- 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.1 KiB
Fix About Dialog & Reprocess Always Uses Low-Res
Date: 2026-09-22 16:07
Task: Fix native About dialog duplication/icon + force reprocessing to always use low-res preview file
Issues Addressed
1. Native About Dialog Still Showing (Duplicate Version)
Problem: The macOS menu "About" item still opened the native About panel (which shows duplicate version strings "v0.1.2 (0.1.2)") instead of the custom Svelte AboutDialog.
Fix: Replaced the AboutMetadataBuilder-based .about() menu item with a custom MenuItemBuilder that emits a Tauri event (open-about). The frontend listens for this event via listen('open-about', ...) in App.svelte and toggles showAboutDialog = true.
Files changed:
src-tauri/src/lib.rs— ReplacedAboutMetadataBuilderusage withMenuItemBuilder+PredefinedMenuItemfor hide/show/quit. Added.on_menu_event()handler to emitopen-aboutevent.src/App.svelte— Addedimport { listen } from '@tauri-apps/api/event'and a$effectthat listens foropen-aboutand opens the custom dialog.
2. Broken Icon in About Dialog
Problem: The <img src="/favicon.svg"> tag failed to load in the Tauri webview, showing a broken image placeholder.
Fix: Inlined the SVG directly into the AboutDialog.svelte component, eliminating the external file reference. Added rx="90" to the background rect for rounded-corner macOS icon styling.
Files changed:
src/lib/components/AboutDialog.svelte— Replaced<img>tag with inline<svg>.
3. Reprocessing Uses Full-Resolution File (Performance)
Problem: reprocessCurrentVideo() used session.activeVideoPath which points to the HQ export file after upgrade. All ffmpeg analysis (waveform, keyframes, thumbnails) on the full-res file takes minutes instead of seconds.
Fix: reprocessCurrentVideo() now explicitly prefers session.previewFilePath for processing. If that equals the export file (or is null), it falls back to checking the disk cache for a low-res preview via checkCachedDownload(title, 'preview'). Only uses activeVideoPath as a last resort.
Files changed:
src/lib/stores/videoSession.svelte.ts— RewrotereprocessCurrentVideo()to resolve the low-res preview path before triggering processing.
Verification
cargo check— 0 errors, 0 warningscargo test— 58 tests passedsvelte-check— 0 errors, 0 warningsReadLints— No linter errors
Lessons Learned
- Tauri's
.about(Some(metadata))onSubmenuBuilderalways creates the native macOS About panel — there is no way to redirect it to a custom webview dialog. To intercept "About", you must use a regularMenuItemBuilderwith.on_menu_event(). - Inline SVGs in Svelte components are more reliable than
<img src="...">references in Tauri webviews, where path resolution can differ between dev and production builds. - When a session tracks both a preview and export file path, any function that runs ffmpeg analysis must explicitly resolve which path to use — defaulting to
activeVideoPathis a footgun since that gets upgraded to HQ.