Skip to content

feat: RTL support for Arabic / Hebrew message text (dir="auto") #65

@Musa85

Description

@Musa85

Problem

When chatting in Arabic (or other RTL languages), message text renders
left-to-right, which makes Arabic content hard to read. There is currently
no setting for text direction.

Suggested fix (minimal, non-breaking)

Forcing the whole UI to RTL would break code blocks and layout. The correct
approach is to let the browser auto-detect direction per message by adding
dir="auto" to the text containers only:

  • src/components/Markdown.tsx — the wrapper <div> (around line 103)
    that wraps <ReactMarkdown>:

    <div dir="auto" className={cn(...)}>
      <ReactMarkdown ...>
      
  • src/components/cc/messages/UserMessage.tsx — add dir="auto" to the
    element that renders the user's text.

With dir="auto", Arabic/Hebrew text flows right-to-left while English
text and code blocks stay left-to-right automatically. No global layout
change, no new setting required.

Environment

  • codexia v0.30.0 (.deb), Linux Mint 22.2 (Ubuntu 24.04 base)
  • Language tested: Arabic

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions