Skip to content

fix(desktop): use resolve_command for ffmpeg discovery in sandboxed app#568

Merged
wesbillman merged 2 commits into
mainfrom
fix/ffmpeg-resolve-command
May 13, 2026
Merged

fix(desktop): use resolve_command for ffmpeg discovery in sandboxed app#568
wesbillman merged 2 commits into
mainfrom
fix/ffmpeg-resolve-command

Conversation

@wesbillman
Copy link
Copy Markdown
Collaborator

Summary

  • Users with brew-installed ffmpeg get "not found" errors because the sandboxed .app bundle doesn't inherit their shell PATH
  • Replaced naive Command::new("ffmpeg") PATH lookup in media.rs with resolve_command("ffmpeg", None) from the existing discovery module
  • resolve_command searches login shell PATH, /opt/homebrew/bin, /usr/local/bin, and other common locations — the same chain used for managed agent binaries
  • find_ffmpeg() now returns a PathBuf that threads through transcode_to_mp4() and extract_poster_frame(), resolving once per upload

Test plan

  • Install ffmpeg via brew, verify video upload works in dev build
  • Uninstall ffmpeg, verify clear "not found" error message appears
  • Test from packaged .app (DMG install) with brew ffmpeg — this is the primary fix scenario

Review notes

  • Beth approved with no BLOCKs. Awareness items: resolve_command checks workspace target/ dirs before PATH (irrelevant in .app context) and uses .exists() without executable check (the -version safety net catches non-executable files)
  • Summer confirmed structural cleanliness, applied rustfmt formatting fixes only

🤖 Generated with Claude Code

wesbillman and others added 2 commits May 12, 2026 16:21
Users with brew-installed ffmpeg get "not found" errors because the
sandboxed .app bundle doesn't inherit shell PATH. Replace naive
Command::new("ffmpeg") with resolve_command() from the discovery module,
which searches login shell PATH, /opt/homebrew/bin, /usr/local/bin, and
other common locations — the same chain used for managed agent binaries.

find_ffmpeg() now returns a PathBuf that threads through
transcode_to_mp4() and extract_poster_frame(), resolving once per upload.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The resolve_command migration added 9 net lines for proper ffmpeg
discovery in sandboxed app context. Bump the guard rail to accommodate.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@wesbillman wesbillman merged commit 8716aef into main May 13, 2026
15 checks passed
@wesbillman wesbillman deleted the fix/ffmpeg-resolve-command branch May 13, 2026 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant