feat(v3 library): persistent "no match" badge + Unmatched quick filter#781
Conversation
The Refresh-Metadata batch (#764) shows a transient per-tile "no match" only while a pass runs, so the unmatched pile goes quiet at rest. Two additions make it visible + reachable: - Persistent per-card "No match" badge: query_page now marks each row `unmatched` (a cheap failed-set membership like favs/estd), and enrichBadge paints a subtle resting marker for those cards — tracked in a `_unmatched` set so a batch tile clearing falls back to it instead of wiping it. A live batch tile still wins while a pass runs. - "Unmatched" toolbar toggle (local-only): one click applies the same filter as the drawer's Match → Unmatched (match_state='failed'), so the no-match pile is a click away right after a batch. Re-queries + reflects active state. Test: query_page flags a failed row + the match=unmatched filter returns it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds a backend unmatched flag for failed enrichment matches, surfaces it in library query results, and updates the Songs UI to show a persistent no-match badge plus an Unmatched filter toggle. A test covers the flag and filter behavior. ChangesPersistent Unmatched Badge and Filter
Estimated code review effort: 2 (Simple) | ~12 minutes Sequence Diagram(s)sequenceDiagram
participant Browser
participant songsjs as songs.js
participant Server
participant MetadataDB
Browser->>songsjs: click `#v3-songs-unmatched`
songsjs->>songsjs: toggleUnmatchedFilter()
songsjs->>Server: reload() -> GET /api/library?match=unmatched
Server->>MetadataDB: _unmatched_set(filenames)
MetadataDB-->>Server: failed filenames set
Server-->>songsjs: songs with unmatched flag
songsjs->>songsjs: enrichBadge(key, song.unmatched)
songsjs-->>Browser: render nomatch badge
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
📋 Merge order — metadata-curation epic (7 PRs)
#778–#780 are stacked (each based on the branch above), so GitHub re-points each to
|
|
Integration note — from a full-queue dry-run that merged every open org PR into a next-version test build. Your persistent "No match" badge now overlaps #783 (the Fix-metadata capstone), which turns the same badge into a clickable hand-off into the Fix-metadata popup ( Recommend: rebase on #783 and trim this PR down to just its unique surface — the Unmatched quick-filter button + |
…e-clear _clearMetaTiles removed every .v3-meta-tile node — including the new persistent 'No match' resting badge, which derives from _unmatched rather than _metaTile. A metadata rescan's tile-clear therefore dropped the badge until the next scroll re-rendered the card. Repaint it from _unmatched. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Makes the metadata misses visible and reachable — the two follow-ups to the Refresh-Metadata batch (#764). Independent of the Fix-metadata popup stack; branches off
main.The gap: the batch paints a per-tile "no match" only while a pass runs, then clears it — so at rest you can't see which songs (the ~640 city-pop imports) never matched.
Persistent per-card "No match" badge
query_pagenow marks each rowunmatched— a cheapmatch_state='failed'set-membership over the page (likefavs/estd), so no N+1.enrichBadgepaints a subtle resting marker on those cards (right-click → fix by hand). It's tracked in a_unmatchedset so a batch tile clearing falls back to the resting badge instead of wiping it; a live batch tile still wins while a pass runs (they never coexist)."Unmatched" quick filter
match_state='failed'), re-queries, and reflects active state — so the no-match pile is one click from the batch, without digging into the filter drawer.Testing
query_pageflags a failed row (unmatched: true) and not a matched one; thematch=unmatchedfilter returns only the failed song.test_library_filters+ keyset + enrichment suites green (67).node --checkclean; reuses existing utility classes (no CSS regen).🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes
Tests