Repository navigation
Studio: keep the download rail in the corner under the welcome composer - #8462
Conversation
With two active downloads the rail is taller than the band the centred welcome composer leaves under it, so reachesStack asked for a dodge and the panel was lifted clear of the composer's top edge: it sat mid-window with the corner underneath it empty. Narrower windows, or a single download, fit the band and land in the corner, so the same build looked different from machine to machine. Ask a coverable box against the stack's floor rather than its natural height. The composer is the only box that opts into coverable, and having said the stack outranks it, a band that holds every card whole is enough: the room the cards would prefer is not worth leaving the corner for, and the rail scrolls for the rest. The docked composer is unaffected, since it leaves no band at all and still gets its dodge whatever the rail measures. A rail whose floor genuinely will not fit is still lifted, so no card is clipped to win the corner. floorRoom is already measured by useStackGeometry and passed to stackGeometry; this threads it down to the placement, defaulting to neededRoom so a caller with one number keeps the stricter reading.
c2bb75e to
cc63c30
Compare
|
@codex review |
|
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". |
|
Checked this at head What the pair showsA 1600x891 window on the welcome screen with six concurrent downloads (six stalled Xet workers, so the rows stay put; no bytes, no weights, no GPU). Both sides are the same screen with the same six rows. BEFORE the rail is not merely adrift, it is pinned to the top right of the window with the entire bottom-right corner empty. AFTER it is back in the corner.
The last four rows are worth more than the placement. Keeping the corner is not paid for with rows: the cap goes up 349 -> 382, the list gets 33px taller and one more row lands whole. The rest scrolls inside the panel's own Why the shot uses six downloads and not twoThe first run, with two, produced two byte-identical halves. That is the trap this fix lives next to, so it is worth writing down: the change only bites while the band under the composer is bigger than the rail's floor and smaller than its natural height. On a headless Studio with no model selected the welcome composer sits at bottom 485 and leaves a 382px band, and a two-row rail is 200px, so it fits and neither side lifts. On the reported window the composer sat at 704 and left 163px. Six rows (507px natural) put the same 1600x891 window back on the wrong side of the same comparison. The precondition is Correctness
I also ran a boundary matrix the PR does not cover, since every pre-existing
Three things in the diff I went looking for and found harmless. |
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. 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, with two downloads really in the railTwo isolated 1600x560BEFORE the panel is adrift in the upper right with the corner beneath it empty. AFTER it is back in the corner. 1440x6201600x891, the controlIdentical on both sides, which is what should happen where the band under the composer is roomy enough to hold the rail either way. The greeting line differs because it is chosen at random; nothing else does. The numbers, read off the photographed pageGap between the rail's bottom edge and the window's, where 16px is the corner:
Finding the window where this bitesWorth writing down, because my first pair was two identical halves. With two download rows the rail is 209px tall, and the placement compares that against the band under the centred welcome composer less the corner inset and the gap. On the tree without this fix the rail keeps the corner down to a 279px band and leaves it at 221px and below. At 1600x891 a fresh install leaves a 403px band, so the reported window size alone does not reproduce it: the band does. That is why the scene runs at 640 and 560 tall. For anyone reusing the scene: the adopter only takes jobs whose state is |




The bug
With two active downloads the panel sits in the middle of the window, with the bottom-right corner underneath it empty.
The chat composer publishes its box to the overlay-frame store as
coverable, and the rail dodges anything that crowds its corner. On the welcome screen the composer is centred rather than docked, so it leaves a usable band beneath it, butreachesStackmeasures that band against the rail's natural height. One download fits, two do not, so the rail is lifted clear of the composer's top edge and ends up adrift with the corner it was dodging left empty.That is also why the same build differs per machine: a narrower window, a shorter card or a single download fits the band and lands in the corner as expected.
The fix
Ask a
coverablebox against the stack's floor instead of its natural height.The composer is the only box that opts into
coverable, and having said the stack outranks it, a band that holds every card whole is enough. The height the cards would prefer is not worth leaving the corner for, and the rail scrolls for the rest, which is what its cap and its scroller are already for.floorRoomis measured byuseStackGeometryand already handed tostackGeometry; this threads it down throughplacetoreachesStack, defaulting toneededRoomso a caller that knows only one number keeps the stricter reading.What does not change:
coverable, so its placement is untouched.Tests
studio/frontend/tests/monitor-stack-inset.test.tsgains three cases, taken from the reported window (1600x891, welcome composer leaving a 163px band):The existing suite passes unchanged, including the two cases this logic was written for:
a card that fits under the welcome composer keeps the corner,a stack too tall for that gap is still lifted over(83px band, so it still lifts), anda placement that fits the cards at their floor is not given up on.44/44 in that file, and the wider frontend suite has the same 10 pre-existing failures with and without this branch (clipboard and background-load-notice, unrelated).
biome checkreports the same 30 warnings on both files before and after, andtscflags nothing in either.