You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Selection toolbar reverts to 'Library' after play/pause, while song stays checked (#224 follow-up) #344
On the Songs tab, long-press a song to enter multi-select (toolbar shows "1 selected").
Without relaunching or touching the selection, start playback and pause it (e.g. via the debug PLAY/PAUSE receivers, or the mini-player controls).
Expected
The "1 selected" toolbar/app-bar persists across the play/pause toggle, matching the still-checked song.
Actual
The song's checkbox remains checked (selection state persists at the data level), but the toolbar/app-bar title reverts to "Library" instead of staying on "1 selected".
Evidence
Screenshot captured during Maestro verification of #224 (song-still-selected flow), showing the checked item with the app-bar back to "Library": tmp/maestro/2026-09-24_215839/song-still-selected/screenshots/step-003-assertCondition-1_selected.png (local artifact, not attached).
Found while verifying ported PR behaviours; the underlying selection-survives-play/pause feature (#224) works at the data layer but the toolbar state binding doesn't follow it.
Root cause (from review): library tabs share one contextual toolbar via findToolbarHost(). ViewPager2 keeps off-screen pages at STARTED, and AlbumListFragment/AlbumArtistListFragment call contextualToolbarHelper.hide() on every uiState emission with no selection. Play/pause updates playCount/lastPlayed, which Album carries, so an off-screen Albums tab re-emits and hides the Songs tab's '1 selected' toolbar while the song stays checked. It's a race, and it needs the Albums page to exist. 440a64e3 (single Compose collector) doesn't address this and is being reverted. Fix: tabs only hide on their own selecting→idle transition, and only while they're the current page.
Activity
timusus commentedon Sep 24, 2026
Root cause (from review): library tabs share one contextual toolbar via findToolbarHost(). ViewPager2 keeps off-screen pages at STARTED, and AlbumListFragment/AlbumArtistListFragment call contextualToolbarHelper.hide() on every uiState emission with no selection. Play/pause updates playCount/lastPlayed, which Album carries, so an off-screen Albums tab re-emits and hides the Songs tab's '1 selected' toolbar while the song stays checked. It's a race, and it needs the Albums page to exist. 440a64e3 (single Compose collector) doesn't address this and is being reverted. Fix: tabs only hide on their own selecting→idle transition, and only while they're the current page.
Revert "fix(app): keep the multi-select toolbar in step with the sele…
fix(app): keep the multi-select toolbar in step with the selection ac…
fix(app): only let the visible library tab drive the shared multi-sel…