feat(terminal): enable truecolor + Unicode 11 wide-char rendering #29
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/terminal-truecolor-unicode"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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=truecolorso claude-code (and any well-behaved CLI) detects 24-bit RGB support. Sits next to the existingLANG/LC_ALLpin documented in AGENTS.md fact #12.worker/tmux.conf— addterminal-features ',*:RGB'so tmux forwards raw 24-bit escapes instead of degrading to 256-color, and pindefault-terminal "xterm-256color"so shells inside tmux see a sane terminfo without needing thencurses-termpackage.nexus/src/lib/components/SessionTerminal.svelte— loadxterm-addon-unicode11and setunicode.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— cleanpnpm typecheck— clean (841 files, 0 errors)pnpm test— 474/474 passingnexus-workerimage, 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-colorecho '你好 ✓ 🚀')Notes
xterm-addon-unicode11is deprecated upstream in favor of@xterm/addon-unicode11. Kept on the old name for consistency with the already-installedxterm-addon-canvas/xterm-addon-fit. A repo-wide migration to the@xterm/*namespace is a separate cleanup.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>6f8eaf6472b37551bc62