165 lines
6.2 KiB
Markdown
165 lines
6.2 KiB
Markdown
---
|
|
phase: 09-scan-cancellation-keyboard-shortcuts
|
|
plan: 05
|
|
type: execute
|
|
wave: 3
|
|
depends_on:
|
|
- 09-01
|
|
- 09-02
|
|
- 09-03
|
|
- 09-04
|
|
files_modified: []
|
|
autonomous: false
|
|
requirements:
|
|
- SCAN-01
|
|
- SCAN-02
|
|
- SCAN-03
|
|
- KEY-01
|
|
- KEY-02
|
|
- KEY-03
|
|
- KEY-04
|
|
- KEY-05
|
|
|
|
must_haves:
|
|
truths:
|
|
- "User can start a scan, pause it, resume it, and cancel it — all via buttons in the settings page"
|
|
- "Cancelled scan does not corrupt the database or delete unvisited files"
|
|
- "Default keyboard shortcuts work immediately — Space, arrows, S, R, Q, M, N, P, /, Ctrl+F"
|
|
- "Shortcuts are suppressed when typing in search box (except Escape)"
|
|
- "User can rebind any shortcut via record-style capture in settings"
|
|
- "Shortcut conflicts are detected and warned about"
|
|
- "Shortcut bindings persist across app restart"
|
|
artifacts: []
|
|
key_links: []
|
|
---
|
|
|
|
<objective>
|
|
Verify all Phase 9 features work together end-to-end — scan control and keyboard shortcuts.
|
|
|
|
Purpose: Catch integration issues before marking the phase complete.
|
|
Output: Verification results and any integration fixes needed.
|
|
</objective>
|
|
|
|
<execution_context>
|
|
@/home/caleb/.config/opencode/get-shit-done/workflows/execute-plan.md
|
|
@/home/caleb/.config/opencode/get-shit-done/templates/summary.md
|
|
</execution_context>
|
|
|
|
<context>
|
|
@.planning/PROJECT.md
|
|
@.planning/ROADMAP.md
|
|
@.planning/STATE.md
|
|
@.planning/phases/09-scan-cancellation-keyboard-shortcuts/09-01-SUMMARY.md
|
|
@.planning/phases/09-scan-cancellation-keyboard-shortcuts/09-02-SUMMARY.md
|
|
@.planning/phases/09-scan-cancellation-keyboard-shortcuts/09-03-SUMMARY.md
|
|
@.planning/phases/09-scan-cancellation-keyboard-shortcuts/09-04-SUMMARY.md
|
|
</context>
|
|
|
|
<tasks>
|
|
|
|
<task type="auto">
|
|
<name>Task 1: Build verification and automated checks</name>
|
|
<files></files>
|
|
<action>
|
|
1. Run the full build to verify everything compiles:
|
|
```bash
|
|
cd backend && go build ./...
|
|
cd ../frontend && npx tsc --noEmit
|
|
```
|
|
|
|
2. Run existing tests to verify no regressions:
|
|
```bash
|
|
cd backend && go test ./... -count=1 -timeout 120s
|
|
```
|
|
|
|
3. Run go vet on all packages:
|
|
```bash
|
|
cd backend && go vet ./...
|
|
```
|
|
|
|
4. Verify event sync is up to date:
|
|
```bash
|
|
cd backend && go generate ./events/...
|
|
git diff --exit-code frontend/src/events.ts
|
|
```
|
|
|
|
5. Verify the new scan control methods are Wails-bindable (exported, on a bound struct):
|
|
```bash
|
|
grep -n "func (l \*Library) CancelScan\|func (l \*Library) PauseScan\|func (l \*Library) ResumeScan\|func (l \*Library) IsScanActive\|func (l \*Library) IsScanPaused" backend/library/scan_control.go
|
|
```
|
|
|
|
6. Verify shortcuts config is accessible:
|
|
```bash
|
|
grep -n "func (c \*Config) GetShortcuts\|func (c \*Config) SetShortcut" backend/config/config.go
|
|
```
|
|
|
|
7. Fix any issues found.
|
|
</action>
|
|
<verify>
|
|
<automated>cd backend && go build ./... && go vet ./... && go test ./... -count=1 -timeout 120s 2>&1 | tail -20</automated>
|
|
</verify>
|
|
<done>Full backend + frontend build passes, all existing tests pass, no regressions.</done>
|
|
</task>
|
|
|
|
<task type="checkpoint:human-verify" gate="blocking">
|
|
<name>Task 2: Human verification of all Phase 9 features</name>
|
|
<action>Verify all scan control and keyboard shortcut features work end-to-end.</action>
|
|
<verify>Human confirms all 23 verification steps pass.</verify>
|
|
<done>All Phase 9 requirements verified: SCAN-01/02/03 and KEY-01/02/03/04/05.</done>
|
|
<what-built>
|
|
Complete scan cancellation and keyboard shortcuts features:
|
|
1. Backend: CancelScan/PauseScan/ResumeScan methods with per-scan context and channel-based pause
|
|
2. Frontend scan UI: Pause/Resume/Cancel buttons during scan, cancel confirmation dialog
|
|
3. Keyboard shortcuts: 16 default bindings (Space, arrows, S/R/Q/M/N/P, /, Ctrl+F, Ctrl+A, Enter, Delete)
|
|
4. Keyboard shortcut settings: Record-style key capture, conflict detection, grouped by category, reset to defaults
|
|
5. Config persistence: Shortcuts saved to TOML config file
|
|
</what-built>
|
|
<how-to-verify>
|
|
**Scan Control (Settings > Library):**
|
|
1. Open Settings, configure a library directory with many audio files
|
|
2. Click "Soft Scan" — verify Pause and Cancel buttons appear, progress shows
|
|
3. Click "Pause" — verify status says "Scan paused.", button changes to "Resume"
|
|
4. Click "Resume" — verify scan continues from where it left off
|
|
5. Start another scan, click "Cancel Scan" — verify confirmation dialog appears showing track count
|
|
6. Click "Keep X tracks" — verify scan stops, tracks remain in library
|
|
7. Start another scan, cancel, click "Discard" — verify scan stops with discard message
|
|
|
|
**Keyboard Shortcuts:**
|
|
8. Without any text input focused, press Space — verify play/pause toggles
|
|
9. Press Up/Down arrows — verify volume changes
|
|
10. Press Left/Right arrows — verify seeking (if a track is playing)
|
|
11. Press S — verify shuffle toggles
|
|
12. Press R — verify repeat mode cycles
|
|
13. Press Q — verify queue panel toggles
|
|
14. Press / or Ctrl+F — verify search box gets focus
|
|
15. Click inside the search box, type — verify shortcuts do NOT fire while typing
|
|
16. Press Escape while in search box — verify search box blurs and shortcuts resume
|
|
|
|
**Shortcut Settings (Settings > Keyboard Shortcuts):**
|
|
17. Scroll to Keyboard Shortcuts section — verify shortcuts grouped by Player, Navigation, App
|
|
18. Click on a shortcut's key badge (e.g., Space for Play/Pause) — verify it enters "Press a key combo..." mode
|
|
19. Press a new key — verify the binding updates
|
|
20. Try binding a key that's already used — verify conflict warning appears
|
|
21. Click "Overwrite" — verify old binding is cleared and new one is set
|
|
22. Click "Reset All to Defaults" — verify all shortcuts return to defaults
|
|
23. Restart the app — verify custom bindings persist
|
|
</how-to-verify>
|
|
<resume-signal>Type "approved" or describe any issues found</resume-signal>
|
|
</task>
|
|
|
|
</tasks>
|
|
|
|
<verification>
|
|
Full build passes. All existing tests pass. Human verification covers all 8 requirement IDs.
|
|
</verification>
|
|
|
|
<success_criteria>
|
|
- `go build ./...` and `npx tsc --noEmit` pass
|
|
- `go test ./...` passes with no regressions
|
|
- All 23 manual verification steps confirmed by user
|
|
</success_criteria>
|
|
|
|
<output>
|
|
After completion, create `.planning/phases/09-scan-cancellation-keyboard-shortcuts/09-05-SUMMARY.md`
|
|
</output>
|