docs(11-02): complete frontend scan UI plan
- SUMMARY.md documents per-library progress display and queue-aware cancel dialog - STATE.md updated: plan 2/3, session continuity, new decisions - ROADMAP.md updated: phase 11 progress 2/3 - REQUIREMENTS.md: LSCAN-03 marked complete
This commit is contained in:
@@ -34,7 +34,7 @@ Requirements for v1.1 Multi-Library Support milestone. Each maps to roadmap phas
|
||||
|
||||
- [x] **LSCAN-01**: User can trigger a scan for a specific library (not all-or-nothing)
|
||||
- [x] **LSCAN-02**: Scanning is sequential — only one library scans at a time (SQLite single-writer)
|
||||
- [ ] **LSCAN-03**: Scan progress UI shows which library is being scanned
|
||||
- [x] **LSCAN-03**: Scan progress UI shows which library is being scanned
|
||||
- [x] **LSCAN-04**: Existing scan cancellation and pause/resume work per-library
|
||||
- [x] **LSCAN-05**: Audio files are associated with their library via `library_id` foreign key
|
||||
|
||||
@@ -188,7 +188,7 @@ Which phases cover which requirements. Updated during roadmap creation.
|
||||
| LIB-06 | Phase 12 | Pending |
|
||||
| LSCAN-01 | Phase 11 | Complete |
|
||||
| LSCAN-02 | Phase 11 | Complete |
|
||||
| LSCAN-03 | Phase 11 | Pending |
|
||||
| LSCAN-03 | Phase 11 | Complete |
|
||||
| LSCAN-04 | Phase 11 | Complete |
|
||||
| LSCAN-05 | Phase 10 | Complete |
|
||||
| VIEW-01 | Phase 13 | Pending |
|
||||
|
||||
@@ -76,7 +76,7 @@ Plans:
|
||||
2. Only one library scans at a time — requesting a second scan while one is running either queues it or is rejected with clear feedback
|
||||
3. Scan progress UI identifies which library is currently being scanned (library name visible in progress indicator)
|
||||
4. Existing cancel and pause/resume controls work correctly for per-library scans — cancelling one library's scan doesn't affect others
|
||||
**Plans:** 1/3 plans executed
|
||||
**Plans:** 2/3 plans executed
|
||||
Plans:
|
||||
- [ ] 11-01-PLAN.md — Backend scan queue coordinator, per-library scan methods, CreateAudioFile with library_id
|
||||
- [ ] 11-02-PLAN.md — Frontend progress UI with library name, cancel scope modal, Scan All button
|
||||
@@ -120,7 +120,7 @@ Plans:
|
||||
| 8. Frontend Performance & UX | v1.0 | 4/4 | Complete | 2026-03-05 |
|
||||
| 9. Scan Cancellation & Keyboard Shortcuts | v1.1 | 5/5 | Complete | 2026-03-07 |
|
||||
| 10. Schema & Migration | 2/2 | Complete | 2026-03-09 | - |
|
||||
| 11. Per-Library Scan Pipeline | 1/3 | In Progress| | - |
|
||||
| 11. Per-Library Scan Pipeline | 2/3 | In Progress| | - |
|
||||
| 12. Library CRUD & Data Integrity | v1.1 | 0/? | Not started | - |
|
||||
| 13. Library Views & Phantom Tracks | v1.1 | 0/? | Not started | - |
|
||||
|
||||
|
||||
+14
-11
@@ -3,12 +3,12 @@ gsd_state_version: 1.0
|
||||
milestone: v1.1
|
||||
milestone_name: Multi-Library Support
|
||||
status: unknown
|
||||
last_updated: "2026-03-09T20:03:14Z"
|
||||
last_updated: "2026-03-09T20:11:36Z"
|
||||
progress:
|
||||
total_phases: 2
|
||||
completed_phases: 2
|
||||
total_plans: 8
|
||||
completed_plans: 8
|
||||
total_plans: 9
|
||||
completed_plans: 9
|
||||
---
|
||||
|
||||
# YellowJacket — Project State
|
||||
@@ -23,10 +23,10 @@ See: .planning/PROJECT.md (updated 2026-03-08)
|
||||
## Current Position
|
||||
|
||||
Phase: 11 — Per-Library Scan Pipeline
|
||||
Plan: 1 of 3 in Phase (Plan 01 complete)
|
||||
Status: Phase 11 in progress — 2 plans remaining
|
||||
Plan: 2 of 3 in Phase (Plan 02 complete)
|
||||
Status: Phase 11 in progress — 1 plan remaining
|
||||
Progress: ████████████░░░░░░░░ 2/5 phases complete (Phase 11 in progress)
|
||||
Last activity: 2026-03-09 — Completed 11-01 per-library scan pipeline
|
||||
Last activity: 2026-03-09 — Completed 11-02 frontend scan UI
|
||||
|
||||
### Phase Overview
|
||||
|
||||
@@ -34,7 +34,7 @@ Last activity: 2026-03-09 — Completed 11-01 per-library scan pipeline
|
||||
|-------|--------|
|
||||
| 9. Scan Cancellation & Keyboard Shortcuts | Complete (5/5 plans) ✅ |
|
||||
| 10. Schema & Migration | Complete (2/2 plans) ✅ |
|
||||
| 11. Per-Library Scan Pipeline | In Progress (1/3 plans) |
|
||||
| 11. Per-Library Scan Pipeline | In Progress (2/3 plans) |
|
||||
| 12. Library CRUD & Data Integrity | Not started |
|
||||
| 13. Library Views & Phantom Tracks | Not started |
|
||||
|
||||
@@ -53,6 +53,7 @@ Last activity: 2026-03-09 — Completed 11-01 per-library scan pipeline
|
||||
| Phase 10-01 P01 | 11 min | 2 tasks | 10 files |
|
||||
| Phase 10-02 P02 | 5 min | 2 tasks | 9 files |
|
||||
| Phase 11-01 P01 | 7 min | 2 tasks | 11 files |
|
||||
| Phase 11-02 P02 | 4 min | 2 tasks | 2 files |
|
||||
|
||||
## Accumulated Context
|
||||
|
||||
@@ -100,6 +101,8 @@ Decisions from v1.0 are archived in PROJECT.md Key Decisions table. Key patterns
|
||||
| scanInternal returns *ScanMetrics only | Called from goroutine in scan queue, error return impractical; errors logged + accumulated in Warnings |
|
||||
| Auto worker count per library path | Each library may be on different storage (SSD/HDD), auto-detect per scan |
|
||||
| Backward-compatible Scan() wrapper | Keeps handleConfigUpdate and FullRescan working without changes |
|
||||
| Queue-aware cancel dialog scope choice | Two-option "Cancel This Library / Cancel All" only when queuedCount > 0; single-scan keeps existing pattern |
|
||||
| handleScanComplete defers reset when queue draining | Prevents premature scanning=false before next library starts |
|
||||
|
||||
### Warnings (carry forward)
|
||||
|
||||
@@ -123,9 +126,9 @@ Decisions from v1.0 are archived in PROJECT.md Key Decisions table. Key patterns
|
||||
### Last Session
|
||||
|
||||
**Date:** 2026-03-09
|
||||
**What happened:** Executed Phase 11, Plan 01 — created scan queue coordinator (scan_queue.go), refactored Scan() to scanInternal() with per-library parameters, added ScanLibrary(id)/ScanAllLibraries() Wails bindings, FIFO queue with silent dedup, queue-aware cancel/pause, library_id in CreateAudioFile, library identification in all events.
|
||||
**Where we stopped:** Completed 11-01-PLAN.md
|
||||
**Next action:** Execute Phase 11, Plan 02
|
||||
**What happened:** Executed Phase 11, Plan 02 — updated config-page and library-manager with per-library progress display (library name + queue count), queue-aware cancel dialog with scope choice (Cancel This Library / Cancel All Scanning), Scan All Libraries button in both components.
|
||||
**Where we stopped:** Completed 11-02-PLAN.md
|
||||
**Next action:** Execute Phase 11, Plan 03
|
||||
|
||||
---
|
||||
*State initialized: 2026-02-27*
|
||||
@@ -138,4 +141,4 @@ Decisions from v1.0 are archived in PROJECT.md Key Decisions table. Key patterns
|
||||
| 18 | add multi-column metadata display to playlist-details | 2026-03-08 | ce23177 | [18-add-multi-column-metadata-display-to-pla](./quick/18-add-multi-column-metadata-display-to-pla/) |
|
||||
|
||||
Last activity: 2026-03-08 - Completed quick task 18: add multi-column metadata display to playlist-details
|
||||
*Last updated: 2026-03-09 — Completed 11-01-PLAN.md (Phase 11 complete)*
|
||||
*Last updated: 2026-03-09 — Completed 11-02-PLAN.md*
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
---
|
||||
phase: 11-per-library-scan-pipeline
|
||||
plan: 02
|
||||
subsystem: ui
|
||||
tags: [lit-element, scan-progress, cancel-dialog, per-library, wails-bindings]
|
||||
|
||||
# Dependency graph
|
||||
requires:
|
||||
- phase: 11-per-library-scan-pipeline
|
||||
provides: ScanLibrary, ScanAllLibraries, CancelCurrentScan, CancelAllScans, queue-aware ScanProgress with libraryId/libraryName/queuedCount, LibraryScanQueued/LibraryScanQueueDrained events
|
||||
provides:
|
||||
- Per-library progress display showing library name and queue count in config-page and library-manager
|
||||
- Queue-aware cancel dialog with "Cancel This Library" / "Cancel All Scanning" scope choice
|
||||
- "Scan All Libraries" button in both config-page and library-manager
|
||||
affects: [12-library-crud-data-integrity, 13-library-views-phantom-tracks]
|
||||
|
||||
# Tech tracking
|
||||
tech-stack:
|
||||
added: []
|
||||
patterns:
|
||||
- "Queue-aware cancel dialog: scope choice when queuedCount > 0, single-scan dialog otherwise"
|
||||
- "Library name in progress label: baseLabel + libraryName from ScanProgress"
|
||||
- "Queue draining guard: handleScanComplete defers full reset when queue still has entries"
|
||||
|
||||
key-files:
|
||||
created: []
|
||||
modified:
|
||||
- frontend/src/components/config-page/config-page.ts
|
||||
- frontend/src/components/library-manager/library-manager.ts
|
||||
|
||||
key-decisions:
|
||||
- "Cancel dialog shows two-option scope choice (Cancel This Library / Cancel All) only when queuedCount > 0; single-scan uses existing Keep/Discard/Continue pattern"
|
||||
- "handleScanComplete defers scanning=false when queue has entries, relying on ScanQueueDrained for final reset"
|
||||
- "Wails binding stubs already generated by Plan 01 auto-generation; no manual stubs needed"
|
||||
|
||||
patterns-established:
|
||||
- "Queue-aware cancel dialog: conditional dialog content based on scanQueuedCount > 0"
|
||||
- "Progress library prefix: libraryName from ScanProgress displayed in progress-label"
|
||||
|
||||
requirements-completed: [LSCAN-03, LSCAN-04]
|
||||
|
||||
# Metrics
|
||||
duration: 4min
|
||||
completed: 2026-03-09
|
||||
---
|
||||
|
||||
# Phase 11 Plan 02: Frontend Scan UI Summary
|
||||
|
||||
**Per-library progress display with library name and queue count, queue-aware cancel dialog with scope choice, and Scan All Libraries button in both config-page and library-manager**
|
||||
|
||||
## Performance
|
||||
|
||||
- **Duration:** 4 min
|
||||
- **Started:** 2026-03-09T20:07:11Z
|
||||
- **Completed:** 2026-03-09T20:11:36Z
|
||||
- **Tasks:** 2
|
||||
- **Files modified:** 2
|
||||
|
||||
## Accomplishments
|
||||
- Config-page and library-manager both show "Scanning: [Library Name]" in progress bar during scans
|
||||
- Queue count displayed as "[N] libraries queued" below progress bar when libraries are queued
|
||||
- Cancel dialog in config-page shows "Cancel This Library" / "Cancel All Scanning" scope choice when multiple scans queued
|
||||
- "Scan All Libraries" button added alongside Soft Scan and Full Rescan in both components
|
||||
- ScanProgress interface updated with libraryId, libraryName, queuedCount in both components
|
||||
- Event subscriptions for LibraryScanQueued and LibraryScanQueueDrained properly managed
|
||||
|
||||
## Task Commits
|
||||
|
||||
Each task was committed atomically:
|
||||
|
||||
1. **Task 1: Add Wails binding stubs and update progress/cancel UI in config-page** - `d01591d` (feat)
|
||||
2. **Task 2: Update library-manager component for per-library scan display** - `d61f122` (feat)
|
||||
|
||||
## Files Created/Modified
|
||||
- `frontend/src/components/config-page/config-page.ts` - Updated ScanProgress interface, replaced CancelScan with CancelCurrentScan/CancelAllScans, added queue-aware cancel dialog with scope choice, progress shows library name and queue count, Scan All Libraries button added
|
||||
- `frontend/src/components/library-manager/library-manager.ts` - Updated ScanProgress interface, progress shows library name and queue count, Scan All Libraries button added, queue event subscriptions, scan complete defers reset when queue draining
|
||||
|
||||
## Decisions Made
|
||||
- **Cancel dialog scope choice:** When queuedCount > 0, show "Cancel This Library" (btn-warning) and "Cancel All Scanning" (btn-danger) — no default, user must pick. When queuedCount === 0, keep existing three-option Keep/Discard/Continue pattern but calling CancelCurrentScan instead of deprecated CancelScan.
|
||||
- **Queue drain guard:** handleScanComplete checks scanQueuedCount before resetting scanning=false. If queue has entries, only metrics are updated; full reset waits for LibraryScanQueueDrained event.
|
||||
- **Wails binding stubs already present:** Plan 01's auto-generation already created all needed stubs (ScanLibrary, ScanAllLibraries, CancelCurrentScan, CancelAllScans, GetScanQueueLength, QueuedLibraryNames) — no manual stub additions needed.
|
||||
|
||||
## Deviations from Plan
|
||||
|
||||
### Auto-fixed Issues
|
||||
|
||||
**1. [Rule 3 - Blocking] Unstaged backend files in git index**
|
||||
- **Found during:** Task 2 commit
|
||||
- **Issue:** Backend Go files (app.go, library.go, rescan.go) were staged in the git index from prior work, causing golangci-lint failures in the pre-commit hook on unrelated code
|
||||
- **Fix:** Unstaged the backend files before committing the frontend-only change
|
||||
- **Files modified:** None (git index manipulation only)
|
||||
- **Verification:** Commit succeeded with frontend-typecheck passing
|
||||
- **Committed in:** d61f122 (Task 2 commit)
|
||||
|
||||
---
|
||||
|
||||
**Total deviations:** 1 auto-fixed (1 blocking)
|
||||
**Impact on plan:** Minor git workflow issue, no scope creep.
|
||||
|
||||
## Issues Encountered
|
||||
None
|
||||
|
||||
## User Setup Required
|
||||
None - no external service configuration required.
|
||||
|
||||
## Next Phase Readiness
|
||||
- Per-library scan UI complete — progress identifies library by name, queue count visible, cancel has scope choice
|
||||
- Ready for Phase 11 Plan 03 (if exists) or Phase 12 (Library CRUD & Data Integrity)
|
||||
- Frontend fully wired to backend scan queue API from Plan 01
|
||||
|
||||
---
|
||||
*Phase: 11-per-library-scan-pipeline*
|
||||
*Completed: 2026-03-09*
|
||||
Reference in New Issue
Block a user