Skip to content

fix(dashboard): advertise truecolor to the embedded chat TUI#60576

Merged
teknium1 merged 1 commit into
mainfrom
hermes/hermes-17d43587
Jul 8, 2026
Merged

fix(dashboard): advertise truecolor to the embedded chat TUI#60576
teknium1 merged 1 commit into
mainfrom
hermes/hermes-17d43587

Conversation

@teknium1

@teknium1 teknium1 commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Fresh hosted/cloud dashboards render the embedded chat TUI banner salmon-red instead of gold: headless servers have no COLORTERM, so chalk inside the PTY-spawned TUI child downgrades every skin hex color to the xterm 256 palette. This PR backfills COLORTERM=truecolor into the dashboard PTY child env, restoring exact 24-bit skin colors.

Root cause: the TUI child inherits the dashboard server's environment. Under a process manager (container init, systemd) there is no COLORTERM, so chalk picks the 256-color path and the default skin's bronze banner border #CD7F32 snaps to palette 173 (#D7875F — salmon red); gold #FFD700 snaps to 220. Local launches never reproduce it because the operator's interactive terminal leaks COLORTERM=truecolor into the server env. xterm.js renders 24-bit RGB unconditionally, so degrading was never correct for this surface.

Changes

  • hermes_cli/web_server.py: _resolve_chat_argv()env.setdefault("COLORTERM", "truecolor") for the dashboard PTY child. setdefault so an explicit operator value wins. Native CLI/TUI usage untouched.
  • tests/hermes_cli/test_web_server.py: 2 tests — backfill fires when COLORTERM is unset; operator-set COLORTERM=24bit is respected.

Validation

Clean-env PTY probe of the real TUI binary (ui-tui/dist/entry.js) under ptyprocess, TERM=xterm-256color:

truecolor SGRs palette-256 SGRs bronze border
Before (no COLORTERM) 0 165 38;5;173 (salmon)
After (backfill) 166 0 38;2;205;127;50 (exact bronze)

Also verified live end-to-end: launched the dashboard with env -u COLORTERM (reproducing the hosted environment) and inspected /chat in a real browser — salmon banner on main, gold banner with the fix. Targeted tests green, ruff clean.

Infographic

infographic

Headless/hosted deploys run the dashboard server without COLORTERM in
the process environment, so chalk inside the PTY-spawned TUI child
downgraded every skin hex color to the xterm 256 palette — the default
skin's bronze banner border (#CD7F32) snapped to palette 173 (#D7875F,
salmon red) and the gold caduceus rendered red/yellow on fresh cloud
instances. Local launches never reproduced it because the operator's
interactive terminal leaks COLORTERM=truecolor into the server env.

xterm.js always renders 24-bit RGB, so the dashboard PTY child should
always advertise truecolor: backfill COLORTERM=truecolor in
_resolve_chat_argv via setdefault (an explicit operator value wins).

Verified with a clean-env PTY probe of the real TUI binary:
no COLORTERM -> 0 truecolor SGRs / 165 palette-256 (salmon 38;5;173);
with the backfill -> 166 truecolor SGRs, exact bronze 38;2;205;127;50.
@teknium1 teknium1 merged commit 5633fa1 into main Jul 8, 2026
31 checks passed
@teknium1 teknium1 deleted the hermes/hermes-17d43587 branch July 8, 2026 00:17
@alt-glitch alt-glitch added type/bug Something isn't working comp/dashboard Web dashboard / control panel UI (dashboard/, landing) P3 Low — cosmetic, nice to have labels Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/dashboard Web dashboard / control panel UI (dashboard/, landing) P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants