Skip to content

fix(web): keep a short email or folder path under its name in right-to-left restore rows - #4878

Merged
Quick104 merged 1 commit into
mainfrom
fix/rtl-restore-row-email-alignment
Nov 21, 2026
Merged

Quick104 merged 1 commit into
mainfrom
fix/rtl-restore-row-email-alignment

Conversation

@Quick104

@Quick104 Quick104 commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: N/A
Validation tasks: none

Other clients: Apple N/A (no backup restore screen); Android N/A (no backup restore screen); Roku N/A (no backup restore screen)

In Chrome, Edge and other Chromium-based browsers, the backup restore Choose step in Arabic (or another right-to-left language) showed a short account email or library folder path at the far left of a narrow row, next to the state tag, while its name sat at the right edge. This change keeps the email or path under its name in every browser.

Below 42rem a restore row puts the name above its detail line, and the detail stretched across the column. The account email and a library's folder paths are set dir="ltr" so a long one keeps its start when cut short (#4711). In Chromium that also aligned their text to the left edge of the stretched box. Firefox and Safari didn't show it: in a right-to-left list they give list items a right text alignment, which the line inherited. A long email that fills the line hid the problem; a short one, such as a six-letter name at example.com or /media/movies, showed it. It happened on phones, and at desktop widths where the list sits beside the restore summary and its rows stack.

Approach

The account row's contact line (AccountRow) and the item row's detail line (ItemRow) now take the width of their text (w-fit), so the stacked line sits at the row's start side, under the name, in either direction, whatever text alignment it inherits. max-w-full caps it at the space beside the checkbox, so a long email or path still ends in "…" and keeps its start. The expanded folder list on the same page already uses w-fit for the same reason. Rows wide enough to show the name and detail side by side don't change, and neither does English.

Validation

  • Reproduced and verified with the real RestoreChoose step and fixture data in a temporary dev-only route (not committed), in Arabic and English at 360, 393, 820, 1024 and 1440 px. No dev sandbox could start at the time (the build host had no free Docker network address pools), so this was not checked against a live server.
  • Measured in the page before and after: in Arabic in Chromium, a short email started 86–366 px from its name's edge and a short path 124–404 px, depending on width; after the fix both start at 0. A long email is still cut short with its first letter visible. Firefox and WebKit already started both at 0 before the fix and still do. There's no sideways scrolling at 360 or 393 px. Side-by-side rows and English measure the same before and after.
  • Web gate: pnpm run lint, format:check, build, budget:check, make lint-changed, make verify-local-paths pass. The restore page's tests pass. make test-web fails in 9 files outside this page (request deadlines, auth refresh, player range reads, admin collections, home rows, sign-in settings); run alone on main, six of the nine fail too and the rest fail intermittently under load. None imports the changed components.
  • Validation board: no backup, restore or right-to-left task.

Evidence

Surface and build: web admin, backup restore Choose step; local dev build of this branch, Arabic and English, Chromium, Firefox and WebKit.

Evidence: https://evidence.siloserver.org/r/silo-server/restore-rtl-detail-align/

Risks

None identified. Class changes on two spans in one admin page.

Follow-ups

Council review

Background review: 1 round on 99d7677

Member Round 1
Sol (gpt-6.2-sol, xhigh) 9/10, 1 finding (S1, low)
Opus (claude-opus-5-5, high) 9/10, no findings posted
Gemini (gemini-4-neon, xhigh) unavailable (usage quota reached; failed on retry)

Open after merge: S1 (Sol). A short stacked path whose last glyph overhangs, such as a Devanagari folder name, loses about 1 CSS px of that glyph's ink, because the span is now exactly as wide as its text. Reproduced in Chromium, Firefox and WebKit. Every other truncate label sized to its text clips the same way, including these rows when name and detail sit side by side. Left for the maintainer to decide.

Visual review: 2 rounds, captures from fbb0038f (the head since then changes only comments)

Member Round 1 Round 2
Sol better, 9/10 better, 9/10
Opus better, 8/10 better, 8/10
Gemini better, 8/10 better, 9/10

Fixed: full-page captures, the stacking point, an Arabic-script name and Firefox and WebKit captures were added (all three, round 1). The evidence now says the bug showed only in Chromium (Sol, Opus and Gemini, round 2, on the Firefox and WebKit before captures). Answered: small Arabic status text at 820 px, the second folder hidden when a path is cut, a long path starting away from its name, slack before "…", contrast and tap targets, and status labels not lining up between rows all look the same before and after and are outside this change. Filed separately: a merging account's email loses its first part when its line is cut short in Arabic (Gemini, round 1); its fix edits the same line, so it waits for this PR (#4880).

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. (It adds none.)
  • The Evidence section shows every change a user can see, or how I checked a change nobody sees.

AI Disclosure

  • Harness: Claude Code (in T3 Code)
  • Tool(s): Claude Code; T3 Code delegated tasks for the council (Codex, Claude, Antigravity); Playwright for captures and measurements
  • Model(s): claude-opus-5-5 (implementation); gpt-6.2-sol, claude-opus-5-5, gemini-4-neon (council); claude-opus-5-5 and claude-sonnet-5-5 (code-review subagents)
  • Involvement: Fully AI-generated. The agent verified it in a local dev harness in three browser engines; a person has not verified it yet.
  • Adversarial review: the plan round was skipped as a mechanical fix (two classes on two spans, root cause shown in the source and reproduced). Code review at xhigh effort (three finders, a sweep, and a 1.0 validation check) led to two comment corrections; a simplify pass changed nothing. A three-model visual review of the captures, and a background review on the PR. See Council review.

🤖 Generated with Claude Code

…o-left restore rows

When a restore row is too narrow for the name and its detail side by side,
the detail moves under the name and stretched across the column. The account
email and a library's folder paths read left to right, so in Arabic in
Chromium-based browsers a short one sat at the far left of the row, next to
the state tag, away from the name on the right. (Firefox and Safari give
right-to-left list items a right text alignment, so they already showed it
under the name.) The detail now takes only the width of its text, so it sits
under the name on the page's start side in every browser, and a long one
still fills the line and keeps its start when cut short.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 3 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: 80f418e0-bcaf-4e21-b77d-cc54f8d201ed
Commits

Reviewing files that changed from the base of the PR and between 3ebeb42 and 99d7677.

Files selected for processing: 2

  • web/src/pages/admin-backups/RestoreRows.tsx
  • web/src/pages/admin-backups/RestoreUsers.tsx
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@silo-kody

silo-kody Bot commented Nov 21, 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 the size/S 0–49 added + deleted lines (all files); change volume, not priority. label Nov 21, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-21T04:36:53.600010Z 99d7677 PR opened
🔒 Security Review ✅ Completed 2026-11-21T04:39:16.116989Z 99d7677 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

title={secondary}
dir={item.kind === "library" ? "ltr" : undefined}
className="text-muted-foreground min-w-0 truncate text-xs"
className="text-muted-foreground w-fit max-w-full min-w-0 truncate text-xs"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

kody code-review Kody Rules medium

Truncated account emails can lose their logical start in RTL

In a right-to-left interface, truncation can clip the logical start of a long account email. Resolve the mailbox direction explicitly, including strong RTL digits and weak numeric prefixes, and test mixed local parts and domains at narrow widths.

Kody rule violation: Preserve the logical start of bidirectional truncated text

Prompt for LLM
File web/src/pages/admin-backups/RestoreRows.tsx, line 350:

Truncated account emails can lose their logical start in RTL

The truncated account email inherits the interface direction rather than choosing its direction from the mailbox’s Unicode bidi behavior. In a right-to-left interface, this can clip the logical start of a long email. Resolve the mailbox direction explicitly, including strong RTL digits and weak numeric prefixes, and test mixed local parts and domains at narrow widths.

