Repository navigation
fix(web): keep the start of more long names cut short in right-to-left languages - #5016
Conversation
…t languages Collection titles, device and profile names, storage-location names in the downloads filters, and access group descriptions now take their own text direction, so a name in the other script keeps its beginning when it is cut and a description keeps its final period at the end. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Only the filter's trigger cuts a long name with an ellipsis; the menu wraps it, as before, so similar names stay distinguishable. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Next included review available in 6 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:
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
| {l.name} | ||
| <SelectItem key={l.key} value={l.key} className="*:last:min-w-0"> | ||
| {/* Cut with "…" in the trigger; the open menu wraps it. */} | ||
| <span dir="auto" className="in-data-[slot=select-trigger]:truncate"> |
There was a problem hiding this comment.
Automatic direction can clip the start of numeric-prefixed location names
A long numeric prefix before RTL text can cause the logical start of a location name to be clipped. Resolve direction using Unicode bidi behavior instead of relying solely on dir="auto", and test numeric prefixes and mixed-direction names at narrow widths in both interface directions.
Also found in:
web/src/components/calm/ListRow.tsx:162-162web/src/pages/admin-downloads/HistoryTab.tsx:120-120
Kody rule violation: Preserve the logical start of bidirectional truncated text
Prompt for LLM
File web/src/pages/admin-downloads/PreparedFilesTab.tsx, line 150:
Automatic direction can clip the start of numeric-prefixed location names
Resolve the location name’s direction using Unicode bidi behavior that accounts for strong RTL digits and weak numeric prefixes, rather than relying solely on `dir="auto"`. A long numeric prefix followed by RTL text can otherwise be clipped at its logical start. Cover numeric prefixes and mixed-direction names at narrow widths in both interface directions.
**Also found in:**
- `web/src/components/calm/ListRow.tsx:162-162`
- `web/src/pages/admin-downloads/HistoryTab.tsx:120-120`
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.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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:
|
Quick104
left a comment
There was a problem hiding this comment.
Adversarial review (gpt-6.2-sol, reviewed c77d902)
One finding, below. Score for the change as it stands: 8/10.
Run by Codex (gpt-6.2-sol) through the codex CLI, read-only; posted by the author's agent on its behalf.
Problem
Related issue: N/A
Validation tasks: none
Other clients: N/A (web layout only; Apple, Android and Roku lay out their own text)
In Arabic, a long Latin name cut short with "…" showed its end instead of its start: the "…" sat where the name begins. An Arabic name on an English page did the same. This happened to collection titles (the Collections page cards and the admin Collections list), device names (admin Devices, and the Devices card on an admin user's Activity tab), profile names on an admin user's Overview, and the storage-location names in the Downloads History and Prepared files filters. The built-in Default Group's description "Applied automatically to newly created users." also showed as ".created users" on an Arabic page.
These are the sites a review of a sibling change left for a separate pull request. That change applies the same rule to libraries, policy documents, transcode nodes, access group names and others.
Approach
Each site now follows the "Right to left" rules in
web/src/i18n/README.md. A name that can be in either script takesdir="auto", so it reads in its own direction and keeps its start when cut. Collection titles can come from metadata, so the two block-level ones also take.bidi-text. The access group description takesdir="auto"andalign-with-page, so the sentence keeps its period at the end and its lines stay on the page's start side.The shared title components take a direction only when asked. The admin collection list's
ListRow(components/calm) also shows home-row titles, and the admin user detailListRowalso shows media titles. Either can be translated text, which shouldn't switch direction. So both components get an optionaltitleDir="auto", and only the collection, device and profile rows pass it.The location filters needed more than
dir. The selected name in the fixed-width trigger was clipped instead of cut with "…", and an over-wide menu item could push the menu off the screen. They follow the pattern the sibling change used for overlay images: each level down to the name can shrink, and the menu is capped at the screen width. Only the trigger cuts the name with "…". The open menu still wraps it, mid-word when it has no spaces, so two long names that start the same stay distinguishable.Validation
mainfor the before state and from this branch for the after state, in Chromium, Firefox and WebKit, in Arabic and English, at 393 and 1440 px. The data was long Latin and Arabic collection titles, profile names, device names and storage-location names. For each cut name, a script checked whether its first character was visible. Onmain, Chromium and Firefox lost the start at every site. With this change, none of the 130 measured captures did. WebKit was judged from its screenshots. The access group description was checked from screenshots: onmainthe period is at the start of the line, and with this change it is at the end.Evidence
Evidence: https://evidence.siloserver.org/r/silo-server/rtl-truncated-entered-names-more/
Risks
None identified. Rendering only: no API, stored data or translation keys change.
Checklist
Council review
Ran as a follow-up run with one reviewer per round.
Visual review: 1 round, captures from d677a57
Fixed: S2. The open location menu cut long names to one line; it now wraps them again, and only the trigger cuts the name. Re-captured on the final head.
Answered: S1, the title drawn on a collection card with no poster, still loses its start. It sits on the poster artwork, where the README keeps direction physical, and it's outside this change. It's tracked with the other remaining sites in a follow-up issue. S3: page text and counts differ between the before and after captures because the after build is a newer sandbox state. This change doesn't touch them.
Background review: 1 round, last reviewed c77d902. T3 Code's delegation was unavailable, so Sol ran through the codex CLI read-only and its finding was posted on its behalf.
Fixed: S1. A location name with no spaces could still be clipped in the open menu. Both filters now let it wrap mid-word (20e668a), checked live in Chromium, Firefox and WebKit.
AI Disclosure
🤖 Generated with Claude Code