Repository navigation
Studio: keep a chat's summary when forking it - #19627
Merged
danielhanchen merged 1 commit intoNov 27, 2026
Merged
Conversation
Codex Review Summary: ✅ CompletedThis 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. 🎉 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
Nov 27, 2026
…date banner layout red since #19970) (#20005) ## Problem The update banner layout check (`tests/studio/playwright_update_banner_layout.py`) fails 6 of its 2159 checks on main. It fails on the Linux `Chat UI Tests (chat)` leg, the Windows `Chat UI Tests` leg and the Mac `Chat UI, API, Update and GGUF inference` leg, on every staging run built on current main, for example #19837, #14119, #14292, #15300 and #19627: ``` [banner] FAIL 921x534 new chat expanded: the bottom card is on the corner, not floating above it lastPaintedFromBottom=4 (want 16) [banner] FAIL 390x500 new chat collapsed: the bottom card is on the corner, not floating above it lastPaintedFromBottom=9.1 (want 16) ``` The other four failures are the same check on the Train and Model hub pages, at the same two sizes. The cards in the corner rail (update, llama.cpp update, downloads, loaded models) are supposed to sit 16 px above the corner. At these two window sizes the bottom card lands 4 px and 9 px from the edge instead. #19970 made the rail `overflow: visible` while its cards fit, and scroll only once they outgrow it (`data-rail-scrolls`), so WebKit can blur glass cards against the page. That part is right. But `overlayRailScope` decided "outgrow" with `scrollHeight > clientHeight`, and for an `overflow: visible` box Chromium leaves the end padding out of `scrollHeight`. Cards that run into the rail's 16 px bottom padding, but not past its border, read as `scrollHeight == clientHeight`: the rail never starts scrolling, and the bottom card sits in the gutter. The same 921x534 layout on a bare page in Chromium, cards running 12 px into the bottom padding: | rail | `scrollHeight` / `clientHeight` | bottom card from the corner | |---|---|---| | `overflow: visible` (main) | 534 / 534 | 4 px, and the rail does not scroll | | `overflow: auto` (before #19970) | 546 / 534 | scrolls | Before #19970 the rail was always a scroll container, so the same layout scrolled. ## Fix `railOverflows()` in `studio/frontend/src/lib/toast-offset.ts`: - It keeps the `scrollHeight` test. - It also measures the span of the rail's in-flow cards plus its top and bottom padding against `clientHeight`. Dragged cards are `fixed` elsewhere and are left out. - `overlayRailScope` uses it, so the rail scrolls whenever its cards do not fit. - While they fit, the rail stays `overflow: visible`, so #19970's WebKit glass fix is unchanged. On the bare page above: - Cards 12 px into the padding: the old test reports no overflow, `railOverflows` reports overflow. - Cards that fit with room to spare: both report no overflow, and the bottom card sits at 16 px. ## Verification - `tests/toast-offset.test.ts`, new case: cards running into the bottom padding with `scrollHeight == clientHeight` count as overflow; a fitting stack, a stack with a dragged `fixed` card, and an empty rail do not; a real `scrollHeight` overflow still does. `toast-offset.test.ts` and `glass-floating-cards.test.ts`: 27 passed. - `npm run typecheck` and `eslint` on both files: clean. - The browser check itself, `tests/studio/playwright_update_banner_layout.py`, run against a local Studio install of main (`6047d3b980`) with the same driver CI uses: - Before, main: `2159 checks, 6 failed`. The same six as CI: 921x534 expanded and 390x500 collapsed on New chat, Train and Model hub, `lastPaintedFromBottom=4` / `9.1`. - After, the same install with only this PR's `toast-offset.ts` rebuilt in: `2153 checks, 0 failed`. - The six corner checks are not run in those six layouts any more, because the rail now scrolls there, exactly as it did before #19970. The check only judges the corner while the rail is not scrolling. Every other check, including "can be scrolled into the rail's view" for each card, passes on both sides. ## Screenshots Bottom-right corner of the two failing layouts, from the driver's own screenshots of the run above. At rest the pixels are the same on both sides: the stack does not fit these windows, and the bottom card runs into the gutter either way. What changes is that the rail is a scroll container again when its cards outgrow it, as before #19970, rather than an `overflow: visible` box that lets them spill into its padding. 
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.
Forking a chat that was compacted with /compact gave the fork none of the parent's saved summary. With auto-compact off, the parent kept sending its summary plus the recent turns, but the fork sent the whole history again, so the next message in the fork failed with the provider's context length error. With auto-compact on, the fork first hit that error and then wrote a second summary of the same turns.
A fork now carries the parent's saved summaries along with its messages. A summary only applies when the turns it covers are the start of the fork's own history, so a fork taken before the compacted point, or one that goes a different way, still sends its own turns as before. Deleting the parent leaves the fork's copy in place.
Screenshots