feat(library): Reanalyze and Remove-from-library context menu - #89
Merged
Conversation
Move the track context menu from the Title cell to the whole row and add two actions. Reanalyze clears the stored analysis (re-arming the worker queue, keeping the BPM column populated) and wakes the analysis worker; the worker-event handler now refreshes a deck holding the track even when it already has an artifact, so a reanalyzed grid reaches a loaded deck. Remove from library opens a confirmation dialog (the FK cascade also deletes authored lighting cues), then deletes the row — playlist membership and cues cascade in SQLite, the audio file on disk is untouched, and any deck still holding the track is detached without interrupting playback. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Right-clicking a track row in the library browser (now anywhere on the row, not just the Title cell) offers two new actions below the playlist items:
analysis_json(newLibrary::clear_analysis), which re-arms the worker'snext_unanalyzedqueue, and wakes the analysis worker for an immediate run. The BPM column stays populated while the worker re-runs. TheAnalyzedevent handler no longer skips decks that already hold an artifact, so a loaded deck picks up the refreshed grid (the engine-side apply still waits for a non-playing moment viapending_artifact).playlist_tracksandlighting_cues. On confirm,Library::delete_trackdeletes the row, any deck/audition still holding the track is detached (track_id = None) without interrupting playback, and the status bar reports the removal.Testing
clear_analysisre-arms the queue (including from the''failure marker), anddelete_trackcascades playlist membership + lighting cues while the playlist itself survives.cargo test --workspace: 119 passed.🤖 Generated with Claude Code