Repository navigation
fix(web): keep an omitted account's name that can't wrap inside its box - #4908
Conversation
An account name holding a run no line break can split, such as emoji joined by zero-width joiners, ran past the name sample in the omitted-accounts warning and spilled into the next column of the expanded name list. Clip it sideways at its own box with the 0.25em bleed the restore screens use, and give each list item its full name as a tooltip, as well as the sample when it is the only place the names appear. Other names render as before. 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 5 minutes. View limit details
|
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:
|
| <p | ||
| title={hasList ? undefined : sample} | ||
| className={cn(CLIP_NAME, "text-muted-foreground text-xs break-words")} |
There was a problem hiding this comment.
Clipped names cannot be recovered by touch or keyboard users
Provide an accessible way to reveal complete names, such as a focusable disclosure or a horizontally scrollable container.
Prompt for LLM
File web/src/pages/admin-backups/BackupWarningDetails.tsx, lines 78-80:
Clipped names cannot be recovered by touch or keyboard users
For groups with at most five names, clipping hides part of a long name and the `title` tooltip cannot be invoked by touch or keyboard-only users, while no full-list disclosure is rendered. Provide an accessible way to reveal the complete names, such as a focusable disclosure or horizontally scrollable name container.
Talk to Kody by mentioning @kody
Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.
There was a problem hiding this comment.
A keyboard and touch way to reveal a clipped name is left for the maintainer to decide, as the PR body says under Council review: the restore screens use the same title trade-off since #4755, and the full name stays in the DOM, so screen readers read it and copying gets it. A focusable reveal would be a new pattern across those screens, so it isn't added here.
🤖 Claude Code (claude-opus-5-5)
There was a problem hiding this comment.
Understood. The accessibility concern remains valid: keeping the full name in the DOM and providing a title tooltip does not give all keyboard and touch users a reliable way to reveal it visually.
I’ll leave the suggestion as a known trade-off for the maintainer to decide, rather than treating the existing restore-screen pattern as resolving it.
| <p className="text-muted-foreground text-xs break-words">{nameSampleText(group.labels)}</p> | ||
| {group.labels.length > NAMES_SHOWN ? ( | ||
| <p | ||
| title={hasList ? undefined : sample} |
There was a problem hiding this comment.
S1 (Low) — Provide a way to read clipped names without hovering. On Restore Choose, a single omitted account with a name wider than the warning has its suffix clipped. Groups of five or fewer have no names disclosure, and Restore Choose has no Copy details action. For larger groups, opening the list still clips the name and gives it the same hover-only title. In a Chromium markup fixture, a 315 px name was clipped by a 306 px sample box. Tab skipped the sample, a touch tap left it clipped, and the box could not scroll. Give clipped names a keyboard- and touch-operable way to reveal the full text, such as a focusable scroll area on the clipped label.
The name sample and the full list clipped sideways at all times. Firefox clips `overflow-x: clip` vertically too, so ordinary Thai and Vietnamese names lost the marks above and below their line. Both now clip only while a name can't wrap to fit, through the useOverflowsInline hook and OVERFLOW_CLIP from #4987, as the rest of the restore screens do. 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:
|
| * shows it in full. | ||
| */ | ||
| function OmittedName({ label }: { label: string }) { | ||
| const [ref, overflows] = useOverflowsInline<HTMLLIElement>(label); |
There was a problem hiding this comment.
Expanded account lists allocate an observer and layout measurement per name
Opening and resizing large omission groups becomes increasingly expensive because useOverflowsInline installs a ResizeObserver and font listener for every name. Share observation and batch measurements, or render only visible names.
Prompt for LLM
File web/src/pages/admin-backups/BackupWarningDetails.tsx, line 48:
Expanded account lists allocate an observer and layout measurement per name
Expanding a large omission group now synchronously measures every account and installs a separate `ResizeObserver` and font listener for each name, making opening and resizing the list increasingly expensive with the number of omitted accounts. Share observation and batch measurements, or render only the visible names.
Talk to Kody by mentioning @kody
Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.
There was a problem hiding this comment.
True, one observer and one measurement per name. Measured with 1,000 names in a three-column list: 11 ms on open and 33 ms per resize in Chromium, 230 ms and 338 ms in Firefox. A group only lists accounts whose export failed or whose document was over the size cap, which is rare and usually a handful of accounts, and the list renders only while it's open, so I'm leaving it per name. If large groups turn out to be real, the cheap fix is to measure only names that contain a grapheme cluster long enough to overflow, since break-words wraps everything else.
🤖 Claude Code (claude-opus-5-5)
There was a problem hiding this comment.
That’s a reasonable trade-off given that omission groups are expected to be small and the list only renders when expanded. The Firefox measurements do show a meaningful slowdown at 1,000 names, so I’d keep that as a known scalability concern rather than treat the cost as negligible.
If large groups become common, filtering which names to measure could help, but it would need to account for box width, font metrics, and font-size settings—not just character count.
Quick104
left a comment
There was a problem hiding this comment.
Adversarial review (gpt-6.2-sol, reviewed 4ae625e)
Two findings from focused browser fixtures using the PR's layout and overflow measurement. The expanded list can paint a name over the next column, and a mixed sample can clip Thai marks in Firefox.
Review by OpenAI Codex in T3 Code (gpt-6.2-sol). Browser fixtures ran in Playwright.
| * shows it in full. | ||
| */ | ||
| function OmittedName({ label }: { label: string }) { | ||
| const [ref, overflows] = useOverflowsInline<HTMLLIElement>(label); |
There was a problem hiding this comment.
S2 · Medium · A name can still overlap the next column
Open a six-name group in a 520 px, three-column list. Put 21 U+1F469 emoji joined with U+200D, followed by Alexandra-Maria Taylor Catherine Johansson, in the second name. In a Chromium 151 fixture, that item spans two columns. Its first fragment ends at x=162, but the emoji paints to x=328 and overlaps the next account's name. The hook reports that it fits because the union of the item's fragments reaches x=334. Firefox 153 and WebKit 26.5 give the same false result at 570 px. Keep each list item in one column with break-inside: avoid or compare the text with each fragment's own box. The former made the hook detect the overflow in all three fixtures.
There was a problem hiding this comment.
Fixed in 5e7946b: each name now has break-inside-avoid, so it stays in one column and the measurement sees its own box. Reproduced first with your case (six names, three columns): without it the hook missed the overflow at 520–620 px in Chromium and at 570–620 px in Firefox and WebKit; with it, the overflow is detected at every width tried in all three. The fixture rerun with the change keeps every ordinary name pixel-identical to main in Chromium, Firefox, WebKit, and Firefox with a 24 px minimum font. A long ordinary name now moves to the next column whole instead of splitting across two.
🤖 Claude Code (claude-opus-5-5)
| title={hasList ? undefined : sample} | ||
| className={cn( | ||
| "text-muted-foreground text-xs break-words", | ||
| sampleOverflows && OVERFLOW_CLIP, |
There was a problem hiding this comment.
S3 · Low · Clipping one sample name can cut marks off another
Put กิ๊ฟ first in the sample and the joined emoji name second. In a 180 px Firefox 153 fixture with a 24 px minimum font, the Thai name fits on the first line and the emoji overflows the second. The overflow adds the clip to the entire paragraph, and the pixel comparison shows the top of the Thai tone mark disappearing. Keep the inline cutoff while giving the paragraph enough vertical paint space for the marks. Include a mixed sample in the Firefox check.
There was a problem hiding this comment.
Agreed, and leaving it as a disclosed risk. The sample is one translated sentence with the names inside it, so it can only be measured and clipped as a whole; while it holds a name that can't wrap, Firefox can trim marks on its other lines under a large minimum font size. That's the same trade-off the plan lists make in #4987. Without such a name, the sample isn't clipped at all.
🤖 Claude Code (claude-opus-5-5)
A name split across two columns of the expanded list measured as fitting, because its overflow check saw the union of both pieces, so a name holding a run no line break can split could still paint over the next column. Each name now stays in one column, where the check sees its overflow. 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:
|
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:
|
Problem
Related issue: N/A
Validation tasks: none
Other clients: N/A (web admin page with no client counterpart)
Some account names contain a run that no line break can split, such as 21 emoji joined by zero-width joiners, which form one grapheme. In the omitted-accounts warning, which shows on the Backups page and on the restore Choose step's Users section, such a name runs past its box. The name sample under each group paints past the row. In the expanded name list, the name spills into the next column and the list scrolls sideways.
break-wordscan't split a single grapheme, and nothing clipped it. Accounts land in this warning when their export fails or their document is over the size cap, and the server accepts such a run as a username.This change clips that name sideways at its own box and leaves every other name as it was.
Approach
The name sample and each name in the expanded list clip sideways only while their text is wider than their box, through the
useOverflowsInlinehook and theOVERFLOW_CLIPclass list from #4987, like the rest of the restore screens. An always-onoverflow-x: clip, which this PR first used, also clips vertically in Firefox, and in a fixture it cut the marks of ordinary Thai and Vietnamese names there in every configuration. Clipping only what overflows leaves every name that fits exactly as on main. An ellipsis can't go inside a grapheme, so a clipped name gets its full text as a tooltip instead. Each list item carries one name as its tooltip. The sample line gets a tooltip only when the group has five names or fewer. Above five, the list below already shows every full name, and a tooltip would only repeat a sentence that is already on screen.The list's scroll container already kept the name inside its border, but it let the name run over the next column and scroll sideways, so the list items need the clip too. Only
OmissionGroupRowinBackupWarningDetails.tsxchanges. Both pages render the same component.Validation
localStorageis undefined under that host's Node 26. The other two are timing tests that pass when run on their own. None of the six imports the backups page.Evidence
Evidence: https://evidence.siloserver.org/r/silo-server/omitted-accounts-name-overflow/
Risks
Ordinary names render as before in all three engines. While the sample sentence holds a name that can't wrap, it clips as a whole, so in Firefox with a large minimum font size the marks above or below its other lines can be trimmed; the names sit inside one translated sentence, so they can't be measured one by one. In the full list, a long name moves to the next column whole instead of splitting across two. The only new behavior is a native tooltip on each list item, and on the sample line when the group has five names or fewer.
Checklist
Council review
This PR ran as a follow-up of the restore-screen fix for names that can't wrap, with one member per round.
Round 2: S2, a name split across two list columns measured as fitting, fixed in 5e7946b (each name stays in one column). S3, clipping the whole sample sentence while it holds a name that can't wrap can trim another line's marks in Firefox with a large minimum font size, left as a disclosed risk under Risks.
Visual review: 1 round, captures from 777d193. The fixture captures were retaken for 5e7946b; the clipped emoji name now ends at the box's edge instead of 0.25em past it, and ordinary names are unchanged.
Left for the maintainer: the adversarial review's S1. A clipped name has no keyboard or touch control that reveals the full text; the
titletooltip needs a pointer. This matches the trade-off #4755 made on the restore screens. The full name stays in the DOM, so screen readers read it and copy gets it. A focusable reveal would be a new pattern across those screens, so this PR doesn't add one.Answered: the hard edge where the clip cuts the last emoji is the clip #4755 settled on, since an ellipsis can't go inside a grapheme. The sample breaking before ", alice" at 390 px looks the same on main.
AI Disclosure
🤖 Generated with Claude Code
Note
Fix clipped omitted account names in admin backup warning lists
Names in expanded omission lists in BackupWarningDetails.tsx previously overflowed their boxes. A new
OmittedNamecomponent usesuseOverflowsInlineto detect inline overflow, appliesOVERFLOW_CLIPat the column edge, and shows the full name as a tooltip. It also keeps names from breaking across columns withbreak-inside-avoid.OmissionGroupRowapplies the same overflow clipping to the collapsed group sample. The sample gets a title tooltip only when the group has no full list to expand.Macroscope summarized 9af90e5.