Skip to content

Studio: keep the download rail in the corner under the welcome composer - #8462

Merged
danielhanchen merged 2 commits into
mainfrom
fix/download-rail-welcome-composer-corner
Aug 11, 2026
Merged

danielhanchen merged 2 commits into
mainfrom
fix/download-rail-welcome-composer-corner

Conversation

@danielhanchen

@danielhanchen danielhanchen commented Aug 11, 2026 •

Copy link
Copy Markdown
Member

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, but reachesStack measures 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 coverable box against the stack's floor instead of its natural height.

const wanted = frame.coverable ? floorRoom : neededRoom;

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.

floorRoom is measured by useStackGeometry and already handed to stackGeometry; this threads it down through place to reachesStack, defaulting to neededRoom so a caller that knows only one number keeps the stricter reading.

What does not change:

  • The docked composer leaves no band at all, so it still gets its dodge whatever the rail measures, and the card cannot land on Send.
  • A rail whose floor genuinely will not fit the band is still lifted over, so no card is clipped to win the corner.
  • The Live monitor is not coverable, so its placement is untouched.
  • The covering fallback for windows too short to do either is untouched.

Tests

studio/frontend/tests/monitor-stack-inset.test.ts gains three cases, taken from the reported window (1600x891, welcome composer leaving a 163px band):

  • a rail that scrolls into the band keeps the corner and still clears the composer
  • a rail whose floor will not fit that band is still lifted fully clear
  • the docked composer is dodged for floors of 1, 40 and 120px

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), and a 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 check reports the same 30 warnings on both files before and after, and tsc flags nothing in either.

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.
@danielhanchen
danielhanchen force-pushed the fix/download-rail-welcome-composer-corner branch from c2bb75e to cc63c30 Compare August 11, 2026 17:37
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: cc63c30424

ℹ️ 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".

@danielhanchen

Copy link
Copy Markdown
Member Author

Checked this at head cc63c3042 against its merge base 0b4d909bb, with a before/after pair from two isolated Studio installs.

download rail placement, before and after

What the pair shows

A 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.

BEFORE AFTER
rail_bottom_offset 526 16
rail_css_bottom 525.984px 16px
rail top edge (rail_box.y) 16 493
rail cap 349px 382px
list_client_height 306 339
rows fully visible 3 of 6 4 of 6
list content 472px 472px

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 ul on both sides, which is where it scrolled before. So the corner is not bought by squeezing the cards.

Why the shot uses six downloads and not two

The 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 natural > band > floor, not the number two.

Correctness

44/44 in monitor-stack-inset.test.ts, 1956/1956 for the whole frontend suite, typecheck clean, and biome check reports the same 30 warnings on the two changed files at head and at the merge base (902 errors / 6279 warnings repo-wide on both, unchanged).

I also ran a boundary matrix the PR does not cover, since every pre-existing SHORT_WELCOME / CHAT_W case omits coverable and so never reaches the new branch:

  • the corner/dodge switch is exactly at the band: floors of 1, 80, 140 and 162 keep the corner, 164 and above dodge to a full lift. No partial lifts either side of it.
  • the same box without coverable gives byte-identical geometry for every floor, so the new argument reaches nothing it was not meant to.
  • omitting the floor reproduces the pre-PR answer exactly.
  • a Live monitor beside a coverable composer, in both list orders, still keeps the stack above the monitor's top edge. The composer's permission to be covered is not inherited.
  • the docked composer, through full stackGeometry rather than just stackBottomInset, with floors of 0, 1, 40, 120, 140, 260 crossed with persistent tails of 0, 40 and 80: the rail's bottom edge stays above the composer's top edge in all 18, so Send is never covered.

Three things in the diff I went looking for and found harmless. place()'s empty-list branch omits floorRoom, but it passes frame = null and both helpers return before reading either height. The covering fallback passes floorRoom into place(uncoverable, ...), where by construction nothing is coverable, so it is inert. And a corner placement cannot end up with maxHeight below the floor, since that same condition is what makes reachesStack true and takes the dodge instead.

danielhanchen added a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Aug 11, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: 674efdce1d

ℹ️ 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".

@danielhanchen
danielhanchen merged commit 16f857a into main Aug 11, 2026
32 of 44 checks passed
@danielhanchen
danielhanchen deleted the fix/download-rail-welcome-composer-corner branch August 11, 2026 18:43
@danielhanchen

Copy link
Copy Markdown
Member Author

Before and after, with two downloads really in the rail

Two isolated install.sh --local builds at the merge base and at cc63c3042, with the two hub endpoints the download manager hydrates from stubbed identically on both sides. Nothing is downloaded; what is being measured is where the rail sits.

1600x560

1600x560

BEFORE the panel is adrift in the upper right with the corner beneath it empty. AFTER it is back in the corner.

1440x620

1440x620

1600x891, the control

1600x891

Identical 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 page

Gap between the rail's bottom edge and the window's, where 16px is the corner:

viewport band under the composer before after
1600x560 163px 286px 16px
1440x620 200px 329.5px 16px
1600x891 403px 16px 16px

Finding the window where this bites

Worth 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 running or cancelling, so a payload saying downloading is dropped without a word and the panel never appears.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant