Display album artwork in the TUI via artwork@v1#266
Merged
Conversation
balloob
requested changes
Jun 11, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for rendering album artwork in the TUI “Now Playing” panel by negotiating the artwork@v1 role (only when terminal graphics are available) and decoding streamed artwork frames into Pillow images for display via textual-image.
Changes:
- Negotiate
artwork@v1in the TUI client hello when terminal graphics are detected, and plumb decoded artwork intoUIState. - Add an artwork connector (
ArtworkHandler) to decode artwork frames and clear artwork on stream end/clear. - Add a small renderable cache + tests; introduce
pillowandtextual-imagedependencies.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
sendspin/tui/app.py |
Negotiates artwork@v1, attaches artwork handler, updates UI state on artwork changes. |
sendspin/tui/ui.py |
Adds artwork state and renders an artwork column in the Now Playing panel when available/wide enough. |
sendspin/tui/artwork.py |
New helper to render artwork via textual-image with a small cache and support detection. |
sendspin/artwork_connector.py |
New connector to decode artwork payloads with Pillow and emit latest image/clear events. |
tests/tui/test_artwork.py |
Tests for the artwork render helper caching behavior. |
tests/test_artwork_connector.py |
Tests for artwork decoding, channel filtering, and stream clear/end behavior. |
pyproject.toml |
Adds pillow and textual-image runtime dependencies. |
uv.lock |
Locks new dependencies (pillow, textual-image) and their transitive requirements. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Renders album artwork in the Now Playing panel using the
artwork@v1role. The role is only registered whentextual-imagedetects Kitty graphics or Sixel support at startup. Terminals without graphics support keep the existing layout since the Unicode block fallback can only render a couple of pixels.Mainly wrote this to more easily test the artwork role since this doesn't require an ESP32 and most on desktop runnable implementations use the image url from the metadata role.
Screenshot