Skip to content

fix(web): wrap long names on the restore Review and Run steps - #4738

Merged
Quick104 merged 7 commits into
mainfrom
fix/restore-long-profile-name-wrap
Nov 21, 2026
Merged

Quick104 merged 7 commits into
mainfrom
fix/restore-long-profile-name-wrap

Conversation

@Quick104

@Quick104 Quick104 commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

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

  • Run step, each profile line: built on fix(web): keep restore checkboxes and profile icons on the first line of wrapped text #4723's layout (the icon stays on the first line and
    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.
  • Run step, each item's line (an account or other item name): the name wraps.
  • Run step, each data type's notes in an account's report: they wrap. A note can name a
    personal collection that was left out.
  • Run step, the muted "· Users · Restored" run on an item's line: each "·" stays with the word
    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.
  • Review step, the plan and "Left out" lists: names wrap.

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

  • Reproduced on a Silo dev deployment built from main (ab6e84d), then checked on the same
    deployment 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.
  • A collection left out of a restore (two of the profile's collections share its
    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.
  • Web lint, format check, build, and bundle budget pass, as do the local-path, size, bidi,
    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.
  • No test added: the change is class names, one isolating element, and two small text helpers,
    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

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

Rounds: 4, last reviewed 2e0ee59

Member Round 1 Round 2 (52f5daa) Round 3 Final (2e0ee59)
Sol (gpt-6.2-sol, xhigh) 8/10 (8af9773) 9/10 8.5/10 (dc9a973) 8.5/10
Opus (claude-opus-5-5, high) 8/10 (8af9773) 9/10 8/10 (dc9a973) 8/10
Gemini (gemini-4-neon, xhigh) 8/10 (2c81bf0; earlier run hit a provider quota) 8/10

Visual review: 2 rounds, captures from 8af9773

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

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

  • Harness: Claude Code in T3 Code
  • Tool(s): Claude Code, T3 Code delegated tasks, Codex, Antigravity
  • Model(s): claude-opus-5-5 (implementation), gpt-6.2-sol, claude-opus-5-5, gemini-4-neon (visual and background review), claude-sonnet-5-5 (code-review subagents)
  • Involvement: Fully AI-generated. The agent verified it live on a dev deployment; a person has not verified it yet.
  • Adversarial review: The plan round was skipped because the fix is a small layout change where the overflow starts. Code review at xhigh found one defect, a "·" left at the end of a profile line, which is fixed; its other candidates were consistency notes, and one it refuted (per-data-type notes carry no names) was wrong, which the background review caught and this PR now fixes. A simplify pass changed nothing. Background and visual review results are under Council review.

🤖 Generated with Claude Code

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]>
@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

Explain Change →

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 36 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: 2fc4c14b-daa0-4976-bdd2-63843860ff20
Commits

Reviewing files that changed from the base of the PR and between f964c3a and 2e0ee59.

Files selected for processing: 2

  • web/src/pages/admin-backups/RestoreReview.tsx
  • web/src/pages/admin-backups/RestoreRun.tsx
Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • 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:50:59.768207Z cf20f84 New commits
🔒 Security Review ✅ Completed 2026-11-21T02:56:27.996348Z 2e0ee59 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 javascript Pull requests that update javascript code 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 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 (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-triage silo-triage Bot added size/M 50–199 added + deleted lines (all files); change volume, not priority. and removed size/S 0–49 added + deleted lines (all files); change volume, not priority. labels Nov 21, 2026
@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 ❌

…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

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 ❌

…ile-name-wrap

# Conflicts:
#	web/src/pages/admin-backups/RestoreRun.tsx
@silo-triage silo-triage Bot added size/S 0–49 added + deleted lines (all files); change volume, not priority. and removed size/M 50–199 added + deleted lines (all files); change volume, not priority. 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 52f5daa)

Reviewed with gpt-6.2-sol in T3 Code via Codex. Posted by the run's agent because the reviewer's GitHub access failed.

