Skip to content

fix(tui): theme-driven update-behind banner + auto-detect light terminals (#11300)#13103

Merged
OutThisLife merged 1 commit into
mainfrom
bb/tui-light-mode-11300
Apr 20, 2026
Merged

fix(tui): theme-driven update-behind banner + auto-detect light terminals (#11300)#13103
OutThisLife merged 1 commit into
mainfrom
bb/tui-light-mode-11300

Conversation

@OutThisLife

Copy link
Copy Markdown
Collaborator

Fixes #11300. Alt to #12487 — routes through the existing theme instead of swapping one hardcoded color for another.

Summary

  • branding.tsx: 4× color="yellow"color={t.color.warn}. Now respects theme (amber #ffa726 on dark, burnt-orange #E65100 on light). PR fix(tui): replace unreadable yellow colors with dark goldenrod (#11300) #12487 swapped in #b8860b — better than bright yellow but still bypasses the theme and ignores the LIGHT_THEME that already landed in 20eab355.
  • theme.ts: HERMES_TUI_LIGHT regex → detectLightMode(env) that also sniffs COLORFGBG. Bg slot 7 or 15 → LIGHT_THEME. Explicit HERMES_TUI_LIGHT (on or off) still wins. XFCE Terminal / rxvt / Terminal.app / iTerm2 users get light mode with no config.
  • theme.test.ts: +10 assertions covering empty env, explicit on/off, COLORFGBG positions (0;15, 0;default;15, 0;7, 15;0, 7;default;0), and off-overrides-light.

Test plan

  • npm run type-check — clean
  • npx vitest run src/__tests__/theme.test.ts — 15/15
  • npm run lint on touched files — clean (pre-existing errors unrelated)
  • Manual: COLORFGBG=0;15 hermes --tui on a real light terminal shows dark-orange "commits behind" text

Notes for reviewers

If #12487 is preferred for the color-swap narrowness, this PR supersedes it: same readability win, plus the theme path and autodetect. If both land, the color={t.color.warn} change is a clean rebase on top.

…t terminals (#11300)

- branding.tsx: `color="yellow"` → `t.color.warn` so light-mode users get the
  burnt-orange warn instead of unreadable bright yellow on white bg.
- theme.ts: replace HERMES_TUI_LIGHT regex with `detectLightMode(env)` that also
  sniffs `COLORFGBG` (XFCE Terminal, rxvt, Terminal.app, iTerm2). Bg slot 7 or
  15 → LIGHT_THEME. Explicit HERMES_TUI_LIGHT (on *or* off) still wins.
- tests: cover empty env, explicit on/off, COLORFGBG positions, and off-override.
@OutThisLife OutThisLife merged commit bf5e2e4 into main Apr 20, 2026
1 of 2 checks passed
@OutThisLife OutThisLife deleted the bb/tui-light-mode-11300 branch April 20, 2026 16:29
ulasbilgen pushed a commit to ulasbilgen/hermes-adhd-agent that referenced this pull request May 1, 2026
…mode-11300

fix(tui): theme-driven update-behind banner + auto-detect light terminals (NousResearch#11300)
aj-nt pushed a commit to aj-nt/hermes-agent that referenced this pull request May 1, 2026
…mode-11300

fix(tui): theme-driven update-behind banner + auto-detect light terminals (NousResearch#11300)
Luminet2023 pushed a commit to Luminet2023/hermes-agent that referenced this pull request May 1, 2026
…mode-11300

fix(tui): theme-driven update-behind banner + auto-detect light terminals (NousResearch#11300)
02356abc pushed a commit to 02356abc/hermes-agent that referenced this pull request May 14, 2026
…mode-11300

fix(tui): theme-driven update-behind banner + auto-detect light terminals (NousResearch#11300)
gweeteve pushed a commit to gweeteve/hermes-agent that referenced this pull request Jun 2, 2026
…mode-11300

fix(tui): theme-driven update-behind banner + auto-detect light terminals (NousResearch#11300)
Egavasyug pushed a commit to Egavasyug/hermes-agent that referenced this pull request Jun 10, 2026
…mode-11300

fix(tui): theme-driven update-behind banner + auto-detect light terminals (NousResearch#11300)
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.

[Bug]: TUI hardcodes bright yellow colors, unreadable on white terminal backgrounds

1 participant