feat(terminal): enable truecolor + Unicode 11 wide-char rendering #29

Manually merged
lz merged 1 commit from feat/terminal-truecolor-unicode into main 2026-05-28 23:25:52 +02:00
Owner

Summary

Three coordinated changes so claude-code's full color range and wide glyphs (CJK, emoji, box-drawing) render correctly in the in-browser session terminal.

  • worker/DockerfileENV COLORTERM=truecolor so claude-code (and any well-behaved CLI) detects 24-bit RGB support. Sits next to the existing LANG/LC_ALL pin documented in AGENTS.md fact #12.
  • worker/tmux.conf — add terminal-features ',*:RGB' so tmux forwards raw 24-bit escapes instead of degrading to 256-color, and pin default-terminal "xterm-256color" so shells inside tmux see a sane terminfo without needing the ncurses-term package.
  • nexus/src/lib/components/SessionTerminal.svelte — load xterm-addon-unicode11 and set unicode.activeVersion = '11'. xterm.js's built-in v6 width tables mis-measure modern wide chars, causing claude's status icons and emoji to overlap the next column. Truecolor itself works in xterm.js core out of the box; nothing extra is needed there.

The worker-side changes only take effect on the next worker image rebuild + container respawn.

Test plan

  • pnpm lint — clean
  • pnpm typecheck — clean (841 files, 0 errors)
  • pnpm test — 474/474 passing
  • Rebuild nexus-worker image, respawn a worker, verify a 24-bit gradient (e.g. printf '\x1b[38;2;255;100;0mhello\x1b[0m\n' inside the session) renders as orange, not the nearest 256-color
  • Verify claude-code emits its full color palette (status icons, syntax highlighting)
  • Verify emoji + CJK render without overlapping the next column (e.g. echo '你好 ✓ 🚀')

Notes

xterm-addon-unicode11 is deprecated upstream in favor of @xterm/addon-unicode11. Kept on the old name for consistency with the already-installed xterm-addon-canvas / xterm-addon-fit. A repo-wide migration to the @xterm/* namespace is a separate cleanup.

## Summary Three coordinated changes so claude-code's full color range and wide glyphs (CJK, emoji, box-drawing) render correctly in the in-browser session terminal. - **`worker/Dockerfile`** — `ENV COLORTERM=truecolor` so claude-code (and any well-behaved CLI) detects 24-bit RGB support. Sits next to the existing `LANG`/`LC_ALL` pin documented in AGENTS.md fact #12. - **`worker/tmux.conf`** — add `terminal-features ',*:RGB'` so tmux forwards raw 24-bit escapes instead of degrading to 256-color, and pin `default-terminal "xterm-256color"` so shells inside tmux see a sane terminfo without needing the `ncurses-term` package. - **`nexus/src/lib/components/SessionTerminal.svelte`** — load `xterm-addon-unicode11` and set `unicode.activeVersion = '11'`. xterm.js's built-in v6 width tables mis-measure modern wide chars, causing claude's status icons and emoji to overlap the next column. Truecolor itself works in xterm.js core out of the box; nothing extra is needed there. The worker-side changes only take effect on the next worker image rebuild + container respawn. ## Test plan - [x] `pnpm lint` — clean - [x] `pnpm typecheck` — clean (841 files, 0 errors) - [x] `pnpm test` — 474/474 passing - [ ] Rebuild `nexus-worker` image, respawn a worker, verify a 24-bit gradient (e.g. `printf '\x1b[38;2;255;100;0mhello\x1b[0m\n'` inside the session) renders as orange, not the nearest 256-color - [ ] Verify claude-code emits its full color palette (status icons, syntax highlighting) - [ ] Verify emoji + CJK render without overlapping the next column (e.g. `echo '你好 ✓ 🚀'`) ## Notes `xterm-addon-unicode11` is deprecated upstream in favor of `@xterm/addon-unicode11`. Kept on the old name for consistency with the already-installed `xterm-addon-canvas` / `xterm-addon-fit`. A repo-wide migration to the `@xterm/*` namespace is a separate cleanup.
feat(terminal): enable truecolor + Unicode 11 wide-char rendering
All checks were successful
ci / nexus (pull_request) Successful in 3m47s
ci / images (./nexus, agent-nexus) (pull_request) Successful in 4m1s
ci / images (./worker, nexus-worker) (pull_request) Successful in 2m19s
6f8eaf6472
Three coordinated changes so claude-code's full color range and wide
glyphs (CJK, emoji, box-drawing) render correctly in the in-browser
session terminal:

  worker/Dockerfile:
    Add ENV COLORTERM=truecolor so claude-code (and any well-behaved
    CLI) detects 24-bit RGB support.

  worker/tmux.conf:
    Add `terminal-features ',*:RGB'` so tmux forwards raw 24-bit RGB
    escapes instead of degrading to 256-color, and pin default-terminal
    to xterm-256color so shells inside tmux see a sane terminfo.

  nexus/src/lib/components/SessionTerminal.svelte:
    Load xterm-addon-unicode11 and set unicode.activeVersion = '11'.
    xterm.js's built-in v6 width tables mis-measure modern wide chars,
    causing claude's status icons and emoji to overlap the next column.
    Truecolor itself works in xterm.js core out of the box; nothing
    extra is needed there.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
lz force-pushed feat/terminal-truecolor-unicode from 6f8eaf6472
All checks were successful
ci / nexus (pull_request) Successful in 3m47s
ci / images (./nexus, agent-nexus) (pull_request) Successful in 4m1s
ci / images (./worker, nexus-worker) (pull_request) Successful in 2m19s
to b37551bc62
Some checks failed
ci / nexus (pull_request) Failing after 1m38s
ci / images (./nexus, agent-nexus) (pull_request) Has been skipped
ci / images (./worker, nexus-worker) (pull_request) Has been skipped
ci / nexus (push) Failing after 1m29s
ci / images (./nexus, agent-nexus) (push) Has been skipped
ci / images (./worker, nexus-worker) (push) Has been skipped
2026-05-28 23:24:17 +02:00
Compare
lz manually merged commit b37551bc62 into main 2026-05-28 23:25:52 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lz/agent-nexus!29
No description provided.