- fix_path_env() now adds ~/.pyenv/shims (with PYENV_ROOT) before Homebrew paths so pyenv-managed yt-dlp (with pip-installed plugins) takes priority over Homebrew's bare yt-dlp binary - Also handles ~/.nvm, ~/.deno/bin, ~/.cargo/bin for broader coverage - check_pot_plugin uses lightweight 'yt-dlp -v' instead of network simulation for reliable plugin detection - Bump version to 0.1.1 Co-authored-by: Cursor <cursoragent@cursor.com>
3.8 KiB
3.8 KiB
Build Cleanup & Release Packaging
Date: 2026-09-22 13:39 Commits: 4bf6545..1ea7f19 (5 commits)
Task Description
Resolved all build warnings/errors across the frontend (svelte-check, Vite) and backend (cargo), fixed a failing test, and implemented a release build script that produces a distributable GUI Video Clipper.app bundle.
Changes Made
Task 1: TypeScript Error Fixes (3eebe01)
- Installed
@types/nodeas dev dependency - Added
"types": ["node"]totsconfig.json - Changed
defineConfigimport invite.config.tsfromvitetovitest/config(extends config type withtestproperty) - Result: 4 TS errors → 0
Task 2: Svelte A11y Warning Fixes (9d1f1cf)
- CaptionSettingsPanel.svelte: 9 label/control association fixes (id/for pairs and wrapping)
- ClipList.svelte: Added
tabindex="0"and keyboard handler to listbox container - PreferencesPanel.svelte, ExportDialog.svelte, AboutDialog.svelte: Added
tabindex="-1"to dialog divs, keyboard handlers on overlays - VideoPlayer.svelte: Added
<track kind="captions" />to<video>element - App.svelte: Added keyboard support to resize handle (
role="slider", arrow keys, aria-value attrs) - Result: 19 a11y warnings → 0
Task 3: Rust Dead Code Annotations (d85fbda)
- Added
#[allow(dead_code)]with comments on 6 items across 4 files:ExportEvent::Error,DownloadEvent::Error(reserved for future use)sanitize_vtt_for_ffmpeg,opacity_to_ass_back_colour,caption_style_to_force_style(caption burn-in pipeline)SubtitleFormat.ext/.url(serde deserialization fields)
- Result: 6 warnings → 0
Task 4: Test Fix (30b04b4)
- Changed
markInPoint(5)tomarkInPoint(12)in clips.test.ts - Time 5 was outside
EDIT_TOLERANCE(0.5s) of clip boundary (10-20), soisTimeInsideClipreturned false and the edit path didn't execute - Result: 1 failing test → 31/31 pass
Task 5: Release Build Script (1ea7f19)
- Created
scripts/build-release.sh: builds, ad-hoc signs, copies todist/release/ - Changed
tauri.conf.jsonbundle targets from"all"to["app", "dmg"] - Added
dist/to.gitignore - Added
"release"npm script - Updated README with Release Build section
- Script parses tauri build output for .app/.dmg paths (handles custom CARGO_TARGET_DIR)
- Result:
npm run release→GUI Video Clipper.app(6.2M) +.dmg(2.8M)
Verification Results
npm run check: 0 errors, 0 warningsnpm test: 31/31 passcargo build: 0 warningsnpm run release: produces signed .app + .dmg
Lessons Learned
- Cursor sandbox CARGO_TARGET_DIR: The Tauri build outputs to a sandboxed cache directory, not
src-tauri/target/. The build script must parse the actual output paths fromnpx tauri buildoutput rather than hardcoding the expected location. - Svelte a11y linter strictness:
role="separator"with keyboard support still triggersa11y_no_noninteractive_element_interactions. Usingrole="slider"satisfies the linter for resize handles. - Dialog overlay keyboard patterns: Adding
onkeydown+tabindex="-1"to overlays ande.stopPropagation()to inner dialogs satisfies the click-needs-keyboard-equivalent rule, but the stopPropagation means Escape from inside the dialog won't bubble to the overlay handler. Not a regression since dialogs previously had no keyboard close. - Test EDIT_TOLERANCE awareness: When testing functions that use proximity checks (
isTimeInsideClip), test values must account for tolerance thresholds. Values outside tolerance trigger different code paths.
Follow-up Items
- Push new commits to remote:
git push origin master - Consider re-tagging
v0.1.0to include these cleanup commits, or tag asv0.1.1 - Dialog Escape-from-inside behavior could be improved in a future pass (add Escape handler on the dialog div itself, not just the overlay)