Skip to content

feat(gui): filter playlists in Your Library - #907

Merged
LargeModGames merged 4 commits into
LargeModGames:mainfrom
vnic03:feat/library-playlist-filter
Oct 22, 2026
Merged

LargeModGames merged 4 commits into
LargeModGames:mainfrom
vnic03:feat/library-playlist-filter

Conversation

@vnic03

@vnic03 vnic03 commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes #842.

This adds a filter box below the Your Library chips so you can find a playlist without scrolling through the whole list. It works across all sources, ignores case, and matches search words in any order.

Matching playlists inside closed Spotify folders appear without folder rows or indentation. Clearing the search brings back the folder view with the same folders open as before. Liked Songs, Recently played, and Library health are filtered by their displayed titles too. When nothing matches, the panel shows a short message.

Screenshots

Before

Your Library before the change, without a filter box

After

Searching for “film” finds “Film scores” inside a closed folder and shows it without indentation.

Your Library filtered by film, showing Film scores without its folder

Testing

I ran the following checks locally:

  • npm ci
  • npm run lint
  • npm run format:check
  • npm run typecheck
  • npm test — 533 tests passed
  • npm run build
  • npx playwright test --project=chromium -g "library f" — both scenes passed, including checks that clearing the filter preserves open and closed folders

The browser checks used Chromium with the fake bridge. I haven't tested this with a live Spotify session.

I used the existing translation system for the two new messages and included the updated generated files.

Summary by CodeRabbit

  • New Features
    • Added a filter field to Your Library to find playlists and other supported library items by name.
    • Filtering can find playlists inside closed folders; folders are hidden while filtering, and their open or closed state is restored when the filter is cleared.
    • Added localized filter labels and a message when no items match.

@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: LargeModGames/spotatui/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b72b9aee-d60e-4938-8375-66f731c40255
📥 Commits

Reviewing files that changed from the base of the PR and between 1097ecb and 57e4230.

⛔ Files ignored due to path filters: 2
  • gui/src/bindings/GuiStrings.ts is excluded by !gui/src/bindings/**
  • gui/src/bindings/strings.json is excluded by !gui/src/bindings/**
📒 Files selected for processing: 4
  • CHANGELOG.md
  • gui/src/libraryModel.test.ts
  • gui/src/libraryModel.ts
  • gui/src/libraryPanel.test.tsx
🚧 Files skipped from review as they are similar to previous changes: 1
  • CHANGELOG.md

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.

📝 Walkthrough

The library panel now filters playlists and built-in rows by text. Filtering includes playlists inside closed folders, and the panel shows a no-match state when no rows match.

Changes: Library playlist filtering

Layer / File(s) Summary
Query matching
gui/src/libraryModel.ts, gui/src/libraryModel.test.ts
Added case-insensitive matching across whitespace-separated terms. Tests cover matching across fields, null fields, and blank queries.
Sidebar filtering and validation
gui/src/LibraryPanel.tsx, gui/src/LibraryPanel.css, src/core/i18n/gui.rs, src/core/i18n/gui/en.rs, gui/src/libraryPanel.test.tsx, gui/e2e/scenes.shot.ts, CHANGELOG.md
Added a filter input and filtered rendering for playlists and built-in rows. Filtering hides folder trees while matching playlists inside closed folders. Tests cover active-source rows, translated titles, no matches, and folder state after clearing the query.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Feature · Severity of issue fixed: Low

Sequence Diagram(s)

sequenceDiagram
  actor User
  participant LibraryPanel
  participant PlaylistRows
  participant matchesFilter
  User->>LibraryPanel: Enter filter query
  LibraryPanel->>PlaylistRows: Pass query as needle
  PlaylistRows->>matchesFilter: Test row fields against query
  matchesFilter-->>PlaylistRows: Return match result
  PlaylistRows-->>LibraryPanel: Render matching rows or NoMatches
Loading
Merge Risk: ⚪ Minimal · up to 57e42

The filter is limited to Playlists, and clearing it restores the folder view. No concrete merge-blocking issue is evident in the inspected change.

Caution

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

  • Ignore

Failed Failed checks: 2 errors

Check name Status Explanation Resolution
Linked Issues check Error The implementation covers the functional and test objectives in #842. It adds playlist-only filtering, case-insensitive word matching, fixed-row matching, closed-folder flattening, folder-state restor… Remove the Rust changes and implement the required UI strings within the issue-approved scope, or obtain an updated issue requirement that permits the Rust localization changes.
Out of Scope Changes check Error The library filter UI, matching helper, styles, tests, end-to-end coverage, changelog entry, and screenshots support #842. The changes to src/core/i18n/gui.rs and src/core/i18n/gui/en.rs are Rust … Remove the unrelated Rust localization changes, or update the linked issue scope before including them.
Passed Passed checks: 2 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title uses the valid conventional-commit prefix feat(gui):, clearly describes the library playlist filtering change, and remains concise and imperative.
Full details: Linked Issues check

Explanation

The implementation covers the functional and test objectives in #842. It adds playlist-only filtering, case-insensitive word matching, fixed-row matching, closed-folder flattening, folder-state restoration, no-match status, unit tests, component tests, and Playwright coverage. However, #842 requires the change to remain within gui/src and gui/e2e and explicitly prohibits Rust changes. The reviewed changes modify src/core/i18n/gui.rs and src/core/i18n/gui/en.rs.

Resolution

Remove the Rust changes and implement the required UI strings within the issue-approved scope, or obtain an updated issue requirement that permits the Rust localization changes.

Full details: Out of Scope Changes check

Explanation

The library filter UI, matching helper, styles, tests, end-to-end coverage, changelog entry, and screenshots support #842. The changes to src/core/i18n/gui.rs and src/core/i18n/gui/en.rs are Rust changes outside the issue's gui/src and gui/e2e scope. The excluded generated binding files are not used as evidence of additional changes.

Resolution

Remove the unrelated Rust localization changes, or update the linked issue scope before including them.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
✨ Simplify code
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pre-merge checks failed. Please resolve the failing checks before merging.

@codecov

codecov Bot commented Oct 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@LargeModGames LargeModGames left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue's "no Rust change" line is my mistake: I wrote it before the GUI i18n catalog landed. Your first commit was right, so please revert 0fbabe0 to bring back filter_your_library and no_library_matches. Right now zh users get an English empty state and aria-label. I'll ignore CodeRabbit's scope check here.

@vnic03

vnic03 commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for clarifying! I've reverted 0fbabe0, restoring filter_your_library, no_library_matches, and the generated bindings. The local frontend checks and both Chromium scenes passed after the revert. I've also resolved the changelog conflict.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pre-merge checks failed. Please resolve the failing checks before merging.

@LargeModGames
LargeModGames merged commit 1acc3da into LargeModGames:main Oct 22, 2026
32 checks passed
@vnic03
vnic03 deleted the feat/library-playlist-filter branch October 22, 2026 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GUI: filter the playlists in Your Library

2 participants