fix: RTL text rendering regression in VSCode webview since v2.1.63 (fixes #29754)#29759
fix: RTL text rendering regression in VSCode webview since v2.1.63 (fixes #29754)#29759HarshalJain-cs wants to merge 5 commits intoanthropics:mainfrom
Conversation
…hropics#29754) This plugin fixes RTL text rendering issues in the VSCode chat panel caused by incorrect CSS settings. It addresses multiple reported issues related to Persian, Arabic, and Hebrew text.
This script patches the CSS of the Claude Code extension to fix RTL text rendering issues caused by a global CSS rule. It creates backups of the original CSS files and outputs the status of the operation.
This script fixes RTL text rendering issues in the Claude Code VSCode extension by replacing 'unicode-bidi: bidi-override' with 'unicode-bidi: normal' in the relevant CSS files.
Provides detailed instructions on fixing RTL text rendering issues in the Claude Code VSCode extension caused by a CSS regression. Includes installation methods and manual fix options.
|
Still have RTL Problems can't code |
|
@roy9982-cmd — the PR isn't merged yet (awaiting a maintainer review), so the extension itself hasn't been updated. Here's how to fix it right now without waiting: Immediate workaround — apply the fix manuallyLinux / macOS: sed -i.rtl-backup 's/unicode-bidi: bidi-override/unicode-bidi: normal/g' \
~/.vscode/extensions/anthropic.claude-code-*/webview/index.cssFor macOS if the above fails: sed -i '' 's/unicode-bidi: bidi-override/unicode-bidi: normal/g' \
~/.vscode/extensions/anthropic.claude-code-*/webview/index.cssWindows (PowerShell): $cssPath = Get-ChildItem "$env:USERPROFILE\.vscode\extensions" -Filter "index.css" -Recurse | Where-Object { $_.FullName -like "*anthropic.claude-code*webview*" } | Select-Object -First 1 -ExpandProperty FullName
if ($cssPath) {
Copy-Item $cssPath "$cssPath.rtl-backup"
(Get-Content $cssPath) -replace 'unicode-bidi:\s*bidi-override', 'unicode-bidi: normal' | Set-Content $cssPath
Write-Host "Patched successfully: $cssPath"
}After running the script: Reload VSCode (
Maintainers — this bug affects Persian, Arabic, Hebrew, and all RTL language users across Linux, macOS, and Windows (ref: #29754, #29658, #29662, #29545, #29958). The fix is a single CSS property change ( |
GenaxaDev
left a comment
There was a problem hiding this comment.
Confirmed fix works. Arabic RTL rendering broken on Windows 11 + v2.1.63, this CSS change resolves it. +1 for merge.
Summary
Fixes #29754 (and related: #29658, #29662, #29545, #29958) — RTL text rendering is broken in the Claude Code VSCode chat panel since v2.1.63.
Affected languages: Persian/Farsi, Arabic, Hebrew, and all RTL scripts
Affected platforms: Linux, macOS, Windows
Confirmed on: Debian Linux, macOS (Apple Silicon), Windows 11 Pro, VSCode 1.109.5, extension v2.1.63+
Root Cause
Version v2.1.63 introduced a global CSS rule in the extension webview (
webview/index.css):The
unicode-bidi: bidi-overrideproperty forces all text LTR, completely reversing RTL characters within words. This breaks Persian/Farsi, Arabic, and Hebrew text, making it completely unreadable.The Fix
Change
bidi-override→normal:This allows the browser's native Unicode Bidirectional Algorithm (BIDI) to handle RTL text correctly while keeping overall layout LTR. Mixed RTL+LTR content works perfectly with this change. The Claude Desktop app already handles this correctly.
Changes
New Plugin:
plugins/rtl-text-support/A
SessionStarthook plugin that automatically patches the installed extension's CSS at each session start:~/.vscode/extensions/anthropic.claude-code-*/webview/index.css.rtl-backupbefore patchingNew Script:
scripts/fix-rtl-css.shA standalone one-time script for users who prefer manual fixing. Supports both Linux (
sed -i) and macOS (sed -i '') syntax.Testing
~/.claude/plugins/rtl-text-support/Ctrl+Shift+P→Developer: Reload Window)Affected Users
Any user of Claude Code extension v2.1.63+ who writes in: Persian/Farsi, Arabic, Hebrew or any other RTL language.
Related issues tracking this across platforms: