Repository navigation
fix(tui): enforce backgrounds on light themes to prevent invisible text - #195
Conversation
- Forces `SurfaceDark` background on `pickerBox` and `inputBoxStyle` so TUI menus remain readable on mismatched terminal backgrounds - Synchronizes `glamour` markdown rendering with the active app theme instead of relying on unreliable terminal auto-detection - Updates status bar to dynamically obey selected theme colors
QualityMax ReviewVerdict: COMMENT · Confidence: evidence-backed scan Files eligible: 5 · Files reviewed: 5 · Files with findings: 0 · Findings: 0 · Inline cards: 0 Priority findings
Review gates
Important files
Change diagram — Flowgraph TD
A[ApplyTheme(Theme)] --> B[Update Global Styles]
B --> C[refreshLiveTerminalRenderers]
C --> D{For each Terminal}
D --> E[t.setMarkdownStyle(dark)]
E --> F[Rebuild glamour.TermRenderer]
F --> G[Update t.renderer under rendMu]
Review lifecycleUse the inline cards to inspect evidence and suggested remediation. Re-run the QualityMax review after pushing a fix; unchanged cards are identified by their stable finding marker. Dismiss with a reason through the existing QualityMax/GitHub review feedback flow. 0 prior card(s) are stale/resolved on this head. Proof legend: VERIFIED independently judged patch · REPRODUCED verified finding · GROUNDED deterministic evidence · MODEL-ONLY model judgment. QualityMax project results are available in the configured project. Receipt · commit |
- Rebuild glamour renderer on live theme switch via terminal registry, so /theme and /set theme take effect immediately instead of after restart - Guard renderer swaps with a mutex so mid-session style changes cannot race an in-flight markdown render - Raise SurfaceSelect contrast vs SurfaceDark in all themes (picker selection highlight was invisible on the new boxed background) - Paint statusMetricsStyle with SurfaceDark so the metrics line matches the status bar instead of floating on the terminal background - Drop stale 'takes full effect on restart' message - Add regression tests: polarity flag, style backgrounds, palette contrast, renderer swap + live refresh
|
| Gate | Result |
|---|---|
| 🔍 AI diff review | ✅ Clean · gemini-3.1-flash-lite · completed · 5 eligible / 5 reviewed · gemini-3.1-flash-lite |
| 🔍 SAST | completed · 5 eligible / 5 reviewed · qwen3.7-plus |
| 🔍 Canonical PR review delivery | completed · 0 eligible / 0 reviewed · exact-head review #5183375423 and overview #5640162349 confirmed |
| 🧪 Repo Tests | ✅ 799/799 passed (go) |
Powered by QualityMax — AI-Powered Test Automation
Adversarial review — findings resolved ✅Follow-up review of this PR flagged 5 issues, all fixed in 09a1139 and verified (
Also verified clean during review: startup ordering (theme applied before every |
Adversarial-review follow-ups: - Foreground-only picker chrome (labels, headers, footers, dividers, hints) now keys off the terminal's actual background polarity instead of the previewed theme's. Previewing a light theme on a dark terminal (or vice versa) previously rendered near-black labels on a dark background — the exact invisible-text bug #195 tried to fix. Values match same-polarity themes exactly, so matched setups are unchanged. - Gate tea.ClearScreen on actual polarity flips: clearing erases the visible screenful in place, so every arrow key was destroying the on-screen transcript. Same-polarity moves rely on the renderer's line diff; cancel only clears when the restore flips polarity. - Skip glamour renderer rebuilds when polarity is unchanged. - Tests: same-polarity move must not clear, no-flip cancel must quit without clear, chrome polarity adaptation, renderer rebuild elision.
SurfaceDarkbackground onpickerBoxandinputBoxStyleso TUI menus remain readable on mismatched terminal backgroundsglamourmarkdown rendering with the active app theme instead of relying on unreliable terminal auto-detection