Commit Graph
612 Commits
Author SHA1 Message Date
yonlu d789c0b68e docs(19): create phase plan for WAV tag writer 2026-03-18 20:37:24 -04:00
yonlu c5184fed79 docs(19): research phase domain 2026-03-18 20:33:37 -04:00
yonlu 75e49a839e docs(19): capture phase context 2026-03-18 19:56:59 -04:00
yonlu 5d37eb3a2a docs: create milestone v1.2.1 roadmap (3 phases) 2026-03-18 16:30:15 -04:00
yonlu 6b4adf8690 docs: define milestone v1.2.1 requirements 2026-03-18 15:01:12 -04:00
yonlu 279501f972 docs: complete project research for v1.2.1 Format Parity 2026-03-18 14:33:42 -04:00
yonlu 664de001ed docs: start milestone v1.2.1 Format Parity 2026-03-18 14:20:55 -04:00
yonlu 2256f8f329 chore: complete v1.2 Tag Editing milestone
Archive v1.2 milestone: ROADMAP + REQUIREMENTS + phases to milestones/.
Evolve PROJECT.md with v1.2 validated requirements and key decisions.
Update RETROSPECTIVE.md with v1.2 lessons and cross-milestone trends.
Clean STATE.md for next milestone.
2026-03-18 14:07:28 -04:00
yonlu e37535b115 docs(phase-18): complete phase execution 2026-03-18 13:57:00 -04:00
yonlu 77dec0bceb docs(18-02): complete batch edit UI plan
- SUMMARY.md with task commits, deviations, and self-check
- STATE.md updated: Phase 18 complete, all BATCH requirements fulfilled
- ROADMAP.md updated: 2/2 plans complete for Phase 18
- REQUIREMENTS.md updated: BATCH-02 and BATCH-04 marked complete
2026-03-18 13:53:53 -04:00
yonlu d430ad884b fix(18-02): add field labels to all track-details states (single/batch, read/edit) 2026-03-18 13:40:11 -04:00
yonlu 9df2d6764a fix(18-02): add field labels above title/artist/album inputs in batch edit mode 2026-03-18 13:32:08 -04:00
yonlu 5f21804b20 docs(18-02): update STATE.md for checkpoint pause at task 3 2026-03-18 13:14:53 -04:00
yonlu 656985add9 feat(18-02): wire batch track-details to all 4 view context menus
- track-list: branch on selection count, resolve tracks from this.tracks
- cover-grid: branch on selection count, resolve from expandedTracks
- queue-panel: branch on indices count, resolve via libraryStore.getCachedTracks
- playlist-details: branch on selection count, resolve via libraryStore
- Each view determines coverArt/coverArtMixed state and calls showBatch()
2026-03-18 13:14:02 -04:00
yonlu 6dab32b36b feat(18-02): add batch edit mode to track-details component
- showBatch() API for multi-track entry with merged field values
- Three-state field model: keep/set/clear via dirty tracking in editValues
- Confirmation dialog showing field changes before batch save
- Progress bar with live counter wired to BatchWriteProgress events
- Cancel button calling CancelBatchWrite during batch write
- Results view with success/failure counts and expandable failure details
- Batch cover art: pick, preview, or clear for all selected tracks
- Post-save data refresh returning to updated summary view
- Single-track show() path unchanged (batchMode = false)
2026-03-18 13:11:36 -04:00
yonlu 92f6353fa6 docs(18-01): complete batch write backend plan
- SUMMARY.md with BatchWriteTrackTags implementation details
- STATE.md updated with Phase 18 position and decisions
- ROADMAP.md progress updated (1/2 plans)
- REQUIREMENTS.md: BATCH-01, BATCH-03 marked complete
2026-03-18 13:04:54 -04:00
yonlu f557ffd652 feat(18-01): add BatchWriteTrackTags with progress, cancellation, and partial failure
- Add BatchFailure and BatchResult types for structured batch outcomes
- Add cancelBatch channel and suppressEvents flag to TagWriter struct
- Add CancelBatchWrite method for mid-batch cancellation from frontend
- Add BatchWriteTrackTags method processing tracks sequentially
- Emit BatchWriteProgress event per-track with current/total/succeeded/failed
- Suppress per-track TrackMetadataChanged; emit single event after batch
- Wails bindings auto-generated for BatchWriteTrackTags and CancelBatchWrite
- tagwriter namespace with BatchResult/BatchFailure in models.ts
2026-03-18 13:02:30 -04:00
yonlu 3dba0e143c feat(18-01): add BatchWriteProgress event constant
- Add BatchWriteProgress to tag writing events const block in events.go
- Regenerate frontend/src/events.ts via genevents codegen tool
2026-03-18 13:00:05 -04:00
yonlu 78f0d89331 docs(18): create phase plan — 2 plans in 2 waves for batch edit 2026-03-18 12:33:27 -04:00
yonlu 33ee843d77 docs(18): create phase plan 2026-03-18 12:30:36 -04:00
yonlu 255b8db375 docs(18): capture phase context 2026-03-18 11:44:31 -04:00
yonlu 4e79e1bb16 docs(phase-17): complete phase execution 2026-03-18 11:25:32 -04:00
yonlu b0976c9217 docs(17-02): complete track details save flow & cover art editing plan
- SUMMARY.md with 5 commits (1 feat + 4 fixes during verification)
- STATE.md updated: Phase 17 complete, decisions added
- ROADMAP.md updated: Phase 17 2/2 Complete
- REQUIREMENTS.md updated: EDIT-02, EDIT-03, EDIT-04 all complete
2026-03-18 11:21:46 -04:00
yonlu 8cd4914842 fix(17-02): refresh cover art URLs after save
After a successful save, re-fetch albums alongside tracks and re-resolve
cover art URLs from the updated album data. Previously the dialog only
refreshed this.track but kept stale this.coverArt URLs pointing to the
old content-hash files, causing the image to revert until reopen.
2026-03-18 10:54:17 -04:00
yonlu d7c2965752 fix(17-02): fix cover art replace and remove
Three issues fixed:

