mirror of
https://github.com/openai/codex.git
synced 2026-11-26 23:40:43 +00:00
## Why Terminals that leave bidirectional ordering to the application can display Arabic and Hebrew transcript text in the wrong order, especially when it includes URLs, numbers, or inline code. ## What changed Use the terminal's bidirectional mode report when available on a direct connection, with a fallback for Windows Terminal, Ghostty, and Alacritty. Resolve direction before wrapping and reorder graphemes for display in the live transcript and scrollback. Preserve styling, hyperlink destinations, and logical text for copying. Keep URLs and inline literals left to right, and skip reordering for code blocks, tables, and lines with shell syntax that could be misrepresented. Measure hyperlink columns by painted graphemes so Arabic ligatures do not shift clickable ranges in the transcript or composer. ## Testing Cover agreement between streaming and finalized scrollback, preservation of shell command boundaries, startup probe reply handling, and wrapped composer links following Arabic text. GitOrigin-RevId: 9ffa0f491a93c78fef423acfc6a951cb037abd4d