Skip to content

Fix terminal glyph renderer fallback - #1850

Merged
AmethystLiang merged 2 commits into
mainfrom
bug-seeing-weird-garbled-characters-on-the-termi
May 14, 2026
Merged

AmethystLiang merged 2 commits into
mainfrom
bug-seeing-weird-garbled-characters-on-the-termi

Conversation

@AmethystLiang

Copy link
Copy Markdown
Contributor

Summary

  • Fixes [Bug]: Seeing weird garbled characters on the terminal, happening for both Claude Code and Codex #1847 by broadening terminal renderer-risk detection beyond RTL scripts to agent UI glyphs: box drawing, block/braille/geometric symbols, private-use/powerline, emoji/ZWJ/variation selectors, replacement chars, and split surrogates.
  • Applies the predicate on both live PTY output and replay before writing to xterm, preserving GPU mode semantics: auto falls back to DOM, on can still force WebGL.
  • Merges the duplicate deb electron-builder block that was blocking lint.

Validation

  • pnpm vitest run src/renderer/src/lib/pane-manager/terminal-complex-script.test.ts src/renderer/src/lib/pane-manager/pane-lifecycle.test.ts src/renderer/src/lib/pane-manager/pane-terminal-gpu-acceleration.test.ts
  • pnpm typecheck
  • pnpm lint passed with existing React hook warnings only.
  • Electron validation via local dev app: cold/plain terminal rendered; risky glyph output switched active pane canvas count 3 -> 1 and stayed visible; repeat risky output stayed DOM 1 -> 1; adjacent ASCII-only terminal stayed WebGL 2 -> 2. Console errors: 0 renderer errors, 16 warnings.
  • Local validation screenshots are intentionally uncommitted in validation-screenshots/: 01-cold-terminal-pass.png, 02-risk-glyph-fallback-pass.png, 03-repeat-risk-dom-pass.png, 04-adjacent-ascii-webgl-pass.png.

Notes

  • Root cause confidence is medium: WebGL glyph atlas rendering is the primary suspect, while Unicode-width restore ordering remains a separate known terminal garbling class covered by existing guardrails.
  • Design doc: docs/terminal-agent-glyph-corruption.md.

@AmethystLiang
AmethystLiang requested a review from nwparker May 14, 2026 17:49
@AmethystLiang

Copy link
Copy Markdown
Contributor Author

Closing per request.

@AmethystLiang
AmethystLiang merged commit cfa98d4 into main May 14, 2026
7 checks passed
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
* fix terminal glyph renderer fallback

* remove terminal glyph design doc from pr
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.

[Bug]: Seeing weird garbled characters on the terminal, happening for both Claude Code and Codex

1 participant