fix(tui): paint every canvas row and re-theme the help card on switch - #114
Merged
Conversation
Ember Light showed terminal-black stripes because paintCanvas only re-asserted the canvas after embedded SGR resets — rows with no escapes (plain text, blank rows, bottom padding) fell back to the terminal's own background. Every row now starts on the canvas SGR. The raw /help card was a point-in-time snapshot the theme switch never regenerated, leaving it on the previous palette. switchTheme now rebuilds every help card in place via buildHelpCard, preserving transcript order. Also updates all dependencies (go 1.26.0, x/*, goldmark, regexp2, runewidth, charmbracelet x/exp/slice) and pins both fixes with RED-first regression tests.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
bodek | 9d66c97 | Commit Preview URL Branch Preview URL |
Sep 12 2026, 01:34 PM |
The pinned v2.5.0 binary is built with go1.25 and cannot load the config of a go 1.26.0 module; v2.13.2 supports it.
lipgloss GetBackground returns NoColor{}, never nil, so the
high-contrast skip in answerCardBody was dead code (staticcheck
SA4023). surfaceSGR already encodes the no-surface case; use it.
GetBackground never returns nil — the unset case is NoColor{}, so the
nil comparison was dead code (staticcheck SA4023). Assert the sentinel
by type; unlike the rendered SGR this is profile-independent, so cards
keep their width in CI's low-color profile too.
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.
Summary
Fixes the two validated bugs from the Ember Light theme review, plus a full dependency update.
Bug 1 — blacks still observed in Ember Light (root cause)
paintCanvasframed the view with an unstyledlipgloss.Width/Heightand only re-asserted the canvas after embedded SGR resets. Rows containing no escapes at all — plain transcript lines, blank rows, bottom padding — carried no background and let the terminal's own black bleed through the parchment canvas as stripes. Every row now starts on the canvas SGR.Bug 2 — Ember Light misses some components
The raw
/helpcard was a point-in-time styled snapshot;switchTheme → resize()deliberately skipsrawmessages, so the card kept the previous palette after/theme.switchThemenow regenerates every help card in place (newbuildHelpCard()+message.helpflag), preserving transcript position.Dependencies
go get -u ./...: go 1.25.0 → 1.26.0, golang.org/x/{sys,net,term,text}, go-runewidth, goldmark, regexp2/v2, charmbracelet x/exp/slice.Validation
internal/tui/theme_regression_test.go), green after; one extra regression guard pins glamour light-preset code blocks staying background-free.make fmt,make vet,make lint(0 issues),make test(race, all packages ok).Fixes validated via 3 sequential bug-hunt subagents + RED tests per standing convention.