Kody rule violation: [Preserve the logical start of bidirectional truncated text](https://kodus.siloserver.org/settings/code-review/1247142351/kody-rules/543088f5-5d79-48a9-804f-7c9ce6776d3a?teamId=ba9922fc-c0ea-4cf8-87bb-9d4f42ffc73e)

Talk to Kody by mentioning @kody

Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.

​

​

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This line is ItemRow, which doesn't show account emails; the account email is in AccountRow (RestoreUsers.tsx). This PR doesn't change either line's direction. It only adds w-fit max-w-full, so the line takes its text's width. An account line that is only the email has been dir="ltr" since #4711, which keeps the email's start when it's cut short. That PR tried dir="auto" and dropped it because it reversed an address starting with Arabic letters. The case still open is a merging account whose line starts with the pending summary and ends with the email: in Arabic it loses the email's start. That's #4880, to fix after this PR.

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks for the correction. The suggestion is misplaced: ItemRow does not display account emails, and this PR changes the sizing classes, not the text direction.

The separate truncation issue for merging accounts is tracked in #4880. I’ll treat this suggestion as not applicable to the changed line.

title={secondary}
dir={item.kind === "library" ? "ltr" : undefined}
className="text-muted-foreground min-w-0 truncate text-xs"
className="text-muted-foreground w-fit max-w-full min-w-0 truncate text-xs"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

kody code-review Kody Rules medium

Mixed-direction folder paths can reorder their delimiters

Rendering the library detail as one left-to-right text run can misrepresent mixed-direction paths. Isolate path components while preserving delimiters and filename punctuation, and verify visual order and copied text for Arabic, Hebrew, and Latin paths.

Kody rule violation: Isolate bidirectional URL components without reordering delimiters

Prompt for LLM
File web/src/pages/admin-backups/RestoreRows.tsx, line 350:

Mixed-direction folder paths can reorder their delimiters

The library detail is rendered as one left-to-right text run, so mixed-direction folder names can reorder path delimiters. Render path components in bidi-isolated segments while preserving their delimiters and filename punctuation, and verify both visual order and copied text for Arabic, Hebrew, and Latin paths.

Kody rule violation: [Isolate bidirectional URL components without reordering delimiters](https://kodus.siloserver.org/settings/code-review/1247142351/kody-rules/045e17ea-e5d3-40d1-8e9f-044195c20418?teamId=ba9922fc-c0ea-4cf8-87bb-9d4f42ffc73e)

Talk to Kody by mentioning @kody

Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.

​

​

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Confirmed, but it doesn't come from this PR: the row's text and its dir="ltr" are unchanged here. Each path is already its own left-to-right run (U+2066…U+2069), so two paths keep their order. Within one path, neighbouring right-to-left folder names still display right to left: in Chromium, /media/أفلام/عربية shows عربية to the left of أفلام. Every place the web app shows a path as one left-to-right run does the same, including the expanded folder list on this page, the folder browser and library locations. Isolating path components is therefore an app-wide change, and I've raised it with the maintainer rather than add it here.

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks for clarifying. Since the mixed-direction path behavior predates this PR and affects multiple parts of the app, it makes sense to address it separately. The suggestion should not block this alignment fix.

@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 triaged High-confidence review completed; does not mean fixed, validated, or accepted for release. labels Nov 21, 2026
@Quick104
Quick104 merged commit bb5e279 into main Nov 21, 2026
31 checks passed
@Quick104
Quick104 deleted the fix/rtl-restore-row-email-alignment branch November 21, 2026 05:11

@Quick104 Quick104 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Adversarial review (gpt-6.2-sol, reviewed 99d7677)

One low-severity finding. The /silo run posted it on the reviewer's behalf, because the reviewer's tool couldn't pin the commit, and reproduced it in the real component first. Score: 9/10.

title={secondary}
dir={item.kind === "library" ? "ltr" : undefined}
className="text-muted-foreground min-w-0 truncate text-xs"
className="text-muted-foreground w-fit max-w-full min-w-0 truncate text-xs"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

S1 · low: a short path can lose the edge of its last glyph. w-fit makes the span exactly as wide as its text, and truncate's overflow: hidden then clips ink that reaches past the last glyph's advance width, even when the whole path fits. With /media/भालू as a library's only folder, about 1 CSS px of the final vowel sign's hook is cut off in Chromium, Firefox and WebKit, on English and Arabic pages. Before this change a stacked line had the rest of the column beside it. The same clipping already happens wherever a truncate span is sized to its text, including these rows when the name and detail sit side by side.

Suggested repair: keep the span stretched and give the left-to-right detail text-align: match-parent (with the -webkit-match-parent fallback) below @2xl.

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. triaged High-confidence review completed; does not mean fixed, validated, or accepted for release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant