Repository navigation
fix(playlist): refetch stale tracks when clearing search - #786
LargeModGames merged 3 commits into
Conversation
A remove marks the cached playlist pages stale but never refreshes the visible table, so clearing an active search restored the rows from before the search, the removed track included. When the cached pages are stale, clearing the filter now reopens the table and walks Spotify from the first page instead of restoring them. Adds an App-level regression that fails on the old restore path.
Adds one Unreleased Fixed entry for the playlist filter-clear reload. Only the changelog; the code fix and its test are unchanged.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Fixes #785.
Fixes the playlist bug where clearing a search brought back a track you'd removed. The paired issue is #785.
The filter clear path is clear_playlist_track_filter. It used to restore the unfiltered table straight from the playlist's loaded pages, and a remove leaves those pages out of date. Now, when the pages are out of date, it reloads the playlist through the existing reset_playlist_tracks_view boundary and walks Spotify from the first page instead of restoring them. The fetch responses rebuild the table through the one existing set_playlist_tracks_to_table_continuous path, so there's no new fetch response handling and no UI change.
I added a regression that drives the real App and cache state. It fails on the old path with the stale cached rows message and passes with the fix, and it needs no Spotify login because it uses a fake event channel. I didn't touch the network remove path.
Testing
I ran
cargo test --no-default-features --features telemetry,tui, which passed 1553 tests. I also rancargo fmt --all -- --checkandcargo clippy --no-default-features --features telemetry,tui -- -D warnings, both clean. I only tested the slim telemetry,tui feature set locally, so I'm not claiming the wider CI feature matrix.The test output was
1553 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out. The format check returned exit 0 with no output, and Clippy returned exit 0.Summary by CodeRabbit