- Replace native macOS About menu with custom Svelte dialog via Tauri event - Inline SVG icon in AboutDialog (fixes broken image in webview) - Align cache directory with Tauri $APPDATA, add to asset protocol scope - Fix ffprobe 8.x keyframe parsing (skip_frame nokey, flexible parser) - Copy caption files into cache dir when outside cache path - Add -y flag to ffmpeg thumbnail extraction (prevent hang on re-extract) - Reprocess always uses preview (low-res) file, never HQ export - Prefer cached preview file for analysis even when HQ is cached - Guard upgrade toast when already on HQ Co-authored-by: Cursor <cursoragent@cursor.com>
3.4 KiB
Fix Post-v0.1.2 Issues
Date: 2026-09-22 15:48 Task: Fix broken keyframe detection, missing cached captions, and About dialog version duplication
Changes Made
Issue 1: Keyframe buttons always greyed out
Root cause: ffprobe 8.x no longer populates the flags field. The parser in keyframe_index.rs expected 3-column CSV output (media_type,pts_time,flags) and checked parts[2].contains('K'). With ffprobe 8.0.1, the output was just timestamps (flags absent), so the parser's parts.len() >= 3 check failed on every line, always returning [].
Confirmed locally: ffprobe -show_entries frame=pts_time,flags -of csv=p=0 -skip_frame nokey produces:
0.000000,
1.000000
Fix in src-tauri/src/services/keyframe_index.rs:
- Changed ffprobe command to only request
frame=pts_time(droppedflagssince-skip_frame nokeyalready filters to keyframes) - Rewrote
parse_ffprobe_outputto handle: (a) new format: plain timestamp per line with optional trailing comma, (b) legacy format:section,pts_time[,flags] - Updated all tests — 5 tests covering new format, legacy with flags, legacy with section prefix, empty, and whitespace
Issue 2: Captions not cached or loaded from cache
Root cause: In save_analysis_to_cache (cache.rs), caption paths were relativized via strip_prefix(&cache_dir). But captions live outside the cache dir (e.g. /tmp/video-clipper/subtitles/embedded.vtt), so strip_prefix always failed and relative_caption was None. Captions were never saved to the manifest.
Fix (2 files):
src-tauri/src/commands/cache.rs: Whenstrip_prefixfails, copy the caption file intocache_dir/captions/and store the relative path.src/lib/stores/videoSession.svelte.ts: In the cache-hit path oftriggerPostDownloadProcessing, ifcaptionFilePathis null (old caches without captions), fall back toloadCaptionsWithCache(filePath)for re-extraction.
Issue 3: About dialog shows "v0.1.2 (0.1.2)"
Root cause: The native macOS About dialog shows "Version {CFBundleShortVersionString} ({CFBundleVersion})". Tauri sets both from the same version field, producing "Version 0.1.2 (0.1.2)".
Fix in src-tauri/src/lib.rs: Created a custom macOS app menu with AboutMetadataBuilder that only sets short_version (no build number). Also provides standard Edit menu (undo/redo/cut/copy/paste/select-all). Version is read at compile time via env!("CARGO_PKG_VERSION").
Files Changed
src-tauri/src/services/keyframe_index.rs— Fix 1: ffprobe command + parser + testssrc-tauri/src/commands/cache.rs— Fix 2: copy captions into cache dirsrc/lib/stores/videoSession.svelte.ts— Fix 2: caption fallback on cache hitsrc-tauri/src/lib.rs— Fix 3: custom macOS menu
Verification
cargo check: 0 warnings, 0 errorscargo test: 58 passed, 0 failedsvelte-check: 0 errors, 0 warningsReadLints: no issues
Lessons Learned
- ffprobe output format can change across major versions. The
flagsfield was silently dropped in ffprobe 8.x. Always test against the actual binary on the target system. - When caching file references, files outside the cache directory need to be copied in —
strip_prefixsilently returnsNoneon failure via.ok(), making the bug invisible. - Native macOS About dialogs auto-format version info as "Version X (Build Y)". When both values are identical, it looks like a bug. Use
AboutMetadataBuilderto control this.