Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Use dir="auto" on user and assistant message text containers so the browser automatically detects RTL languages (Arabic, Hebrew, etc.) and aligns text correctly.
Head branch was pushed to by a user without write access
Move dir="auto" from the outer ChatMarkdown wrapper to individual text-level markdown components (p, headings, li, blockquote) so code blocks, Shiki-highlighted code, and tables remain LTR.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Replace physical border-left/padding-left with border-inline-start/ padding-inline-start so blockquote borders and list indentation follow text direction in RTL content.

What Changed
Added
dir="auto"to message text containers in both user and assistant messages:UserMessageBodyinMessagesTimeline.tsx(all 3 text rendering paths)ChatMarkdownwrapper div inChatMarkdown.tsxBefore:
After:
Here's a video explaining the changes:
t3code-pr-video.mp4
Why
Messages in RTL languages (Arabic, Hebrew, Persian, etc.) displayed with incorrect LTR alignment, making them hard to read. The HTML
dir="auto"attribute uses the browser's built-in Unicode Bidi Algorithm to detect the first strong directional character and set text direction automatically - no custom detection logic needed. LTR messages are unaffected.Checklist
Changes are minimal and focused
No new dependencies added
Works for both web and desktop (shared components)
This PR is small and focused
I explained what changed and why
I included before/after screenshots for any UI changes
I included a video for animation/interaction changes
Note
Low Risk
Low risk UI-only change that relies on browser
dir="auto"behavior; potential issues are limited to chat text layout in edge cases.Overview
Improves RTL rendering in chat by adding
dir="auto"to key message text containers, including user message bodies (MessagesTimeline.tsx) and common markdown block elements (ChatMarkdown.tsx).Updates chat markdown styling to use logical CSS properties (
padding-inline-start,border-inline-start) so list indentation and blockquote borders adapt correctly to LTR/RTL direction.Written by Cursor Bugbot for commit 0d33c10. This will update automatically on new commits. Configure here.
Note
Add RTL support for chat messages using
dir="auto"dir="auto"to block-level elements (p, headings,li,blockquote) in ChatMarkdown.tsx, letting the browser detect text direction per element.dir="auto"to user message body containers in MessagesTimeline.tsx.padding-left/border-leftwith logical CSS properties (padding-inline-start,border-inline-start) in index.css so list and blockquote styles adapt to writing direction.Macroscope summarized 0d33c10.