Repository navigation
Fix the update card clipping its own buttons at the 20px interface size - #11510
Merged
Merged
Conversation
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.
|
You have reached your Codex usage limits for security reviews. Please try again later. |
Member
Author
|
@codex review |
Codex Review SummaryThis 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. |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
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>
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.
What is wrong
At Settings > Appearance > 20px, the update card cuts off its own controls.
Unsloth UI CIhas been red onmainsince10c380e92for this. Measured at 390x500 and 20px: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'soverflow-hiddencut 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-0andoverflow-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-1and 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: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:
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:
overflow-hiddenVerified in both directions: putting either
min-h-0oroverflow-hiddenback 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.