Skip to content

fix(web): clip restore names only while they overflow - #4987

Merged
Quick104 merged 3 commits into
mainfrom
fix/restore-clip-when-overflowing
Nov 21, 2026
Merged

Quick104 merged 3 commits into
mainfrom
fix/restore-clip-when-overflowing

Conversation

@Quick104

@Quick104 Quick104 commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: #4946
Validation tasks: none

Other clients: N/A (backup restore is only in the web admin)

#4921, and then #4982 for the Choose step's selection notice, clipped six 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: clip vertically 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 six places: the Choose step's library heading, its summary panel's plan list and selection notice, 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

  • Each place measures its text with the shared useOverflowsInline hook (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 notice, the "Left out" list and each report row use a new shared OVERFLOW_CLIP class 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 only overflow-x-clip, since its start padding already holds the bullets.
  • The report clips each row's whole text column while any of its lines overflows, as fix(web): keep restore names that can't wrap inside their box #4921 did, so a name inside an account's data note is covered too.
  • The hook now measures where the text lays out (a Range over the element's contents) against its content box, instead of scrollWidth. scrollWidth counts 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.
  • The hook also measures again once a web font finishes loading, since a font swapping in changes a name's width without resizing its box (document.fonts.ready, and the loadingdone event, 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.tsx and useOverflowsInline.ts. No API, text, or translation changes.

Validation

  • Live on a Silo dev deployment, with the same backup and restore job on main and on this change. The data: a library renamed to a Thai name; collections, accounts and profiles named in Thai, Vietnamese, combining marks, and with the emoji run. Checked in Chromium and Firefox, at the default and x-large Text Size and with a 24 px minimum font size.
  • On this build, each ordinary name was cropped, then fix(web): keep restore names that can't wrap inside their box #4921's classes were added back on the same page and the crop taken again. fix(web): keep restore names that can't wrap inside their box #4921's clip cut a Vietnamese report line at x-large and Thai report lines with the minimum font, plus 4 faint pixels of the Thai heading at x-large, all in Firefox only. This build clips none of them. It clips only the elements holding the emoji run, and only where the run doesn't fit: the report's emoji rows at 360 px, none at 1024 px.
  • A fixture rendered each of the six places with the app's built CSS and fonts, with no clip (as before fix(web): keep restore names that can't wrap inside their box #4921), with fix(web): keep restore names that can't wrap inside their box #4921's clip, and with this change, for 14 names across scripts, at 300, 360 and 900 px, default and x-large Text Size, 1× and 2×, both directions, in Chromium, Firefox, WebKit, and Firefox with a 24 px minimum font size. Every name other than the emoji run renders pixel-identical to no clip; only the emoji names clip.
  • The new measurement read none of 3,472 wrapping-name layouts with a trailing margin as overflowing in any engine (scrollWidth read 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.ready resolved after it in all three engines.
  • The notice was checked in the fixture only; the live data produces no notice.
  • Lint, format, build, bundle budget, local paths, size ratchet, bidi, and case collisions: pass. The admin-backups tests pass; the full web suite wasn't rerun on this head, so CI's run is the check there.
  • No passed case on the v1.0 validation board reaches the restore screens.

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

  • 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

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: 1 round, on 1eefc69, finished after merge

Member Round 1
Sol (gpt-6.2-sol, xhigh) 8/10
Opus (claude-opus-5-5, high) 7.5/10
Gemini (gemini-4-neon, xhigh) 8/10

Follow-ups: Sol's S1, a report row clipping as a whole while one line overflows, which trims a fitting account name's tilde in Firefox at the largest Text Size: caused by this PR, fixed in a follow-up pull request that clips each overflowing line instead. Opus's O1 and Gemini's G1, the notice's own scroll box cutting marks at lg and wider in every engine: predates this PR (#4797), handled by a follow-up run. Opus's O2, the max-width in OVERFLOW_CLIP: kept for the item and account rows, which are capped at max-w-full.

Visual review: 1 round, on captures from 6cc9f09b (the head adds only the font-load re-measure and the jsdom guard)

Member Round 1
Sol better, 9/10
Opus better, 8/10
Gemini unavailable (provider quota)

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

  • Harness: Claude Code in T3 Code
  • Tool(s): Claude Code, T3 Code delegated tasks, Codex, Antigravity
  • Model(s): claude-opus-5-5 (implementation and code review), gpt-6.2-sol, claude-opus-5-5 (visual and adversarial review), claude-sonnet-5-5 (code-review subagent)
  • Involvement: Fully AI-generated. The agent verified it on a dev sandbox and in browser fixtures; a person has not verified it yet.
  • Adversarial review: see Council review.

🤖 Generated with Claude Code

Note

Clip restore text only when it overflows in admin-backups pages

  • Adds a textOverflows measurement function in useOverflowsInline.ts that uses a DOM Range to compare text bounds against the element's content box, with a one-pixel tolerance, instead of comparing scroll and client widths
  • Introduces a shared OVERFLOW_CLIP class and applies it conditionally in RestoreChoose, RestoreReview, and RestoreRun, replacing always-on horizontal clipping and its negative-margin/padding treatment; text that fits is no longer clipped
  • The hook now re-measures when web fonts finish loading and guards against stale updates after cleanup
  • Behavioral Change: overflow detection now uses text bounds rather than scrollWidth/clientWidth, so elements whose text extends past either content-box edge are treated as overflowing; check textOverflows and the OVERFLOW_CLIP constant if row layouts shift

Macroscope summarized 1eefc69.

#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 <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Restore views now measure inline text overflow and apply clipping only when text exceeds its container. The overflow hook rechecks after layout, element resizing, and font loading.

Changes: Restore view overflow handling

Layer / File(s) Summary
Measure inline text overflow
web/src/pages/admin-backups/useOverflowsInline.ts
The hook measures text bounds against the content box, allows a 1-pixel tolerance, and treats unavailable or zero-width measurements as not overflowing. It remeasures after layout, on resize, and when fonts finish loading. The file also exports OVERFLOW_CLIP.
Apply conditional clipping
web/src/pages/admin-backups/RestoreChoose.tsx, web/src/pages/admin-backups/RestoreReview.tsx, web/src/pages/admin-backups/RestoreRun.tsx
Library names, review sentences and caveats, selection notices, and report rows use the hook to apply clipping when text overflows. The previous fixed clipping and padding or margin adjustments are removed.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Low

Possibly related issues

  • Issue 4946: The PR applies conditional clipping to the restore elements named in the issue. The issue also covers SameRow, which this PR does not change.

Possibly related PRs

Merge Risk: Minimal · up to 1eefc

This change clips restore-screen text only when it overflows, so names that fit are no longer clipped in Firefox. It affects only how the restore screens render, with no data or API changes. No concrete merge-blocking risk was identified.

Security architecture risk: Minimal · up to 1eefc

The change adjusts how restore-view text is measured and clipped. The inspected changes introduce no material risk to security, failure containment, rollback, or ownership guarantees.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "fix(web): clip restore names only while they overflow" matches the main change. The raw summary and objectives show that the PR adds conditional overflow clipping to the restore screens (Re…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description is related to the changeset. It explains that the restore screens in the web admin clipped text on both axes at all times, which caused Firefox to trim the tops of glyphs. It names the…
Full details: Title check

Explanation

The title "fix(web): clip restore names only while they overflow" matches the main change. The raw summary and objectives show that the PR adds conditional overflow clipping to the restore screens (RestoreChoose, RestoreReview, RestoreRun) and rewrites the useOverflowsInline hook. The title is specific and concise, and it names the web scope.

Full details: Description check

Explanation

The description is related to the changeset. It explains that the restore screens in the web admin clipped text on both axes at all times, which caused Firefox to trim the tops of glyphs. It names the six affected places in RestoreChoose.tsx, RestoreReview.tsx, and RestoreRun.tsx, and it describes the change to useOverflowsInline.ts. It also covers the new OVERFLOW_CLIP class, the Range-based measurement, the font-load re-measure, validation steps, and known risks. The description is detailed and specific, so it passes this lenient check.

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
Recent review info

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: 2a07301a-3f96-44e2-b368-0f58ec28e117
Commits

Reviewing files that changed from the base of the PR and between 82ee6a0 and 1eefc69.

Files selected for processing: 1

  • web/src/pages/admin-backups/RestoreChoose.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.

@silo-triage silo-triage Bot added the size/M 50–199 added + deleted lines (all files); change volume, not priority. label Nov 21, 2026
@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-21T09:07:15.963202Z 1eefc69 New commits
🔒 Security Review ✅ Completed 2026-11-21T09:08:45.431846Z 1eefc69 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 priority: P2 Limited scope, workaround exists, or polish labels Nov 21, 2026
Quick104 and others added 2 commits November 21, 2026 03:57
…-overflowing

# Conflicts:
#	web/src/pages/admin-backups/RestoreReview.tsx
#4982 clipped the Choose step's selection notice sideways at all times,
which in Firefox also trims the marks above and below its lines. It now
clips only while a name in it can't wrap to fit, like the other restore
clips.

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 merged commit 0e10960 into main Nov 21, 2026
18 checks passed
@Quick104
Quick104 deleted the fix/restore-clip-when-overflowing branch November 21, 2026 09:13

@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 1eefc69)

This pass looked for parts of the change the problem doesn't need. Two findings, both on lines in this diff.

  • O1 (pre-existing, limits the fix): at lg and wider, the selection notice's own scroll box still cuts the marks this PR restores.
  • O2 (nit): the max-width in OVERFLOW_CLIP has no effect at any of the five places that use it.

Checked with no finding:

  • Every hook call is needed, since each place can show a name.
  • The jsdom guard is needed, because jsdom's Range has no getBoundingClientRect.
  • The active flag and listener cleanup are correct.
  • Bullets don't cause false overflows: ::marker boxes aren't in the Range, and each <li> border box spans exactly the list's content box.
  • cn merges ps-[0.25em] with py-3.5 without conflict.
  • ItemRow and AccountRow get the same verdict as with scrollWidth, truncated one-line rows included.
  • SameRow is the only always-on clip left on these screens, and the PR says a later change converts it.
  • I also looked at the font-load re-measure. Plus Jakarta Sans is the only web font, and almost every place breaks anywhere, so a font load can rarely change the answer. The Run report's data lines don't set wrap-anywhere, though, so I didn't count the re-measure as unneeded.

Written by Claude Opus 5.5 (claude-opus-5-5) in Claude Code, as an automated review.

@@ -732,13 +736,14 @@ export function RestoreChoose({
tabIndex={noticeScrolls ? 0 : undefined}
className="overlay-scroll focus-visible:outline-ring -mx-[0.25em] rounded-sm px-[0.25em] text-[13px] wrap-anywhere text-amber-600 focus-visible:outline-2 focus-visible:outline-offset-2 lg:max-h-32 lg:min-h-0 lg:overflow-y-auto dark:text-amber-400"

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.

O1, pre-existing (limits the fix): at lg and wider, this notice's own scroll box cuts the marks the span change restores.

Trigger: any notice whose marks rise above its first line or drop below its last at a width of lg or more. These are the same names and settings the PR fixes (Vietnamese at x-large Text Size, Thai with a large minimum font size).

Impact: at lg this <p> gets overflow-y: auto, which makes it a scroll container, and it has no padding in the block axis. The span is its only child: a block with no vertical margin or padding, so the span's box lines up with the <p>'s padding box. A scroll container clips ink at its padding box in both axes in every engine. Any pixels the old span clip cut vertically are therefore still cut by the <p> at lg, in Chromium and WebKit as well as Firefox. The fix only takes effect below lg.

Evidence: I built a fixture of a block span inside a <p> with inline-only padding, 24px Vietnamese text, and line-height 1 and 1.2, in Firefox 153, Chromium and WebKit. With overflow-y: auto on the <p>, the topmost ink row moved from 2 to 6 px above the box to the box's top edge, and the ink pixel count dropped by 1.5 to 7%. At line-height 1.5, where nothing rose above the box, all three variants rendered the same.

Suggested repair: give the notice room in the block axis inside its scroll box, for example lg:-my-[0.25em] lg:py-[0.25em]. That moves the scroll box's clip edge past the first and last lines, and useScrolls still compares heights the same way. If that room isn't enough for the minimum-font case, say in the PR that the notice is still cut at lg.

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.

Agreed this is real at lg and up, and it predates this PR: the notice became a scroll container in #4797, and a scroll container clips its content on every side in every engine, whatever the inner span does. This PR only stops the inner span from adding a cut of its own. A follow-up run is confirming whether the app's real font size, line height, Text Size and minimum font size reach it, and will fix it in its own pull request if they do.

🤖 Claude Code (claude-opus-5-5)

* fit inside a box otherwise capped at `max-w-full`, so the cut stays flush with its
* container.
*/
export const OVERFLOW_CLIP = "-ms-[0.25em] max-w-[calc(100%+0.25em)] overflow-x-clip ps-[0.25em]";

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.

O2, nit: the max-width in OVERFLOW_CLIP changes nothing at any place in this PR.

Trigger: none. The doc comment says the wider max-width is for a box "otherwise capped at max-w-full", and none of the five places that use the constant has that cap. They are the library heading (a flex item inside an inline-flex button), the Run report's row column (flex-1), the notice span, and the "Left out" list (both auto-width blocks). PlanSentences uses plain overflow-x-clip. An auto-width block with -ms-[0.25em] is already exactly 100% + 0.25em wide, and a shrinking flex item ends at its container's edge.

Evidence: I laid out a 21-emoji ZWJ run in each of the four shapes in Firefox, Chromium and WebKit, in LTR and RTL, with and without max-w-[calc(100%+0.25em)]. The left and right edges of every box matched to 0.01 px.

Suggested repair: drop max-w-[calc(100%+0.25em)] and the sentence about it, so the constant matches ProfileRow's -ms-[0.25em] overflow-x-clip ps-[0.25em]. Add it with the ItemRow/AccountRow change, which has the max-w-full it is meant for.

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.

Right, none of the places in this PR is capped at max-w-full, so the max-width does nothing here. It's in the shared constant for the item and account rows, whose labels are capped at max-w-full; the run converting those to OVERFLOW_CLIP (tracked in #4946) asked for this exact value so every restore clip matches. Keeping it.

🤖 Claude Code (claude-opus-5-5)

@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 1eefc69)

One finding on the Choose step's selection notice (web/src/pages/admin-backups/RestoreChoose.tsx:737). The Range.getBoundingClientRect() measurement in useOverflowsInline.ts, the document.fonts.ready and loadingdone listeners (including WebKit's missing loadingdone), the OVERFLOW_CLIP box math, the existing ItemRow/AccountRow callers, and the merged #4970 and #4982 behaviors held up across Chromium, Firefox, and WebKit.

AI disclosure: Gemini 4 Neon in Antigravity (T3 Code).

@@ -732,13 +736,14 @@ export function RestoreChoose({
tabIndex={noticeScrolls ? 0 : undefined}
className="overlay-scroll focus-visible:outline-ring -mx-[0.25em] rounded-sm px-[0.25em] text-[13px] wrap-anywhere text-amber-600 focus-visible:outline-2 focus-visible:outline-offset-2 lg:max-h-32 lg:min-h-0 lg:overflow-y-auto dark:text-amber-400"

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.

G1 (Medium): Choose notice <p> still clips tall marks vertically at lg and wider

  • Trigger: An ordinary fitting selection notice at viewport width >= 64rem (lg) whose first or last line has marks extending past the line box, such as Vietnamese in Plus Jakarta Sans at x-large Text Size (16.12px, line-height: 1.5) or Thai under Firefox's 24px minimum font size.
  • Impact: Making OVERFLOW_CLIP conditional on the inner <span> stops Firefox's overflow-x: clip vertical trimming below lg, but <p> keeps lg:overflow-y-auto on at all times with zero vertical padding (px-[0.25em], no py-*). Per CSS Overflow 3 § 3.1, overflow-y: auto forces overflow-x: auto and clips all paint outside <p>'s padding edge in Firefox, Chromium, and WebKit. On desktop (lg+), the Choose notice still loses the top mark pixels that commit 1eefc69 aims to keep intact. Comparing the inner <span> against a plain <span class="block"> inside the same <p> reads pixel-identical at lg only because <p> already clips those pixels in both cases.
  • Evidence: Measured on the notice markup with Plus Jakarta Sans at x-large (16.12px, line-height: 1.5) for Also chose Ẫ Ệ Ổ Ứ Ữ Ắ Ằ Ẳ Ẵ Ặ:
    • Below lg (no overflow-y: auto): non-white ink pixels above the first line box = 8 (Firefox), 30 (Chromium), 10 (WebKit).
    • At lg (current lg:overflow-y-auto on <p>, inner <span> unclipped): 0 in all three engines.
    • Under Firefox 24px minimum font size with Thai (13px, line-height: 1.5): 15 pixels above the first line box below lg, 0 at lg.
  • Suggested repair: Apply lg:overflow-y-auto only while noticeScrolls is true (keeping lg:max-h-32 lg:min-h-0 on <p>, which still reports scrollHeight > clientHeight when content exceeds 8rem across all three engines, and running an initial check in useScrolls on attach) so fitting notices have no vertical clip at any font size. To protect scrolled notices as well, or avoid toggling overflow-y, add lg:-my-[0.25em] lg:py-[0.25em] on <p> and switch its parent (line 731) from space-y-4 to flex flex-col gap-4 so space-y-4's margin-bottom does not override -my-[0.25em]. That restores exact pixel parity with the unclipped notice across Firefox, Chromium, WebKit, and Firefox 24px minimum font size while keeping scrollHeight <= clientHeight on short notices and scrollWidth === clientWidth when a name overflows.

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.

Same finding as O1 above, so I answered it there: it predates this PR (the notice became a scroll container in #4797), and a follow-up run is confirming it under the app's real settings before fixing it in its own pull request.

🤖 Claude Code (claude-opus-5-5)

Quick104 added a commit that referenced this pull request Nov 21, 2026
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]>

@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 1eefc69)

I checked the overflow measurement, clip boundaries, and hook lifecycle. Browser fixtures with Chromium, Firefox, and WebKit covered wrapping and direction. I reproduced one Firefox report regression and recorded it inline.

AI disclosure

OpenAI Codex in T3 Code, gpt-6.2-sol at xhigh, performed this independent review and used Playwright for the browser and pixel checks. The finding is open.

{/* Only while a line is still wider than the row after wrapping, such as one holding a
long run of joined emoji in a name or a note, does the row clip sideways at its end
edge; the words around the run still wrap, and a name's title shows it in full. */}
<div ref={columnRef} className={cn("min-w-0 flex-1", columnOverflows && OVERFLOW_CLIP)}>

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.

S1 [P3] Keep a fitting account name clear of the profile’s clip

An overflowing profile name turns on clipping for the entire report column. In a Firefox Nightly 153 fixture with the shipped Plus Jakarta Sans font, Extra Large text size, and Bolder text weight, Nguyễn Lương Huỳnh Thị Vĩ fits in a 225 CSS px column with a 224.77 px layout box. A profile name made from 21 U+200D-joined emoji turns on the clip. The new flush edge cuts off the right tip of the tilde. A pixel comparison at 2× scale showed 12 pixels of the tilde missing compared with the old classes, which gave the ink 5 CSS px of end padding.

Clip the overflowing profile line in its own box so the account heading can keep its full glyphs.

Quick104 added a commit that referenced this pull request Nov 21, 2026
…ox (#4908)

* fix(web): keep an omitted account's name that can't wrap inside its box

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

* fix(web): clip an omitted account's name only while it overflows

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

* fix(web): keep an omitted account's name in one column of the list

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

* fix(web): import useOverflowsInline from its new hooks path

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
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 priority: P2 Limited scope, workaround exists, or polish size/M 50–199 added + deleted lines (all files); change volume, not priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant