Repository navigation
fix(network): release the playback poll when the auth gate drops it (#563) - #720
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 11 minutes. View limit detailsLimit details: You’ve used all 4 included reviews currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (2)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review. 📝 WalkthroughWalkthroughThe network event handler now clears the playback-fetch latch when the authentication gate rejects a ChangesPlayback poll recovery
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to No actionable merge-blocking risk is identified; the playback poll recovery change is mergeable after normal checks. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
…argeModGames#563) Only the GetCurrentPlayback handler cleared is_fetching_current_playback, and the tick polls only while it is false. A poll dropped at the auth gate (failed refresh, or no session) left the latch set, so the tick never polled again and a remote device's playbar stayed frozen until a restart. Both drop paths now release it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
38cbb85 to
8f70b25
Compare
Summary
Fixes #563.
Only the
GetCurrentPlaybackhandler clearsis_fetching_current_playback, and the tick polls only while it isfalse. When the auth gate inhandle_network_eventdrops a poll (the refresh fails, or there is no session), the handler never runs, the latch stays set, and the tick never polls again. With spotatui controlling another Connect device, the playbar stays frozen until a restart, even after the next timed refresh succeeds.Both drop paths at the gate now release the latch when the dropped event is
GetCurrentPlayback, next to the cleanup they already do (is_loading,pending_playlist_open).Testing
rustc / clippy 1.99.0, macOS (aarch64):
cargo fmt --all --check: clean.cargo clippy --locked <leg> -- -D warnings: clean fordefault,slim,headless,headless-streaming,mcp-only,ai-dj-only,gui, and themacosjob's feature set.cargo test --locked:default1854 passed,slim1448 passed, themacosfeature set 2453 passed, 22 ignored.a_playback_poll_dropped_by_a_failed_refresh_lets_the_tick_poll_again: the tick polls, the poll hits a refresh that fails (an expired token with no refresh token, as inpre_event_auth_failure_clears_loading_state), and the tick polls again afterwards. Without the fix it fails at!app.is_fetching_current_playback.Not run here: the Linux
all-sourcesleg, and the live suspend-and-resume repro from the issue.💬 Questions or want to chat with other contributors? Join the spotatui Discord.
🤖 Generated with Claude Code