Skip to content

fix emoji/wide-character rendering in terminal#34

Merged
abasiri merged 1 commit into
doctly:mainfrom
navedr:fix/xterm-unicode-graphemes
Apr 26, 2026
Merged

fix emoji/wide-character rendering in terminal#34
abasiri merged 1 commit into
doctly:mainfrom
navedr:fix/xterm-unicode-graphemes

Conversation

@navedr

@navedr navedr commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds @xterm/addon-unicode-graphemes to fix garbled text on lines containing emoji (✅, ❓, flags, ZWJ sequences)
  • xterm.js defaults to Unicode 6.1 width tables which treat emoji as single-width, shifting all subsequent characters on the line
  • The addon uses UAX Failing to launch new session with no feedback #29 grapheme clustering (Unicode 15) for correct cell-width calculation

Test plan

  • Open a session that outputs emoji (e.g. Claude Code output with ✅/❓ markers)
  • Verify characters after emoji are correctly aligned, no gaps or overlap
  • Verify normal ASCII-only output is unaffected

🤖 Generated with Claude Code

xterm.js defaults to Unicode 6.1 width tables which treat emoji as
single-width, causing all subsequent characters on the line to shift.
The unicode-graphemes addon uses UAX doctly#29 grapheme clustering (Unicode 15)
for correct cell-width calculation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@abasiri abasiri merged commit e20e3ea into doctly:main Apr 26, 2026
4 checks passed
ymajoros pushed a commit to ymajoros/switchboard that referenced this pull request Jun 4, 2026
…-wiring

fix(stats): wire replaceSessionMetrics + touchCachedModified into sessionCache ctx.db
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.

2 participants