Files
gui-video-clipper/chat-summaries/2026-09-22_16-07-about-dialog-reprocess-lowres-summary.md
cottongin 9499d776fd fix: about dialog, cache paths, keyframes, reprocess always uses low-res
- 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>
2026-09-22 16:16:00 -04:00

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 — Replaced AboutMetadataBuilder usage with MenuItemBuilder + PredefinedMenuItem for hide/show/quit. Added .on_menu_event() handler to emit open-about event.
  • src/App.svelte — Added import { listen } from '@tauri-apps/api/event' and a $effect that listens for open-about and 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 — Rewrote reprocessCurrentVideo() to resolve the low-res preview path before triggering processing.

Verification

  • cargo check — 0 errors, 0 warnings
  • cargo test — 58 tests passed
  • svelte-check — 0 errors, 0 warnings
  • ReadLints — No linter errors

Lessons Learned

  • Tauri's .about(Some(metadata)) on SubmenuBuilder always 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 regular MenuItemBuilder with .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 activeVideoPath is a footgun since that gets upgraded to HQ.