Repository navigation
studio: show the train run preview as a column on a laptop window - #9762
Conversation
The Run preview card and its Start training button only split into a second column when the train-configure container query matches. That container is the page wrapper, so its width is min(1180, window - sidebar) - 72, and the sidebar is 280px by default. The 64rem tier from unslothai#7633 needed a 1376px window, and below that the card stacked under the wizard as a full-width row. 56rem is the narrowest tier that still leaves the wizard column past its own 28rem @md/train-section threshold once the 320px preview track, the 32px gap and the card's 40px padding come out, so the model/method/token row stays two across. The second column now appears from a 1248px window with the sidebar expanded, and from 1016px with it collapsed to the rail.
The threshold is a class name on the design scale, so nothing in the source says it is really a window-width requirement. The test reads the tier, the preview track, the gaps, the page padding, the training card's inset and SIDEBAR_WIDTH_DEFAULT out of the source and out of Tailwind's own scales, then holds both ends: two columns must be reachable in a 1280px window, and the wizard column must still clear @md/train-section, the narrowest tier the wizard's own sections use. It also pins the sticky offset to the same tier as the column split, so the preview cannot scroll away inside its own track, and checks that both named containers are still declared, since every tier it reads is inert without them. A tier it cannot resolve throws rather than dropping out of the budget.
|
@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". |
ReviewLogic and tests both check out. Ran the suite on this branch: 5138 pass, 0 fail. Checked the tier arithmetic against source rather than the body: 56rem is the right pick and the argument for it being the narrowest safe tier holds. Leaving Two small things, neither blocking. The two numbers in the collapsed-rail row cannot both be right. Only the tier moved, 1024 to 896, and the container stays in the linear regime the whole way (1024 is under the 1108 cap, so nothing clamps), so the window requirement has to differ by exactly 128px in both rows whatever the sidebar is doing. The expanded row is 1376 - 1248 = 128. The collapsed row reads 1176 - 1016 = 160. Reading the class strings rather than measuring: Worth re-measuring rather than taking my word for it, since I did not render this:
One thing worth a comment rather than a change: Codex is clean on the current head and the logic and tests look good from here, so this is just waiting on CI now. |
|
Addressed Leo’s notes in a139849: corrected the collapsed rail table to 1144px, removed the stale issue reference, and clarified that the train-section tier scan is intentionally limited to top-level wizard and section files. The focused test passes. |
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs 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". |
|
Confirmed the tier in studio-page.tsx:245 needs a 1376px window, so a default-sized laptop window never gets the preview column, and the 4xl move plus the sticky-tier pin looks right. Will get this reviewed once CI settles. |
LeoBorcherding
left a comment
There was a problem hiding this comment.
staged ci passing, codex converged, logic review looks clean. LGTM

The Run preview card on Train > Configure, and the Start training button inside it, only become a second column when the
train-configurecontainer query matches. That container is the page wrapper instudio/frontend/src/features/studio/studio-page.tsx:so its width is
min(1180, window - sidebar) - 72, andSIDEBAR_WIDTH_DEFAULTinstudio/frontend/src/hooks/use-sidebar-width.tsis 280. The@5xltier added in #7633 is 64rem, which turns into a 1376px window requirement. Below that the card dropped out of the grid and rendered as a full-width row under the wizard, which is what happens on every laptop-sized window:MINIMUM_APP_WINDOW_SIZEis 900px wide and a first run opens at 75% of the work area, so a 1440px display gets a 1080px window and never showed the column at all.What changed
studio-page.tsxmoves the two-column grid and the preview card's sticky positioning down to@4xl/train-configure(56rem) from@5xl(64rem).@5xl/train-configure:gap-10stays where it is, so the gap is 32px in the new band and widens to 40px once there is room for it.56rem is the narrowest tier that still leaves the wizard column above its own
@md/train-sectionthreshold. At 896px of container the wizard track is 544px, and after the training card'sp-5and 1px border its@container/train-sectionis 502px against the 448px that tier needs, so the model/method/token row stays two across rather than collapsing to buy the preview its 320px.Measured in Chromium against CSS compiled from the edited class strings by the repo's own Tailwind 4.2.4:
Screenshots
Two isolated Studio installs, one at
55213845eand one at this branch, driven through Train > Configure at 1280x900. Both sides report the same 280px sidebar and the same 928px container, so the only variable is the tier.Top of the tab. The wizard gives up its full width for the preview column:
Scrolled to the Run preview card. Before, it sits below Configuration as a full-width row; after, it is pinned beside the wizard:
Geometry read from the same servers that were photographed,
data-tour="studio-dataset"againstdata-tour="studio-start":Regression test
studio/frontend/tests/train-configure-preview-column.test.tsreads the tier, the 320px preview track, the gaps, the page padding andSIDEBAR_WIDTH_DEFAULTout of the source, and the--container-*and--spacingscales out of the resolvedtailwindcss/theme.css, then holds both ends of the corridor:@md/train-section, the narrowest tier the wizard's own sections useIt also pins the sticky offset to the same tier as the column split, so the preview cannot scroll away inside its own track, and checks that
@container/train-configureand@container/train-sectionare still declared, since every tier it reads is inert without them.Mutation-checked, restoring the source afterwards:
@5xltwo columns need a 1376px window, budget is 1280px@2xlwizard section gets 278px, below the 448px train-section tierpreview sticks at a different tier than the 4xl column splitexpected one className with @container/train-configure, got 0wizard section gets 342px, below the 448px train-section tier@min-[40rem]unresolvable tier @min-[40rem]/train-section in params-section.tsxChecks
npm testinstudio/frontend: 5138 pass, 0 failnpx tsc -bandnpx tsc -p tsconfig.test.json: cleannpx biome check:studio-page.tsxreports the same two diagnostics as its parent commit; the new test file reports only thenoNodejsModuleswarnings every test in that directory produces