Repository navigation
Studio: put the notification rail back in its bottom-right corner - #9547
Merged
Merged
Conversation
The rail was anchored with `fixed bottom-4 right-4` until #8082, which added the loaded models indicator and, with it, a frame store the rail read: the Live monitor, the API monitor panel and the chat composer publish their boxes, and `useStackGeometry` wrote `bottom` and `maxHeight` as inline styles that dodged them. Every input to that placement moves on its own. The composer grows with its input and goes from centred to docked with no resize event, a download row arrives, release notes expand, a banner is dismissed. Each change re-ran the measurement, and when the room fell short the rail lifted over the obstacle at `viewportHeight - frame.top + STACK_GAP`. On the welcome chat that is the cards in the middle of the window; against a maximised monitor the lift clamped at MIN_STACK_ROOM and parked them at the top. It reads as random because the trigger is measurement timing. The store also had to probe its own output, dropping `max-height` to read `scrollHeight` and restoring it with transitions suppressed, because the placement was feeding on the box it had just sized. It went from 184 lines to 701 over nine follow-up PRs, all of them editing the same arithmetic. So this restores the anchor rather than adding another special case. The rail is `fixed bottom-4 right-4` with the CSS cap again, on the named layer rather than the old hard-coded z-index. The frame store keeps its map of boxes, which api-monitor/panel-placement still needs to open the API panel clear of the monitor and the composer, and loses the dodge arithmetic, the measurement loop and the `coverable` licence. The composer still publishes for that panel's sake. The indicator itself is untouched. Known trade-off, and the pre-#8082 behaviour: in a short window a card can sit over the composer's Send button rather than the rail dodging it. The indicator is off by default, draggable and dismissible.
Review catch, and it reproduces. The cap alone does not contain anything: the cards that cannot shrink lay out past the rail's bottom edge, which is pinned 16px off the floor, so the overflow goes under the bottom of the window with no way to bring it back. At 320x480 with --ui-font-scale 1.25, three cards up: the llama.cpp banner is in flow with its bottom at 497 against a 480px viewport, and the card after it is squeezed to 0px at 505. scrollHeight 501 against clientHeight 448, and overflow-y visible. The Update button is below the fold for good. Earlier sizes missed it because the download panel is the one min-h-0 card in the rail and absorbed the squeeze on its own. Raising the type size puts the two banner floors over the cap and the slack runs out. So the rail scrolls again, in CSS only. No measurement, no placement: the offset and the cap stay where they were. The gutter comes back with it, since overflow-y forces overflow-x and the card shadows clip without it, and stays horizontal so the bottom card keeps sitting on bottom-4. The rail stays click-through. Verified that the fold is still reachable: elementFromPoint over a card returns a node inside it, so the card is the hit target despite the rail being pointer-events-none, and the rail is that node's nearest scrollable ancestor, which is the chain a wheel scrolls. Focus works too: the Update button measured at bottom 481 in a 480px viewport, and focusing it scrolled the rail to 17 and brought it to 464.
…ter contract Two fixes to the Playwright suite, both mine to begin with. The corner check measured `fromRight` off the rail's border box. The rail carries the shadow gutter, `-mx-3 px-3`, so its border box sits 4px from the viewport edge while the cards it pads sit at 16. It reported 4 and would have failed at every inspected viewport. Measured at 320x480 and at 921x534, one of the two the pass runs: rail 4, every in-flow card 16. It now takes the right edge from the cards, filtered to the ones in flow, since a dragged loaded models card is `fixed` somewhere else. The bottom still comes off the rail: no vertical margin or padding, and its border box does not move when the cards scroll. Checked at both scroll extremes. The other is a contract this branch already invalidated. The suite asserted the rail takes pointer input exactly when it scrolls, which was #9150 and needed the JS that also placed it. The rail is click-through in every state now, so that check failed whenever the rail scrolled. Verified at 320x480 with the rail actually scrolling, scrollHeight 501 against clientHeight 448: pointer-events none, and a click on the gutter lands on the thread viewport behind it. Both assertions are now unconditional.
Member
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? 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". |
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.
The vite install in the banner shard exists for playwright_overlay_rail.py and nothing else, so with the harness gone it is dead. Nothing left in studio-ui-smoke.yml touches npm, npx, node_modules or studio/frontend, so on a frontend-dist cache hit it would run a clean `npm ci` for no consumer. logs/playwright-overlay-rail goes with it: it was only ever written by the two steps this branch removed. Job-level setup-node stays. It predates the harness (#9060) and the installer needs node to build the frontend on a cache miss.
Member
Author
|
@codex review |
|
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". |
danielhanchen
added a commit
that referenced
this pull request
Aug 25, 2026
One conflict, in studio-frontend-ci.yml. #9547 removed the overlay rail smoke from this workflow while this branch added the keyboard shortcut smoke a few lines above it, so the two edits landed in the same hunk. Resolved by keeping the new step and honouring the removal; the paths list had already merged cleanly the same way. Everything else auto-merged, the twelve locale catalogs included. Merge result: typecheck clean over app and tests, npm test 4893 passing, build and bundle budget clean, i18n parity clean, and the shortcut browser harness 113/113 on chromium across all three emulated platforms.
shimmyshimmer
added a commit
that referenced
this pull request
Oct 19, 2026
) Fixes #14146. ## What changed On phones and other narrow windows, the docked chat composer runs under the bottom-right notification rail. The collapsed download button sat on top of the Send button, and the expanded downloads panel covered the whole composer. Both now sit just above the composer. The composer now reports how far it reaches up from the bottom edge, but only while its right edge is inside the rail's column. The rail adds that number to its bottom gutter (`--studio-composer-clearance`). The rail is still `fixed bottom-0 right-0` with the CSS cap from #9547. Only its bottom padding takes the clearance, and that comes from a single input, the composer column's box. Nothing measures the rail itself, so there is no feedback loop. Wide layouts never set the clearance, so desktop is unchanged. In compare mode each pane registers, and the largest clearance wins. ## Verification - `npm run typecheck` and the rail contract tests (`overlay-shadow-gutter`, `update-banner-flex-priority`) pass. `tests/studio/test_update_release_notes.py` and `test_overlay_layering.py` pass, with the rail padding contract updated to the new constant. - An isolated Studio, driven with Playwright on a chat with messages while a real GGUF download was in flight: | Viewport | Before | After | | --- | --- | --- | | 390x844, collapsed button | overlaps Send | 8px above the composer | | 390x844, expanded panel | covers the composer | above the composer | | 1280x800 | 16px from the corner | unchanged | The welcome screen's centred composer does not trigger the lift. ## Screenshots 390x844, collapsed download button: it covers Send before, and sits above the composer after:  The expanded downloads panel, before and after:  ## Not tested here Real mobile browsers (iOS Safari keyboard behaviour in particular) were not tested; the check used Chromium mobile emulation. --------- 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.
Bottom-right notifications stopped staying in the bottom-right corner. The update banners and the download panel turn up in the middle of the window, and sometimes at the top, while the loaded models card sits on the corner by itself.
Root cause
The rail was anchored in CSS until #8082:
#8082 added the loaded models indicator and a
monitor-frame-storealongside it, where the Live monitor, the API monitor panel and the chat composer publish their boxes. The rail stopped being anchored and started being placed:useStackGeometrymeasured its own content and wrotebottomandmaxHeightas inline styles that dodged those boxes.Every input to that placement moves on its own. A card mounts or is dismissed, a download row arrives, release notes expand, the composer grows with its input. Each one re-ran the measurement, and when the computed room fell short the rail lifted over the obstacle:
Reproduced on a build of
main, at 431x678 on/chat, with the Live monitor open from Settings, Resources and both update banners plus the loaded models card in the rail:mainbottom135.469pxmax-height526.531pxSame machine, same viewport, same scenario, only the build differs.
Worth being precise about the trigger, because my first reading of it was too broad. The chat composer publishes as
coverable, and at the sizes tested the covering fallback does keep the rail at the corner, so the composer alone is usually not enough. What reliably lifts it is a box that may not be covered: the Live monitor, which defaults to this same corner, and the API monitor panel. A docked composer in a short window reaches it too, once the persistent tail is tall enough that covering is refused.The store also had to probe its own output, dropping
max-heightto readscrollHeightand restoring it with transitions suppressed, because the placement was reading the box it had just sized.monitor-frame-store.tswent from 184 lines to 701 across nine follow-up PRs, all editing the same arithmetic: #8190, #8210, #8249, #8301, #8315, #8367, #8462, #9150, #9334.The fix
Restore the anchor instead of adding another special case.
app/provider.tsx: both rails, desktop and browser, are back tofixed bottom-4 right-4with the CSS cap. The named layer from Keep the two floating panels out of each other's corner #8249 is kept rather than reinstating the hard-codedz-[9998], since that rename was a separate and sound refactor. The rail keeps a scroller for content taller than the cap, in CSS only: at a large type size the two banner floors exceed the cap on their own, and a cap without a scroller drops the overflow below the bottom of the window. The offset and the cap themselves stay out of JS, which is the point of the change.monitor-frame-store.ts: 701 lines down to 66. The dodge arithmetic, the measurement loop and thecoverablelicence are gone. The map of boxes stays, becauseapi-monitor/panel-placementstill needs it to open the API panel clear of the monitor and the composer. That is panel against panel, not notification placement.use-published-frame.tsandthread.tsx: the composer still publishes, for that panel's sake, minuscoverable.data-overlay-dismissibleremoved, since nothing reads it now.The indicator itself is untouched: same card, same rows, same eject, same drag and persist, still last in the rail so it holds the corner.
Net 1,779 lines removed.
Why this holds
bottom: 16pxandright: 16pxare constants. There is no measurement, no obstacle list and no feedback loop, so nothing on the page can move the rail. It is a direct child of the provider root with no transformed ancestor, soposition: fixedresolves against the viewport.Verification
Measured off the live DOM on
/chatwith all four cards in the rail:bottomwritten by JSmax-heightwritten by JScalc(100dvh - 2rem)static, in the rail's flowStress case, release notes expanded and the window at 1091x640 so the rail hits its cap: it fills the window top to bottom and still measures 16px from every edge.
Suites: 4,473 node tests pass,
tscclean, biome clean on the changed files, and 194 pytest contract tests intests/studio.Tests that pinned the removed behaviour are replaced by ones that pin the corner.
monitor-stack-inset.test.tsis deleted, the geometry it covered no longer exists.update-banner-flex-priority.test.tskeeps its card-internal contracts and swaps the rail contracts for one that asserts the corner and bans the placement symbols from the render.test_update_release_notes.pyandtest_overlay_layering.pymatch on the corner classes instead of the inline cap. The Playwright indicator pass now checks the rail is 16px from both edges with nothing inline on it, rather than checking it dodged the composer.Trade-off
This gives up what #8210 and #8367 were chasing. In a short window a card can sit over the composer's Send button rather than the rail dodging it. That is the behaviour we had before #8082 and it was not what anyone reported. The indicator ships off by default (#8346), and it is draggable and dismissible, so there are outs. If we want that handled it should be handled on its own terms, not by putting the rail's position back under JS.