Repository navigation
Studio: stop docked composer from squeezing download panel - #9334
Conversation
|
Codex Review: Didn't find any major issues. Hooray! 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". |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0ba7c06c70
ℹ️ 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".
| const cards = [...node.children].filter(inRailFlow); | ||
| const grown = cards.map(cardHeight); |
There was a problem hiding this comment.
Re-measure when a card leaves the rail flow
When the loaded-models card is dragged while the remaining download content still keeps the rail at its cap, changing the wrapper to position: fixed does not necessarily change any observed height, and the MutationObserver below watches only childList, not class/style attributes. Consequently measure() may never rerun, leaving floorRoom, neededRoom, and persistentTail computed with the now-fixed card despite this filter. Fresh evidence in this revision is that the new filter is evaluated only inside that untriggered measurement callback; observe the direct children's flow-affecting attribute changes or explicitly request a measurement when dragging begins.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
I could not reproduce this one, and I think the premise does not hold: leaving the flow always changes a box the ResizeObserver is watching.
The card's wrapper is flex min-h-0 justify-end, so it is shrinkable, and the rail's height is min(content, cap). That leaves two cases and no third:
- the rail is over its cap, so the deficit was distributed and the shrinkable card is carrying some of it. Going fixed, it stops being a flex item and takes its own box, so its height changes.
- the rail is under its cap, so its height is its content. Removing the card's height plus a gap changes the rail's own box.
Measured at 1366x640 with the observer armed on the rail and its children, driving a real drag. Every row fired, and every post-drag placement is the one the remaining in-flow content warrants:
| rail contents | card before drag | events on drag | placement |
|---|---|---|---|
| 1 download | 89 (unshrunk) | card 89.05, RAIL 217.81 -> 120.77 | 344/280 -> 16/200 |
| 3 downloads | 66 (shrunk) | card 89.05, RAIL 280 -> 200 | 344/280 -> 16/200 |
| 5 downloads | 47 (shrunk) | card 89.05, RAIL 280 -> 200 | 344/280 -> 16/200 |
| llama banner | 89 (unshrunk) | card 89.05, RAIL 236.3 -> 139.25 | 344/280 -> 16/200 |
| llama banner + 1 download | 53 (shrunk) | card 89.05, panel 71.8 -> 120.77 | 344/280 unchanged |
| llama banner + 5 downloads | 22 (shrunk) | card 89.05, panel 103.22 -> 132.75 | 344/280 unchanged |
The last two are unchanged because 344/280 is the right answer both times, not because the measurement was skipped: with the card gone the in-flow floor is still 268 and 275 against a 200px band, so the rail stays lifted. The events show the measurement ran.
You are right that the MutationObserver watches only childList. It does not have to carry this: the ResizeObserver watches the rail and every descendant and filters on height, and the height it needs is always one of the two above.
Rejecting, but if you have a configuration where both the wrapper and the rail keep their heights across the drag, I will take it.
|
@codex review |
|
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". |
Review + GitHub Actions UI evidencePinned review: I reproduced the real Studio flow in Chromium at 1366×640 on fresh upstream
Conclusion: the clipping issue and its fix are verified; I found no new blocker. The inspected upstream Backend/Frontend reds are stale-base failures whose fixes are already on current |

Problem
Starting a model download from a chat thread can render the download panel only 5px tall. The download continues and its progress values are correct, but the UI appears as a hairline across the "LLMs can make mistakes" note.
The overlay rail decides whether it can fit below the coverable chat composer by comparing the available band with the rail's measured floor. Its squeeze probe sets
max-height: 0and readsscrollHeight, but the rail'smin-h-0flex cards collapse to their borders. During a live download, a 121px panel therefore reported a 2px floor.The published composer form leaves a 5.47px band above the footnote. Because that band appeared larger than the 2px floor, the rail stayed in the corner and accepted a 5.47px cap, clipping the panel almost completely.
Fix
Floor the rail card by card rather than as one number:
Each card keeps enough room for the download header and one row, a card shorter than that is asked for what it has, and a card with a larger minimum of its own still wins. The sum is bounded by the rail's natural height.
Per card and not over the sum, because a rail floored as one number is answered by whichever card carries a
min-height. The app update card's is 189px at the default font scale, which clears 128 on its own while themin-h-0download panel next to it still measures its borders. That leaves the same hairline on the welcome screen at 1366x640, where the composer's band is 200px: the rail took the corner at a 200px cap, the banner held its own minimum, and the panel came back as an 8px strip with 7px of its 41px header showing and no scrollbar to reach it by.Two things the per-card reading needs that the aggregate one did not.
cardHeightreadsoffsetHeight, not a bounding rect, for the reasonuse-panel-anchor.tsalready has it. The update cards animate in fromscale: 0.96and a rect is measured through that transform: 176.64 against a layout 184 at 1366x640, still 193.71 against 196 at the last reflow. A finished transform resizes nothing, so no observer comes back with the settled figure and the short reading is the floor the placement keeps. It also matchesscrollHeight, the total the sum is clamped against.inRailFlowdropsfixedandabsolutechildren. Dragged, the loaded models card pins itselfposition: fixedand leaves the rail's flow;scrollHeightdrops it, so a floor that still counted it asked for 225px where 128 was needed and lifted the rail off a corner it fitted in. ThepersistentTailwalk had the same fault, counting a card that lands on nothing as part of the run guarding the composer, and now uses the same list.overflowingmoves offfloorRoomand onto the height the cards actually collapse to. The floor is now larger than that wherever a card would rather be clipped than shrink, and a clipped card is not a fold to scroll to: reading the floor there would give the railpointer-events-auto, and with it the clicks crossing its gutter, for a scrollbar it does not have.The docked composer is still cleared instead of accepting its 5px strip. The behavior added in #8462 is preserved: a welcome-screen band that holds one usable card keeps the rail in the corner, and longer lists scroll there.
Verification
bottom 16, cap 5.47bottom 149, cap 635bottom 16, cap 5.47bottom 149, cap 355cap 200, panel 8pxcap 608, panel 120.77pxbottom 344, cap 280bottom 16, cap 200node --test tests/monitor-stack-inset.test.ts: 66 passed, including the banner-plus-panel floor, the 1366x640 placement, the layout-box reading and the dragged cardnode --test tests/update-banner-flex-priority.test.ts: 15 passednpm run typechecknpm run buildnpm test: 13 failures, all incontext-window-visible.test.tsandthread-scoped-sampling-simulation.test.ts, reproduced on the PR's own basetests/studio/playwright_update_banner_layout.pysweeps, welcome and docked, with and without a download: the rail takes pointer input exactly when it scrolls in all of them, and 3 to 5 of them do scrolltailOverlapis 0 in all of them