Repository navigation
Stop the corner update toasts being cut off at the bottom - #9246
Conversation
|
Perhaps @shimmyshimmer you could consider taking a quick look at #9196 and see if the issue with the toast there (reported by me) is related to this one? That one also happened between llama.cpp b10360 -> b10472 |
|
The three Those tests count the literal Fixed on main in #9253: the assertion now matches the cap being derived from Nothing to change here. Rebase once #9253 lands. The rest of the red on this PR is main breakage from before #9189, #9213 and #9202 landed, and clears on the same rebase. |
…spelled Three tests assert every bottom-right overlay stack caps itself, and counted the literal `maxHeight: stack.maxHeight` in provider.tsx to do it. #9246 keeps the cap but wraps it -- `maxHeight: railMaxHeight(stack.maxHeight)`, which is the same value plus a constant gutter so the rail's overflow clip stops slicing the shadow off its bottom card -- and all three went red against a PR that had not removed a single cap. The tests are right about what they care about and wrong about how they check it. This file already made the same mistake once and fixed it the same way; the comment two lines below one of these assertions says so: Counted by the layer they sit on, not by a literal z-index: the overlay rail reads its depth from Z_LAYER now. _capped_stacks matches the cap being DERIVED from stack.maxHeight, through an optional wrapping call. That still fails on everything the count was protecting, verified by mutation: the cap dropped entirely, the cap hardcoded to a number so it no longer tracks the measurement, and only one of the two stacks capped -- the exact bug the "== stacks" comparison exists to catch. #9246's wrapped form passes, and its branch goes from 3 failures to 187 passed with this test alone swapped in. Nothing about the assertions' subject changes. A cap that stops reading stack.maxHeight still fails.
…spelled (#9253) Three tests assert every bottom-right overlay stack caps itself, and counted the literal `maxHeight: stack.maxHeight` in provider.tsx to do it. #9246 keeps the cap but wraps it -- `maxHeight: railMaxHeight(stack.maxHeight)`, which is the same value plus a constant gutter so the rail's overflow clip stops slicing the shadow off its bottom card -- and all three went red against a PR that had not removed a single cap. The tests are right about what they care about and wrong about how they check it. This file already made the same mistake once and fixed it the same way; the comment two lines below one of these assertions says so: Counted by the layer they sit on, not by a literal z-index: the overlay rail reads its depth from Z_LAYER now. _capped_stacks matches the cap being DERIVED from stack.maxHeight, through an optional wrapping call. That still fails on everything the count was protecting, verified by mutation: the cap dropped entirely, the cap hardcoded to a number so it no longer tracks the measurement, and only one of the two stacks capped -- the exact bug the "== stacks" comparison exists to catch. #9246's wrapped form passes, and its branch goes from 3 failures to 187 passed with this test alone swapped in. Nothing about the assertions' subject changes. A cap that stops reading stack.maxHeight still fails.
|
Confirmed both rails in studio/frontend/src/app/provider.tsx still clip at the padding box with no room under the bottom card, so the toast really does lose its shadow, and the compensation in railBottomOffset/railMaxHeight keeps the cards where they were. Could you get Frontend CI green so this can be reviewed for merge? |
shimmyshimmer
left a comment
There was a problem hiding this comment.
Codex review
Reviewed the PR changes around the overlay rail shadow gutter, geometry compensation, and tests. I did not find a clear correctness issue that requires changes.
Notes:
- The compensation approach (adding bottom padding while discounting it from measurement) is consistent with keeping existing card placement while avoiding overflow clipping.
- The new helper functions make the geometry adjustment easier to test and isolate.
- The added tests cover the key invariant: the visual gutter should not consume the measured card band.
Leaving this as a comment review only (not approving).
Ooo it's a little different, seems like another user already made a PR for your issue |
I just wanted to make sure if your PR didn't overlap with the other one. Thanks |
2394509 to
5580d4c
Compare
|
Thanks, that matches what I found. Rebased onto main so #9253 comes with it, and Frontend is green locally on the rebased tree: 4032 tests pass, typecheck clean, build clean. The two remaining reds were both main's rather than this branch's, and the rebase picks up the fix for each. Also pushed one more commit here off the review above: the gutter is now split into 16 below and 8 above, since the light shadow does paint above the card and a capped rail was clipping it. |
|
Codex Review: Didn't find any major issues. Another round soon, please! 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". |
|
Confirmed both rails in studio/frontend/src/app/provider.tsx still clip at the padding box with no room above or below the cards, and the split gutter with the discount in both measure() probes keeps every card at the position it had. |
The bottom-right rail that holds the llama.cpp and Unsloth update toasts, the download panel and the loaded models card is overflow-y-auto, so it clips at its padding box. It reserved a gutter sideways only, so the bottom card sat flush against the clip edge: every surface in the rail offsets its shadow downwards, so all of that shadow fell outside the box and the card's bottom edge read as cut off. A cap landing a few px short of a card sliced its rounded corners off at the same edge. The gutter was left off downwards because the placement measures the rail's own scrollHeight and block padding inflates it. railCardsHeight discounts it instead, and railBottomOffset/railMaxHeight add the gutter on top of the band the cards may fill, so the cards stay exactly where they were.
The bottom gutter was sized from blur/2, which is the blur's standard deviation rather than its painted extent, and the comment claimed neither theme paints above a card. Measured off the rendered blur instead: the dark shadow reaches 30px below a card and 12px above it, the light one 8px and 4px. Bottom stays 16, where the dark tail is down to one level of #181818 and the light one has been gone for 8px, and where the viewport edge clips it anyway at the corner placement. Top becomes 8, so the first card in the rail keeps its halo instead of being cut flat.
5580d4c to
ad52a11
Compare
|
Rebased onto main. #9334 rewrote Main now reads the rail card by card: The source guard in 4094 frontend tests pass, |
Last round's fix was scoped by an argument rather than by a measurement, and the argument was wrong. The rail reaches five of the eight resize targets, not two, and its lower gutter also sits on the composer. ## The rail reaches five grips, and took three The harness now carries all eight targets and the driver reports geometric reach separately from what the rail actually takes, so the set is measured rather than asserted. Rail scrolling and pointer-active: | state | reaches | took, before this commit | | --- | --- | --- | | 1280x800 | north-east, south, south-east | north-east 32 of 144 | | 420x760 | those plus north-west, south-west | north-east 32, north-west 32, south-west 80 | The narrow window is the case I had reasoned away: a card is `w-[calc(100vw-2rem)]`, so the rail spans nearly the full width and the left-hand corners come into range. The north-east one needs no narrow window at all, because the top gutter lifts the rail's box from 16px below the ceiling to 8, and that corner target is 12px tall. Neither is reachable on the merge base. All eight take `Z_LAYER.WINDOW_RESIZE_EDGE` now. The window controls go up with them as `Z_LAYER.WINDOW_CONTROLS`, because Close's corner and the north-east grip overlap and the button is what a click there should mean; they were `z-[80]`, which beat the grips and lost to the stack, and both of those were the wrong way round. Each control keeps 900 of 900px with the grips above it, measured. ## The lifted rail sat on the composer it had just dodged `liftOver` left `STACK_GAP` over the box it dodges. That was enough while the rail's box ended where its cards did; the box now hangs 16px lower, so at a gap of 8 the lower 8px of the gutter covered the composer's top edge, 1088px2 of it at 1280x800. Nothing protects the composer the way `FLOATING_PANEL` protects the Live monitor: it is ordinary in-page chrome and the stack is meant to paint over that, so the placement is what has to keep off it. The clearance is `max(STACK_GAP, STACK_SHADOW_GUTTER_BOTTOM)`, which puts the rail's box edge exactly on `frame.top` and the cards 16px above it rather than 8. That is the only branch where a card moves, and it moves because something under it has to stay clickable, which is what `MONITOR_GRIP` already does. ## And the driver's own path filter `studio-frontend-ci.yml` enumerates the Playwright drivers that start it, so a PR touching only this one skipped the Chromium run; `studio-ui-smoke.yml` triggers on `tests/studio/**` but its step loops over firefox and webkit only. 4836 node tests, typecheck, build, bundle in budget, and 2000 states per engine green in Chromium, Firefox and WebKit.
The window-controls toolbar sits inside a positioned, numbered header, so that header is a stacking context and a z-index on the toolbar is compared inside it rather than against the resize grips outside it. WINDOW_CONTROLS could not do what its name said, so it goes, along with its entry in the layer order. Measured rather than argued, in all three engines: with the grips and the header both at z-[70] as they were before this branch, Close loses 92 of its 900px and the other two 60 each, to the 4px north edge strip crossing the buttons and, for Close, the corner as well. Adding the toolbar number leaves that untouched, and so does raising the grips: all three shapes measure the same. The overlap is the titlebar's own, from before this branch, and raising the header to take it back would put a full-width opaque band over the top of the notification stack, which this change has no business doing. The harness had two gaps behind the wrong answer. It rendered the controls with no header above them, and it rendered the grips first, which is the reverse of window-titlebar.tsx -- and document order is what decides between equal z-indexes, so the pre-change control run was measuring a titlebar that does not exist. Both are fixed, with a compareDocumentPosition guard so the order cannot drift again and a source guard against a new z-index on the toolbar.
|
Codex Review: Didn't find any major issues. Can't wait for the next one! 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". |
|
Before and after from two isolated installs, the merge base The surface is the download manager panel, which is the same toast shape the report was about, and the crop is its bottom-left corner: 28px of card and 28px below it. BEFORE the card's bottom edge is cut flat where the rail's The whole card, for context:
The last row is the part worth checking: the card does not move and does not shrink, so the gutter is paid for by the rail dropping its own edge and growing its own cap, not taken out of the cards. The card's text is identical on both sides too, so nothing in the picture varies except the rail. Both sides carry the same shadow, |
…it is missing (#9654) `Overlay rail shadow gutter, other engines` has failed on every studio-ui-smoke run since #9246 added it, and passed on #9246 itself. The difference is the frontend-dist cache. The harness serves its own vite via `npm run dev` in studio/frontend. That job never installs the frontend dev dependencies: it installs Studio, and setup.sh installs them only when it has to build the frontend. The frontend-dist cache exists precisely to stop that build, and the restore action asserts the installer reported the frontend up to date. So on a cache miss setup.sh builds, node_modules exists and the step passes; on a hit there is no node_modules, `npm run dev` exits 127 with `sh: 1: vite: not found`, and the step fails. #9246's own run missed the cache. Every run since has hit it. The harness is right and its use in studio-frontend-ci.yml is right, where `npm ci` has already run. Only the new step's assumption was wrong: what that shard has already paid for is the WebKit and Firefox install, not a frontend toolchain. So the shard installs the dependencies itself, conditional on the binary rather than unconditional, because on the cold-cache path setup.sh has already put them there and `npm ci` would delete and refetch them. The step then checks the binary actually arrived, since a silent install would surface later as a Playwright timeout rather than as a missing toolchain. start_vite now refuses up front with the cause and the remedy. "vite exited with code 127" reads as a vite crash; the toolchain was never installed, and the two must not look the same. This is what made the failure look like flake: identical job, identical commit, green or red depending on a cache key. While here, the wildcard-host detector added in #9623 only matched a command at the start of a line, so `UNSLOTH_STUDIO_PASSWORD=... unsloth studio -H 0.0.0.0` in the Launch section passed the guard. It now matches the command anywhere on the line. Twelve fixtures pin what the detector must catch and must not, because every negative assertion in that file passes when the detector sees nothing: a detector that quietly stops matching turns the whole file green while guarding nothing.
Resolved against #9246, which landed the same shadow-gutter work this branch deletes the machinery for. #9246 reserves a gutter so the rail's overflow clip stops cutting the card shadows off, and pays for it with railBottomOffset, railMaxHeight and railCardsHeight around the JS placement. The gutter is a real fix and still applies, since the rail still scrolls; the placement is what this branch is removing. So the gutter is carried over in CSS, with the same constants and the same measured sizes: bottom-0 + paddingBottom 16 + paddingTop 8, cap calc(100dvh - 8px) which is the cards' own band, 100dvh - 2rem, plus the 24px of gutter around it. Measured on the merged build at 431x678: the rail's border box sits on the floor and 4px from the right, its padding is 16/8, and the cards still land 16px off both edges. Cap 670 = 678 - 8. Nothing inline sets bottom or maxHeight. Also from #9246, kept as-is: the window resize grips take Z_LAYER .WINDOW_RESIZE_EDGE, since a rail on the floor spans them. It matters less here, because this rail is click-through in every state rather than only when it is not scrolling, but the guard costs nothing and the layer is the right home. Deleted with the machinery they exercise: smoke-overlay-rail-main.tsx and its page, tests/studio/playwright_overlay_rail.py, and the two CI steps that ran it. The harness exists to drive the real useStackGeometry, which is gone. overlay-shadow-gutter.test.ts is rewritten against the CSS instead of the deleted helpers, so #9246's rule that the gutter costs the cards no room is still pinned. The Playwright corner probe now reads the bottom off the rail's padding box rather than its border box, which the gutter moved to the floor.


What was wrong
The llama.cpp update toast reads as cut off along its bottom edge: no shadow under it, and when the rail's cap lands a few px short of the card, its rounded bottom corners are sliced off in a straight line.
It shows up on any of the corner cards, in both themes. On the report at
b10360 -> b10472-mix-4b653dbthe top corners are rounded and lifted while the bottom is a flat cut, which is the tell.Cause
All four corner overlays share one rail in
app/provider.tsx: the two update banners, the download panel and the loaded models card. That rail isoverflow-y-auto, so it clips at its padding box, and it reserved a gutter sideways only (-mx-3 px-3), never underneath.Every surface in the rail offsets its shadow downwards (
0 2px 8px -2pxlight,0 8px 28px -6pxdark), so with the bottom card flush against the clip edge, all of its shadow fell outside the box. The card then looks like the window has sliced it. Separately, a cap a few px short of a card cut into the card itself, since nothing in it can give up height, which is the sheared-corners variant in the screenshot.The gutter was deliberately sideways only:
useStackGeometrymeasures the rail's ownscrollHeight, and block padding inflates it, so a card that fits under the composer would measure as one that does not and the rail would lift over the composer for nothing.Fix
STACK_SHADOW_GUTTER = 16, from the deepest shadow the rail carries (dark theme,8 + 28/2 - 6below the card). Nothing is reserved above, since neither theme's shadow reaches past the top edge.railCardsHeight()discounts the rail's measured padding from both height probes inmeasure(), so the placement still reads the cards alone. The reason the gutter was skipped no longer holds.railBottomOffset()andrailMaxHeight()add the gutter on top of the band the cards may fill rather than out of it, so every card keeps the exact position it had. A negative block margin cannot do this job:bottomanchors the margin edge, and withtopandheightauto the engine solves fortop, so in Chromium the padding moved the card instead of the box.Since the clip is at the padding box, this also buys 16px of slack: a cap that lands short of a card now shows it whole instead of taking its corners off.
Verification
Measured on the running rail at 1280x800, with the update card in it:
... px-3... px-3 pb-4bottom/max-height16px/768px0px/784pxAlso checked the two placements that clipping depends on are unchanged:
stackGeometryreturns the same bottom and cap for a discounted measurement as it did for an unpadded one.Tests
tests/overlay-shadow-gutter.test.ts: the gutter clears the deepest shadow, the cards keep their inset and their band, a cap slightly short of a card no longer slices it, the measurement discounts the padding, and the placement is unchanged by it.tests/update-banner-flex-priority.test.ts: the rule pinning "no block padding on the rail" is replaced by the pair it becomes,pb-4on both rails plus the discount in both probes, and a new case for the compensated offset and cap.tests/monitor-stack-inset.test.ts: the probe-ordering regex now matches thescrollHeightread throughrailCardsHeight.npm run typecheckclean, and the suite passes apart fromtests/queued-model-capabilities.test.ts, which fails the same way onmain(src/features/chat/utils/mmproj-fallbackis missing).