kami 45a9fe3369 fix(tui): repaint the background after inner ANSI resets, and guard it
Wrapping already-styled text in a Background() style silently fails: an inner
"\x1b[0m" (glamour emits one per span) resets the background to the *terminal*
default, not to the enclosing lipgloss style, so every cell after the first
reset went transparent and the terminal wallpaper showed through. fillFrame only
pads tail gaps, so it never caught this.

paintBG splits on the reset and re-applies the background per segment, leaving
each segment's own foreground codes intact. Used for the markdown-rendered
router turn, whose old comment claimed the wrapping approach "keeps the opaque
panel" — it did not.

TestFrameHasNoTransparentCells asserts the property directly over every
render-matrix case: after any reset, no printable cell before a background SGR.
Verified non-vacuous — restoring the old line fails it on chat.turn (router).
This is the part that stops the next render site from reintroducing it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-31 23:22:31 +04:00
S
Description
No description provided
7.7 MiB
Languages
Kotlin 89.1%
Go 10.6%
Python 0.2%
CSS 0.1%