Chat UI breaks with mixed Persian/Arabic (RTL) + English (LTR) text

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Cursor Chat / Agent UI does not correctly render mixed Persian/Arabic (RTL) + English (LTR) text.

When a message contains Persian/Arabic together with English technical terms (e.g. API, UVICORN_WORKERS, WebSocket, DB, health, login), the chat stays left-aligned and bidirectional (BiDi) ordering breaks. Punctuation (like ؟) appears on the wrong side, and sentence word order becomes scrambled—especially around symbols like /, +, =, and code-like tokens. This makes Persian/Arabic technical conversations hard to read.

Steps to Reproduce

1-Open Cursor Chat / Agent panel.
2-Send a Persian message that includes English technical terms, for example:
چرا وقتی UVICORN_WORKERS=2 و DB فقط ۵+۵=۱۰ کانکشن داره، health و login می‌زنن؟
3- Ask the model to reply in Persian while mixing English terms like API, WebSocket, retry storm, UVICORN_WORKERS, etc.
4- Observe alignment, punctuation placement, and word order in both the user message and the assistant reply.

Expected Behavior

  • Persian/Arabic messages should render as RTL (right-aligned / correct reading direction).
  • Mixed Persian/Arabic + English text should keep correct sentence order while keeping English identifiers readable.
  • Punctuation such as ؟ and . should appear in the correct position for RTL text.
  • Suggested approach: use proper BiDi handling in the chat renderer (e.g. dir=“auto”, unicode-bidi: plaintext or equivalent), including for markdown-rendered assistant replies.

Screenshots / Screen Recordings

Operating System

MacOS

Version Information

Version: 3.12.17
VS Code Extension API: 1.128.0
Commit: 0fb762053c34788bb7760d5673f8a6d4c8589d50
Date: 2026-07-17T02:53:53.006Z
Layout: IDE
Build Type: Stable
Release Track: Default
Electron: 40.10.3
Chromium: 144.0.7559.236
Node.js: 24.15.0
V8: 14.4.258.32-electron.0
xterm.js: 6.1.0-beta.256
OS: Darwin arm64 25.5.0

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey @Pooria_Monfared,

Cursor’s chat/agent renderer doesn’t currently do bidirectional (BiDi) text handling, so the whole message stays left-aligned and neutral characters (؟ / + =) plus English tokens take their direction from the surrounding left-to-right container instead of your Persian sentence. That’s why punctuation lands on the wrong side and the word order scrambles, for both your messages and the model’s markdown replies.

This is a known gap that’s come up a fair bit, and it’s on our radar — there’s no implementation timeline yet, mostly because getting mixed LTR/RTL right alongside code blocks and markdown is trickier than a plain dir="auto". The best place to follow it and add your voice is the main request thread: Add RTL for chat. More interest there genuinely helps us prioritize.

In the meantime, a few community members have shared RTL workaround extensions in that thread that auto-align chat based on the detected language. They help in the Chat and Plan panels - heads-up that they reportedly don’t fully cover the Agents window yet.

Appreciate the clear report!