@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 (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

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 ❌

@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 (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), and usercollections.BackupData.Import (registered in internal/backup/users_registry.go:22) formats user-supplied collection names (c.Name, up to defaultStringBound = 1024 bytes in internal/backup/userdata/bounds.go:18) into res.Notes at internal/usercollections/backup_userdata.go:327 and :351 (reachable via createCollection at :484-487 and duplicate-name matches at :350-352). Those notes flow unchanged through internal/backup/users_apply.go:460 and internal/apiv2/admin_backup_restore.go:507-508 into profile.data[].notes, where RestoreRun.tsx:210 renders <span key={position} className="text-muted-foreground block">{note}</span> with no wrap-anywhere or break-words on the span or any ancestor, unlike the sibling detail and note paragraphs at lines 110, 194, 224, 229, and 363.
  • Suggested repair: Add wrap-anywhere to the note <span> at web/src/pages/admin-backups/RestoreRun.tsx:210. (As a separate follow-up, web/src/pages/settings/YourDataSettings.tsx:90 renders the same data.notes from 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 plan at :655), or expand an unchecked account with a long spaceless username and check one of its profiles (populates notice at :666 with "Also chose the account <username>, which is needed by what you chose.").
  • Impact: Unbroken names overflow out of the 20rem summary panel at lg and wider, and below lg they widen the single-column grid past the viewport because <aside> lacks min-w-0.
  • Evidence: RestoreReview.tsx:54 adds wrap-anywhere to the restorePlan <ul>, while RestoreChoose.tsx:655 renders the same restorePlan sentences (web.admin.backups.restore.plan.sentence) in <ul className="list-disc space-y-1.5 ps-5 text-sm"> without wrap-anywhere. Directly below it, RestoreChoose.tsx:666 renders notice without wrap-anywhere, even though chooseItems and unchooseItems (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> at RestoreChoose.tsx:644 omits min-w-0 (unlike the main column at :586).
  • Suggested repair: Add min-w-0 to <aside> at web/src/pages/admin-backups/RestoreChoose.tsx:644 and wrap-anywhere to 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

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 ❌

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

AI-assisted review by gpt-6.2-sol in Codex. Posted by the run's agent because the reviewer's GitHub access failed.

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

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 ❌

@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 (claude-opus-5-5, reviewed 2e0ee59)

One minor finding, inline (O3). The rest of the attack turned up nothing:

  • keepSeparatorsWithNext is 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 described branch and the Review step lists are unaffected beyond wrap-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>,

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.

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: anywhere on 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). With word-break: keep-all, "เหมือนเดิมอยู่แล้ว" split in 216 layouts and "ไม่ได้กู้คืน" in 121. With white-space: nowrap and 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 delete nonBreaking. 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> (from keepSeparatorsWithNext) 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.

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.

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
Quick104 merged commit 27420da into main Nov 21, 2026
20 checks passed
@Quick104
Quick104 deleted the fix/restore-long-profile-name-wrap branch November 21, 2026 02:59

@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 (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:

  • keepSeparatorsWithNext leaves React elements, bidi marks, Catalan Col·leccions, and en-XA/ar-XB wrappers unchanged. react-intl wraps the <bdi> outcome in a keyed Fragment before calling muted, so mapping chunks produces zero React key warnings.
  • ReportRow wraps 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 in SHIPPED_LANGUAGES yet, but if it ships later, word-break: keep-all does 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's described prop show no regressions. Replacing spaces with U+00A0 touches 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 ImportSummary status box (at a 360 px viewport / 328 px content width, a 64-character unbroken collection name reaches scrollWidth 544 px inside a 326 px box).
  • Evidence: internal/backup/profile_transfer.go (lines 516–520) runs the same internal/usercollections/backup_userdata.go importer (lines 327, 351) that populates data.notes for 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 no wrap-anywhere, while unmatched and hidden right below (lines 99, 104) use break-words.
  • Suggested repair: Add wrap-anywhere to the data.notes span in web/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).

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 javascript Pull requests that update javascript code 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