Repository navigation
fix(web): keep restore names that can't wrap inside their box - #4921
Conversation
A name holding a run no line break can split, such as emoji joined by zero-width joiners, ran past its box on the backup restore screens: the Choose step's library heading and its summary panel, the Review step's plan sentences and left-out list, and the Run report's item and profile lines. In the summary panel the sentence also set the width of the phone layout's only column, so every section ran past the screen. Each of these now clips such a run sideways at its edge, as the profile rows do since #4755. The summary panel no longer widens the column, and its sentences wrap like the Review step's. Every other name renders as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…le-name-overflow # Conflicts: # web/src/pages/admin-backups/RestoreChoose.tsx
|
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 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:
|
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. |
| "-me-[0.25em] list-disc space-y-1.5 overflow-x-clip ps-5 pe-[0.25em] text-sm wrap-anywhere", | ||
| className, | ||
| )} | ||
| > | ||
| {sentences.map((sentence, position) => ( | ||
| <li key={position}>{t("web.admin.backups.restore.plan.sentence", { sentence })}</li> |
There was a problem hiding this comment.
Clipped plan names cannot be inspected in the summary or review
Users cannot distinguish selected plans with the same visible prefix when their names are clipped. Provide an accessible way to reveal the full sentence on Choose and Review.
Prompt for LLM
File web/src/pages/admin-backups/RestoreReview.tsx, lines 60-65:
Clipped plan names cannot be inspected in the summary or review
Clipping the plan sentence without exposing the original text prevents users from identifying the full selected name on both Choose and Review, including when two names share the same visible prefix. Provide an accessible way to reveal the complete sentence or name without relying on the clipped text.
Suggested code:
<li key={position} title={sentence}>{t("web.admin.backups.restore.plan.sentence", { sentence })}</li>
Talk to Kody by mentioning @kody
Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.
| sideways at the row's edge, in the item's line and in its profiles' lines; the words | ||
| around it still wrap. The 0.25em of padding, offset by a negative margin, keeps | ||
| letters whole whose ink reaches past their edge. */} | ||
| <div className="-mx-[0.25em] min-w-0 flex-1 overflow-x-clip px-[0.25em]"> |
There was a problem hiding this comment.
Report row clipping hides portions of restore diagnostics
Users can lose diagnostic details in unbreakable text from item.error, item.message, notes, and profile diagnostics. Restrict clipping to name-bearing lines or provide a way to inspect the full text.
Prompt for LLM
File web/src/pages/admin-backups/RestoreRun.tsx, line 99:
Report row clipping hides portions of restore diagnostics
The new clipping container also truncates unbreakable runs in `item.error`, `item.message`, notes, and profile diagnostics, none of which have a title or other full-text view. Restrict clipping to the name-bearing lines or provide a way to inspect the complete diagnostic text.
Talk to Kody by mentioning @kody
Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.
…estore-choose-your-data main's #4921 moved the Choose summary's plan list to the shared PlanSentences, which already wraps long names, so this branch's change to that list is dropped. The notice and the Your data note keep wrap-anywhere. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| return ( | ||
| <ul | ||
| className={cn( | ||
| "-me-[0.25em] list-disc space-y-1.5 overflow-x-clip ps-5 pe-[0.25em] text-sm wrap-anywhere", |
There was a problem hiding this comment.
S1 (P3) — Keep clipped names distinguishable in the restore plan
At a 1024 px viewport with default Text Size, two library names made from 41 joined emoji that differ only in the last emoji render identically in both Choose and Review. In a Chromium fixture using the app CSS, main’s Choose summary could scroll 474 px sideways to reveal the difference. With this change it has zero horizontal scroll, and neither plan displays the differing character. An admin can no longer tell those entries apart by reading the plan before restoring.
Keep the list inside its column and offer a keyboard- and touch-accessible way to read the full name when a line clips. Limit that reveal to clipped names so ordinary sentences don’t gain tooltips.
Problem
Related issue: N/A
Validation tasks: none
Other clients: N/A (backup restore is only in the web admin)
On the backup restore screens, a library, collection, or account name that holds a run no line break can split, such as many emoji joined by zero-width joiners, ran past its box and was cut off at the screen edge. On a phone, choosing such an item made it worse: the Choose step's summary panel widened the page's only column from 328 to 560 px on a 360 px screen, so every section ran past the edge and the Users section's "All" checkbox could no longer be reached. This change clips such a run at the edge of its box on each of those surfaces and keeps the summary panel from widening the page. Every other name renders as before.
The affected places:
Server-side, usernames are only trimmed and capped at 255 characters, and collection titles and library names accept the same run, so real data can produce these names. #4755 fixed this for the Choose step's profile rows, and #4849 fixes the Choose step's item and account rows.
Approach
Each surface uses the classes #4755 settled for this:
overflow-x-clipwith 0.25em of padding offset by a negative margin. That clips sideways only, so tall marks above and below a line stay visible, and letters whose ink reaches past their edge stay whole. The clip goes on the box that already sets the line width, so the words around the run still wrap and only the run is cut:min-w-0, andmax-w-fullon its button so the button can't grow past the row);PlanSentenceslist;The summary panel gets
min-w-0. On a phone it shares the sections' grid column, and without it the panel's widest sentence set the column's width. Names that are clipped get atitleon the name element with the full name. The plan sentences don't, since the name sits inside a translated sentence and a tooltip on every sentence would only repeat it.Web only, in
RestoreChoose.tsx,RestoreReview.tsx, andRestoreRun.tsx. No API, text, or translation changes.Validation
Evidence
Evidence: https://evidence.siloserver.org/r/silo-server/restore-unbreakable-name-overflow/
Risks
The last glyph of a clipped run can be cut mid-glyph at the box's edge; an ellipsis can't go inside one grapheme. The Run report clips its whole text column, so the end of an unbreakable run inside a server message or a title list is clipped there too; on a phone that text already ran off the screen.
Checklist
Follow-ups
Two pre-existing defects that main shows the same way, each fixed in its own pull request:
BackupWarningDetails.tsx, on the Choose step and the Backups page) has the same overflow.Council review
Plan round: skipped as a mechanical fix. The source shows each box that overflows, and the change applies the classes #4755 settled at those boxes.
Background review: 1 round, on 78eb2e8, finished after merge
Open: Sol's S1, a keyboard- and touch-accessible way to read a clipped name in the plan, is a design decision for the maintainer. A follow-up fix makes these clips apply only while a name overflows, after Firefox was found to clip
overflow-x: clipvertically too.Visual review: 1 round, on captures taken before this branch merged main. Main's pinned summary panel changed the desktop before; the desktop after looks the same.
Answered: all three noted that a clipped run ends 3 to 4 px past the dividers. That is the 0.25em of room #4755 keeps for letters whose ink reaches past their edge, so it stays. Gemini read two of those runs as reaching the screen edge; the measurements put them 12 px inside it. The empty first line in the Arabic report (Sol, Gemini) shows the same way on main and is a follow-up. A lone "items." at the end of some sentences also shows on main.
AI Disclosure
🤖 Generated with Claude Code
Note
Fix restore wizard text overflow by clipping unbreakable names within their rows
PlanSentencescomponent in RestoreReview.tsx, used by both the Choose summary and Review plan lists.titleattributes so clipped content stays reachable.Macroscope summarized 78eb2e8.