feat(liked-music): add live track search and restore detail-page scroll-edge effect#351
Open
prewue wants to merge 1 commit into
Open
feat(liked-music): add live track search and restore detail-page scroll-edge effect#351prewue wants to merge 1 commit into
prewue wants to merge 1 commit into
Conversation
…ll-edge effect Liked Music now has an in-place search field pinned to the top of the list. Filtering runs client-side over the already-paginated liked library, so matches keep appearing live as continuation batches load — no new API or endpoint. When an active search shrinks the results, the list scrolls back to the top so the pinned field stays visible and focused. Also restores the native macOS 26 toolbar scroll-edge effect on track/detail pages (Liked Music, albums, releases, artist, top songs, discography, episodes) by removing the manual toolbar-background hide and top-fade; the album-art accent background is unchanged.
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.
video.mp4
Description
Adds live, in-place search to Liked Music and restores the native macOS 26 toolbar scroll-edge effect on track/detail pages that had it disabled.
The Liked Music page already eagerly paginates the full liked library, so search filters the loaded tracks client-side and matches keep appearing "live" as continuation batches arrive with no extra API calls and no new endpoint. The search field is pinned to the top of the list while scrolling. Separately, the detail/track pages (Liked Music, albums, releases, playlists, artist, top songs, discography, episodes) previously hid the toolbar background and painted a manual top fade, which suppressed the system scroll-edge effect; this restores the default effect while keeping the album-art accent background intact.
AI Prompt (Optional)
🤖 AI Prompt Used
Developed with the assistance of Claude.
AI Tool: Claude
Type of Change
Related Issues
N/A
Changes Made
likedMusicSearchQueryandvisibleTracks(for:)filtering toPlaylistDetailViewModel, matching title, artists, album, and video ID (case- and diacritic-insensitive). Results update live as the liked library keeps paginating — filtering runs over already-loaded tracks, with no new API or endpoint.LikedMusicSearchField(liquid-glass + macOS 15 fallback styles) andLikedMusicSearchEmptyState, pinned as a sticky section header on the Liked Music list, with a live result count and clear button. Wired into bothPlaylistDetailView(macOS 26) andSimplePlaylistDetailView(macOS 15).ScrollViewReader, so the pinned field stays visible and keeps focus (previously it unpinned mid-scroll and lost focus while the viewport stayed put)..toolbarBackgroundVisibility(.hidden)and the manual.topFade(...)fromPlaylistDetailView,ArtistDetailView,ArtistDiscographyView,ArtistEpisodesListView, andTopSongsView, so the native macOS 26 toolbar scroll-edge effect returns. TheaccentBackgroundalbum-art gradient is untouched.PlaylistDetailRows.swift.PlaylistDetailViewModelTestscoverage for search filtering, blank-query passthrough, live continuation updates, the non–Liked-Music guard, and clearing.Testing
swift test --skip KasetUITests— 1690 tests across 141 suites)KasetUITests/LikedMusicViewUITests)Checklist
swiftlint --strict && swiftformat .(0 violations; 0 files require formatting)Additional Notes
Search intentionally reuses the existing Liked Music playlist pagination rather than a server-side "search liked songs" endpoint YouTube Music exposes no such scoped endpoint, so filtering the fully-paginated liked set client-side is consistent with the current Liked Music loading path.