You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(ui): AnimatedNumber renders multi-digit numbers reversed in RTL locales #43643
When the UI language is set to an RTL locale (e.g. Arabic), multi-digit numbers
rendered by AnimatedNumber appear reversed: 16 displays as 61.
Visible in:
tool-count labels, e.g. "16 قراءة" (packages/session-ui/src/components/tool-count-label.tsx)
todo progress numbers (packages/app/src/pages/session/composer/session-todo-dock.tsx)
Root cause
AnimatedNumber reverses the digit array in DOM order and relies on flex-direction: row-reverse to restore the visual order. But row-reverse
resolves against the inherited direction context, and packages/app/src/context/language.tsx sets document.documentElement.dir = "rtl" for RTL locales. In that context row-reverse resolves to left-to-right, so the intentionally reversed digits
stay visually reversed.
Expected
Numbers must render in correct order regardless of document direction.
Activity
fix(ui): read AnimatedNumber once, in order, in any direction
fix(ui): read AnimatedNumber once, in order, in any direction
fix(ui): read AnimatedNumber once, in order, in any direction