Skip to content

Serialize Spotify remote skip commands - #267

Merged
jsgrrchg merged 4 commits into
developfrom
fix/spotify-remote-skip-serialization
Aug 9, 2026
Merged

jsgrrchg merged 4 commits into
developfrom
fix/spotify-remote-skip-serialization

Conversation

@jsgrrchg

@jsgrrchg jsgrrchg commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • serialize Spotify remote next/previous commands through a FIFO queue
  • allow only one remote skip request in flight at a time
  • assign operation IDs and ignore stale results or results from a previously active device
  • keep skip results separate from the shared playback result receiver
  • refresh remote playback state after each accepted operation completes

Why

Rapid next/previous input could launch overlapping Spotify Web API requests. Network timing could reorder those requests, while replacing the shared result receiver caused earlier outcomes to be dropped locally even though Spotify could still apply them.

The queue establishes a single ownership boundary for remote skip operations and preserves input order without duplicating Spotify command error handling.

Testing

  • cargo fmt --check
  • cargo test (242 passed)
  • cargo clippy --all-targets
  • git diff --check

Fixes #263

@jsgrrchg
jsgrrchg requested a review from sewandev as a code owner August 9, 2026 11:23
@jsgrrchg
jsgrrchg marked this pull request as draft August 9, 2026 11:23
@jsgrrchg
jsgrrchg marked this pull request as ready for review August 9, 2026 11:44
@jsgrrchg

jsgrrchg commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator Author

Residual risk, Spotify API behavior under real-world latency, token expiration, and device changes is covered by simulated states, not live integration tests. Not a blocker.

@jsgrrchg
jsgrrchg merged commit e0c7878 into develop Aug 9, 2026
7 checks passed
@jsgrrchg
jsgrrchg deleted the fix/spotify-remote-skip-serialization branch August 9, 2026 15:56
@sewandev sewandev mentioned this pull request Sep 7, 2026
sewandev added a commit that referenced this pull request Sep 7, 2026
## Release v1.5.8

Version bump and changelog cut for the v1.5.8 release.

### Changes
- \Cargo.toml\ / \Cargo.lock\: version \1.5.7\ -> \1.5.8\
- \CHANGELOG.md\ / \CHANGELOG.es.md\: moved \[Unreleased]\ to \[1.5.8] -
2026-09-07\, added a fresh empty \[Unreleased]\ / \[Sin publicar]\

### Included since v1.5.7
- fix: monotonic clock for stream stall detection (#268)
- fix: serialize Spotify remote skip commands (#267)
- fix: ensure required CI check reports lint failures (#266)
- ci: separate lint job and integrate swatinem/rust-cache (#250)
- docs: add winget as the easy Windows install method (#249)
- build(deps): update Ratatui, Zip, Bytes, Clap, Rand, Thiserror and
Actions
sewandev added a commit that referenced this pull request Sep 7, 2026
## v1.5.8 release

Promotes `develop` to `main` for the v1.5.8 release.

### Included since v1.5.7
- fix: monotonic clock for stream stall detection (#268)
- fix: serialize Spotify remote skip commands (#267)
- fix: ensure required CI check reports lint failures (#266)
- ci: separate lint job and integrate swatinem/rust-cache (#250)
- docs: add winget as the easy Windows install method (#249)
- build(deps): update Ratatui, Zip, Bytes, Clap, Rand, Thiserror and
Actions

Merge with "Create a merge commit" (never squash/rebase).
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.

Serialize Spotify remote skip commands to prevent out-of-order playback changes

1 participant