fix(connect): hydrate status metadata + improve device UX#11
Conversation
- Hydrate connect status track/device metadata via Web API best-effort with bounded timeouts - Improve connect-state item parsing for sparse payloads - Enhance device commands (show/clear, set --save) and selector matching - Add tests for hydration, device selection, and CLI behaviors
|
Rebased review against current main: not merge-now safe. Current blocker: this still does not fix issue #8. still routes through Connect transfer, and the failure path remains in when neither origin nor active device is present. Current architecture also diverged since this PR was opened: the old monoliths were split, and parts of this PR now overlap landed work in #7 and #15. This needs a manual split/port, not a straight rebase. Recommended split:
Keeping this open for a narrower follow-up, but not merging as-is. |
|
Follow-up with the exact blocker text. This still does not fix issue #8. Current architecture also diverged since this PR was opened: the old monoliths were split, and parts of this PR now overlap landed work in #7 and #15. This needs a manual split/port, not a straight rebase. Recommended split:
Keeping this open for a narrower follow-up, but not merging as-is. |
|
Root issue is fixed on in c613e96.\n\nThat change handles the missing-origin-device path directly by falling back to Web API transfer when Connect state has no source device.\n\nThis PR still looks like separate status-hydration / device-UX work, and it still needs a rebase/split before merge. |
|
Triage note: not merging this as-is today. It is dirty against current Some adjacent fixes are already on |
|
Closing this stale broad PR after current-main triage. The original missing-origin device path was fixed on \ in c613e96, and more adjacent Connect/status fixes have landed since then (#16, #21, #24, plus the current sparse metadata fixes released in v0.3.0). This branch is now conflicting/dirty and mixes several separable changes: status hydration, Connect-state parsing, device commands, saved-device config, and selector matching. There are still useful ideas here, but they should come back as smaller rebased PRs. Good follow-up slices would be:
Thanks for the work here; closing to keep the queue actionable rather than trying to revive this branch wholesale. |
|
Correction to the close note above, where Markdown backticks were eaten by my shell. Closing this stale broad PR after current-main triage. The original missing-origin device path was fixed on There are still useful ideas here, but they should come back as smaller rebased PRs. Good follow-up slices would be:
Thanks for the work here; closing to keep the queue actionable rather than trying to revive this branch wholesale. |
Summary
This improves reliability of
spogo status(especially with theconnectengine) when Spotify connect-state payloads omit track/device metadata, and upgrades device management ergonomics.Problem
Some devices/sessions return sparse connect-state payloads where the currently playing item has a URI/ID but no name/album, and the active device has little to no metadata. This made
statusoutputs inconsistent (track/device fields often empty) and could lead to slow/hanging status calls when fallback paths were slow.Fix
/me/playerto fill missing track/device fields when available.GetTrackfirst (fast), then fall back to the existing connect GraphQLtrackInfo./me/player/devicesby ID, and as a last resort pick the single active Web API device.status --jsonstays responsive under automation.Device UX
spogo device showandspogo device clear.spogo device set --saveto persist selection to the current profile.connectengine honors--device/profile device by auto-transferring before playback commands.Tests
ContentLengthso Web API JSON decoding behavior matches production client logic.Docs
connectstatus hydration behavior in README/spec/changelog.