fix: album art repaint, idle reconnect, greyscale themes - #4
Merged
Conversation
odiumuniverse
commented
Jul 29, 2026
Owner
- Blank and overdraw the album art with CellDiffOption::AlwaysUpdate; ratatui-image marks the image's cells Skip without changing their symbols, and a blank cell compares equal to the blank already there, so Clear over an image wrote nothing and the picture survived every attempt to erase it
- Draw overlays on top of the cover instead of under it — the actions menu used to leave its right-hand half stencilled across the art with the image gone
- Write the image escape only when the cover actually changes; it went out on every frame, so a recolour that repaints the screen dozens of times in a row made the cover flicker
- Rebuild the session, player and Connect device when the access point stops answering; librespot invalidates the session on a keep-alive timeout and leaves recovery to the caller (session.rs: "TODO: Optionally reconnect"), so every command afterwards failed with Internal error { channel closed } until a restart
- Take the theme's base hue from the most saturated swatch, not the dominant one; rgb_to_hsl reports hue 0 for every grey and hue 0 is red, so black-and-white covers all painted the UI the same burgundy
- Scale the surface tint by how colourful the art is, so greyscale art gets a neutral UI instead of an arbitrary hue, and stop for_dark_fg raising saturation on an achromatic swatch
- Present each frame atomically with synchronized output (DECSET 2026); a track change recolours every glyph at once and the terminal rendered that half-applied
- Run the theme cross-fade over 1200ms instead of 300ms — smoothness comes from duration, since every present recomposes the viewport
- Drop the blind two-second art resend under tmux; it re-encoded the cover to produce an identical cell the diff discarded, so it never recovered anything
- Honour protocol and MYX_PROTOCOL inside a sixel-capable tmux; the sixel picker drops tmux passthrough, so a forced kitty or iTerm2 left its escapes for tmux to eat
- Detect kitty from the client tmux has attached now instead of KITTY_WINDOW_ID, which lingers in a session's environment after reattaching from another terminal
- Build the picker before the tokio runtime and the player exist — picking sixel swaps TERM around the query, and setenv is only safe without concurrent readers
- Ignore the keys that only drive the hidden library in zen mode, and drop their footer hints; a retargets onto the playing track rather than the invisible selection
- Give each cache write a unique temp name so two threads fetching the same URL can't interleave into one corrupt entry
The art box's cells are marked Skip and never rewritten, so blanking or overdrawing an inline image needs AlwaysUpdate. An idle session dies and librespot leaves recovery to the caller. Grey has hue 0, which is red.
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.