Skip to content

fix(music): shuffle by reordering the queue and keep radio going - #179

Open
A-EDev wants to merge 4 commits into
perf/music-frame-disciplinefrom
fix/music-queue-shuffle
Open

A-EDev wants to merge 4 commits into
perf/music-frame-disciplinefrom
fix/music-queue-shuffle

Conversation

@A-EDev

@A-EDev A-EDev commented Oct 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

Part 2 of 22 of the music player plan (Android parity). Stacked on perf/music-frame-discipline (PR #178); review and merge in order.

  • Shuffle reorders the upcoming songs (Fisher-Yates, current song kept) instead of picking at random with repeats. Next, Previous, Up next, Play next and the preload follow the list, every song plays once, and turning shuffle off restores the original order.
  • Radio ports Android's MusicRadioPlanner: a 100-song pool ranked once, at most 2 songs per artist, reseeding from anchor songs when YouTube's mix runs out, and it keeps going after a shuffled queue ends. When it runs dry the queue says so.
  • Removing a song or clearing the queue can be undone from the toast, and songs that already played can be queued again. Clear also resets the radio state and the standby preload.

Related issue

Change type

  • Bug fix
  • Feature
  • Refactor or maintenance
  • Documentation
  • Build, packaging, or CI

Validation

  • pnpm test: 410 tests passed, 0 failed
  • pnpm build: passed
  • cargo fmt --manifest-path src-tauri/Cargo.toml --all -- --check: not run on this branch (no Rust changes); clean at the top of the stack
  • cargo clippy --manifest-path src-tauri/Cargo.toml --all-targets --all-features: not run on this branch (no Rust changes); no new warnings at the top of the stack
  • cargo test --manifest-path src-tauri/Cargo.toml --all-targets --all-features: not run on this branch (no Rust changes); 825 passed, 0 failed at the top of the stack
  • I smoke-tested the affected desktop behavior. macOS, combined build: shuffle on reorders a 10-song queue with the current song first, shuffle off restores the order, remove and undo work.
  • OS/device: device testing by the owner. The checks above ran on macOS 27 (Apple Silicon MacBook Pro, 120 Hz) in a dev build of the whole stack; Windows and Linux were not run.

Screenshots or recordings

Risk and compatibility

  • No new secrets, private data, telemetry, or broad Tauri permissions were introduced.
  • User-facing documentation was updated where needed (changelog entry in v0.1.0-beta3.txt).
  • Dependency and lockfile changes are intentional and limited to this PR. No dependency changes.
  • Breaking changes and upgrade steps are clearly documented. No breaking changes.

Copilot AI balanced review requested due to automatic review settings October 24, 2026 14:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants