Repository navigation
Conversation
#4921 clipped the Choose step's library heading, the plan lists on the Choose and Review steps, the Review step's left-out list, and the Run report's rows sideways at all times. Firefox clips `overflow-x: clip` vertically too, so names that fit lost the marks above and below their line there: Thai and Vietnamese marks at the larger Text Size or with a minimum font size. Each of these now clips only while its text is wider than its box, through the shared useOverflowsInline hook and a new OVERFLOW_CLIP class list that the other restore rows can share. The hook now measures where the text lays out instead of scrollWidth, which counts an inline margin: Firefox lets the gap after a name hang past a line's end, so a name that fit read as overflowing at some widths. A clipped name now stops at the box's end edge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait...
|
Codex Review Summary: 🔄 RunningThis 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:
|
…-overflowing # Conflicts: # web/src/pages/admin-backups/RestoreReview.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Problem
Related issue: #4946
Validation tasks: none
Other clients: N/A (backup restore is only in the web admin)
#4921 clipped five places on the backup restore screens sideways at all times, so that a name holding a run no line break can split (many emoji joined by zero-width joiners) stays inside its box. Firefox clips
overflow-x: clipvertically too, so ordinary names that fit lost the top of their highest marks there. Live, at the x-large Text Size, a Vietnamese name on the Run report lost the top one to two pixel rows of its stacked diacritics, and with a 24 px minimum font size Thai names lost the top row of their tone marks. Chromium (checked live) and WebKit (checked in a fixture) were unaffected. This change clips each of those places only while its text is wider than its box, so a name that fits draws exactly as it did before #4921, and the emoji run still stays in its box.The five places: the Choose step's library heading, the plan list in the Choose step's summary panel, the Review step's plan lists and "Left out" list, and the Run report's rows. #4946 also lists the Choose step's "match this server" rows; another pull request covers those.
Approach
useOverflowsInlinehook (fix(web): clip restore item and account names that can't wrap #4849) and adds the clip classes only while it overflows. The heading, the "Left out" list and each report row use a new sharedOVERFLOW_CLIPclass list: fix(web): clip a restore profile name only when it overflows #4848's start-side room for a first letter whose ink reaches before its box, and a cut flush with the box's end edge. The plan list adds onlyoverflow-x-clip, since its start padding already holds the bullets.scrollWidth.scrollWidthcounts an inline element's margin, and Firefox lets a trailing margin, such as the gap after the heading's name or a report profile's name, hang past the end of a line, so a name that fit read as overflowing at some widths and would have been clipped again.document.fonts.ready, and theloadingdoneevent, which WebKit doesn't fire). The hook returns "fits" where there's no layout, as in jsdom.Web only, in
RestoreChoose.tsx,RestoreReview.tsx,RestoreRun.tsxanduseOverflowsInline.ts. No API, text, or translation changes.Validation
scrollWidthread 93 of 5,194 in Firefox), caught all 496 real emoji overflows, and gives the same answer with the clip on or off. A font served late widened a name from 115 to 181 px;document.fonts.readyresolved after it in all three engines.Evidence
Evidence: https://evidence.siloserver.org/r/silo-server/restore-clip-when-overflowing/
Risks
A plan list clips as a whole while one of its sentences overflows, so in Firefox the marks above its first line and below its last can still be trimmed while a list holds an unbreakable name. Each measured element adds a resize observer; a Run report has one per row.
Checklist
Council review
Plan round: skipped; this follows the merged pattern from #4848 and #4849. Code review at high (three finders) led to clipping the report's whole row only while it overflows instead of each name line, so data notes stay covered, and to the measurement change after a margin probe confirmed Firefox's trailing-margin overflow. A finding from #4849's review led to the font-load re-measure.
Background review: running on 3a3c30d
Visual review: 1 round, on captures from 6cc9f09b (the head adds only the font-load re-measure and the jsdom guard)
Answered: the one- and two-pixel cuts were hard to see at 4× (Opus), so the evidence adds images that mark every pixel that differs; the Thai heading's cut is 4 faint pixels and the evidence says so. Crop framing notes (Sol, Opus) are covered by the report pairs, which show the run stopping at the content edge.
AI Disclosure
🤖 Generated with Claude Code
Note
Clip restore names only when they actually overflow
useOverflowsInlinein useOverflowsInline.ts to measure text bounds with a DOM Range against the element's content box, replacing the old scroll-width comparisonOVERFLOW_CLIPclass constant and applies it conditionally inRestoreChoose,RestoreReview, andRestoreRun, removing unconditional clipping, its padding, and negative margintextOverflowsfor elements with unusual padding or bordersMacroscope summarized 82ee6a0.