Skip to content

fix(tui): preserve readable skins across appearance modes - #16835

Closed
tzedekr wants to merge 1 commit into
NousResearch:mainfrom
tzedekr:fix/tui-appearance-contrast
Closed

fix(tui): preserve readable skins across appearance modes#16835
tzedekr wants to merge 1 commit into
NousResearch:mainfrom
tzedekr:fix/tui-appearance-contrast

Conversation

@tzedekr

@tzedekr tzedekr commented Apr 28, 2026

Copy link
Copy Markdown

Summary

  • Preserve the Hermes TUI look while making skins readable across light and dark terminal appearance modes
  • Add contrast-safe skin/theme merging for terminal, status bar, and completion-menu colors
  • Harden theme tests for light/dark detection, invalid colors, status backgrounds, and completion palette behavior

Verification

  • npm --prefix ui-tui run lint: passed with 0 errors, 13 warnings
  • COLORFGBG='0;15' npm --prefix ui-tui run test -- --run src/tests/theme.test.ts: 37 tests passed
  • env -u COLORFGBG npm --prefix ui-tui run test: 49 files, 423 tests passed
  • npm --prefix ui-tui run type-check: passed
  • npm --prefix ui-tui run build: passed, compiled 112 files
  • Claude Code Review: PASS

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/tui Terminal UI (ui-tui/ + tui_gateway/) labels Apr 28, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Thanks for this contribution, @tzedekr! After reviewing current main, the core fix this PR implements is already covered by subsequent commits.

This is an automated hermes-sweeper review.

  • The normalizeThemeForAnsiLightTerminal() function and its application inside fromSkin() landed via PR fix(tui): normalize legacy Terminal.app colors #17695 (commit 4cc6da84a, 2026-04-29): ui-tui/src/theme.ts lines 478–496 and 526.
  • Light-terminal auto-detection improvements and the accompanying test hardening for COLORFGBG, HERMES_TUI_THEME, Apple_Terminal, and truecolor passthrough landed via PR feat(tui): expand light-terminal auto-detection (HERMES_TUI_THEME, background hex) #17113 (commit 258efb257, 2026-04-28).
  • The ANSI color math constants (ANSI_LIGHT_MAX_LUMINANCE, ANSI_MUTED_BUCKET, ANSI_NORMALIZED_FOREGROUNDS, etc.) are all present at lines 80–100 of the current theme.ts.
  • The PR is currently marked CONFLICTING against main due to these overlapping changes.

The underlying problem is fixed on main. Closing as implemented.

@teknium1 teknium1 closed this Jun 10, 2026
@teknium1 teknium1 added the sweeper:implemented-on-main Sweeper: behavior already present on current main label Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/tui Terminal UI (ui-tui/ + tui_gateway/) P3 Low — cosmetic, nice to have sweeper:implemented-on-main Sweeper: behavior already present on current main type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants