Skip to content

Studio: Video Create and Train tabs, media header icons, Images and Video linked - #15520

Merged
shimmyshimmer merged 9 commits into
mainfrom
studio-media-header-video-train
Oct 27, 2026
Merged

shimmyshimmer merged 9 commits into
mainfrom
studio-media-header-video-train

Conversation

@shimmyshimmer

@shimmyshimmer shimmyshimmer commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Studio: Video Create and Train tabs, media header icons, Images and Video linked

Video gets Create and Train

  • Train is Images' Train page as is (DiffusionTrainPanel and its base picker), which already covers the video families (LTX-2, H3).
  • Video loads no adapters, so its "Deploy to Create" hands the run to Images through the image workflow store and switches page; Images loads it exactly as its own Train page does. A run finished on Video also refreshes Images' adapter list.
  • The images loader refuses video bases, so adapters of a video family (LTX-2, MiniMax-H3) get no "Deploy to Create" on either page (Export stays). The training info reports this per family as is_video; an older backend omits it and keeps the button as before.
  • Starting a training run unloads the resident image and video models, but switching Train back to Create kept showing them as loaded until the page was left and reopened. Both pages now re-read their model status on the way back to Create, without cancelling a load still in progress.
  • Switching Train to Create unmounted the training panel on both pages, so a prepared dataset, trigger and hyperparameters were lost. The panel now mounts on first visit and is hidden, not unmounted, while Create shows (its polling already pauses when inactive).
  • Video's guided tour gains the mode step, and Images' Train steps in Train. Images stays mounted (hidden) before Video, so with Images left in Train the tour found its hidden copy of the shared targets first and gave up; it now attaches to the first visible match.

Images and Video headers

  • The right side reads API, Library, then the other media page (Video on Images, Images on Video) with its name and a small arrow; the name shows where the header has room, as the Library link's did. All are icon buttons styled like the chat header's (30px, 10px corners, text-nav-fg), with tooltips instead of the Library label, and without the divider. Images and Video use the sidebar's icons.
  • The row sits at the chat header's right inset (its scrollbar gutter plus 0.5rem, window controls included): the last button ends 18px from the edge, as on Chat, instead of 8px.
  • Create and Train get more horizontal padding (px-7, px-14 on wide headers), and Reapply's icon sits at the button's own 6px gap instead of 14px.
  • The Train-mode base picker's two names were centred, not baseline aligned, so the family name sat high, and its type and padding differed from Create's picker. It now matches Create's model picker, so the base model's name stays put when switching tabs.

Library

  • Library's empty Images and Videos tabs offer "Upload files" and, to its right, "Generate an image" / "Generate a video", which open those pages. The new label reuses each locale's existing "Generate an image" string.

Verification

  • npm run typecheck, npm run i18n:check, npm test, npm run build.
  • New video-train-deploy-tour.test.ts and backend test_diffusion_train_is_video.py (the flag survives the response model).
  • New media-header-links.test.ts (icon buttons, order, label and arrow, inset, tab padding, Reapply, Video Train and the deploy handoff, Library buttons).
  • Checked in a local Studio with Playwright: header buttons at 30 x 30 with the chat header's colour, gaps and 18px right inset at 1000 and 1440px; Images and Video link to each other; Video's Train tab renders the training page; the Train trigger's names share one baseline and start where Create's do; both Library empty states.
  • Not exercised here: training and deploying an adapter (no GPU on this host).

… like chat

Video's Train tab is Images' trainer; its Deploy hands the adapter to Images, which loads it as its own Train page does. Images and Video headers show API, the other page and Library as the chat header's icon buttons, without the divider or labels. The Train base picker matches Create's: same type and padding, names on one baseline.
…d Library

Images and Video headers use the chat header's right inset and read API, Library, then the other page with an arrow. An unpinned Video is listed last under Images in the sidebar, and an unpinned Images under Video. Library's empty Images and Videos tabs offer Upload files and a Generate button.
The other media page's link shows its name between the icon and the arrow where the header has room, as the Library link used to.
shimmyshimmer pushed a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Oct 27, 2026
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 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-10-27T10:26:16.483466Z 5274977 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.

The header links Images and Video, so the sidebar no longer lists one under the other. Create and Train get more horizontal padding, and Reapply's icon uses the button's own gap instead of adding 8px.
shimmyshimmer pushed a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Oct 27, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 209ef6f625

ℹ️ 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 pushed a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Oct 27, 2026
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4f09ce6a69

ℹ️ 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 pushed a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Oct 27, 2026
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: abf3387d78

ℹ️ 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 pushed a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Oct 27, 2026
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

1 similar comment
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b49299378b

ℹ️ 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 pushed a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Oct 27, 2026
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 527497751e

ℹ️ 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 f4f15d3 into main Oct 27, 2026
24 of 58 checks passed
@shimmyshimmer
shimmyshimmer deleted the studio-media-header-video-train branch October 27, 2026 10:28
danielhanchen added a commit that referenced this pull request Oct 27, 2026
…n buttons (#15550)

Two checks in
`tests/studio/test_desktop_reliability_frontend_contract.py` fail on
main since #15520 (`Repo tests (CPU, studio)`, e.g. job 122142458511 on
#15535):

```
test_compact_media_link_keeps_accessible_name_and_truncation
    assert 'cn("min-w-0 truncate", labelClassName)' in '... type="button" aria-label={label} onClick={go} className={cn( ...'
test_images_header_tracks_preview_and_preserves_titlebar_controls
    assert 'labelClassName="hidden @[50rem]:inline"' in ' className="pointer-events-none relative z-40 grid h-[48px] ...'
```

## Cause

#15520 turned the Images and Video header links into icon buttons, a
deliberate redesign covered by its own `media-header-links.test.ts`.
`MediaPageLink` gained an `iconOnly` branch ahead of the labelled one,
and the Images header now renders `<LibraryPageLink tab="images"
iconOnly={true} />` and `<SiblingMediaPageLink to="/video" />` instead
of passing `labelClassName` / `arrowClassName`.

- The first test read only the first `<button` in the component, which
is now the icon button, so it no longer saw the labelled link it checks
(whose `cn("min-w-0 truncate", labelClassName)` is unchanged).
- The second test asserted the old props on the Images header. What they
guaranteed, the name and arrow showing only on a wide header, now lives
inside `SiblingMediaPageLink` (`iconArrow`).

The product is right; the tests pinned the old markup.

## Change

- The media link test now checks both buttons: each keeps
`aria-label={label}`, the labelled link keeps `cn("min-w-0 truncate",
labelClassName)` and `arrowClassName`, and the icon button's `iconArrow`
label truncates and stays `hidden` until `@[50rem]`, with
`SiblingMediaPageLink` setting `iconArrow={true}`.
- The Images header test asserts the two header links it now renders, in
place of the removed props.

## Verification (local)

- `tests/studio/test_desktop_reliability_frontend_contract.py`: main 2
failed, 41 passed; this branch 43 passed.
- Sabotage, each fails one of the two tests: making the sibling label
always visible, dropping the icon button's `aria-label`, dropping
`min-w-0` from the labelled link, dropping `iconArrow={true}` from
`SiblingMediaPageLink`, and removing `<SiblingMediaPageLink to="/video"
/>` from the Images header.

Test-only change; no UI difference.
danielhanchen added a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Oct 30, 2026
…othai#15798)

The sibling Video/Images shortcuts added in unslothai#15520 could be cut off when
the window narrowed. Since then, unslothai#15919 added `MediaHeaderActions`,
which hides the API, Library and sibling links when they cannot fit
beside Create / Train. One defect remained on main: the header column's
minimum is a fixed `13rem`, which ignores the UI scale and the native
window-control inset, so at a raised UI scale the Create / Train pill
itself is clipped at the window edge (Train cut off at 1100px / 140%,
1280px / 160% and 1600px / 200%, on both Images and Video).

This PR keeps main's link step-down and fixes the boundary it sits on:

- `--media-header-min-width` (`14rem * --ui-space-scale` plus the header
right inset, falling back to the window-control inset) replaces the
fixed `13rem` minimum for the Images and Video header column and the
settings rail cap, so the pill always has room for its scaled size.
- Below the 50rem split (rail stacked over the preview) that minimum is
capped at half the header row, so the model selector keeps its room at
high UI scale on a narrow page.
- The rail resize handle computes the same cap in px, so drags and arrow
keys start from the width that is actually shown. A present `0px` header
inset wins over the window-control fallback, matching the CSS `var()`.
- The Images / Video Train rail follows the same boundary, so it stays
under the header divider in Train mode.
- The Video rail fallback width is 408px, matching `useMediaRailWidth`.

Audio keeps its existing `13rem` minimum.

Validation:
- A Studio built from main and one built from this branch, measured over
Images and Video, Create and Train, at 16 width / UI-scale combinations
(480px to 1600px, 100% to 200%), in Chromium, WebKit and Firefox
(identical counts in all three): header controls clipped by an overflow
ancestor or the viewport went from 42 of 64 cells to 12, and every
remaining cell shows at least as much of the control as main (all are
stacked layouts at or below 640px with 150% to 200% scale); no
overlapping controls on either side, including the model selector at
500px / 200%; links hidden by `MediaHeaderActions` unchanged (same cells
as main).
- Without the Train rail change, Train mode left the rail up to 224px
off the header divider at high UI scale; with it, 0px in all 16 Train
cells.
- `npm run typecheck` passes; targeted header, rail-cap and UI-spacing
tests pass (38/38); the frontend contract tests in
`tests/studio/test_desktop_reliability_frontend_contract.py` now pin the
scaled minimum for Images and Video (45/45).

Before (main) and after, 1280px wide at 160% UI scale:

![Images header at 1280px and 160% UI scale: Train tab clipped on main,
fully visible
after](https://raw.githubusercontent.com/danielhanchen/unsloth-staging-2/pr-media/pr/15798/pr15798_pair_00_q-ec2ff6064508.png)

![Video header at 1280px and 160% UI scale: Train tab clipped on main,
fully visible
after](https://raw.githubusercontent.com/danielhanchen/unsloth-staging-2/pr-media/pr/15798/pr15798_pair_01_q-124239603b05.png)

---------

Co-authored-by: Daniel Han <[email protected]>
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