Skip to content

Studio: responsive layout for phones, tablets and ultrawide - #11660

Merged
shimmyshimmer merged 7 commits into
mainfrom
studio-responsive-layout
Sep 23, 2026
Merged

shimmyshimmer merged 7 commits into
mainfrom
studio-responsive-layout

Conversation

@shimmyshimmer

@shimmyshimmer shimmyshimmer commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

Problem

Studio is tuned for laptop and desktop widths, but breaks down outside that range:

  • Phones (320 to 430px): headers overlap the sidebar toggle, menus and popovers run off screen, labels clip mid word, and some controls only appear on hover.
  • Tablets (768 to 1023px): side panels dock next to the content and crush it. Chat settings left the thread about 216px wide at 768px, and compare mode split into two ~240px panes.
  • Ultrawide and 4K (2560px+): page content stays capped at 1152 to 1280px, leaving most of the screen empty.

Change

Every rule is scoped to a breakpoint outside the laptop and desktop range, so 1280 to 1919px renders the same as main. The only change that reaches 1024 to 1279px is the Data Recipes tag wrap, which only matters when the tags would otherwise clip.

UI scale

Built on top of #11648. Every new fixed length goes through --ui-space-scale, so the phone, tablet and 4K rules resize with the UI font size and interface scale like the rest of Studio. The breakpoints themselves stay fixed. The Settings tablet rail only applies while the rail is not stacked. The Video split moves from md to lg, and its scale test now expects lg.

Large screen breakpoints

Adds 3xl (1920px) and 4xl (2560px) to the theme. Arbitrary min-[2560px]: variants are emitted before the named lg and xl rules, so they lose to them (xl:grid-cols-3 beat min-[2560px]:grid-cols-4). Named breakpoints sort after 2xl and win.

Shell

  • Sidebar: starts unpinned (icon rail) below 1024px when the user has not chosen yet. A stored choice is kept.
  • Chat run settings: overlays as a sheet below lg instead of docking beside the thread.
  • Compare mode: stacks below lg.
  • Mobile sidebar sheet: widens to 85vw, still capped at 18rem.

Phones

  • Page headers: Audio and Video headers clear the floating sidebar toggle, matching Chat and Images.
  • Images and Audio: the Create / Train toggle goes icon only under a 30rem container, so the model selector keeps its name. Labels stay for screen readers.
  • Overflowing controls:
    • Hub download menus, the profile avatar picker and the train base selector are capped to the viewport.
    • The HF token field, the model load status bar and the Recipe Studio header fit on narrow screens.
    • The hyperparameter tabs and the training start overlay are tightened.
  • Padding: tighter page padding on Images, Audio, Video, Train, Export, API and Projects. The shared Empty state uses less padding on phones.
  • Hub:
    • The device stats align left under the title.
    • The quant picker shows a dot for "On device" and hides the GGUF tag, so the size stays visible.
    • Long tokens in readmes wrap below 1024px.
  • Recipe Studio:
    • Canvas zoom controls stack vertically on narrow canvases so they stop sliding under the Run / Check bar.
    • The runs list stacks above its detail and fills the width.
  • Touch: clip, transcript, dataset image and avatar actions that were hover only now show on coarse pointers.
  • Tooltips and context menus: capped to the viewport. Tooltips need an unlayered rule, since call sites set their own max-w.
  • Long names: provider names in Connections and log file names in Logs truncate instead of clipping.

Tablets

  • Video: switches to the side by side layout at lg instead of md.
  • Settings dialog: the tab rail narrows to 208px between md and lg.
  • API monitor: request and detail panes are capped to 45dvh when stacked.
  • Data Recipes: card tags wrap below xl instead of clipping the last tag.

Ultrawide and 4K

  • Page width: Train, Export, Data Recipes and API grow to 1440px at 3xl and 1760px at 4xl. The Hub measure grows to 2200px. Chat keeps its reading width.
  • Grids: training history and recipe cards go to 4 columns at 4xl. Training charts get taller.
  • Other:
    • The API monitor panes use the screen height.
    • The Settings dialog grows to 1120 x 940.

Testing

Checked every route, tab, mode, dialog, menu and Settings tab at 320, 375, 768, 1024, 1280, 1512, 1728, 2560 and 3440px, scanning for anything past the viewport or clipped by its container. I also opened each menu and popover trigger on a phone viewport and measured it.

For desktop parity, I built main and this branch and compared the position and size of 1,400 to 1,550 elements per width across all routes at 1280, 1512 and 1728px. They match once pages settle. The only differences were the random greeting, entrance animations and data still loading.

  • npm run typecheck: clean
  • npm test: 8571 passed
  • npm run i18n:check:strict: passes
  • npm run bundle:check: main is already over the raw startup budget (5601.9 KB > 5595.7 KB). This branch adds about 1 KB of class names, so I left the budget alone.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 23, 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-23T11:47:13.944454Z 67668aa 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.

@shimmyshimmer
shimmyshimmer force-pushed the studio-responsive-layout branch from 6707ad4 to 5a43c18 Compare September 23, 2026 07:05
chatgpt-codex-connector[bot]

This comment was marked as resolved.

@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

chatgpt-codex-connector[bot]

This comment was marked as resolved.

@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: bf51cfceb5

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

pull Bot pushed a commit to chizee/unsloth that referenced this pull request Sep 23, 2026
…to start (unslothai#11670)

test_work_done_by_a_descendant_counts spawns a shim that spawns the worker, so a
second Python has to start before any descendant work exists. On a loaded runner
that startup outlasted the 0.6s default and the wait gave up on a load about to make
progress (assert False is True, on unslothai#11660's l-r shard).

This test now waits with a 1.5s stall timeout, still well under healthy_after = 2.5,
so only descendant work can carry the wait past it. On a core shared with six busy
loops the old test failed 5 of 8 runs and this one 0 of 8.
Fit every page, dialog and menu from 320px phones up to 4K and ultrawide
monitors. Laptop and desktop widths (1280 to 1919px) are unchanged.
With no stored choice, the width default was read once at load, so
resizing or rotating across 1024px kept a stale pin state. Listen for
the breakpoint and re-read it. A stored choice still wins.
Fall back to the width default when localStorage throws, and never let a width change override a toggle made this session.
@shimmyshimmer
shimmyshimmer force-pushed the studio-responsive-layout branch from bf51cfc to d8b490d Compare September 23, 2026 10:21
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

chatgpt-codex-connector[bot]

This comment was marked as resolved.

Both layouts now stack until lg, so the preview keeps its 60dvh minimum and the second compare pane keeps its top divider and start-aligned header on tablets.
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

chatgpt-codex-connector[bot]

This comment was marked as resolved.

The chat tour now holds the sidebar open without persisting it or counting it as a choice. On exit it returns to the user's choice, or to the width default when there is none, so a narrow first run still pins once widened.
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

chatgpt-codex-connector[bot]

This comment was marked as resolved.

A storage event now resets the choice flag from what is stored, so a reset in another tab brings back the width default here too.
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

chatgpt-codex-connector[bot]

This comment was marked as resolved.

…sync

The hover only actions now use any-pointer-coarse, matching useIsCoarsePointer, so a touchscreen laptop with a trackpad still shows them. A storage change from another tab during the tour hold now updates the value restored on release instead of closing the sidebar mid step.
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 67668aa1a2

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

@shimmyshimmer
shimmyshimmer merged commit a5ee713 into main Sep 23, 2026
36 of 47 checks passed
@shimmyshimmer
shimmyshimmer deleted the studio-responsive-layout branch September 23, 2026 11:49
pull Bot pushed a commit to eoinmcgee1993/unsloth that referenced this pull request Sep 23, 2026
…ponsive classes in the tests (unslothai#11680)

* Let a scratch --target prefetch through the torch-probe installer check

unslothai#11635's _prefetch_diffusers_main builds the pinned Diffusers into a scratch
--target directory to warm uv's cache, so it installs nothing into the
environment and cannot change which torch is there. The entry-point check
counted any caller of _build_uv_cmd as an installer and failed main.

A function whose every build command carries --target is now read as a
scratch prefetch. Anything else that builds a command still has to drop the
memoized torch classification.

* Follow unslothai#11660's phone gutters and lg chat split in the desktop contract

unslothai#11660 gave the Images, Audio and image-train rails a 20px gutter on phones
(max-sm:px-5, max-sm:pl-5) and moved the chat split from md to lg, so
tablets stack. Four contracts still pinned the old class strings.

* Exempt only a --target into a directory the function just made with mkdtemp

* Only a name bound once can prove its --target is the mkdtemp scratch

* Hold the prefetch to a scratch target by running it, not by reading its source

The AST classifier kept meeting spellings it could not see through: a
rebound name, a second --target. Exempt _prefetch_diffusers_main by name
instead, and prove the exemption by running it with the subprocess stubbed,
through both the git and the archive source: exactly one --target, naming a
directory it made under the temp root, gone afterwards.

* Name the callers of the shared requirements filter, including unslothai#11635's prefetch

The ARM64 wheelhouse test counted _effective_requirements(req) and expected
four. unslothai#11635's Diffusers prefetch is a fifth, and it has to filter the same
way, since it builds the cache entry the install then reads. Name each caller
and the file it passes instead, so a new caller fails with its own name.
Stanley00 pushed a commit to stanley-fork/unsloth that referenced this pull request Sep 23, 2026
… the update card's scaled width (unslothai#11700)

* Read the sidebar pin's width default only where matchMedia exists

unslothai#11660 made use-sidebar-pin read the lg media query when it is imported,
without asking whether window.matchMedia exists. Frontend tests that reach
the window titlebar supply a partial window with no matchMedia, so the import
threw and failed training-dataset-source-transitions.test.ts on main.

With nothing to ask, keep the desktop default, as the module already does
when there is no window at all, and skip the width listener.

* Expect the update card's scaled width at a larger UI size

unslothai#11648 made the card's max width calc(448px * var(--ui-space-scale, 1)), so
at the 20px UI size it is 597px, and the layout pass still wanted 448. The
pass only reached that check once unslothai#11673 made its scale probe readable.
shaojun pushed a commit to shaojun/unsloth that referenced this pull request Sep 29, 2026
…to start (unslothai#11670)

test_work_done_by_a_descendant_counts spawns a shim that spawns the worker, so a
second Python has to start before any descendant work exists. On a loaded runner
that startup outlasted the 0.6s default and the wait gave up on a load about to make
progress (assert False is True, on unslothai#11660's l-r shard).

This test now waits with a 1.5s stall timeout, still well under healthy_after = 2.5,
so only descendant work can carry the wait past it. On a core shared with six busy
loops the old test failed 5 of 8 runs and this one 0 of 8.
shaojun pushed a commit to shaojun/unsloth that referenced this pull request Sep 29, 2026
…i#11660)

* Studio: responsive layout for phones, tablets and ultrawide

Fit every page, dialog and menu from 320px phones up to 4K and ultrawide
monitors. Laptop and desktop widths (1280 to 1919px) are unchanged.

* Studio: re-derive the default sidebar pin when crossing lg

With no stored choice, the width default was read once at load, so
resizing or rotating across 1024px kept a stale pin state. Listen for
the breakpoint and re-read it. A stored choice still wins.

* Studio: keep the compact sidebar default when storage is unavailable

Fall back to the width default when localStorage throws, and never let a width change override a toggle made this session.

* Studio: move the video preview and compare pane chrome to the lg split

Both layouts now stack until lg, so the preview keeps its 60dvh minimum and the second compare pane keeps its top divider and start-aligned header on tablets.

* Studio: keep the tour's sidebar pin out of the stored preference

The chat tour now holds the sidebar open without persisting it or counting it as a choice. On exit it returns to the user's choice, or to the width default when there is none, so a narrow first run still pins once widened.

* Studio: follow the stored sidebar pin when another tab changes it

A storage event now resets the choice flag from what is stored, so a reset in another tab brings back the width default here too.

* Studio: show touch actions on hybrid devices, and keep tour holds in sync

The hover only actions now use any-pointer-coarse, matching useIsCoarsePointer, so a touchscreen laptop with a trackpad still shows them. A storage change from another tab during the tour hold now updates the value restored on release instead of closing the sidebar mid step.
shaojun pushed a commit to shaojun/unsloth that referenced this pull request Sep 29, 2026
…ponsive classes in the tests (unslothai#11680)

* Let a scratch --target prefetch through the torch-probe installer check

unslothai#11635's _prefetch_diffusers_main builds the pinned Diffusers into a scratch
--target directory to warm uv's cache, so it installs nothing into the
environment and cannot change which torch is there. The entry-point check
counted any caller of _build_uv_cmd as an installer and failed main.

A function whose every build command carries --target is now read as a
scratch prefetch. Anything else that builds a command still has to drop the
memoized torch classification.

* Follow unslothai#11660's phone gutters and lg chat split in the desktop contract

unslothai#11660 gave the Images, Audio and image-train rails a 20px gutter on phones
(max-sm:px-5, max-sm:pl-5) and moved the chat split from md to lg, so
tablets stack. Four contracts still pinned the old class strings.

* Exempt only a --target into a directory the function just made with mkdtemp

* Only a name bound once can prove its --target is the mkdtemp scratch

* Hold the prefetch to a scratch target by running it, not by reading its source

The AST classifier kept meeting spellings it could not see through: a
rebound name, a second --target. Exempt _prefetch_diffusers_main by name
instead, and prove the exemption by running it with the subprocess stubbed,
through both the git and the archive source: exactly one --target, naming a
directory it made under the temp root, gone afterwards.

* Name the callers of the shared requirements filter, including unslothai#11635's prefetch

The ARM64 wheelhouse test counted _effective_requirements(req) and expected
four. unslothai#11635's Diffusers prefetch is a fifth, and it has to filter the same
way, since it builds the cache entry the install then reads. Name each caller
and the file it passes instead, so a new caller fails with its own name.
shaojun pushed a commit to shaojun/unsloth that referenced this pull request Sep 29, 2026
… the update card's scaled width (unslothai#11700)

* Read the sidebar pin's width default only where matchMedia exists

unslothai#11660 made use-sidebar-pin read the lg media query when it is imported,
without asking whether window.matchMedia exists. Frontend tests that reach
the window titlebar supply a partial window with no matchMedia, so the import
threw and failed training-dataset-source-transitions.test.ts on main.

With nothing to ask, keep the desktop default, as the module already does
when there is no window at all, and skip the width listener.

* Expect the update card's scaled width at a larger UI size

unslothai#11648 made the card's max width calc(448px * var(--ui-space-scale, 1)), so
at the 20px UI size it is 597px, and the layout pass still wanted 448. The
pass only reached that check once unslothai#11673 made its scale probe readable.
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