fix: shuffle the full collection when selecting a song #64

Merged
joshuafhiggins merged 1 commits from t3/shuffle-album-playlist-selection into main 2026-11-03 15:36:27 -05:00
Owner

Selecting a song with shuffle enabled discarded earlier album or playlist tracks. Mobile could also carry a native player's position or a pending seek into a new queue.

Keep the selected song first and shuffle the full remaining collection on mobile, web, and the matching backend mutations. Reset mobile playback when starting a new queue. Track album/playlist origins so reselecting the current song from the same origin leaves playback and queue order alone; selecting it from another origin restarts playback. Also fix the mobile build-variant type error.

Validation:

  • Workspace typechecks and ESLint for the changed web files passed.
  • 500 shuffled selections passed queue membership, selected-first, history, and progress checks. Ordered playback and deferred queue extension also passed.
  • Android development app loaded this worktree through Metro. Selected album track 4 with shuffle enabled and verified track 1 remained upcoming. Reselecting the current track from the same album preserved playback past three minutes.
  • Android screen recording

Remaining manual coverage: cross-origin restart, playlist playback, and iOS. The shared Android emulator changed apps during testing. Browser playback verification timed out during the isolated Next.js app's first compile while the host had heavy memory pressure and full swap. No backend deployment was performed.

Made with GPT-6.1-sol using the Codex harness in T3 Code.

Selecting a song with shuffle enabled discarded earlier album or playlist tracks. Mobile could also carry a native player's position or a pending seek into a new queue. Keep the selected song first and shuffle the full remaining collection on mobile, web, and the matching backend mutations. Reset mobile playback when starting a new queue. Track album/playlist origins so reselecting the current song from the same origin leaves playback and queue order alone; selecting it from another origin restarts playback. Also fix the mobile build-variant type error. Validation: - Workspace typechecks and ESLint for the changed web files passed. - 500 shuffled selections passed queue membership, selected-first, history, and progress checks. Ordered playback and deferred queue extension also passed. - Android development app loaded this worktree through Metro. Selected album track 4 with shuffle enabled and verified track 1 remained upcoming. Reselecting the current track from the same album preserved playback past three minutes. - [Android screen recording](https://files.gitcoffee.dev/files/otunes-shuffle-android-hoix9dyi6zajdbxk.mp4) Remaining manual coverage: cross-origin restart, playlist playback, and iOS. The shared Android emulator changed apps during testing. Browser playback verification timed out during the isolated Next.js app's first compile while the host had heavy memory pressure and full swap. No backend deployment was performed. Made with GPT-6.1-sol using the Codex harness in T3 Code.
joshuafhiggins added 1 commit 2026-11-03 15:36:20 -05:00
joshuafhiggins force-pushed t3/shuffle-album-playlist-selection from eb96901553 to 43d2017e1c 2026-11-03 15:36:20 -05:00 Compare
joshuafhiggins merged commit 66e5587ea6 into main 2026-11-03 15:36:27 -05:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: joshuafhiggins/otunes#64