1. asBytes() helper for []interface{} → []byte conversion — same
   float64 deserialization issue as numeric fields. Cover art data
   from the frontend arrives as []interface{} of float64, not []byte.

2. DB sync for cover art — was a placeholder no-op. Now saves image
   to covers cache dir (content-hash dedup + thumbnail generation),
   upserts cover_art row, and updates release_groups.cover_art_id.
   Clear sets cover_art_id to NULL on linked release groups.

3. Frontend ReadFile returns base64 string (Go []byte JSON encoding),
   not number[]. Decode with atob() before creating Uint8Array for
   preview blob URL.
2026-03-18 10:36:17 -04:00
yonlu 900db2e56c fix(17-02): handle float64 numeric values from Wails JSON deserialization
Wails deserializes JSON numbers from JavaScript as float64, not int.
All .(int) type assertions on year, track_number, and disc_number
silently failed. Add asInt() helper, replace all assertions.
2026-03-18 07:46:29 -04:00
yonlu ffcdc41b0d fix(17-02): refresh track-details dialog data after successful save
After saveEdit() succeeds, re-fetch tracks from library store and update
this.track with the fresh data so the dialog shows updated values instead
of the stale snapshot passed via show().
2026-03-18 01:23:34 -04:00
yonlu 265a9ea8ce feat(17-02): implement save flow, cover art editing, and error handling
- Wire saveEdit() to WriteTrackTagsByPath with diff-only TagChanges map
- Add cover art selection via ImageFilePicker with instant blob preview
- Add cover art removal (× button) with clearCoverArt state
- Show saving indicator and disable buttons during save
- Display errors inline in action bar; edit mode stays active on error
- Add ReadFile Go method on FrontendUtil to read cover art bytes
- Add Wails binding for ReadFile
- Clean up all edit state (editValues, pendingCoverArt, errorMessage) on close/cancel
2026-03-17 21:20:01 -04:00
yonlu b776f3acb9 docs(17-01): complete backend bridge & frontend plumbing plan
- Created 17-01-SUMMARY.md
- Updated STATE.md with position, decisions, metrics
- Updated ROADMAP.md with plan progress
- Marked EDIT-01 and EDIT-04 complete in REQUIREMENTS.md
2026-03-17 21:07:19 -04:00
yonlu fc5cf70e4c feat(17-01): add TrackMetadataChanged handler and remove selection gate on Track Details
- LibraryStore now listens for TrackMetadataChanged and invalidates all caches
- Track Details context menu item visible for any right-clicked track in all 4 views
- Removed selectionCount === 1 gate from track-list, queue-panel, cover-grid, playlist-details
2026-03-17 21:04:57 -04:00
yonlu 4235b4a4d5 feat(17-01): add WriteTrackTagsByPath and ImageFilePicker backend methods
- WriteTrackTagsByPath resolves filePath to trackID via GetAudioFileByPath
- ImageFilePicker opens native file dialog filtered to JPEG/PNG
- Added Wails TypeScript bindings for both new methods
2026-03-17 21:03:17 -04:00
yonlu 290f236a1b docs(17): fix files_modified in 17-02-PLAN 2026-03-17 18:37:14 -04:00
yonlu 4f7c800fb6 docs(17): create phase plan for single track edit 2026-03-17 18:35:28 -04:00
yonlu 9951a362ea docs(17): capture phase context 2026-03-17 18:25:13 -04:00
yonlu 4dc8724d03 docs(phase-16): complete phase execution 2026-03-17 11:02:48 -04:00
yonlu bdbcd54e92 docs(16-03): complete WriteTrackTags pipeline plan
- SUMMARY.md with pipeline architecture, 5 tests, 7 files
- STATE.md: Phase 16 complete (3/3), decisions, session
- ROADMAP.md: Phase 16 marked complete
- REQUIREMENTS.md: SYNC-01/02/03/04 and WRITE-06 marked complete
2026-03-17 10:58:13 -04:00
yonlu 64322f9353 feat(16-03): WriteTrackTags pipeline with player safety, scan mutex, events, and app wiring
- TagWriter struct with WriteTrackTags entry point orchestrating full pipeline
- PlayerStopper interface + playerAdapter for import-cycle-free player safety
- PipelineLocker interface + pipelineMu on Library for scan/write mutual exclusion
- TrackMetadataChanged event constant + auto-generated TypeScript events
- TagWriter wired into app.go as Wails binding with SetContext in OnStartup
- 5 pipeline integration tests: player safety, scan mutex, orphan cleanup, genre relink, full DB sync
- Lint fixes: static error, else-if, wsl cuddle, golines
2026-03-17 10:55:10 -04:00
yonlu 2966079625 feat(16-03): implement DB sync module for tag write pipeline
- syncDatabase runs entity relink + FTS5 + orphan cleanup in single tx
- Handles artist, album, genre changes with upsert-and-relink pattern
- FTS5 delete + insert within transaction for search index consistency
- Orphan cleanup for artist_credits, release_groups, and genres
- All hand-crafted SQL has SAFETY comments per codebase convention
2026-03-17 10:48:03 -04:00
yonlu 6cfb991602 docs(16-01): complete tagwriter foundation + MP3 writer plan
- Create 16-01-SUMMARY.md with execution results
- Update STATE.md with Plan 01 progress and decisions
- Update ROADMAP.md plan progress (2/3 plans complete)
- Mark WRITE-01 requirement complete
2026-03-17 10:44:10 -04:00
yonlu 6bd65a6f43 docs(16-02): complete FLAC tag writer plan
- Create 16-02-SUMMARY.md with execution results
- Update STATE.md with Phase 16 progress and decisions
- Update ROADMAP.md plan progress
- Mark WRITE-02 and WRITE-04 requirements complete
2026-03-17 10:35:38 -04:00
yonlu a677a44d49 test(16-02): add FLAC writer round-trip tests with 7 test functions
- TestWriteFlacTags_TextFields: round-trip 9 text fields via metadata.ExtractTags
- TestWriteFlacTags_CoverArt: JPEG embed and read-back verification
- TestWriteFlacTags_ClearCoverArt: embed then clear art, verify removal
- TestWriteFlacTags_PartialUpdate: update 2 of 8 fields, verify others preserved
- TestWriteFlacTags_PreservesStreamInfo: verify StreamInfo block survives tag writes
- TestWriteFlacTags_ReplaceComment: write twice, verify no duplicate Vorbis Comments
- TestWriteFlacTags_AtomicSafety: verify corrupt/invalid writes leave original intact
- Create shared helpers_test.go with testLogger, tinyJPEG, assertEqual, etc.
2026-03-17 10:32:46 -04:00
yonlu 3642cbe0d5 feat(16-02): add go-flac dependencies and implement FLAC tag writer
- Add go-flac/go-flac/v2, flacvorbis/v2, flacpicture/v2 dependencies
- Create tagwriter.go with TagChanges type, field constants, format detection, MIME detection
- Create flac.go with writeFlacTags using Vorbis Comments + PICTURE blocks + AtomicWrite
- Implement replaceVorbisComment helper for case-insensitive field replacement
- Handle cover art add/replace/clear via PICTURE metadata blocks
2026-03-17 10:32:28 -04:00
yonlu 4463d3e3e1 docs(16): create phase plan — tag writing & database sync 2026-03-17 10:07:30 -04:00
yonlu 0da3448949 docs(16): research phase domain 2026-03-17 09:56:10 -04:00
yonlu 7d0d68a915 docs(16): capture phase context 2026-03-17 09:34:26 -04:00
yonlu 4e8449b400 docs(phase-15): complete phase execution and verification 2026-03-16 18:21:14 -04:00
yonlu 6a1cd44b25 docs(15-02): complete atomic write utility plan
- SUMMARY.md with 2 task commits, 2 auto-fixed lint deviations
- STATE.md: Phase 15 complete (2/2 plans), ready for Phase 16
- ROADMAP.md: Phase 15 marked complete
- REQUIREMENTS.md: SCHEMA-02, WRITE-05 marked complete
2026-03-16 18:16:22 -04:00
yonlu 4876d21fc5 docs(15-01): complete FTS5 migration plan
- Create 15-01-SUMMARY.md
- Update STATE.md with position, decisions, metrics
- Update ROADMAP.md plan progress
- Mark SCHEMA-01 requirement complete
2026-03-16 18:15:26 -04:00
yonlu 0cdfe48e2e test(15-02): add comprehensive tests for AtomicWrite
- TestAtomicWrite_Success: overwrite with permission preservation
- TestAtomicWrite_NewFile: create new file with 0644 default
- TestAtomicWrite_CallbackError: rollback on callback failure
- TestAtomicWrite_OrphanCleanup: clean orphaned .yj-tmp files
- TestAtomicWrite_SameDirectoryTempFile: verify same-dir constraint
- TestAtomicWrite_PermissionPreservation: table-driven 644/755/600
- TestAtomicWrite_SyncAndClose: 1MiB write with size verification
2026-03-16 18:13:35 -04:00
yonlu 56cd7e38a5 test(15-01): add FTS5 row deletion and update cycle tests
- TestDeleteSearchIndex: table-driven test for delete existing/non-existent rowid
- TestSearchIndexUpdateCycle: verifies delete+reinsert produces no ghost entries
- TestClearSearchIndexPreservesSchema: verifies drop/recreate preserves contentless_delete=1
- Update TestInsertAndDeleteSearchIndex to expect successful delete
2026-03-16 18:12:06 -04:00