Skip to content

fix: play on collection starts in sequence and active icon toggles show accent color - #12

Merged
1 commit merged into
Ryoku-dev:mainfrom
Satirito:fix/playlist-play-sequential
Oct 21, 2026
Merged

1 commit merged into
Ryoku-dev:mainfrom
Satirito:fix/playlist-play-sequential

Conversation

@Satirito

@Satirito Satirito commented Oct 15, 2026 •

Copy link
Copy Markdown

What changed

  1. IconButton.qml & MiniPlayer.qml: active icon color now uses Style.accent instead of Tokens.ink / Tokens.bone. Active controls (Shuffle, Repeat) now have clear visual contrast indicating when they are enabled, matching Svelte's text-primary and the heart/like button override in PlayerBar.qml.
  2. crates/core/src/state.rs (play_tracks) & methods.rs (play_playlist): shuffle argument is now Option<bool> rather than defaulting to false when absent.
    • When explicitly Some(false), or when starting a collection without specifying a track or shuffle (shuffle.is_none() && start.is_none()), keep_shuffled is turned off and q.shuffle_orig is reset to None.
    • When Some(true), shuffle is enabled.
    • When None and a specific track was clicked (start.is_some()), existing queue shuffle state is preserved.
  3. PlaylistPage.qml, AlbumPage.qml, LibrarySongs.qml, MediaCard.qml: the primary "Play" button explicitly passes shuffle: start === null ? false : undefined.
  4. Unit test added in crates/core/src/state.rs: play_collection_defaults_to_sequential_unless_explicitly_shuffled.

Why

  1. Active toggles on icon buttons in the native QML client were using Tokens.ink vs Tokens.inkMuted. In Quickshell palettes, both are monochromatic shades with low contrast, making it virtually impossible to distinguish whether Shuffle or Repeat is turned on or off.
  2. When clicking the primary "Play" hero button on a playlist or album, if shuffle mode had previously been enabled in the queue, q.shuffle_orig.is_some() persisted ("sticky across queues"), picking a random track (rand::Rng::gen_range) and shuffling the list. Since the playlist page provides a dedicated "Shuffle" button right next to "Play", clicking "Play" was expected to play sequentially from the beginning (track 1) and disable shuffle.

Surface area

playback, PlayerBar, mini-player, PlaylistPage, AlbumPage, Library

Validation

  • ./scripts/release-check.sh
  • cargo fmt --all -- --check
  • relevant Rust/frontend tests (cargo test -p ryotunes-core -p ryotunesd all 142 tests pass)
  • ./scripts/check-release-invariants.py
  • ./scripts/check-source-shapes.py
  • ./scripts/check-rust-structure.py
  • tested live on Ryotunes QML client: toggling shuffle shows Style.accent, clicking "Play" on a playlist starts sequentially from track 1 and clears shuffle, clicking "Shuffle" shuffles the playlist, and clicking track fix: advance past Spotify tracks and make them seekable #3 with shuffle active starts at track fix: advance past Spotify tracks and make them seekable #3 and preserves shuffle for remaining tracks.

Regression contracts

  • live Ryoku theme bridge: IconButton.qml and MiniPlayer.qml use Style.accent, ensuring active toggles dynamically follow live system palette/theme switches.
  • no regressions on non-touched contracts: verified that background WebKit hibernation, MPRIS/tray semantics, Home DOM/scrolling, window rules, packaging rollback, and steady-state CPU/timers remain untouched and unaffected.

@neur0map neur0map closed this pull request by merging all changes into Ryoku-dev:main in a1510fb Oct 21, 2026
@neur0map

Copy link
Copy Markdown
Member

Merged, thank you.

aethctl pushed a commit to Ryoku-dev/RyotunesNix that referenced this pull request Oct 26, 2026
…quence and active icon toggles show accent color
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