feat(tui): add Spotify settings tab to picker#58
Merged
Conversation
Adds a fourth Settings tab to the picker modal so single-pane users can see their Spotify auth state, Connect device name, and daemon.toml path without dropping out of the TUI. Tab 4 is read-only in this slice — no write surface; auth is triggered via the existing `clitunes auth` subcommand, which the tab advertises as its primary instruction. Wires up a new `Verb::ReadConfig` → `Event::ConfigSnapshot` round-trip so the daemon owns the truth about config and credential-file state; the client renders whatever the snapshot contains. `1`/`2`/`3`/`4` jump directly to a tab outside the Search input, and `Tab` cycles Radio → Search → Library → Settings → Radio. Closes clitunes-dn9 / CLI-90
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
daemon.tomlpath without dropping out of the TUI.Verb::ReadConfig→Event::ConfigSnapshotround-trip: the daemon owns the truth about config + credential-file state; the client only renders.1/2/3/4jump to a tab directly (outside the Search input where they are printable);Tabnow cycles Radio → Search → Library → Settings → Radio.Why
Before this PR, users who ran clitunes as a single pane had no way to see whether Spotify was authenticated, what their Connect device was named, or where the daemon was reading config from. The
Librarytab listed Spotify data but offered no auth hook, so a logged-out user browsing Saved Tracks got a silent empty list with no guidance. Settings is discoverability-first: we name the problem (auth state) and name the fix (clitunes authin another terminal).Read-only in this slice by design. A write path (edit device name, toggle Connect, trigger auth from the TUI) opens a multi-process race and a TUI-vs-editor focus question that are not worth solving inside a papercut PR.
Auth-surface audit (Phase 1 findings)
clitunes authalready exists as a first-class subcommand that drivesload_or_authenticatewith full headless / SSH-port-forward handling.clitunes auth. Auth state is therefore inspectable purely from disk.Verb::ReadConfigis the minimal addition needed to surface state; the payload is deliberately narrow (only fields the Settings tab actually renders).What the Settings tab shows
daemon.tomlpath (from the same resolver the daemon boots with)clitunes authwrites to)Test plan
cargo fmt --checkcleancargo clippy --workspace --all-targets -- -D warningscleancargo test --workspace --all-features— 480 engine tests + all downstream crates green, including new paint / state / verb / event roundtrip tests4, confirm auth state + device name render; runclitunes authin another terminal, pressEnterto refresh, confirm status flips to "Logged in"Closes clitunes-dn9 / CLI-90