Skip to content

Protect Spotify seeks and skips when the Connect device ID is missing #1237

Backlog

Description

@kapok-4o

On main (1facae80), App::apply_seek queues Seek or NextTrack without a target. Rate-limit replay checks the playback owner, so it can still replay the command after a switch between two Spotify devices. The Spotify adapter resolves an unbound command to the current device. PR #1206 checks the cached device name and item for the ID-less fallback, so a switch that has yet to reach the app cache can still slip through.

Verify the original device and item from the same Connect state used to select the command destination. Drop the command and refresh playback when the original target cannot be verified. Cover both seek and skip after a device switch during rate limiting, including two devices with the same name playing the same track. Also cover the case where the original target can be verified and the command should run.

Activity

  1. spotatui commented on Dec 2, 2026

    @spotatui
    Contributor

    🎧 spotatui triage

    Auto-triaged with claude-opus-5-5.

    Label: bug
    Likely area: Spotify

    Summary

    A Spotify seek or skip that waits out a rate limit can be replayed on the wrong Connect device. App::apply_seek queues Seek or NextTrack without a device ID. The replay only checks that Spotify still owns playback, and the Spotify adapter sends a command with no device ID to whatever device is active at that moment. The reporter says the cached device name and item check from PR #1206 can miss a switch that the app cache has not seen yet. They ask to verify the original device and item against the same Connect state that picks the destination, to drop the command and refresh playback when that check fails, and to add tests for both outcomes.

    Key points

    • Seen on main at commit 1facae8.
    • App::apply_seek queues Seek or NextTrack without a target device.
    • Rate-limit replay only checks the playback owner, so a command queued for one Spotify device can be replayed after a switch to another Spotify device.
    • PR fix(playback): target the current track and keep the latest remote command #1206 checks the cached device name and item, so a switch the app cache has not seen yet can still get through.
    • Requested tests: seek and skip after a device switch during a rate limit, two devices with the same name playing the same track, and a verified target where the command should still run.

    Where to look

    • src/infra/network/mod.rs: hold_back_if_rate_limited stores only the PlaybackOwner with each held-back event. flush_deferred and owner_still_owns treat any two Spotify owners as the same when they replay the events.
    • src/infra/spotify/player.rs: The helper near line 492 picks the command's device: the device_id from the query, else the cluster's active_device_id. This is where a command with no device ID goes to whatever device is active.
    • src/core/app/seek.rs: apply_seek dispatches IoEvent::Seek or IoEvent::NextTrack with no device or item attached.

    Possible duplicates: none found

    Compared against 55 open and 100 recently closed issues.

  2. added
    bug
    on Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Fields

    Area

    Spotify

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions