Repository navigation
fix(web): keep digit-first titles in order in Libraries diagnostics in right-to-left languages - #5192
Conversation
…n right-to-left languages In Arabic, the Ambiguous Roots, Skipped Roots and Stale External IDs sections showed "100% Wolf" as "Wolf 100%": the title elements took the page's right-to-left direction, which moves leading digits to the end. The Ambiguous Roots and Skipped Roots table titles and the three sections' card headings now take dir="auto" with .bidi-text, as the right-to-left rules in web/src/i18n/README.md ask for a name in either script. A cut table title keeps its start and stays on the page's start side.
|
Warning Review limit reachedThis organization requires a seat for paid usage-based reviews, including automatic and on-demand reviews. Ask an admin to assign a seat or enable paid usage-based reviews for users without a seat in Billing. Next included review available in 11 minutes. View limit details
|
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
…iguous Roots title web/src/i18n/README.md says a .bidi-text title keeps a short one on the page's start side, so it needs no w-fit, and a div is already a block. The table title renders the same without them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Quick104
left a comment
There was a problem hiding this comment.
🤖 Claude Code via T3 Code (claude-opus-5-5)
Review of af5fc65. The fix works: on a sandbox in Arabic, "100% Wolf" and "10 Cloverfield Lane" read with their digits first in every element this PR changes, and nothing changed for left-to-right titles. One small finding below, which I'm fixing in a commit on this branch. The summary comment has the rest.
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
|
🤖 Claude Code via T3 Code (claude-opus-5-5) /silo review summaryReviewed head: 42bd37d (the PR's commit af5fc65 plus one review commit). The fix works. On a sandbox in Arabic, titles that start with digits ("100% Wolf", "10 Cloverfield Lane") read backwards on main and in order on this branch, in the Ambiguous Roots table and cards, the Skipped Roots table and cards, and the Stale External IDs cards. Arabic titles read the same as before, and English titles in English look the same. One extra gain: a long Skipped Roots folder name that runs the other way from the page is now cut at its own end, so it keeps its start (a long Arabic name in English, or a long English name in Arabic). Addressed
Left for maintainersNothing blocks this PR. Two notes:
Verification
Validated featuresThe v1.0 board has no passed case that reaches these sections. User manual and other clientsThe user manual doesn't describe these diagnostics at this level, so it's unaffected. This is web-only rendering, so Apple, Android, and Roku aren't affected. Overlap with #5191#5191 touches the same three files (an import rename) and merges cleanly with this branch in either order. Neither PR depends on the other. Council
The only code finding in this PR's lines was the nit above. The others were the pre-existing library-name gaps, and a mixed-direction title losing part of a number when cut, which the README documents as a known limit of Fit: 9/10 · Readiness: 9/10 · ready Fit: a small right-to-left fix in the admin interface, following the repository's documented rules for names in either script, with no new surface. Readiness: the bug was shown on main and gone on this branch, the validation board check ran, and CI is green. The only gap is that Firefox and WebKit weren't checked. |
Problem
Closes #5065
Related issue: #5061
Validation tasks: none
Other clients: Apple N/A (web-only rendering); Android N/A (web-only rendering); Roku N/A (web-only rendering)
In Arabic, the admin Libraries diagnostics showed a title that starts with digits backwards: "100% Wolf" read "Wolf 100%" and "10 Cloverfield Lane" read "Cloverfield Lane 10". It happened in the Ambiguous Roots table and cards, the Skipped Roots table and cards, and the Stale External IDs cards. The title elements had no direction of their own, so they took the page's right-to-left direction, which moves the leading number to the end.
This PR leaves out the Unmatched Items heading that #5061 also names. Open PR #5023 is editing
UnmatchedItemsSection.tsx, so that heading can follow once #5023 merges, and #5061 stays open until then.Approach
The titles now follow the right-to-left rules in
web/src/i18n/README.mdfor a name in either script:dir="auto"with.bidi-text. Each title reads in its own direction and still sits on the page's start side. The Ambiguous Roots and Skipped Roots table titles are cut withtruncate;dir="auto"cuts each at its own end, so it keeps its start. The Stale External IDs table cell already rendered correctly and is unchanged.Validation
100% Wolf (2020),10 Cloverfield Lane (2016),10 Things I Hate About You (1999)) set up as ambiguous roots, skipped roots and stale IDs, in headless Chromium with the Arabic locale at 1440 px and 390 px. Before: every title in these elements rendered with the digits at the end. After: the digits render first in all of them. Paths, badges and the Stale IDs table cell look the same as before.pnpm run lint(no new warnings),format:check,build,budget:checkandmake test-webpass.make verify-local-pathsandmake verify-case-collisionspass.Evidence
Evidence: https://evidence.siloserver.org/r/silo-server/pr-5192/
Surface and build: web admin, Admin → Libraries → Catalog health, Arabic, desktop 1440 px and phone 390 px.
Risks
None identified. Titles in left-to-right languages render the same as before.
Checklist
AI Disclosure
Note
Fix digit-first title ordering in Libraries diagnostics for RTL languages
Adds automatic text direction and the
bidi-textclass to root labels in AmbiguousRootsSection.tsx and path leaves in SkippedRootsSection.tsx, in both table and card layouts.Macroscope summarized 42bd37d.