feat(library): complete library context menu (T2.1.10 Batch B/C) #60
All Vouch review confidence checks passed
Residual risk 0.39 = Change Risk (0.52) × (1 − Review Confidence (0.24)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 44% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #60"
general
weight: 0.35
greptile-apps[bot]
Summary
tracks.removed_at; the list, count and library-stats SQL all filterremoved_at IS NULL, so a removed track leaves every read path while its row, cue points, tags and analysis stay on disk. The write and itsskill_runssnapshot commit in one transaction; Undo restores only the rows still holding the state the write left (a track removed again since is skipped), and a second undo of the same id is refused. Nothing ever touches the audio file.reveal_in_file_managercommand:explorer /select,<path>on Windows,open -Ron macOS,xdg-open <parent dir>on Linux. The argument shape lives incrates/core/src/reveal.rsso it is unit-tested (the desktop crate's test binary cannot start on the dev box); the command only checks the path exists and spawns the program — never through a shell. A missingxdg-opensurfaces as a readable error.MENU_LAYOUTinsrc/lib/library-menu.ts— a pure module, because.tsxtests are never collected by this repo's harness.ModalShelldialog) and the Undo toast now carries akind, so the remove toast runs the remove undo path rather than the metadata one.Tests
crates/core: 157 unit tests (remove/undo SQL, snapshot docs, guards, reveal arg shapes) —library_remove.rs,reveal.rs.tests/schema/tests/soft_remove.rs: 6 round-trip tests on the real migrated schema — row + cues + tags survive, undo restores once then refuses, a re-removed track is skipped, an already-removed selection writes no snapshot, a foreignskill_runssnapshot is refused, and stats agree with the list after a remove. Mutation-checked: weakeningpresent_statesor dropping the undoAND removed_at IS ?2guard makes them fail.scripts/make-library-fixture.test.mjs: migration count 7 → 8 (the fixture reads the migrations directory).pnpm ci:local:portableis green end to end (lint, typecheck, 173 desktop + 23 shared + 2 api + 59 agent + 10 tools JS tests, rustfmt, clippy-D warnings, and the portable Rust suites).Known limits (not covered by a test on this box)
STATUS_ENTRYPOINT_NOT_FOUNDbefore running,.tsxtests are never collected, and the browser dev server mocks an empty library, so the menu render, the confirm dialog and the clipboard write were read and type-checked but not driven.get_track, cues, tags) still resolve a soft-removed row — intentional, so the Undo path and the panel can still name the track; only the list and the stats were filtered.Test plan
pnpm ci:local:portablegreen (ran locally, exit 0)docs/ui/03-LIBRARY-VIEW.md§3.5 order, stubs greyed with tooltipsSELECT removed_atis NULL again andskill_runs.status=undone<!-- greptile_comment -->
<!-- greptile_summary -->
<h2><a href="https://app.greptile.com/api/retrigger?id=88548637"><picture><source media="(prefers-color-scheme: dark)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/RetriggerDark.svg?v=2"><source media="(prefers-color-scheme: light)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2"><img alt="Retrigger" src="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2" align="right"></picture></a><a href="https://app.greptile.com/mediabubble/github/iDorgham/dj-assistant/-/pull/60"><picture><source media="(prefers-color-scheme: dark)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptileDark.svg?v=2"><source media="(prefers-color-scheme: light)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2"><img alt="View in Greptile" src="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2" align="right"></picture></a>Confidence Score: 2/5</h2>
<!-- greptile-risk -->
Fix track recovery, older-database reads, and library-wide removal filters before merging.
<h2>Findings</h2>
1. <img alt="P1" src="https://greptile-static-assets.s3.amazonaws.com/badges/p1.svg?v=9" align="top"> Removed tracks cannot return <a href="https://github.com/iDorgham/DJ-Assistant/pull/60#discussion_r4383789531">▶</a>
2. <img alt="P1" src="https://greptile-static-assets.s3.amazonaws.com/badges/p1.svg?v=9" align="top"> Older library queries fail <a href="https://github.com/iDorgham/DJ-Assistant/pull/60#discussion_r4383789542">▶</a>
3. <img alt="P1" src="https://greptile-static-assets.s3.amazonaws.com/badges/p1.svg?v=9" align="top"> Removed tracks still get work <a href="https://github.com/iDorgham/DJ-Assistant/pull/60#discussion_r4383789547">▶</a>
4. <img alt="P2" src="https://greptile-static-assets.s3.amazonaws.com/badges/p2.svg?v=9" align="top"> Menu actions lose keyboard focus <a href="https://github.com/iDorgham/DJ-Assistant/pull/60#discussion_r4383789562">▶</a>
<details><summary>Fix with agent prompt</summary>
`
`</details>
<h3>Summary</h3>
Adds confirmed soft removal with Undo, file reveal, Copy path, and the remaining disabled context-menu items.
Acknowledged limits from iDorgham: per-track detail reads intentionally remain available; online-find stubs cite Phase 3 without a scheduled roadmap entry. Neither is reported as a finding.
<details open><summary><h3>Diagram</h3></summary>
</details>
<!-- greptile_confidence_score:2 -->
<sub>Reviews (1) · Last reviewed commit: "feat(library): complete context menu wit..." · Reviewed by Greptile</sub>
<!-- /greptile_comment -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
New Features
Remove tracks from the library without deleting their files or associated data, and undo removals when possible.
Use the row menu to copy a track’s path or reveal it in the file manager.
The row menu now supports scrolling and provides clearer disabled-action guidance.
Bug Fixes
Removed tracks no longer appear in library lists, searches, or summary counts.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->