fix(desktop): list markers and quote border follow RTL message direction - #44628
Closed
Adolanium wants to merge 1 commit into
Closed
fix(desktop): list markers and quote border follow RTL message direction#44628Adolanium wants to merge 1 commit into
Adolanium wants to merge 1 commit into
Conversation
unicode-bidi:plaintext (NousResearch#44596) resolves text direction per line, but list markers and the blockquote border are box chrome driven by the CSS direction property, which plaintext never sets, so an RTL list renders its numbers stranded at the far left edge. CSS cannot close this gap (:dir() only reads the dir attribute, never plaintext resolution), so ul/ol/blockquote carry dir="auto" and the browser resolves their box direction natively while the plaintext rules keep owning the text. Inline code carries dir="ltr", which HTML's auto algorithm skips, matching the no-vote contract the CSS isolate already gives it.
Contributor
Author
|
@OutThisLife this is the direct follow-up to #44596 (thanks for merging that one). Same RTL direction handling, but for the parts #44596 didn't cover. List markers and blockquote borders are controlled by box direction (CSS It's a small change ( |
Contributor
waefrebeorn
pushed a commit
to waefrebeorn/slermes
that referenced
this pull request
Jul 2, 2026
habarmc1223-sudo
pushed a commit
to habarmc1223-sudo/hermes-agent-fluxmem
that referenced
this pull request
Jul 8, 2026
santhreal
pushed a commit
to santhreal/hermes-agent
that referenced
this pull request
Jul 13, 2026
Gravezzz
pushed a commit
to Gravezzz/hermes-agent
that referenced
this pull request
Jul 21, 2026
leewenjie
pushed a commit
to leewenjie/hermes-agent
that referenced
this pull request
Aug 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Follow-up to #44596. The plaintext rules resolve text direction per line, but list markers and the blockquote border are box chrome whose side is driven by the CSS
directionproperty, which #44596 deliberately never sets. The visible result in an RTL conversation: a Hebrew/Arabic list renders its numbers stranded at the far left edge while the items sit at the right (screenshot below), and an RTL quote keeps its border on the left.CSS alone cannot close this gap:
:dir()matches only the HTMLdirattribute, neverunicode-bidi: plaintextresolution, so there is no selector that can move a marker based on resolved content direction. This PR uses the smallest possible hook instead, with no JS logic:ul,olandblockquotecarrydir="auto", so the browser's native first-strong algorithm resolves their box direction from content. Markers, list padding (Tailwind Typography already usespadding-inline-start) and the quote border follow it; the plaintext rules from feat(desktop): auto-detect RTL/bidi text direction in chat #44596 keep owning per-line text direction inside, unchanged.dir="ltr": the HTML auto algorithm skips descendants that carry their owndir, so a list item that starts withnpm install ...followed by a Hebrew explanation still resolves RTL. This is the same no-vote contract the CSS isolate in feat(desktop): auto-detect RTL/bidi text direction in chat #44596 already gives inline code at the text level, extended to the attribute level. It also pins inline code LTR redundantly with that CSS, so nothing changes visually.border-l-2/pl-3to the logicalborder-s-2/ps-3so it can follow.Marker side is resolved per list, not per item (the first-strong scan covers the list's content), which matches how RTL word processors lay out mixed lists. LTR lists resolve
ltrand render byte-identically to current main. Fenced code is unaffected: it renders through the code plugin's CodeCard path, which #44596 already pins LTR.Related Issue
Follow-up to #44596 / #44150 (the merged change notes "list-indent stays LTR"; this addresses the user-visible artifact of that for lists inside RTL messages, not app chrome).
Type of Change
Changes Made
apps/desktop/src/components/assistant-ui/markdown-text.tsx:dir="auto"on theul/ol/blockquoteoverrides,dir="ltr"on theinlineCodeoverride, logical border/padding on blockquoteapps/desktop/src/components/assistant-ui/block-direction.test.tsx: pins the contract: list/quote blocks carrydir="auto", inline code carriesdir="ltr"(and so never votes), plain prose blocks stay attribute-free for the plaintext CSSHow to Test
cd apps/desktop && npx vitest run --environment jsdom src/components/assistant-ui/block-direction.test.tsx- 4 passednpm run typecheck- clean;npx eslinton both touched files - cleandir="auto"resolves ltr)Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests pass (renderer-only change; desktop vitest suite run instead)npm run dev)Documentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AScreenshots / Logs
Same Hebrew reply (numbered list of code-first steps, blockquote, English list control) on current main and with this change:
Before (current main):

After:
