Skip to content

fix(web): keep digit-first titles in order in Libraries diagnostics in right-to-left languages - #5192

Merged
Quick104 merged 2 commits into
Silo-Server:mainfrom
Rhainland:fix/5061-rtl-diagnostics-titles
Nov 24, 2026
Merged

Quick104 merged 2 commits into
Silo-Server:mainfrom
Rhainland:fix/5061-rtl-diagnostics-titles

Conversation

@Rhainland

@Rhainland Rhainland commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

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.md for 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 with truncate; 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

  • Local build with a synthetic movies library (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.
  • Web: pnpm run lint (no new warnings), format:check, build, budget:check and make test-web pass. make verify-local-paths and make verify-case-collisions pass.
  • Go checks not run: no Go files changed.
  • No test added. "Decide what to test" excludes UI layout, and the change is markup only.

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

  • I read and can explain the complete diff.
  • This pull request addresses one concern.
  • Each test this pull request adds meets "Decide what to test" in CONTRIBUTING.md.
  • The Evidence section shows every change a user can see, or how I checked a change nobody sees.

AI Disclosure

Note

Fix digit-first title ordering in Libraries diagnostics for RTL languages

Adds automatic text direction and the bidi-text class to root labels in AmbiguousRootsSection.tsx and path leaves in SkippedRootsSection.tsx, in both table and card layouts.

  • Also applies automatic text direction to stale media title headings in the card layout of StaleIDsSection.tsx.
  • Direction is chosen per element based on its own content, so titles starting with digits no longer render in wrong order under a right-to-left UI language.

Macroscope summarized 42bd37d.

…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.
@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

This 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.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f77c6d93-d0f9-4e90-ab5b-cc39dba27000
Commits

Reviewing files that changed from the base of the PR and between 3b2b321 and 42bd37d.

Files selected for processing: 3

  • web/src/components/admin/libraries/AmbiguousRootsSection.tsx
  • web/src/components/admin/libraries/SkippedRootsSection.tsx
  • web/src/components/admin/libraries/StaleIDsSection.tsx
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@silo-triage silo-triage Bot added the size/S 0–49 added + deleted lines (all files); change volume, not priority. label Nov 23, 2026
@silo-kody

silo-kody Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@silo-triage silo-triage Bot added bug Something isn't working impact: polish Annoyance, cosmetic, or nice-to-have priority: P2 Limited scope, workaround exists, or polish labels Nov 23, 2026
…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 Quick104 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 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

silo-kody Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@Quick104

Copy link
Copy Markdown
Contributor

🤖 Claude Code via T3 Code (claude-opus-5-5)

/silo review summary

Reviewed 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

  • Nit, fixed in 42bd37d: the Ambiguous Roots table title dropped block w-fit max-w-full, which web/src/i18n/README.md says a .bidi-text title doesn't need. In Chromium it renders the same with short and cut titles in both directions.

Left for maintainers

Nothing blocks this PR. Two notes:

  • Firefox and WebKit weren't checked; every capture is from Chromium. The markup follows the README's pattern for cut titles, which other components already use.
  • Not in this PR's lines, and the same on main: the card view's "Library" value in Skipped Roots and Stale External IDs has no direction of its own, so a library named "2024 Movies" reads "Movies 2024" in Arabic, while the tables show it correctly. Library names in the Metadata Matcher section and in the Ambiguous Roots library picker have the same gap. These are separate from this PR. A shared card title in DiagnosticsListParts.tsx would also keep the next section from missing the direction, once fix(web): show unmatched items' type and status in the interface language #5023 has landed and the Unmatched Items heading can follow. Paths with Arabic folder names in the cards also draw out of order on main, which [bug] Web admin paths with Arabic folder names show their folders out of order #5064 tracks.

Verification

  • Live check: one sandbox from main (05b39b6) for the before captures; this branch served by Vite against the same sandbox for the after captures. The three changed files and app.css are the same on main and on this PR's base. The rows were seeded in the browser with made-up digit-first titles, since the sandbox's library has no such roots. Arabic and English, 1440 px tables and 390 px cards, long titles that wrap and that are cut.
  • Tests: none added, and none needed for a markup-only layout change under "Decide what to test". CI is green on 42bd37d.
  • Evidence: https://evidence.siloserver.org/r/silo-server/pr-5192-review/

Validated features

The v1.0 board has no passed case that reaches these sections. Validation tasks: none is correct.

User manual and other clients

The 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

Member Code round 1 (af5fc65) Code round 2 (42bd37d) Visual round 1 Visual round 2
Sol (gpt-6.2-sol, medium) 9/10 9/10 better, 9/10 better, 9/10
Opus (claude-opus-5-5, medium) 8/10 9/10 better, 8/10 better, 9/10
Gemini (gemini-4-neon, medium) 8/10 10/10 better, 9/10 better, 9/10

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 dir="auto". The visual review found nothing wrong in this change. Its other findings were the same library-name gap and how card paths wrap, which look the same on main.

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.

@Quick104
Quick104 merged commit afb9db4 into Silo-Server:main Nov 24, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working impact: polish Annoyance, cosmetic, or nice-to-have priority: P2 Limited scope, workaround exists, or polish size/S 0–49 added + deleted lines (all files); change volume, not priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] Ambiguous Roots titles that start with a number read backwards in Arabic

2 participants