Skip to content

fix: album art repaint, idle reconnect, greyscale themes - #4

Merged
odiumuniverse merged 1 commit into
mainfrom
fix/tmux-art-reconnect-theme
Jul 29, 2026
Merged

fix: album art repaint, idle reconnect, greyscale themes#4
odiumuniverse merged 1 commit into
mainfrom
fix/tmux-art-reconnect-theme

Conversation

@odiumuniverse

Copy link
Copy Markdown
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.
@odiumuniverse
odiumuniverse merged commit a9156be into main Jul 29, 2026
11 checks passed
@odiumuniverse
odiumuniverse deleted the fix/tmux-art-reconnect-theme branch July 29, 2026 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant