v0.1.1: fix .app bundle PATH for pyenv/nvm, detect yt-dlp pot-provider plugin

- 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>
This commit is contained in:
2026-09-22 14:09:23 -04:00
parent 1ea7f19668
commit d46973a719
10 changed files with 1001 additions and 17 deletions

View File

@@ -0,0 +1,62 @@
# 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/node` as dev dependency
- Added `"types": ["node"]` to `tsconfig.json`
- Changed `defineConfig` import in `vite.config.ts` from `vite` to `vitest/config` (extends config type with `test` property)
- 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)` to `markInPoint(12)` in clips.test.ts
- Time 5 was outside `EDIT_TOLERANCE` (0.5s) of clip boundary (10-20), so `isTimeInsideClip` returned 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 to `dist/release/`
- Changed `tauri.conf.json` bundle 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 warnings
- `npm test`: 31/31 pass
- `cargo build`: 0 warnings
- `npm 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 from `npx tauri build` output rather than hardcoding the expected location.
- **Svelte a11y linter strictness**: `role="separator"` with keyboard support still triggers `a11y_no_noninteractive_element_interactions`. Using `role="slider"` satisfies the linter for resize handles.
- **Dialog overlay keyboard patterns**: Adding `onkeydown` + `tabindex="-1"` to overlays and `e.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.0` to include these cleanup commits, or tag as `v0.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)