Repository navigation
remove the unused images train dialog and fix media page responsiveness - #8215
Conversation
diffusion-train-dialog.tsx has been dead since unslothai#6822 replaced it with train/diffusion-train-panel.tsx. Nothing imports it, DiffusionTrainDialog is its only export, and unslothai#8016 spent responsiveness edits on it while it was already unreachable. DatasetLabelingGrid capped its height at 420px with default auto rows, so once the tiles passed the cap Chrome divided the definite height between them instead of scrolling. Each tile is overflow-hidden, so its automatic minimum size is zero and the aspect-square thumbnail collapsed: measured tile 26px, thumbnail 170x0. auto-rows-min restores tile 404px, thumbnail 170x170 and a scrolling grid. The Images header positioned the Create | Train switch absolutely over a justify-between row, so at a 390px header it painted 124px over the model selector and 44px over the Video link. It is now a three column grid with equal side tracks, and the pill padding keys off the header width rather than the viewport, since the header is the viewport minus a resizable sidebar. The train run pane sized its stat grids and charts on viewport breakpoints while its own width is whatever is left beside the 416px form column, which put four stat cells needing 396px into a 266px pane. The pane is a container now and both break on its width. The Video header's left group had no min-w-0, so a long resident model name pushed the Images link 51px off a 390px viewport. test_desktop_reliability_frontend_contract.py matched the header band on an order coupled class literal. The marker is the band size now and the group pattern allows utilities between the tokens; every assertion is intact and was mutation tested against four violations it must catch.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 996b216dec
ℹ️ 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".
md: is a viewport query, but the header is the viewport minus a sidebar that is resizable to 480px. At a 420px header the chips kept their intrinsic width and squeezed the model name to zero. They now key off the header's own width, so the name stays 230px readable below 720px and the chips return above it.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a1678f673c
ℹ️ 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".
The link button was shrink-0, so below a roughly 370px header its equal side track underflowed the 90px control and the link overflowed left across the Train tab. It now shrinks and truncates its label the way the model selector already does, keeping the icon, the arrow and the tooltip. Measured at header widths 300 through 1000: link-left minus pill-right is -8 everywhere, previously +25 at 300.
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. Another round soon, 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". |
|
Reviewed this and pushed one fix in f2d39d0. Everything else checks out. What I verified
The fixGrid tracks lay out in the content box, and the header keeps I did not move the padding onto the side groups, since the left group is No overlap and no overflow at any width after the change, and the pill's own width is untouched. Typecheck, the full frontend suite, the contract test and the build all still pass. |
|
One more thing, and it is not from my commit: this branch now conflicts with main, and the conflict is a design overlap rather than a mechanical one.
Both conflicted hunks are between that work and this branch:
Worth rebasing on main and deciding which layout wins before this goes further. The part of this branch that main does not have is the container query, and that is the part that actually matters: One thing to check while rebasing: main's container carries The train pane, labeling grid, video header and dead dialog parts of this branch merged clean and are unaffected. |
# Conflicts: # studio/frontend/src/features/images/images-page.tsx # tests/studio/test_desktop_reliability_frontend_contract.py
|
Merged main into this branch in 3a6ada2 and resolved the two conflicts. Both were with How I resolved itI kept main's DOM and dropped its breakpoint gating. Kept from main:
Taken from this branch:
New in the resolution: the grid itself carries no horizontal padding at all. The insets moved onto the side tracks, so the equal MeasuredSame headless Chromium harness, production stylesheet, long resident model name. The Test changes
Typecheck, 1434/1434 frontend tests, |
|
@codex review |
|
Codex Review: Didn't find any major issues. Bravo. 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". |
Remove the unused Images train dialog
studio/frontend/src/features/images/diffusion-train-dialog.tsxhas been dead since #6822, which replaced it withtrain/diffusion-train-panel.tsxin a single hunk:Nothing has referenced it since.
DiffusionTrainDialogis its only export, the feature barrel exportsImagesPagealone, and no dynamic import, lazy route, registry entry or test names it. It carried a second copy of the dataset accept list, and #8016 spent responsiveness edits on it while it was already unreachable.Caption tiles collapse once a dataset holds more than a few images
DatasetLabelingGridrendersgrid max-h-[420px] grid-cols-2 overflow-y-autowith the defaultgrid-auto-rows: auto. Once the tiles exceed the 420px cap the container height becomes definite, so Chrome divides it across the twelve auto rows instead of letting the grid scroll. Each tile isoverflow-hidden, which gives it an automatic minimum size of zero, so itsaspect-squarethumbnail shrinks to nothing and the caption box below is clipped mid-line.Measured in Chromium at 24 images: tile 26px, thumbnail 170x0,
scrollHeightequal toclientHeight. Withauto-rows-minthe rows take their content height: tile 404px, thumbnail 170x170,scrollHeight3552 against a 420px viewport, so the grid scrolls as intended. The fix holds for a caption long enough to wrap nine lines.The Create | Train switch painted over the model selector
The Images header laid out three items with
justify-betweenand then positioned the mode switch absolutely on top withabsolute inset-x-0 flex justify-center, so the pill overlapped whatever the side controls needed. At a 390px header the model selector lost 124px to it and the Video link 44px, leaving "Sel" and a Video button painted under the pill.The header is now
grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)]. Equal side tracks keep the pill centred on the page, and each side truncates inside its own column instead of colliding. Measured header widths 320 through 1280: no overlap anywhere and no horizontal page overflow.The pill's
px-11padding also keyed offsm:, a viewport query, while the header's width is the viewport minus the sidebar, which is user-resizable between 260px and 480px. At a 900px window with a wide sidebar the header can be 420px whilesm:still applies the 277px pill. Its padding now keys off the header's own width with@container, so the pair is 149px below a 560px header and 277px above.Stat cells and charts broke on the viewport, not on their pane
The train run pane is whatever is left beside the 416px form column, but its stat grids used
sm:grid-cols-4andDiffusionChartsusedlg:grid-cols-2. At a 768px viewport that put four stat cells into a ~266px pane. The widest cell needs 90px, so four plus gaps need 396px, and every label clipped.The pane is now an
@containerand both break on its width:@min-[440px]for the stats,@min-[720px]for the charts. The nested@containerintrainingSettingsstill resolves against itself. Measured at viewports 390 through 1600: two stat columns at a 442px pane, four at 566px, zero clipped cells at any width, charts splitting at 822px.Video header pushed the Images link off screen
The Video header's left group held the model selector and the status chips with no
min-w-0, so a long resident model name could not shrink. At a 390px viewport withWan2.2-TI2V-5B-Diffusers-GGUF-Q8_0loaded, the Images link sat at x=441 against a 390px viewport and the page gained 51px of horizontal overflow. The left group takesmin-w-0and the right takesshrink-0, which puts the link back on screen with the model name truncating.Test contract
tests/studio/test_desktop_reliability_frontend_contract.pypartitioned on the literalh-[48px] shrink-0 items-start justify-between, and matched interactive groups withflex items-center gap-. Both are order coupled, and the Images header is a grid now withmin-w-0between those tokens, so the test failed on both pages.The marker is now the band size alone and the group pattern allows utilities between the tokens. Every assertion it made is intact, and it was mutation tested against four violations it must catch: dropping
z-40from the band, droppingpointer-events-autofrom a group, resizing the band, and collapsing to one interactive group. All four still fail the test.Verification
Manually verified in the running web UI. Layout numbers above were measured in headless Chromium against the shipped class strings.
Typecheck, 1310/1310 frontend tests, production build, i18n parity and the media header contract test all pass. No Python source changed. No GPU work is involved, so no training or CUDA checks were run.