Skip to content

fix(web): keep the start of long usernames in right-to-left admin lists - #4783

Merged
Quick104 merged 2 commits into
mainfrom
fix/admin-username-rtl-truncation
Nov 21, 2026
Merged

Quick104 merged 2 commits into
mainfrom
fix/admin-username-rtl-truncation

Conversation

@Quick104

@Quick104 Quick104 commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: N/A
Validation tasks: changes #1197 C1

Other clients: N/A (user management is web-admin only in the 1.0 definition, #1195; Apple, Android and Roku have no user list, access group or dashboard screens)

In a right-to-left language such as Arabic, a long left-to-right username is cut at its start on three web admin screens:

  • Admin → Users on phones and tablets.
  • The dashboard's Users widget.
  • An access group's member list and its Add users dialog.

The admin sees "…rtholomew_reynolds" instead of "aaron_bartholomew_…" and loses the part that identifies the person. On an English page, a long Arabic username is cut at its start the same way.

Each username inherited the page's direction. text-overflow: ellipsis cuts the end of the line in that direction, and for a name written the other way, that end is where the name begins.

With this change, each username reads in the direction of its own text. A long name in either script keeps its start and ends in "…", and short names stay where they were.

Approach

  • The four username lines take dir="auto", which follows the name's first strong character (a letter, or right-to-left punctuation such as ؟). A name with none, such as one made only of digits, reads left to right.
  • Where a username line would stretch across its row, it is now sized to its text (w-fit max-w-full), so a short Latin name stays on the page's start side. This applies to the users list row and the member list. In the users list row, a wrapper takes the free space so the badges stay at the row's end.
  • A bullet in web/src/i18n/README.md records the rule for the next truncated name.

Rejected alternatives:

  • .bidi-text (unicode-bidi: plaintext) with truncate drops the "…" in Firefox and cuts the name's start in WebKit.
  • The email helper from fix(web): keep the start of emails and folder paths in right-to-left admin lists #4735, ltrUnlessRightToLeft, keeps the page's direction for right-to-left text, so a long Arabic username on an English page would still lose its start.
  • Keeping the page's direction for names that mix scripts fixes qa_فاطمة_… on the Arabic page. It breaks the mirror case instead: support_team_account_محمد becomes "…team_account". No fixed rule keeps the start of every part of every mixed name.

Validation

  • Not reproduced on a live server. A test server couldn't start, because the shared database on the sandbox host was at its connection limit. Instead, a temporary dev-only page mounted the four real components with fixture accounts, the app's styles and fonts, and the Arabic catalog. The page was removed before commit.
  • Before (main df37bfc), Arabic, 393 px: seven username lines had their first character outside the visible box, in both Chromium and Firefox. WebKit's captures show the same cut ("…artholomew_reynolds").
  • After: no username line loses its first characters in Chromium, Firefox or WebKit, in Arabic or English, at 393, 834 or 1440 px.
    • Short names stay on the row's start side, next to their badges and in line with the email line.
    • Latin names on the English page look the same as before, and the keyboard focus ring is unchanged.
    • A digits-only name now keeps its start in Arabic.
  • Web checks: typecheck, lint, format:check, build and budget:check pass, run on Node 24. make test-web: 3079 of 3080 tests pass. PdfBundleCompatibility fails the same way on main on the test host (DOMMatrix is not defined).
  • Repository checks: make lint-changed, verify-local-paths, verify-bidi, verify-case-collisions and verify-size-ratchet pass.

Evidence

Surface and build: web admin (Users list below lg, dashboard Users widget, Access groups → members and Add users), Arabic and English, at 393, 834 and 1440 px, in Chromium, Firefox and WebKit. Before on main (df37bfc), after on this branch.

Evidence: https://evidence.siloserver.org/r/silo-server/admin-username-rtl-truncation/

Risks

None identified. The change sets the text direction and width of four username lines on admin screens.

  • In a name that mixes directions, a part that runs the other way can lose its own start. qa_فاطمة_… on the Arabic page now shows "qa_" and the end of its Arabic part. On an English page, a digit run too long for the box before Arabic letters loses its first digits. No single dir avoids this for every mixed name.
  • This PR and fix(web): keep the start of emails and folder paths in right-to-left admin lists #4735 edit neighboring lines in the same three components, so whichever merges second needs a rebase.

Out of scope, each being fixed separately:

  • The email lines in the same rows (fix(web): keep the start of emails and folder paths in right-to-left admin lists #4735).
  • Other screens that cut a username or another entered name at its start:
    • the dashboard's Now Playing card;
    • the user detail breadcrumb;
    • Activity;
    • the impersonation banner;
    • profile and watch-together names;
    • the group name under each users list row.
  • Card titles and cast names that use .bidi-text with truncate, which lose the "…" or their start in Firefox and WebKit.
  • In the Add users dialog, a long group name squeezes the username out of its row.

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.

Council review

Background review: 1 round, reviewed d838775.

Member Round 1
Sol (gpt-6.2-sol, xhigh) 8/10
Opus (claude-opus-5-5, high) 8/10, no findings
Gemini (gemini-4-neon, xhigh) 9.5/10, no findings

Fixed: the README now says dir="auto" follows the first strong character, which can be right-to-left punctuation (Sol S2, 7ccf3a8). Left for the maintainer: a long digit prefix before Arabic letters loses its first digits on an English page (Sol S1). It is the mixed-run trade-off under Risks, and the thread explains why no fixed rule avoids it.

Visual review: 2 rounds on the final captures. Gemini's first launch hit a provider quota; its retry reviewed every pair from both rounds.

Member Round 1 Round 2
Sol better, 9/10 better, 9/10
Opus better, 8/10 better, 8/10
Gemini better, 8.5/10 (retry, covered both rounds' captures) —

Answered:

  • Round 2 found that names mixing scripts can lose the start of their second part (Opus). Keeping the page's direction for those names was implemented and checked. It was dropped because it cut the start of names whose first part is long. Gemini rated the mixed-script trade-off acceptable.
  • A cut name's "…" stops up to one letter short of the column edge (Sol, Opus, Gemini). The browser puts the ellipsis after the last whole letter that fits.
  • In Arabic, a cut Latin name starts next to the badges, while a short name sits on the start edge (Opus, Gemini). That is the intended layout.
  • The Users widget cuts its last row at tablet and desktop widths (Sol). This comes from the widget's fixed height, and it looks the same on main.

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
  • 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 dev-only page with the real components; a person has not verified it yet.
  • Adversarial review: no plan round, because the fix is mechanical. Code review used three finders, a sweep, a focused review of the mixed-script variant, and a 1.0 validation check. It corrected one README sentence and led to keeping dir="auto". A two-round, three-model visual review checked the captures, and a background review runs on the PR. See Council review.

🤖 Generated with Claude Code

Note

Fix truncated username display in right-to-left admin lists

Long usernames in admin UI lists cut off the start of the name when the browser renders them with right-to-left direction. This PR switches username spans to automatic text direction (dir="auto" behavior) so truncation keeps the beginning of the name visible, matching the direction of the username's first strong character.

  • Updates member lists in AccessGroupMembers.tsx, the users dashboard in UsersWidget.tsx, and the compact user list in AdminUserCompactList.tsx, plus the add-users picker
  • Short usernames now take only their text width; a flex-growing wrapper in the compact rows keeps badges aligned
  • Adds directionality guidance for truncated mixed-script names to the i18n docs, warning against .bidi-text for this case

Macroscope summarized 7ccf3a8.

In Arabic, a long left-to-right username on the admin users list, the
dashboard Users widget, and an access group's member list and Add users
dialog was cut at its start, because the line inherited the page's
direction. Each username now takes its direction from its own text, so a
cut name keeps its beginning in either script. Where the line would
stretch, it is sized to its text so a short name stays on the page's
start side.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-triage silo-triage Bot added the size/S 0–49 added + deleted lines (all files); change volume, not priority. label Nov 21, 2026
@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 37 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: 2b8002f1-571c-407d-8e02-3f7492b48177
Commits

Reviewing files that changed from the base of the PR and between 4b1713e and 7ccf3a8.

Files selected for processing: 4

  • web/src/components/admin/access-groups/AccessGroupMembers.tsx
  • web/src/components/admin/dashboard/widgets/UsersWidget.tsx
  • web/src/components/admin/users/AdminUserCompactList.tsx
  • web/src/i18n/README.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@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-21T02:53:13.852877Z 7ccf3a8 New commits
🔒 Security Review ✅ Completed 2026-11-21T02:55:04.367231Z 7ccf3a8 New commits
ℹ️ 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.

@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 bug Something isn't working impact: polish Annoyance, cosmetic, or nice-to-have priority: P2 Limited scope, workaround exists, or polish labels Nov 21, 2026

@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 d838775)

AI disclosure: Review by gpt-6.2-sol in Codex.

name inside keeps its start when cut, in either script, and w-fit keeps
a short one on the page's start side. */}
<span className="min-w-0 flex-1">
<span dir="auto" className="block w-fit max-w-full truncate font-medium">

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 (P3) Preserve long numeric prefixes on English pages

At 393 px in an English component fixture, 1018273645536271809019283746556677889999محمد kept its first digit on the base revision. With dir="auto", the Arabic letters make the span RTL, but the long digit run still reads left to right. Chromium, Firefox, and WebKit now clip the first digit in this row, the Users widget, the member list, and the Add users dialog. Where the digit run alone exceeds the available width, use LTR truncation to retain the prefix. Add this case to the fixture matrix.

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.

The mechanism is right. In 1018…9999محمد the first strong character is Arabic, so the line reads right to left, and a digit run wider than the box loses its first digits. On main, an English page kept them.

I've left the markup as it is. This is the same mixed-run trade-off the PR already describes, and every fixed rule I can see moves the cut somewhere else:

  • Treating a leading digit as left-to-right keeps this case. It cuts 2024_محمد_عبدالله_… on the Arabic page instead: "2024_" plus the end of the Arabic part, where main and this PR show "2024_محمد_عبدالله…".
  • Keeping the page's direction for any name with mixed runs (tried in this PR and dropped) cuts support_team_account_محمد to "…team_account".
  • Measuring whether the digit run alone overflows would need layout measurement for an edge case no single rule fixes.

Single-script and digits-only names, which are the case this PR is about, keep their start in all three engines. 7ccf3a8 corrects the README and the PR body so they no longer say that dir="auto" always keeps a name's first characters. I'm leaving this thread open so the maintainer can weigh the trade-off.

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

Comment thread web/src/i18n/README.md Resolved
It follows the first strong character, which can be right-to-left
punctuation as well as a letter, and a part of a mixed name that runs
the other way, such as a long digit prefix, can still lose its start.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@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 ❌
⚠️ 4 Kody Rule(s) were not evaluated

These rules declare that they need repository context beyond this diff, and the review could not retrieve it, so they were not judged on this pull request:

  • Preserve optional store capabilities through production wrappers
  • Detach mandatory cleanup from request cancellation and bound its lifetime
  • Preserve durable media identity and share identity-evidence precedence
  • Bound decoder throughput trades and share direct-play eligibility

@Quick104
Quick104 merged commit fd18354 into main Nov 21, 2026
22 checks passed
@Quick104
Quick104 deleted the fix/admin-username-rtl-truncation branch November 21, 2026 03:00
Quick104 added a commit that referenced this pull request Nov 21, 2026
… rule

The username rule from #4783 said not to use .bidi-text because plaintext
drops the "…" in Firefox and cuts the start in WebKit. That holds only for
.bidi-text without dir="auto". Say so, and put the metadata rule next to it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Quick104 added a commit that referenced this pull request Nov 21, 2026
…fari in right-to-left languages (#4853)

* fix(web): keep the start and ellipsis of cut titles in Firefox and Safari in right-to-left languages

Metadata text styled with .bidi-text takes its paragraph direction from its
own text, but the element's direction stays the page's. Firefox and WebKit
cut the text and draw the "…" at the end of that direction, so in Arabic a
long English card title lost its "…" in Firefox and its first letters in
Safari, and clamped overviews put the "…" at the start of their last line.

Give every .bidi-text element that is cut with truncate or line-clamp
dir="auto" (card titles, episode titles, audiobook authors, cast names and
roles, the home hero, episode and detail overviews, and the bounded detail
title). .bidi-text still lines the box up with the page, so short titles
stay on the page's start side and links keep their width.

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

* docs(web): say .bidi-text needs dir="auto" in the username truncation rule

The username rule from #4783 said not to use .bidi-text because plaintext
drops the "…" in Firefox and cuts the start in WebKit. That holds only for
.bidi-text without dir="auto". Say so, and put the metadata rule next to it.

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

* docs(web): note the mixed-direction limit on the metadata truncation rule

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

* refactor(web): keep .bidi-text and dir="auto" together on the detail title

DetailTitle set dir="auto" while its caller passed .bidi-text, so a caller
that left the class out would align an English title to the wrong edge in
Arabic. DetailTitle now adds the class itself. Also note on DetailOverview
that one direction can't suit every paragraph of a clamped multi-paragraph
description.

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

* docs(web): say what Firefox and WebKit show without dir="auto"

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

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
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.

1 participant