Skip to content

an open-source alternative to the dots, bots and muses of the world, run an office of claude code/codex like agents on your laptop, sandboxes or anywhere, uses your existing subscriptions

fix: emoji no longer merge with following text - Unicode 11 width tables

Gulum9285c031f354
diff --git a/package-lock.json b/package-lock.json
index aecc9521..29f3576c 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -22,6 +22,7 @@
"@lezer/highlight": "^1.2.3",
"@uiw/react-codemirror": "^4.25.10",
"@xterm/addon-fit": "^0.10.0",
+ "@xterm/addon-unicode11": "^0.9.0",
"@xterm/addon-webgl": "^0.19.0",
"@xterm/xterm": "^5.5.0",
"better-sqlite3": "^11.10.0",
@@ -2493,6 +2494,12 @@
"@xterm/xterm": "^5.0.0"
}
},
+ "node_modules/@xterm/addon-unicode11": {
+ "version": "0.9.0",
+ "resolved": "https://registry.npmjs.org/@xterm/addon-unicode11/-/addon-unicode11-0.9.0.tgz",
+ "integrity": "sha512-FxDnYcyuXhNl+XSqGZL/t0U9eiNb/q3EWT5rYkQT/zuig8Gz/VagnQANKHdDWFM2lTMk9ly0EFQxxxtZUoRetw==",
+ "license": "MIT"
+ },
"node_modules/@xterm/addon-webgl": {
"version": "0.19.0",
"resolved": "https://registry.npmjs.org/@xterm/addon-webgl/-/addon-webgl-0.19.0.tgz",
diff --git a/package.json b/package.json
index 321d5f32..a5eda73e 100644
--- a/package.json
+++ b/package.json
@@ -37,6 +37,7 @@
"@lezer/highlight": "^1.2.3",
"@uiw/react-codemirror": "^4.25.10",
"@xterm/addon-fit": "^0.10.0",
+ "@xterm/addon-unicode11": "^0.9.0",
"@xterm/addon-webgl": "^0.19.0",
"@xterm/xterm": "^5.5.0",
"better-sqlite3": "^11.10.0",
diff --git a/src/renderer/src/components/terminalPool.ts b/src/renderer/src/components/terminalPool.ts
index 861478d8..0e73ccde 100644
--- a/src/renderer/src/components/terminalPool.ts
+++ b/src/renderer/src/components/terminalPool.ts
@@ -16,6 +16,7 @@
import { Terminal } from '@xterm/xterm';
import { FitAddon } from '@xterm/addon-fit';
import { WebglAddon } from '@xterm/addon-webgl';
+import { Unicode11Addon } from '@xterm/addon-unicode11';
import '@xterm/xterm/css/xterm.css';
export interface TerminalEntry {
@@ -68,6 +69,12 @@ export function acquireTerminal(ptyId: string, theme?: ThemeMap, fontSize = 14):
});
const fit = new FitAddon();
term.loadAddon(fit);
+ // Unicode 11 width tables: xterm's default (Unicode 6) counts most emoji as
+ // ONE cell wide, but Claude Code positions text with modern widths (emoji =
+ // two cells) — the glyph then overflows its single cell and merges with the
+ // following text (e.g. "✅FIX-…"). Match the app's idea of character width.
+ term.loadAddon(new Unicode11Addon());
+ term.unicode.activeVersion = '11';
// NOTE: don't open() yet — xterm needs its host connected to the document to
// measure correctly. We open on first attach (see attachTerminal).