Support color@v1 role in the TUI for dynamic color themes based on the musics artwork#254
Merged
Conversation
Subscribes to `color@v1` so server-pushed artwork palettes tint panel backgrounds, borders, text, and the visualizer gradient. A `t` shortcut toggles dark/light theme, persisted across runs, with fallback to unthemed rendering when no palette is present.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds server-driven artwork palette theming support to the Sendspin TUI by subscribing to the color@v1 role and applying palette-derived colors to panels and the spectrum visualizer, plus a persisted dark/light toggle.
Changes:
- Bump
aiosendspinto~=5.3to accesscolor@v1support. - Subscribe to the color role (
Roles.COLOR) and forward palette updates into the TUI, resetting palette on disconnect. - Extend the visualizer renderer and TUI layout/panels to support palette-based backgrounds and gradients, and add a
tkeybinding to toggle theme mode (persisted).
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| uv.lock | Updates lockfile to aiosendspin 5.3.0 and associated metadata. |
| pyproject.toml | Bumps runtime dependency to aiosendspin[server]~=5.3. |
| sendspin/tui/visualizer.py | Adds palette anchors/background and configurable peak-marker color for spectrum rendering. |
| sendspin/tui/ui.py | Introduces palette state, theme mode toggle/persistence hook, and palette-tinted panels/layout. |
| sendspin/tui/keyboard.py | Adds t shortcut mapped to toggling the UI color mode. |
| sendspin/tui/app.py | Requests Roles.COLOR, attaches color listener, persists theme choice, resets palette on detach. |
| sendspin/settings.py | Persists color_mode across runs in client settings. |
Comments suppressed due to low confidence (1)
sendspin/tui/ui.py:618
- In palette mode,
name_style/url_styleforce hard-coded foreground colors (e.g.white,cyan) which can break contrast in LIGHT mode (panel fg becomes black, but these spans override to white/cyan). Consider passing these through_themed(...)(or omitting explicit fg colors so they inherit the panel’s palette fg).
# Server name
name_style = "bold white" if is_selected else "white"
line.append(server.name, style=name_style)
# Current server indicator
if is_current:
line.append(" (current)", style=self._themed("dim green"))
content.add_row(line)
# Show URL below name
url_line = Text()
url_line.append(" ")
url_style = "cyan" if is_selected else "dim"
url_line.append(f" {server.host}:{server.port}", style=url_style)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
balloob
approved these changes
May 21, 2026
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.
Subscribes to the
color@v1role and tints panel backgrounds, borders, text, and the visualizer gradient from server-pushed artwork palettes. Adds atshortcut to toggle dark/light theme, persisted across runs, with fallback to the previous unthemed rendering when no palette is present.When connected to Music Assistant, the colors will be extracted from the album artwork.