Repository navigation
Studio: responsive layout for phones, tablets and ultrawide - #11660
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
6707ad4 to
5a43c18
Compare
|
@codex review |
|
@codex review |
|
Codex Review: Didn't find any major issues. Delightful! 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". |
…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.
bf51cfc to
d8b490d
Compare
|
@codex review |
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.
|
@codex review |
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.
|
@codex review |
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.
|
@codex review |
…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.
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! 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". |
…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.
… 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.
…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.
…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.
…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.
… 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.
Problem
Studio is tuned for laptop and desktop widths, but breaks down outside that range:
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 frommdtolg, and its scale test now expectslg.Large screen breakpoints
Adds
3xl(1920px) and4xl(2560px) to the theme. Arbitrarymin-[2560px]:variants are emitted before the namedlgandxlrules, so they lose to them (xl:grid-cols-3beatmin-[2560px]:grid-cols-4). Named breakpoints sort after2xland win.Shell
lginstead of docking beside the thread.lg.85vw, still capped at 18rem.Phones
Emptystate uses less padding on phones.max-w.Tablets
lginstead ofmd.mdandlg.45dvhwhen stacked.xlinstead of clipping the last tag.Ultrawide and 4K
3xland 1760px at4xl. The Hub measure grows to 2200px. Chat keeps its reading width.4xl. Training charts get taller.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
mainand 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: cleannpm test: 8571 passednpm run i18n:check:strict: passesnpm run bundle:check:mainis 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.