Skip to content

Fix the update card clipping its own buttons at the 20px interface size - #11510

Merged
danielhanchen merged 3 commits into
mainfrom
fix/update-card-floor-at-large-ui-scale
Sep 22, 2026
Merged

danielhanchen merged 3 commits into
mainfrom
fix/update-card-floor-at-large-ui-scale

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

What is wrong

At Settings > Appearance > 20px, the update card cuts off its own controls.

  • On short viewports (390x500, 320x480) the Copy command button is clipped away entirely.
  • On wider ones (921x534) Remind me later and Copy command are both sliced, from 47.7px tall to 41.8px.

Unsloth UI CI has been red on main since 10c380e92 for this. Measured at 390x500 and 20px:

card:   top 16   bottom 225    (height 209)
footer: top 132  bottom 297    <- 72px below the card
snooze: 190 -> 225             (cut from 47.7 high to 34)
copy:   null                   <- entirely below the clip

Why

The card's floor was written out as min-h-[calc(109px+80px*var(--ui-font-scale,1))], which comes to 209px at the 20px setting while the content needs about 301px. The notes panel had already yielded all of its height, so everything left is non-yielding and the surface's overflow-hidden cut the action row.

That constant was calibrated when only type scaled. #11458 made spacing follow the interface font size too, so the same content is now taller than the formula predicts. Re-tuning the number only moves the size at which it fails again.

The change

The surface declared min-h-0 and overflow-hidden, and each of those sets a flex item's automatic minimum size to zero, which is why a floor had to be written by hand in the first place. Dropping both lets the surface floor itself at header + notes + actions, which is what the constant was approximating, except measured rather than guessed.

The notes panel already carries min-h-0, flex-1 and its own clipping, so it remains the only part that yields. That is what the card intends.

Evidence

tests/studio/playwright_update_banner_layout.py, run against a real Studio:

checks failed
before 1877 2
after 1867 0

The probe only failed when a control was clipped to nothing, so the 921x534 case passed all along while cutting two buttons in half. It now compares each control's clipped box against its unclipped box:

checks failed
before, stronger guard 2111 7
after, stronger guard 2101 0

One behaviour change worth stating: the run has 10 fewer checks than before, and all 10 are "the bottom card is on the corner", which is gated on the rail not scrolling. At 390x500, 768x500 and 921x534 the rail now scrolls, because the cards are no longer squeezed below their content. That is the designed overflow path, and "the copy can be scrolled into the rail's view" passes at every one of them.

Contracts

Three contracts named the mechanism rather than the guarantee, so they failed on the fix instead of on the defect. Each now states what it is for:

  • the no-scroll claim is the absence of a scrolling overflow, not the presence of overflow-hidden
  • the floor claim is the surface declaring neither of the two things that zero its automatic minimum size
  • the desktop card is unchanged and keeps its written floor, so its rows keep the assertions they had

Verified in both directions: putting either min-h-0 or overflow-hidden back fails three node contracts and two Python ones, and a clean tree passes 20 node contracts and 190 Python ones.

Not covered here

The desktop card carries the same constant-floor pattern (min-h-[calc(117px+93px*var(--ui-font-scale,1))]), so the same staleness is waiting for it. The probe measures the browser card's controls only, so I have no measurement for the desktop one and have left it alone rather than change shipped UI on inference.

At the 20px interface size the update card clipped its own Copy command
button away on short viewports, and sliced Remind me later in half on
wider ones. The card's floor was written out as
min-h-[calc(109px+80px*var(--ui-font-scale,1))], which came to 209px at
that setting while the content needed about 301px, so the action row
overflowed and the surface's overflow-hidden cut it.

The constant was calibrated when only type scaled. #11458 made spacing
follow the interface font size too, so the same content is now taller
than the formula predicts and re-tuning the number only moves the size at
which it fails again.

The surface declared min-h-0 and overflow-hidden, and each of those sets
its automatic minimum size to zero, which is why a floor had to be
written by hand in the first place. Dropping both lets the surface floor
itself at header + notes + actions. The notes panel already carries
min-h-0, flex-1 and its own clipping, so it remains the only part that
yields, which is what the card intends.

The layout probe only failed when a control was clipped to nothing, so
the 921x534 case, where the two buttons were cut from 47.7px to 41.8px,
passed all along. It now compares each control against its unclipped box,
which takes the check from 2 failures to 7 on the current card and to
none with this change.
The contracts named the mechanism, so they failed on the fix rather than
on the defect: one required min-h-0 and overflow-hidden on the surface,
another required a written-out min-h floor, and a third required that
floor to be gated on the notes panel. Each now states what it is for.

The no-scroll claim is asserted as the absence of a scrolling overflow
rather than the presence of overflow-hidden, since those are different
claims and reading one as the other is what tied the contract to the old
spelling. The floor claim is asserted as the surface declaring neither of
the two things that zero a flex item's automatic minimum size. The
desktop card is unchanged and keeps its written floor, so its rows keep
the assertions they had.

Verified in both directions: putting either min-h-0 or overflow-hidden
back on the browser surface fails three node contracts and two Python
ones, and a clean tree passes 20 node contracts and 190 Python ones.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-22T07:32:41.744315Z 82befd8 Manual request
ℹ️ 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 82befd8183

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen
danielhanchen merged commit de71b32 into main Sep 22, 2026
42 of 43 checks passed
@danielhanchen
danielhanchen deleted the fix/update-card-floor-at-large-ui-scale branch September 22, 2026 08:30
shaojun pushed a commit to shaojun/unsloth that referenced this pull request Sep 29, 2026
…ze (unslothai#11510)

* Let the update card floor itself instead of guessing its height

At the 20px interface size the update card clipped its own Copy command
button away on short viewports, and sliced Remind me later in half on
wider ones. The card's floor was written out as
min-h-[calc(109px+80px*var(--ui-font-scale,1))], which came to 209px at
that setting while the content needed about 301px, so the action row
overflowed and the surface's overflow-hidden cut it.

The constant was calibrated when only type scaled. unslothai#11458 made spacing
follow the interface font size too, so the same content is now taller
than the formula predicts and re-tuning the number only moves the size at
which it fails again.

The surface declared min-h-0 and overflow-hidden, and each of those sets
its automatic minimum size to zero, which is why a floor had to be
written by hand in the first place. Dropping both lets the surface floor
itself at header + notes + actions. The notes panel already carries
min-h-0, flex-1 and its own clipping, so it remains the only part that
yields, which is what the card intends.

The layout probe only failed when a control was clipped to nothing, so
the 921x534 case, where the two buttons were cut from 47.7px to 41.8px,
passed all along. It now compares each control against its unclipped box,
which takes the check from 2 failures to 7 on the current card and to
none with this change.

* State the browser card's floor as its content, in the contracts too

The contracts named the mechanism, so they failed on the fix rather than
on the defect: one required min-h-0 and overflow-hidden on the surface,
another required a written-out min-h floor, and a third required that
floor to be gated on the notes panel. Each now states what it is for.

The no-scroll claim is asserted as the absence of a scrolling overflow
rather than the presence of overflow-hidden, since those are different
claims and reading one as the other is what tied the contract to the old
spelling. The floor claim is asserted as the surface declaring neither of
the two things that zero a flex item's automatic minimum size. The
desktop card is unchanged and keeps its written floor, so its rows keep
the assertions they had.

Verified in both directions: putting either min-h-0 or overflow-hidden
back on the browser surface fails three node contracts and two Python
ones, and a clean tree passes 20 node contracts and 190 Python ones.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant