Desktop: "Play all" and "Play all shuffled" on the Tracks tab (and anywhere else missing them) #31

Closed
opened 2026-08-18 05:56:10 +00:00 by logan · 2 comments
Collaborator

Report

The Tracks tab should have a play button and a play-shuffled button at the top so I can just put the whole library on. Those two buttons should be on every page with multiple tracks — a genre list, for instance (most other places already have them).

Findings

  • <page-header> (components/page-header/) is the one component carrying title/count/sort/actions for the nine primary views, so this is one action pair added there and passed by each host — not nine implementations.
  • Playback already has the right primitives: GetFilePathsByGenres(names, libraryID) and GetFilePathsByAlbums(ids, libraryID) return paths only, grouped so the caller keeps its order. A "play all tracks" equivalent should ask for paths only too, in the order the user can see, rather than mapping over track rows (that pattern cost 6 MB over the IPC for 5 genres).
  • SetQueue(paths, startIndex, shuffleStart, source) takes shuffleStart, so shuffled-play is the same call.

Direction

Add the pair to page-header's actions slot, wire the missing hosts (Tracks certainly; audit genres/artists/playlists), and set a correct Source so "Playing from" says something true (see the stale-source issue).

**Report** The Tracks tab should have a play button and a play-shuffled button at the top so I can just put the whole library on. Those two buttons should be on every page with multiple tracks — a genre list, for instance (most other places already have them). **Findings** - `<page-header>` (`components/page-header/`) is the one component carrying title/count/sort/actions for the nine primary views, so this is one action pair added there and passed by each host — not nine implementations. - Playback already has the right primitives: `GetFilePathsByGenres(names, libraryID)` and `GetFilePathsByAlbums(ids, libraryID)` return paths only, grouped so the caller keeps its order. A "play all tracks" equivalent should ask for paths only too, in the order the user can see, rather than mapping over track rows (that pattern cost 6 MB over the IPC for 5 genres). - `SetQueue(paths, startIndex, shuffleStart, source)` takes `shuffleStart`, so shuffled-play is the same call. **Direction** Add the pair to `page-header`'s actions slot, wire the missing hosts (Tracks certainly; audit genres/artists/playlists), and set a correct `Source` so "Playing from" says something true (see the stale-source issue).
logan self-assigned this 2026-09-03 04:06:51 +00:00
logan added the
Status
In Progress
label 2026-09-03 04:06:52 +00:00
Author
Collaborator

⟦loop⟧ P0 tick (supervised first run of the autonomous loop, plan 020). Taking this per #73's Phase 5 order — it is the first open item in the roadmap's explicit sequence.

Branch feat/31-play-all-shuffle-all. Approach: one page-header action pair (Play all / Shuffle all) on the Tracks view, gated exactly like the album page's existing pair, queuing the displayed list with the correct queue Source. Plan follows as a comment; no push until the implementation leg.

⟦loop⟧ P0 tick (supervised first run of the autonomous loop, plan 020). Taking this per #73's Phase 5 order — it is the first open item in the roadmap's explicit sequence. Branch `feat/31-play-all-shuffle-all`. Approach: one `page-header` action pair (Play all / Shuffle all) on the Tracks view, gated exactly like the album page's existing pair, queuing the displayed list with the correct queue `Source`. Plan follows as a comment; no push until the implementation leg.
Author
Collaborator

⟦loop⟧ P0 plan for #31 (from the plan leg; implementation leg runs on a later tick).

Change in one sentence: Add a Play-all/Shuffle-all action pair to every page that lists tracks — the Tracks tab, genre details, artist details, and the playlist detail views — driven by one shared helper that owns the shuffle-mode semantics, with each host passing an honest queue Source (#14's rule).

Audit result: Tracks has neither button; genre-details has neither; artist-details has neither; playlist-details has Play all only; smart-playlist-details has both but its Shuffle is broken — shuffleStart: true does not enable shuffle mode and SetQueue only honours it when mode is already on, so with shuffle off it plays track 1 in order. Album/Explore/Home already have the pair. Four hosts plus one helper, still one PR.

Shape: new frontend/src/utils/play-all.ts — playAll(paths, source, shuffle) toggles shuffle first, then sets the queue (album page's own semantics, lifted out). track-list.ts renders the pair in its page header and queues cachedSortedTracks with effectiveQueueSource — one edit covers Tracks and genre-details. Artist queues paths from GetFilePathsByAlbums in album order; both playlist views route through the helper (fixing the broken Shuffle at smart-playlist-details; behaviour delta stated in the PR body). Tests: component cases via the lastArgs('queue.Queue.SetQueue') harness; new e2e/specs/play-all.spec.ts asserting queue state via __yjEvents.call, not pixels.

Verification tiers, none skipped: make ui-test, npx tsc --noEmit, then make dev-headless SEED=default → drive by hand + read screenshots → full make e2e; hooks green regardless (lint, test, bindings-check, css-check). Not demanded, with reasons: ui-visual (no baselines on these components), perf, make generate, Android tiers (issue is Platform/Desktop).

Out of scope: page-level pairs on the card grids; shuffleStart: true per-card menu sites.

Risks: playback.spec.ts:140 does app-scoped getByRole('button', { name: 'Shuffle' }) — substring match, resolves to 2 elements once "Shuffle all" exists (fix: exact: true); two-call ordering already proven on the album page; header fit at 900/800/390/320 via the fit pass with Play all higher-priority.

⟦loop⟧ P0 plan for #31 (from the plan leg; implementation leg runs on a later tick). **Change in one sentence:** Add a Play-all/Shuffle-all action pair to every page that lists tracks — the Tracks tab, genre details, artist details, and the playlist detail views — driven by one shared helper that owns the shuffle-mode semantics, with each host passing an honest queue `Source` (#14's rule). **Audit result:** Tracks has neither button; `genre-details` has neither; `artist-details` has neither; `playlist-details` has Play all only; `smart-playlist-details` has both but its Shuffle is broken — `shuffleStart: true` does not enable shuffle mode and `SetQueue` only honours it when mode is already on, so with shuffle off it plays track 1 in order. Album/Explore/Home already have the pair. Four hosts plus one helper, still one PR. **Shape:** new `frontend/src/utils/play-all.ts` — `playAll(paths, source, shuffle)` toggles shuffle first, then sets the queue (album page's own semantics, lifted out). `track-list.ts` renders the pair in its page header and queues `cachedSortedTracks` with `effectiveQueueSource` — one edit covers Tracks and genre-details. Artist queues paths from `GetFilePathsByAlbums` in album order; both playlist views route through the helper (fixing the broken Shuffle at `smart-playlist-details`; behaviour delta stated in the PR body). Tests: component cases via the `lastArgs('queue.Queue.SetQueue')` harness; new `e2e/specs/play-all.spec.ts` asserting queue state via `__yjEvents.call`, not pixels. **Verification tiers, none skipped:** `make ui-test`, `npx tsc --noEmit`, then `make dev-headless SEED=default` → drive by hand + read screenshots → full `make e2e`; hooks green regardless (`lint`, `test`, `bindings-check`, `css-check`). Not demanded, with reasons: `ui-visual` (no baselines on these components), `perf`, `make generate`, Android tiers (issue is Platform/Desktop). **Out of scope:** page-level pairs on the card grids; `shuffleStart: true` per-card menu sites. **Risks:** `playback.spec.ts:140` does app-scoped `getByRole('button', { name: 'Shuffle' })` — substring match, resolves to 2 elements once "Shuffle all" exists (fix: `exact: true`); two-call ordering already proven on the album page; header fit at 900/800/390/320 via the fit pass with Play all higher-priority.
logan closed this issue 2026-09-04 02:48:28 +00:00
gitea-actions Bot removed the
Status
In Progress
label 2026-09-04 02:48:38 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: yonlu/yellowjacket#31