You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Protect Spotify seeks and skips when the Connect device ID is missing #1237
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.
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.
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.
Activity
spotatui commentedon Dec 2, 2026
🎧 spotatui triage
Auto-triaged with
claude-opus-5-5.Label:
bugLikely area: Spotify
Summary
A Spotify seek or skip that waits out a rate limit can be replayed on the wrong Connect device.
App::apply_seekqueuesSeekorNextTrackwithout 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
App::apply_seekqueuesSeekorNextTrackwithout a target device.Where to look
src/infra/network/mod.rs:hold_back_if_rate_limitedstores only thePlaybackOwnerwith each held-back event.flush_deferredandowner_still_ownstreat 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: thedevice_idfrom the query, else the cluster'sactive_device_id. This is where a command with no device ID goes to whatever device is active.src/core/app/seek.rs:apply_seekdispatchesIoEvent::SeekorIoEvent::NextTrackwith no device or item attached.Possible duplicates: none found
Compared against 55 open and 100 recently closed issues.