Repository navigation
Studio: stop the update banners printing over their own buttons - #8367
Conversation
On the chat routes the composer publishes its box to the frame store, so stackGeometry caps the overlay rail. Nothing in the rail was shrink-0, so the cap came out of the app-update card, and the release notes, whose collapsed summary had no overflow containment, were painted over the "Show release notes / Remind me later / Update" row. Train and Model hub publish no box, get the full viewport and were always fine. The notes are now the only part of a card that gives up height, and they clip while doing it. The card floors at 8rem, the height of the same card with its notes closed, so the row of buttons survives. The rail scrolls if even that does not fit, instead of spilling the cards over the page.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f33a59b5b5
ℹ️ 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".
| : "pointer-events-auto w-[calc(100vw-2rem)] max-w-[400px]", | ||
| : // shrink-0: nothing in this card can give up height, so a capped | ||
| // stack squeezing it only prints its text over its own buttons. | ||
| "pointer-events-auto w-[calc(100vw-2rem)] max-w-[400px] shrink-0", |
There was a problem hiding this comment.
Give the remaining rail panels a usable height floor
When an update banner shares a tightly capped rail with an expanded download or loaded-model panel, making only this item shrink-0 sends the remaining flex deficit into those panels, whose rail-facing roots are still flex min-h-0 and whose card surfaces use overflow-hidden. They can therefore collapse below their headers and action buttons before the rail itself overflows, leaving downloads or model eject/collapse controls clipped rather than reachable by scrolling. Preserve each shrinkable panel's header-height minimum, while continuing to let only its internal list shrink.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Measured this one rather than reasoning about it, and it goes the other way: the two panels get more room after the change, not less.
Stubbed the four /status endpoints so the loaded-models card is up alongside the app-update and llama.cpp banners on New chat, and read the card against its own header:
| viewport | card height | header inside the card |
|---|---|---|
| merge base, 921x534 | 43px | 36px header, list already at 0 |
| merge base, 768x500 | 39px | header bottom 3px BELOW the card bottom, clipped |
| this branch, 921x534 | 80px | 37px to spare, list still 32px |
| this branch, 768x500 | 70px | 28px to spare, list still 22px |
The premise is that the deficit is redirected into those panels, but the rail scrolls now, so the deficit is not forced into the cap at all. On the merge base it was, and the loaded-models header was the thing being clipped at 768x500.
Their min-h-0 is also deliberate and documented in download-manager-panel.tsx, and both panels own internal scrollers, so I am leaving them as they are rather than adding floors they do not need.
Three fixes from review, all measured in a browser against the same two Studios the PR's evidence came from. The desktop failure card has no notes panel, so there is nothing in it to give up and min-h-32 is not its floor: under it the diagnostics and the retry button are what get clipped. It holds its height instead and the rail scrolls. The rail's shadow gutter is now horizontal only. useStackGeometry reads scrollHeight off that node, and vertical padding was counted into it, so the stack asked for 24px it does not occupy: at the 83px-of-room case the geometry pinned in monitor-stack-inset.test.ts, an 80px card measured as 104 and the rail lifted over a composer it fits under. Measured on the chat route the rail now reports 275 for a 128 + 8 + 139 stack. The cap has to stay on that same node, since measure() lifts it there to read the natural height; moving it to a parent makes the read the placement's own output, which oscillates between lifted and not. The layout suite's bootstrap logged in with STUDIO_OLD_PW outside the try that exists to tolerate an already-rotated install, so a rerun, or the studio-ui-smoke job where an earlier suite rotates it first, died on a 401 before reaching that handler. It is wired into that job now, which is the case that needed it.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bdc438e854
ℹ️ 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".
| // biome-ignore lint/a11y/noNoninteractiveTabindex: keyboard-scrollable region | ||
| tabIndex={0} | ||
| aria-label={`Release notes summary for version ${version}`} | ||
| className="hover-scrollbar min-h-0 flex-1 space-y-1 overflow-y-auto overscroll-contain py-2 pr-1" |
There was a problem hiding this comment.
Allow nested notes to hand scrolling back to the rail
When both the release-notes summary and the newly scrollable outer rail overflow, overscroll-contain stops wheel and touch scrolling from chaining to the rail once the summary reaches either end. Because the summary occupies most of the visible update card, users scrolling over it cannot continue down to download or loaded-model panels hidden below without moving the pointer to a small non-scrollable part of the card. Remove containment from the nested notes scroller when it is hosted in the rail, or otherwise forward boundary scrolling to the parent.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Measured this one and it does not happen, because the two conditions cannot coexist: the notes yield all of their height before the rail can overflow at all.
Wheeling over the notes body on New chat, with the rail overflowing:
| viewport | notes body | rail overflow | rail scrollTop after the wheel |
|---|---|---|---|
| 921x534, notes expanded | 24px tall | 24px | 0 -> 24 |
| 390x500, notes expanded | 24px tall | 10px | 0 -> 10 |
| 390x844, notes collapsed | 47px scrollable | 0px | nothing to chain to |
In every case where the rail has something to scroll, the notes region is down to 24px and the wheel reaches the rail immediately, scrolling it to its end; the notes body itself never moved. The premise that the summary occupies most of the visible card while the rail overflows does not arise: the card is at its floor with the notes at zero by then.
Also worth noting overscroll-contain on the notes is not new here. The expanded scroller has carried it since the release-notes panel landed; this PR only gave the collapsed summary the same treatment, so removing it would be a change to existing behaviour with nothing measured to justify it.
… scrolled Second review round, all three measured in a browser. The card's floor was one number, and it is two. At a 390px viewport the action row wraps onto a second line and the card needs 184px with its notes closed, not 128, so a tight rail squeezed it to 128 and its own overflow-hidden cut both buttons off. Measured: with the single floor, Remind me later and Copy command are clipped away entirely at 390x500. It is min-h-48 under sm and min-h-32 above it now. The rail scrolls, and useStackGeometry lifts its cap to read the natural height. An uncapped box does not overflow, so that lift clamped scrollTop to 0 and restoring the cap did not put it back: a reader scrolled down to the download list was thrown back to the first banner by any descendant resize. Measured 33 -> 0 at 390x500 and 24 -> 0 at 921x534. The measurement saves and restores it. The layout suite counted a vanished element as a pass, because clip() returns None for something entirely hidden and both helpers read None as "fine". It now fails on a missing box and checks the controls against the card's inner surface, which is the element that actually clips them; the root above it is overflow-visible and was clipping nothing. Added 390x500, where a wrapped action row meets the floor. 474 checks, and the six that catch the floor bug fail without the fix above. test_update_release_notes.py pinned the old arrangement, where the update card was the one that absorbed the cap. Updated to the new one: the card floors and the notes yield, the download list still shrinks, and the rail scrolls past what is left.
480px is where the card reaches its 448px max width. Below it the card narrows and its action row can wrap, so it needs the 12rem floor; at or above it the row fits on one line and 8rem is right. The sm breakpoint put the taller floor on the whole 480 to 639 band, where the card is already at its full width and the row does not wrap, and a capped rail then had 64px less to give the banner underneath. Measured wrap threshold is a 404px card, so 480 keeps a margin for wider text.
|
Codex Review: Didn't find any major issues. Keep them coming! 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". |
CI statusAll seven red checks on this PR are red on Backend CI
Green on this PR and directly relevant to the change: Frontend CI, Studio UI smoke (which now includes the new
|
f0afdc0 to
ef3ac0b
Compare
useStackGeometry measures the stack by writing max-height twice and reading scrollHeight in between. transition-property: all reaches the rail, so each write started a transition, and a transition computes its start value until the timeline advances: the rail computed 0px while its inline style read back as the cap it was given, and its three cards laid out below a zero-height box. Turning the loaded models indicator on is what surfaced it. The probe now runs with transitions suppressed and the restore is flushed under the suppression. The layout suite grows a pass with the indicator up, at the two sizes where the stack would otherwise cover the composer, checking that the rail computes the cap it was given and that the part of the stack the reader cannot dismiss stays off Send.
…when it helps Seven things the review round found, all in the corner stack. The card floor scaled the whole 12rem box by --ui-font-scale, so at the 20px Appearance setting it asked for 256px where the card needs 209. A floor nothing can meet makes the placement give up and cover the composer for no gain. It is a fixed part plus a scaled part now, the shape index.css already uses for --picker-control-h, with its own constants per card because the desktop card carries an extra status line. Measured at every step from 15px to 20px: exact above the action row's wrap, over-reserving below it, never under. The fallback placement took the composer whether or not it could then show the cards, and judged its persistent tail from the corner even when an uncoverable monitor lifts it somewhere else. It now has to reach the floor to be worth taking, and the tail is checked where the placement actually lands. The height probe saved only the rail's own scroll position, so uncapping the rail grew every scroller inside it and clamped any the reader had scrolled past the new end: read the notes to the bottom, let a download tick, and the list jumps. Each one is noted and put back. The llama.cpp card hides its dismiss button for the length of an update but kept the marker that licences covering the composer, so an update in progress could park an undismissable card on Send. The macOS workflow's extra-UI retry rotates the bootstrap password in its own shell only, leaving every later step reading credentials for a server that no longer exists. It writes them to GITHUB_ENV now. The layout suite reset the Appearance size to the default instead of to whatever the profile was on.
Two more from the review round. Below 384px the card's action pair wraps onto a row of its own on top of the notes toggle's, and the floor did not account for it: at the 20px Appearance setting the card needs 259px where the wide card needs 209. Measured at 320x400 through 320x480, where the rail's cap lands between the two, the card shrank to the declared 209 and its own overflow-hidden surface cut 34px off Copy command. Both cards get a narrow-width floor, measured at every type size from 15px to 20px and never under: web 229 to 259, desktop 234 to 304. The wide desktop constants were 1px short at the widths where its action pair still wraps, and are re-fitted too. The persistent tail was measured after the cap went back on. Those panels are min-h-0 with their own scrollers, so under a tight cap they measure as almost nothing, the placement reads that as a tail it can safely put in the corner, the corner's larger cap lets them grow, and the next measurement says the opposite: the two placements swap back and forth for as long as a download and an update card share the rail. It is taken during the uncapped probe now, like the other two heights. The layout suite gains 320x480 at 20px, which is the viewport where the first of these bites, and judges viewport containment on the part of a card the rail is SHOWING. A card entirely under the fold was failing for being scrolled out of sight, which is the reach check's question, not this one.
|
@codex review |
|
Codex Review: Didn't find any major issues. Breezy! 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". |
The whole rail, with everything in it, on the merged treeEvery overlay the corner rail can hold, up at once, over a real chat: the app update card with its release notes expanded, the llama.cpp card, and the loaded models indicator backed by a model actually loaded through Two isolated 1280x830BEFORE the expanded changelog is squeezed to a grey sliver and the loaded models card is a bare header strip cut off by the composer. AFTER all four bullets show, both update cards are whole, and the indicator reads its real contents. 921x534768x500The notes clip inside their own scroller here. That is the one region in the card allowed to give up height; the header and the action row are not. 768x500, whisper.cppllama.cpp and whisper.cpp are one card, not two: 1920x1080, the controlBoth halves are indistinguishable, which is what should happen when there is room for the whole stack. A fix that changed this one would be a fix doing something it was not asked to. Reading the numbers
Merging the threeThey merge cleanly, with 1877 frontend tests and 194 source pins green on the merged tree. #8367 and #8249 both rewrite the two rail elements and the resolution keeps both, the |
…ng (#9150) * Studio: stop the overlay rail going click-through while it is scrolling `Chat UI Tests (banner)` has been red on main since #9132, on the WebKit leg of "Update banner layout, other engines", at 921x534 on New chat: FAIL the card keeps its full width whatever the scrollbar does cardWidth=430 want=448 railGutter=0 scrolls=True FAIL the rail takes pointer input exactly when it scrolls scrolls=True pointerEvents=none Both assertions are from #8367 and both are right. The second one describes a state a user can actually be in, and the shard's own screenshot shows it: the rail is capped, the llama.cpp card is sliced off at the fold, the Unsloth update card is entirely above it, and the rail is `pointer-events: none`, so there is no scrollbar and no drag that brings it back. The suite's reachability checks pass because they call scrollIntoView, which a reader has no way to do. What #9132 changed is not the product, it is the state the suite finds. The banner scripts used to run on the machine and the Studio home the chat and extra shards had already been through; they now get their own runner and a pristine `~/.unsloth/studio`, since boot-studio-api-only.sh wipes only `auth`. The last green artifact is dark-themed with "Chat C" and "Chat B" in Recents; the first red one is default-themed with "No chats yet". Same commit range, different starting state, so the rail is capped now where it was not before. #9132 is correct; it exposed this rather than caused it, and the same failure reproduces on unrelated PR branches. The defect is that `overflowing` is a prediction. `floorRoom > maxHeight` asks whether the cards WOULD fit if they collapsed to the floor that was measured for them under a max-height of 0. When they stop short of that floor the box overflows a cap the prediction says it fits inside, and the rail is left click-through while it scrolls, which is the failing pair exactly. So the reading is kept and the actual state is or-ed into it, taken off the node in the same synchronous block that already lifts and restores the cap, with the real cap back on and the layout just flushed. It is re-read on every pass and never remembered, which is what the derived value was there to protect against: the observers watch the rail and every descendant, so a placement that grows to fit clears the flag on the same pass that applied it. Being an `||`, it can only add the case the prediction misses and can never take pointer input away from a rail that already had it. Verified on this box, WebKit and Chromium, against a build actually served from this tree (`unsloth studio --frontend`; the venv's installed copy is what gets served otherwise, which is worth knowing before trusting a local Studio run): - Broken deliberately, `overflowing` forced false: the full Chromium suite is 1433 checks, 1 failed, and the one is `320x480 at 20px: the rail takes pointer input exactly when it scrolls scrolls=True pointerEvents=none`. - Fixed: 1433 checks, 0 failed. Firefox and WebKit spot: 221, 0 failed each. - Unchanged where the prediction was already right. Sweeping WebKit down the height axis at 921 wide, the rail and the flag agree at every step both before and after: no scroll and `none` at 534 through 364, scroll and `auto` from 360 down, card 448 throughout. The width half is not fixed here, because I could not reproduce it and will not guess at it. 448 - 430 is 18px of scrollbar, but `offsetWidth - clientWidth` reports 0 in the same breath, so on that runner the bar takes width out of the content box without showing up in the gutter the assertion reads. This box never reproduces it: WebKit here keeps the card at 448 whether the rail scrolls or not. `scrollbar-gutter: stable` is the obvious candidate and is deliberately not taken on a guess, since it reserves the gutter permanently and would shift the cards left by the scrollbar width on Chromium, where the card is already correct. Instead both failing assertions now print the measurements that would settle it: the card's transform and border box, its computed and max width, innerWidth and documentElement.clientWidth, the rail's offset, client and content widths, its scroll and client heights, its cap, and the children's heights. Nothing is relaxed; the same two checks fail on the same conditions, with enough attached to say which of the two mechanisms it is. That output is what the next run of this shard is for. * Take the rail's overflow reading after the transition is restored The DOM reading was inserted between the flush of the restored cap and the line that puts the eased transition back, which is the one place the store must keep adjacent: update-banner-flex-priority asserts on it, and the assertion went red on both the Linux and the Windows frontend unit jobs. The reading does not need to sit there. The cap change is already committed under the suppression by the flush above it, and transition is not itself a transitionable property, so no reflow the read forces can hand that cap to an animation. Moving it below the restore keeps the invariant and the reading. * Measure the banner card's layout width, not its painted width The width half of the banner failure is the card's enter animation, not a scrollbar. The diagnostics added earlier in this branch settled it on the WebKit leg: transform matrix(0.96, 0, 0, 0.96, 0, 12), which is exactly the initial state in components/web/update-banner.tsx, with borderBox 448, cssWidth 448px, railContentW 448 and railGutter 0. 448 * 0.96 is 430.08, and 430 is what the assertion read. Nothing had taken any width; the card had simply not been painted at full size yet. So the assertion was measuring the painted box for a question about layout. getBoundingClientRect includes transforms and offsetWidth does not, so the reading moves to offsetWidth, which a scrollbar taking width out of the rail's content box still shrinks. The painted width is still reported next to it, since the gap between the two is the diagnosis. Checked on chromium, firefox and webkit that this is red exactly when it should be: with the transform applied and no width lost, the old reading fails and the new one passes; with 18px actually taken out of the rail's content box the new one fails on all three, with or without the transform also applied; on a settled healthy box both pass.





Reported with a screenshot of the v0.1.60-beta to v0.1.61-beta offer: on New chat the "New Unsloth version" card had its release notes printed straight over its own "Show release notes / Remind me later / Update" row, and the card was clipped mid-sentence. The same card on Train and on Model hub was fine, and smaller windows were worse.
Why one route and not the others
The chat composer publishes its box to the monitor frame store (
usePublishedFrameinthread.tsx), sostackGeometrycaps the bottom-right overlay rail. Train and Model hub publish nothing, so the rail gets the whole viewport and never has to take height from anyone.Under that cap the rail's flex children shrink, and nothing in the rail was
shrink-0. The app-update card's rail-facing root wasflex min-h-0 ... flex-coland its cardoverflow-hidden, so it had no floor at all, and neither its header nor its action row said they could not be compressed.ReleaseNotesPanelhad a scroller in the expanded state only. The collapsed bullet summary was a plainulwith no overflow containment, so once its box was squeezed the bullets painted through everything under them. That is the screenshot.So this is a constrained-height flex failure inside one shared stack, not a z-index one. The banners were already stacked correctly.
The rule now
Inside a card: the notes are the only part allowed to give up height, and they clip or scroll while doing it. Header and action row are
shrink-0.Between cards: the app-update card floors at
min-h-32, which is that same card measured in a browser with its notes closed, so a tight rail takes the height out of the notes and stops at the row of buttons.min-height: autowould have been the whole card including the notes, so the card would give up nothing and the banner underneath would be the one clipped instead.If even that does not fit, the rail scrolls rather than spilling cards over the composer. The padding there is for the card shadows, which a scroller would otherwise clip at its own edge, and the negative margin cancels it so nothing moves.
monitor-frame-store.tsis untouched. Putting aMIN_STACK_ROOMfloor on the branch that caps the rail would park it back over the composer, which is what #8210 and #8301 fixed.Measured, in a browser
Two Studios from the same backend, one built from this branch's merge base and one from its head, the app update forced with
UNSLOTH_STUDIO_FAKE_UPDATEand the llama.cpp banner stubbed, driven with Playwright. The number is the visible overlap in pixels between the release notes and the action row, after intersecting every rect with whatever actually clips it, so a rect hidden behind anoverflow-hiddenancestor does not count.Notes expanded as well as collapsed, on both sides. 36 pairs in total, no overlap anywhere on the head, no change on the two routes that were already correct.
Tests
studio/frontend/tests/update-banner-flex-priority.test.ts, in the source-reading style the stack already uses, pinning the flex priorities, the notes clip, the collapsed summary's scroller and both rails. Mutation checked against the merge base: 10 of its 11 cases fail there. The eleventh is the one asserting the desktop and browser cards carry the same rules, which is true on both sides and is there so a future fix to one of them cannot skip the other.tests/studio/playwright_update_banner_layout.py, alongside the other Playwright suites, stubbing/api/studio/update-status,/api/studio/release-notesand/api/llama/update-statuswithpage.routeso it needs no GPU, no release and no llama.cpp build. 220 checks over 5 viewports and 3 routes, collapsed and expanded, plus the whisper.cpp variant to pin that it renames the one runtime card instead of adding a second. 13 fail on the merge base, 0 on this branch.npm testis 1613 of 1613, andtsc -bis clean.biome checkandeslintreport exactly what they report on the merge base for these five files, nothing added.Also worth recording
whisper.cpp is not a second banner.
_merge_whisper_statusfolds it into the sameLlamaUpdateBannerthroughupdate_component, so it gets this fix for free, and the Playwright suite now says so. stable-diffusion.cpp has a prebuilt installer but no update status route, hook or banner at all, so there is nothing there to fix yet.