[BUG] Desktop Code tab: Persian is reversed in permission prompts, ZWNJ shown as [U+200C] or removed, RLM shown as U+FFFD, and several places set no text direction
Environment
- Claude Desktop 2.26454.2 on Linux (Debian 13, x64), Code tab, with its bundled Claude Code 2.1.293
- Writing in Persian (Arabic script, right to left)
- Related: #38005 (RTL in general), #99956 (text direction for mods), #83969 (logical CSS properties), #78625
Summary
Assistant messages already work well for Persian. Their renderer sets dir on every paragraph, heading and list from the first strong character, and several components wrap text in dir="auto" and <bdi> (the Recap card, the decision card, the todo body). The problems below are in places that set no direction at all, or that change characters Persian needs.
Characters that are changed
- The permission prompt reverses Persian. Under "What Claude sent" (MCP tool input), a value that contains any Arabic-script letter is treated as code and drawn with
dir="ltr"andunicode-bidi: bidi-override. Persian and Arabic letters therefore appear in reverse order. To reproduce, let a tool that asks for permission run with a Persian string argument. Expected: the value is drawn as text withdir="auto". - ZWNJ (U+200C) is shown as
[U+200C]or removed. ZWNJ is a normal part of Persian spelling, as in «میشود». In the permission prompt's Bash command it is drawn as the literal text[U+200C]. In the meta text of tool rows and instart_sessionproposal titles it is deleted, which joins letters that must stay apart. Expected: U+200C and U+200D are kept and drawn like any other character. - RLM (U+200F) is shown as U+FFFD or as
[U+200F]. In the Code tab's AskUserQuestion card, the question and the options are sanitized so that U+200F becomes U+FFFD in the docked card, and the literal text[U+200F]in the inline card and in the answered receipt. In the permission title it becomes the literal text, andset_session_titlerefuses any title that contains it. RLM and LRM are the standard way to set the direction of a line that starts with a Latin word, so users have to avoid them completely.
Places with no text direction
These inherit the page's left-to-right direction. A Persian line that contains a Latin word is reordered (words and the final punctuation move to the wrong side), and the line is left-aligned.
- The session title, both in the sidebar row and above the conversation (
[data-pane-title]) - The chapters list and chapter headings, sidebar group and section names, and session search results
- The user's own messages (
data-cds="UserMessage"): the Code tab's plain-text renderer does not keep the framework'sdir="auto"default - The Code tab's AskUserQuestion card (question, options and descriptions). The claude.ai
ask_user_inputdialog already usesdir="auto"and<bdi>. - The task list side panel, plan text and toasts
- Mods:
Box,TextandMarkdownin the engine's shadow root have no direction (#99956). A mod'sMarkdownuses components withoutdir, while chat messages use the per-block logic.
Suggested fix: use the pattern the Recap card already uses, dir="auto" on the text container (or <bdi> around the value) with text-align: start, and unicode-bidi: plaintext for text with several lines.
Smaller issues
- Folded narration labels detect inline Markdown with ASCII
\w, so**فارسی**is shown with literal asterisks. - For about 1.5 seconds after a session gets a title, the sidebar's reveal animation draws each grapheme in its own
inline-flexspan, so Persian letters appear unjoined and in reverse order.
Thank you.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