Skip to content

Studio: stop the update banners floating off the corner - #10229

Merged
Etherll merged 3 commits into
unslothai:mainfrom
oobabooga:worktree-llama-banner-floor
Sep 3, 2026
Merged

Etherll merged 3 commits into
unslothai:mainfrom
oobabooga:worktree-llama-banner-floor

Conversation

@oobabooga

Copy link
Copy Markdown
Member

Summary

Fix the empty height that made update banners float above the bottom-right corner. The llama.cpp banner reserved its notes floor while the changelog was closed, and the app-update banner did the same when a release had no previewable notes.

Before and after

Before After
rail-before-light rail-after-light

Fix

  • Gate the llama.cpp floor and changelog on the same changelogPanelOpen predicate.
  • Gate the app and desktop floors on the rendered notes panel through data-slot="update-release-notes" and :has().
  • Keep cards without notes at their natural height with shrink-0.
  • Let each painted surface fill a legitimate floor with grow, including short loading and empty-notes states.

The existing floor constants are unchanged. Standalone positioned={true} banners are also unchanged.

Results

Measured in headless Chromium against a live Studio with both update endpoints stubbed:

card and state before after
llama.cpp, collapsed 204.2px slot, 147.3px painted 147.3px slot, 147.3px painted
llama.cpp, changelog open 265.2px slot, no dead space unchanged
app update, no notes preview 184px slot, 127.8px painted 127.8px slot, 127.8px painted
app update, notes present no dead space unchanged

The gap below the collapsed llama.cpp banner drops from 64.9px to the rail's intended 8px. The result is identical across the tested desktop and narrow viewports, with and without the loaded-models card.

Verification

  • Browser layout suite: 1,703 checks, 0 failures, including no-preview states collapsed and expanded.
  • Reverting the llama.cpp fix produces 73 failures in the new dead-space assertion.
  • Source-level update-banner tests: 19/19 passed.
  • npm run typecheck: passed.
  • Formatting checks: passed.
  • Full frontend suite: 6,722/6,725 passed. The three existing failures are locale-dependent digit-grouping cases also present on main.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-03T11:53:13.141778Z 7542147 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@oobabooga

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: b5aabce375

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

Confirmed the unconditional floor is still there in llama-update-banner.tsx and web/update-banner.tsx, so the collapsed card reserves height it never paints and drifts off the corner; gating it on the rendered notes slot looks like the right fix, and I will get this reviewed.

@Etherll Etherll self-assigned this Sep 3, 2026
@Etherll

Etherll commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: 754214711f

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

@Etherll

Etherll commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

UI evidence — exact-SHA before/after

Compared PR #10229 at head 754214711fb675bf0590f0e6556bc9f9d861d55f against merge base 01262664ea4662686bdde90caf247e8177813119 using isolated Studio installs and the same compact update fixtures in Chromium 131 at 921×534.

  • Web banner unpainted slot height: 56.2 px → 0 px
  • llama.cpp banner unpainted slot height: 56.9 px → 0 px
  • Visible gap between the painted banners: 64.2 px → 8 px
  • Release-notes panels: 0 on both sides

The labelled composite matches the expected result: the compact banners no longer retain invisible panel-height floors and form one evenly spaced bottom-right stack above the persistent Downloads control.

PR 10229 update banner floor before and after

@Etherll
Etherll merged commit 8e26d2c into unslothai:main Sep 3, 2026
36 of 37 checks passed
rhsCZ pushed a commit to rhsCZ/unsloth that referenced this pull request Sep 4, 2026
…ngs (unslothai#10267)

`Repo tests (CPU)` has been red on `main` since unslothai#10229 and on roughly 35 open PRs. Four failures in `tests/studio/test_update_release_notes.py`, and no source file needs to change.

unslothai#10229 is correct. The tests asserted verbatim runs of Tailwind classes against the file text, so inserting `grow` into the painted surface, and gating the floors on the notes panel actually rendering, read as the rules being gone while every one of them was still there. The tell was that only the two constants naming a variant failed; the scaled pair still matched as a suffix.

The assertions now match Tailwind tokens rather than file substrings, and they are stronger than what they replace rather than merely looser. They read off the card's rail-facing branch, take the gates a rule is written under exactly rather than as a subset, and count only the classes an expression always renders. Comments are blanked before any scan, since both banners name these very classes in prose beside them.

Verified by mutation rather than by watching it pass: 33 edits to the banner, panel and layout sources, each run against the affected tests. All 33 behave correctly. The 12 behaviour-preserving edits pass, including class reordering, an attribute reorder, an apostrophe in the copy, a fragment wrapper and a `cn()` grouping refactor. The 21 real regressions fail, including six that the previous version of these tests did not catch at all.

189 tests pass in the file. Staging CI green.
danielhanchen added a commit that referenced this pull request Sep 6, 2026
Two regressions in the bottom-right overlay rail shipped to main and had to be
undone by hand. Neither failed a test on the way in.

#9849 dropped `jobKeys.length === 0` from the Downloads panel's early return, so
a fresh install carried a download FAB on the corner with nothing behind it.
Reverted by #10298. #10117 copied the desktop updater's min-h floor onto the
llama.cpp banner while making its changelog render only once opened, so the card
reserved 204.2px and painted 147.3px and the stack sat 64.9px off the corner.
Fixed by #10229.

Both suites ran on #10117 and both passed. No fixture produced the empty-notes
state; every geometric check read the outer slot, which is the element carrying
the floor; and the source suite was edited in the same commit to assert the
floor was present, turning the bug into a pinned contract.

Adds two fast node tests that run on every frontend PR on ubuntu and windows,
inside the existing npm test step, for about a second between them:

- download-panel-not-permanent.test.ts matches the guard through the AST and
  evaluates the whole condition three-valued with the empty test pinned true, so
  an inverted or partial guard cannot satisfy it.
- overlay-rail-floor-gating.test.ts enumerates the rail's children out of
  provider.tsx and applies a rule rather than a spelling: a floor may only be
  reserved when the thing it protects is on screen. Both gates resolve against
  the components that actually render the shared notes layout root.

In the browser suite the dead-space probe now runs over every flowed card
instead of two named banners, the corner is measured off the bottom-most painted
surface rather than the rail's padding box, and the Downloads overlay is checked
absent by exact card count. Both rails carry a data-testid so the probe can find
the rail when no banner is up.

Every check was verified to fail at the commits that shipped the bugs, and seven
mutations across two review rounds are confirmed caught.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants