diff --git a/docs/superpowers/plans/2026-09-23-v021-polish-and-cut-clip.md b/docs/superpowers/plans/2026-09-23-v021-polish-and-cut-clip.md new file mode 100644 index 0000000..8024d16 --- /dev/null +++ b/docs/superpowers/plans/2026-09-23-v021-polish-and-cut-clip.md @@ -0,0 +1,994 @@ +# v0.2.1 — Polish, Icons, Cut Clip & Shortcuts Reference Implementation Plan + +> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. + +**Goal:** Ship v0.2.1 with Lucide icons, smoother blur animation, cut-clip from Player mode, and a keyboard shortcuts reference in the About dialog. + +**Architecture:** All changes are frontend-only. A new utility function handles quick-clip range calculation. The About dialog gains a tabbed interface. Lucide replaces all emoji/text-glyph icons. CSS pseudo-element fixes the backdrop blur transition. + +**Tech Stack:** Svelte 5, `@lucide/svelte`, Vitest, Tauri v2 + +## Global Constraints + +- Svelte 5 with runes (`$state`, `$derived`, `$effect`, `$props`, `$bindable`) +- `@lucide/svelte` for icons — import from `@lucide/svelte` (tree-shakable named imports) +- All imports at top of file, no inline imports +- Exhaustive switch with `never` check in default case for discriminated unions +- Zero `svelte-check` errors and warnings after every task +- All existing tests must pass after every task (`npm test`) + +--- + +### Task 1: Floating Controls Position Bump + Blur Fix + +**Files:** +- Modify: `src/lib/components/PlayerControls.svelte` (CSS section, lines ~278–302) + +**Interfaces:** +- Consumes: nothing new +- Produces: visual-only changes — no API changes + +- [ ] **Step 1: Raise the controls overlay** + +In `src/lib/components/PlayerControls.svelte`, change `bottom: 48px` to `bottom: 64px` in `.player-controls-overlay`: + +```css +.player-controls-overlay { + position: absolute; + bottom: 64px; + left: 15%; + right: 15%; + pointer-events: none; + opacity: 0; + transition: opacity 0.2s ease 0.1s; + z-index: 20; +} +``` + +- [ ] **Step 2: Move blur to ::before pseudo-element** + +Remove `background` and `backdrop-filter` from `.player-controls-panel`. Add `position: relative` and a `::before` pseudo-element that handles the blur background. The pseudo-element's opacity is driven by the `.visible` class on the ancestor overlay. + +Replace the `.player-controls-panel` rule (currently around lines 294–302): + +```css +.player-controls-panel { + pointer-events: auto; + position: relative; + border-radius: 12px; + padding: 12px 16px; + display: flex; + flex-direction: column; + gap: 8px; +} + +.player-controls-panel::before { + content: ''; + position: absolute; + inset: 0; + background: rgba(0, 0, 0, 0.75); + backdrop-filter: blur(20px); + -webkit-backdrop-filter: blur(20px); + border-radius: 12px; + z-index: -1; + opacity: 0; + transition: opacity 0.25s ease; +} + +.player-controls-overlay.visible .player-controls-panel::before { + opacity: 1; +} +``` + +- [ ] **Step 3: Verify** + +Run: +```bash +npx svelte-check --tsconfig ./tsconfig.json +npm test +``` +Expected: 0 errors, 0 warnings, all tests pass. + +- [ ] **Step 4: Commit** + +```bash +git add src/lib/components/PlayerControls.svelte +git commit -m "fix: raise controls to 64px, smooth blur via ::before pseudo-element" +``` + +--- + +### Task 2: Lucide Icon Migration + +**Files:** +- Modify: `src/lib/components/PlayerControls.svelte` (script + template) +- Modify: `src/lib/components/TransportControls.svelte` (script + template) +- Modify: `src/App.svelte` (toolbar buttons) + +**Interfaces:** +- Consumes: nothing new +- Produces: visual-only changes — all props/events unchanged + +- [ ] **Step 1: Install @lucide/svelte** + +```bash +npm install @lucide/svelte +``` + +- [ ] **Step 2: Replace icons in PlayerControls.svelte** + +Add Lucide imports at the top of the ` + +
+ + +``` + +- [ ] **Step 4: Run tests to verify they pass** + +Run: +```bash +npx vitest run tests/lib/components/AboutDialog.test.ts +``` +Expected: 5 tests pass. + +- [ ] **Step 5: Run full verification** + +Run: +```bash +npx svelte-check --tsconfig ./tsconfig.json +npm test +``` +Expected: 0 errors, 0 warnings, all tests pass. + +- [ ] **Step 6: Commit** + +```bash +git add src/lib/components/AboutDialog.svelte tests/lib/components/AboutDialog.test.ts +git commit -m "feat: tabbed About dialog with keyboard shortcuts reference" +```