Repository navigation
fix(web): wrap long names on the restore Review and Run steps - #4738
Conversation
A long profile or account name with no spaces ran past its line on the restore Review step's lists and the Run step's report, and the Run step's profile line squeezed its outcome icon to nothing. The name now wraps inside its line and the icon keeps its size on the first line. The muted "· Users · Restored" and "· Created" runs wrap only before a "·", so a separator never ends a line and a short status stays whole. 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 36 minutes. View limit details
Finishing Touches
|
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. |
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 (claude-opus-5-5, reviewed 8af9773)
One finding, inline on RestoreRun.tsx. Other checks found no problems. The helper leaves React element chunks alone, and every shipped locale and both pseudo-locales use the separator shapes it expects, bidi marks included (ar-XB puts U+202E/U+202C around " · "). Strings in an array don't need keys, so mapping the chunks adds no key warnings. A no-break space copies and reads aloud as an ordinary space, so copy and screen-reader output don't change in a way that matters. The described branch and the Review lists are unaffected. The rest of the diff (the wrap-anywhere classes, shrink-0 with the 1lh icon offset, and the joining space) is the minimum the reported overflow needs.
This review was written by an AI agent (Claude Opus 5.5, model id claude-opus-5-5).
…report The report line's muted run made every space but the one before a "·" unbreakable, so a long translated section title (German "Bereiche der Startseite und Mediatheken") could only break inside a word at phone width. Bind only the space after each "·" and the spaces inside the short outcome label; section titles wrap between words again. 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:
|
…come The report's profile line now runs the name and its outcome as one line of text, so direction characters in a name could carry into the "· Created" after it and reorder it. Isolate the name with <bdi>, as the name and outcome were isolated when they were separate flex items. 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:
|
…ile-name-wrap # Conflicts: # web/src/pages/admin-backups/RestoreRun.tsx
Quick104
left a comment
There was a problem hiding this comment.
Adversarial review (claude-opus-5-5, reviewed dc9a973)
One minor finding, inline. It comes from the merge resolution: #4723's name margin now sits on the <bdi>.
Everything else I checked holds. min-w-0 wrap-anywhere on the profile text span is still needed on top of #4723, because without it a 64-character unbroken name keeps the flex item at its min-content width. In headless Chrome at 200, 280, and 320 px, with names of 10 to 64 characters and outcomes "· Created", "· 作成済み", and a long German status, the inline-block outcome never wrapped inside itself when it fit on its own line, and nothing overflowed. The separator helpers only see string chunks in every shipped locale, including the ar-XB RLO/PDF marks, so they add no React keys and leave words alone. U+00A0 has the same width as a space, so single-line rows don't change.
AI disclosure: written by claude-opus-5-5 (Claude Code), with no edits to the branch.
…re report A <bdi> takes its direction from its own text, so the name's end margin fell on the wrong side for a name in the other script (a Latin name in the Arabic interface): the name touched its outcome and sat 12 px from the icon. Keep the margin on an outer span and isolate only the name. 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 (Gemini 4 Neon, reviewed 2c81bf0)
The changes in RestoreReview.tsx and RestoreRun.tsx wrap long account and profile names without breaking multi-word section titles, flipping RTL spacing, or leaking bidi overrides into profile outcomes. Two unwrapped spots on the same restore screen still overflow on long spaceless names.
G1 (minor): Per-data-type notes in RestoreRun.tsx:210 have no wrap class
- File:
web/src/pages/admin-backups/RestoreRun.tsx:209-213 - Trigger: Restore a profile whose personal collections include a collection with a long spaceless name that is left out because its rules or sync source reference libraries absent on this server, or because the target profile already has multiple collections with that name.
- Impact: The note overflows its line in the Run step's report at phone and desktop widths.
- Evidence: Five server importers populate
userdata.Result.Notes(internal/backup/userdata/userdata.go:209), andusercollections.BackupData.Import(registered ininternal/backup/users_registry.go:22) formats user-supplied collection names (c.Name, up todefaultStringBound = 1024bytes ininternal/backup/userdata/bounds.go:18) intores.Notesatinternal/usercollections/backup_userdata.go:327and:351(reachable viacreateCollectionat:484-487and duplicate-name matches at:350-352). Those notes flow unchanged throughinternal/backup/users_apply.go:460andinternal/apiv2/admin_backup_restore.go:507-508intoprofile.data[].notes, whereRestoreRun.tsx:210renders<span key={position} className="text-muted-foreground block">{note}</span>with nowrap-anywhereorbreak-wordson the span or any ancestor, unlike the sibling detail and note paragraphs at lines110,194,224,229, and363. - Suggested repair: Add
wrap-anywhereto the note<span>atweb/src/pages/admin-backups/RestoreRun.tsx:210. (As a separate follow-up,web/src/pages/settings/YourDataSettings.tsx:90renders the samedata.notesfrom profile imports without a wrap class.)
G2 (minor): The Choose step's summary sidebar renders the same restorePlan list and dependency notices without wrapping
- File:
web/src/pages/admin-backups/RestoreChoose.tsx:644, 655, 666 - Trigger: On Step 1 (Choose), select a library, collection, or item artwork with a long spaceless name (populates
planat:655), or expand an unchecked account with a long spaceless username and check one of its profiles (populatesnoticeat:666with"Also chose the account <username>, which is needed by what you chose."). - Impact: Unbroken names overflow out of the
20remsummary panel atlgand wider, and belowlgthey widen the single-column grid past the viewport because<aside>lacksmin-w-0. - Evidence:
RestoreReview.tsx:54addswrap-anywhereto therestorePlan<ul>, whileRestoreChoose.tsx:655renders the samerestorePlansentences (web.admin.backups.restore.plan.sentence) in<ul className="list-disc space-y-1.5 ps-5 text-sm">withoutwrap-anywhere. Directly below it,RestoreChoose.tsx:666rendersnoticewithoutwrap-anywhere, even thoughchooseItemsandunchooseItems(web/src/pages/admin-backups/restoreModel.ts:212-235, 274, 347) embed full account usernames, profile names, and library or collection names. The enclosing<aside>atRestoreChoose.tsx:644omitsmin-w-0(unlike the main column at:586). - Suggested repair: Add
min-w-0to<aside>atweb/src/pages/admin-backups/RestoreChoose.tsx:644andwrap-anywhereto the summary<ul>(:655) and notice<p>(:666), or track this as a follow-up if keeping this PR scoped strictly to Review and Run.
AI-assisted review: Gemini 4 Neon via Antigravity in T3 Code.
…nd Korean
No-break spaces kept "Left out" together, but a Chinese, Japanese, or
Korean status could still split between characters ("已 / 恢复"). Render
the status with word-break: keep-all in a <bdi>, which also keeps the
direction isolation the string value had in right-to-left languages. An
inline block would allow a break before the status and leave the
message's "·" at the end of a line.
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:
|
A personal collection left out of a restore is named in its data type's note, and the note had no overflow-wrap, so a long unbroken collection name ran past the line (254 px at a 360 px viewport). Let the note wrap like the report's other detail lines. 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 (claude-opus-5-5, reviewed 2e0ee59)
One minor finding, inline (O3). The rest of the attack turned up nothing:
keepSeparatorsWithNextis still needed. Every locale, including both pseudo-locales, writes the muted run as" · {section} · {outcome}", and the helper only changes those separators. It passes React elements through unchanged. In ar-XB the replacement lands inside the RLO/PDF wrapper, and in Arabic and Hebrew it lands next to the FSI/PDI isolates. Neither placement creates a break opportunity after the "·".- Mapping the chunks changes nothing about keys. The
<bdi>element was already an array member before this change, and string chunks need no keys. - The no-break spaces read as normal spaces to screen readers. Copying the text gives U+00A0, which doesn't matter for a report line.
- On a single line the layout matches the previous version. The
describedbranch and the Review step lists are unaffected beyondwrap-anywhere. - The change fits the project's current focus on correctness and UX polish for admin screens.
Score: 8/10. The Review, profile-line, and note fixes are sound. O3 is a small gap with a simpler fix available.
AI disclosure: written by Claude Opus 5.5 (claude-opus-5-5) running in Claude Code.
| // `wrap-anywhere`. (An inline block would let the line break before it, leaving | ||
| // the message's "·" at the end of a line.) <bdi> keeps the direction isolation a | ||
| // string value gets in right-to-left languages. | ||
| outcome: <bdi className="break-keep">{nonBreaking(t(outcome.label))}</bdi>, |
There was a problem hiding this comment.
O3 (minor): Thai statuses still split across lines on the item line. break-keep stops breaks between Chinese, Japanese, and Korean characters. It has no effect on Thai, where the browser finds word boundaries with a dictionary, so "เหมือนเดิมอยู่แล้ว" (unchanged) and "ไม่ได้กู้คืน" (left out) can still split in the middle.
- Trigger: Thai interface, run report, an item whose name pushes the status onto the line's last few dozen pixels.
- Impact: the status splits across two lines, which S4 fixed for Chinese, Japanese, and Korean. The profile line doesn't have this problem because its outcome is an inline block.
- Evidence: I measured this markup in headless Chrome with a 14 px font,
overflow-wrap: anywhereon the line, a separator plus no-break space before the status, and container widths from 200 to 420 px against name lengths from 4 to 40 characters (962 layouts per status). Withword-break: keep-all, "เหมือนเดิมอยู่แล้ว" split in 216 layouts and "ไม่ได้กู้คืน" in 121. Withwhite-space: nowrapand no other change, both split in 0. In both versions no line ended on a "·" and nothing overflowed. Japanese, German, and Arabic statuses split in 0 layouts either way. - Suggested repair:
outcome: <bdi className="whitespace-nowrap">{t(outcome.label)}</bdi>, and deletenonBreaking. This covers Thai and also removes one of the three mechanisms. You lose the emergency break for a status wider than the line, but the widest real status in any locale measures 118 px (vi "Không thành công") and the en-XA pseudo-locale's measures 185 px. I didn't render the report at 300 px, so I haven't confirmed that the content column there is wider than 185 px. The NBSP before the<bdi>(fromkeepSeparatorsWithNext) still keeps the "·" with the status, so the inline-block problem described in the code comment doesn't come back. Update the code comment to match.
There was a problem hiding this comment.
Not changing this one, because Thai isn't a shipped interface language: SHIPPED_LANGUAGES in web/src/lib/appLocale.ts lists 22 languages without th, and on a dev deployment the Thai browser setting falls back to English, so the report never shows a Thai status today. For the shipped languages, break-keep with no-break spaces keeps every status whole (measured across English, German, Arabic, Chinese, Japanese, and Korean at 300 to 460 px) and still lets a status wider than the line break, which whitespace-nowrap would give up. If Thai ships, whitespace-nowrap is the trade to revisit.
A correction to one bullet in the review body: before this change the outcome value was a plain string, not an element in the chunk array. Rendering it as an element now is safe for keys, because react-intl keys the chunks it passes to the tag function, and a development build showed no key warnings on this page.
🤖 Claude Code (claude-opus-5-5)
Quick104
left a comment
There was a problem hiding this comment.
Adversarial review (Gemini 4 Neon, reviewed 2e0ee59)
Checked RestoreReview.tsx and RestoreRun.tsx against all 22 shipped languages, en-XA/ar-XB, web/src/i18n/format.ts, and Chromium layout measurements:
keepSeparatorsWithNextleaves React elements, bidi marks, CatalanCol·leccions, anden-XA/ar-XBwrappers unchanged.react-intlwraps the<bdi>outcome in a keyed Fragment before callingmuted, so mappingchunksproduces zero React key warnings.ReportRowwraps long names, breaks long section titles between words, keeps every shipped language's status whole when it fits, and breaks oversized statuses without ending a line on·. (Note: Thai is not inSHIPPED_LANGUAGESyet, but if it ships later,word-break: keep-alldoes not suppress Thai dictionary word breaks.)- Single-line layout, RTL profile spacing (6 px on both sides of a short Latin name in Arabic), and both branches of
AccountReport'sdescribedprop show no regressions. Replacing spaces withU+00A0touches only the muted metadata run, not item labels or notes.
Two low-severity edge cases remain in RestoreRun.tsx (inline comments G3 and G4), plus one sibling caller outside this PR's diff:
G5 (low, outside this PR's diff): YourDataSettings renders the same data.notes without wrap-anywhere
- Trigger: Import a profile export on Settings → Your Data when a personal collection with a long unbroken name is left out.
- Impact: The collection note overflows the bordered
ImportSummarystatus box (at a 360 px viewport / 328 px content width, a 64-character unbroken collection name reachesscrollWidth544 px inside a 326 px box). - Evidence:
internal/backup/profile_transfer.go(lines 516–520) runs the sameinternal/usercollections/backup_userdata.goimporter (lines 327, 351) that populatesdata.notesfor backup restore.web/src/pages/settings/YourDataSettings.tsx(lines 89–93) renders each note as<span key={position} className="text-muted-foreground block text-xs">{note}</span>with nowrap-anywhere, whileunmatchedandhiddenright below (lines 99, 104) usebreak-words. - Suggested repair: Add
wrap-anywhereto thedata.notesspan inweb/src/pages/settings/YourDataSettings.tsx(line 90) in a follow-up PR.
Score: 8/10.
AI-assisted review: Gemini 4 Neon (Antigravity harness in T3 Code).
Problem
Related issue: N/A
Validation tasks: none
Other clients: N/A (the backup restore screen is web admin only)
On the backup restore screen's Review and Run steps, a long profile or account name with no
spaces ran past the edge of its line and was cut off. On the Run step's report, the profile
line also squeezed its outcome icon, down to nothing for a name with no spaces, and pushed
"· Created" into a narrow column beside the name or off the screen. This change wraps those
names inside their line and keeps the icon at its size.
Profile names can be 64 characters and usernames longer. At 360 px, 64-character names with
no spaces ran 178 to 185 px past the Review step's "Left out" entries and 185 to 248 px past
the Run step's lines. A 138-character username ran 309 to 333 px past its line even at
1024 px. #4708 fixes the same overflow in the Choose step's profile list.
Approach
the outcome moves down as one piece), the name now wraps inside the line, and it sits in a
<bdi>, so its text direction can't carry into the outcome after it.personal collection that was left out.
after it, so a line never ends on a separator, and the status stays whole ("· Left out",
"· 已恢复", or "· تمت الاستعادة"). Section titles still wrap between words, and a status wider
than the line can still break, so nothing overflows. Every shipped language uses the same
" · " separator.
The names wrap rather than end in "…", as in #4708: at phone width an ellipsis would show
about 20 characters of a name, and the other lines in this report already wrap. On wide
screens, names that fit look the same as on
main.Validation
main(ab6e84d), then checked on the samedeployment rebuilt from this branch (2e0ee59, which includes fix(web): keep restore checkboxes and profile icons on the first line of wrapped text #4723), with the same backups and restore reports:
accounts whose names and profile names are 64 characters (some with spaces, some without),
one account with a 138-character username and short profile names, and a restored home
section. Measured at 320, 360, 390, 820, 1024, and 1440 px, in Arabic at 320 and 360 px, and
in German and French at 320 px. Before: names with no spaces ran 148 to 288 px past their
lines at phone widths, the long username up to 333 px on a desktop, and the outcome icons
rendered 0 to 8 px wide. After: every name stays inside its line, every icon is 14 px, long
German and French section titles wrap between words, no line ends on a "·", account-line
statuses stay whole in Chinese, Japanese, and Korean, a short Latin name in the Arabic
interface keeps the same gaps as in English, and the page doesn't scroll sideways. Where
names already fit, line counts are unchanged.
80-character name) is named in the report's collections note; that note ran 254 px past its
line at 360 px and now wraps.
and case-collision checks. Web unit tests: 29 fail in four files that don't import these
components (request deadline, auth, player client context, player auth refresh), and they
fail the same way with the two changed files set back to
main.and the measurements above check it.
Evidence
Surface and build: web admin, Backups › Restore › Review and Run; before ab6e84d, after
2e0ee59.
Evidence: https://evidence.siloserver.org/r/silo-server/restore-long-name-wrap/
Risks
None identified. The change is limited to the restore screen's Review and Run steps.
Follow-ups
changed here).
follow-up run started (same before this change).
wrap either: follow-up run started (same before this change; the summary panel's width is
also [bug] Restore: with larger browser text, the summary panel widens the list past a phone screen #4730).
Checklist
Council review
Rounds: 4, last reviewed 2e0ee59
Visual review: 2 rounds, captures from 8af9773
Fixed: an account line broke right after a "·" and split a short status (visual review, all
three members); a long translated section title broke mid-word (Opus); a profile name's text
direction could carry into the outcome after it (Sol); after the merge with #4723, the name's
gap fell on the wrong side for a name in the other script (Opus, Sol); an account-line status
could split between Chinese, Japanese, or Korean characters (Sol); a data note naming a long
collection overflowed (Gemini). Resolved by the merge: short statuses splitting on the profile
line, now kept whole by #4723's layout. Answered: very short word pieces before "· Created"
come from 64-character names with no spaces breaking where they must; a Thai status can still
split between words (Opus, Sol, final round), but Thai isn't a shipped interface language, and
the fix it would need gives up breaking a status wider than the line; the English sentences in
non-English reports, a German note squeezed beside the Review buttons, and long names in the
Choose step's summary and the "Your data" page were the same before this change and are under
Follow-ups. After the merge: an item line's label isn't isolated from the text after it, and a
profile status wider than its line can leave its "·" alone (Gemini, final round); both predate
this change and went to a separate fix.
AI Disclosure
🤖 Generated with Claude Code