Repository navigation
Fix Images and Video header controls clipping in narrow windows - #15798
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. |
## Summary `studiobench-ui-parity` fails its `Merge base vs itself, the null` control on unrelated PRs (#15798 and #15799, both runs around 15:00): one of the four cells times out and the control refuses to print a verdict over the remaining pairs. ``` cell FAILED: TimeoutError: ElementHandle.click: Timeout 8000ms exceeded. 15 x waiting for element to be visible, enabled and stable - <div class="mt-4 flex shrink-0 flex-wrap items-center justify-end gap-x-1 gap-y-2">...</div> from <div data-testid="overlay-rail" ...> subtree intercepts pointer events 1 of 4 planned cells left no usable reading ``` The element in the way is the button row of the llama.cpp update card (`components/llama-update-banner.tsx`), which floats in the bottom-right `overlay-rail` over the composer. It appears when the backend sees a newer llama.cpp prebuilt than the runner installed, so whether a cell gets it depends on release timing, not on the build under test. Neither side of a null control is wrong here; the run just has an out-of-band card in it. ## Change `studiobench/runtime/lifecycle.seed_init_script` now also writes `unsloth_<channel>_notification_frequency = "off"` for every notification channel (`llama`, `whisper`, `audio`, `unsloth`). With every channel muted, `updateBannerAllowed` finds no audible component and the card never renders; the update check itself still runs. Callers can still override any key through `extra_local_storage`. `runtime/selftest/test_studiobench_quiet_notifications.py` keeps this honest against the frontend: the muted channels must equal `NOTIFICATION_CHANNELS`, the key must match `frequencyKey` in `use-notification-frequency.ts`, `"off"` must still be a `NOTIFICATION_FREQUENCIES` value, and the seed script must write them. ## Testing - `tests/studio/studiobench`: 1509 passed, 145 skipped (the new selftest included). - Sabotage, one at a time: dropping the mute from the seed payload, dropping the `unsloth` channel, and renaming the frontend key to `unsloth_${channel}_notify_frequency` each fail exactly one of the three new tests. - Not reproduced end to end here: forcing a pending llama.cpp update on a local Studio needs a newer prebuilt than the one installed. The mute path itself is the frontend's own (`updateBannerAllowed` requires an audible, unmuted component), covered by `notification-frequency*.test.ts` and `llama-job-lifecycle.test.ts`.
|
The first three pin the old header / rail widths, so if the new The other four failures in that job ( |
…rowth (#15822) ## Summary `Frontend build + bundle sanity` fails on main (seen on #15806, #15799, #15798, #15795; reproduces locally on `556b28bb40`): ``` eager startup JS: 5837.8 KB raw, 1806.0 KB transfer, 85 chunks over the startup budget: transfer 1806.0 KB > 1795.7 KB, raw 5837.8 KB > 5819.8 KB ``` Building every frontend commit since the last budget base (`8222149ee`) and measuring the eager set the same way `scripts/check-bundle-budget.ts` does: | commit | raw B | transfer B | |---|---|---| | `ed9857c0c3` (#15718) | 5,942,150 | 1,836,750 | | `39b8a6ce13` (#15678, Trick or treat row) | 5,972,134 | 1,847,702 | | `556b28bb40` (main) | 5,977,895 | 1,849,311 | Every other step in the range moves by 0.0 to 0.5 KB. #15678 added 29,984 B raw / 10,952 B transfer in one step and merged without re-measuring. #15485 then raised the budget by its own 1,953 B, but measured against `8222149ee`, a base from before #15678, so main has been over ever since. ## Change `BUDGET` in `studio/frontend/scripts/check-bundle-budget.ts` is raised by #15678's measured growth (+29,984 B raw, +10,952 B transfer), with the measurement recorded next to the earlier raises. Main is then within budget with 0.5 KB transfer / 11.3 KB raw to spare, so the next unmeasured growth still fails here. I tried the gate's first suggestion before raising it. Loading the Trick or treat dialog on first open (`React.lazy` in `app-sidebar.tsx`) saves only 10.4 KB raw / 3.0 KB transfer, and it raises the startup set from 85 to 90 chunks: the case the script warns about, where a dynamic import splits shared modules into extra startup chunks. The rest of #15678's weight is its Halloween color themes in `features/settings/lib/color-themes.ts`, which the theme store reads at startup to apply the saved theme. So that is not a laziness fix, and I left it out. ## Testing - `npm run build && npm run bundle:check`: over on main, `within budget (0.5 KB transfer, 11.3 KB raw to spare)` with this change. - `tests/bundle-budget-cli.test.ts`, `tests/bundle-budget-closure.test.ts`: 43 passed. - Measurements on Node 24.22.1, one machine and build, as the earlier entries.
## Summary UI jobs fail on unrelated PRs when a llama.cpp, whisper.cpp or audio.cpp release is published mid-run. The prebuilt the job just installed becomes one behind, and Studio shows its update card in the bottom-right overlay rail, over the controls the scripts click: - **Windows UI lane** (the `Chat UI Tests` staging run for #15796, on current main `56278f5f65`): `FAIL in step "turn 3: 'Reply with exactly: world'"`, `Locator.click` on `button[aria-label="Send message"]` times out because the card's button row (`components/llama-update-banner.tsx`) intercepts the click. - **UI parity null control** (`Merge base vs itself, the null` on #15798 / #15799): one cell times out the same way. `UNSLOTH_DISABLE_UPDATE_CHECK=1` already keeps the card down: with it set, `get_update_status` never reports an update (`utils/update_status.update_checks_disabled`), and `test_studiobench_ci_update_checks_off.py` already requires it, but only for two named workflows (`studiobench-ci.yml`, `studio-ui-smoke.yml`). The Windows and Mac UI smokes, the parity arms, inline images, composer compatibility and the frontend browser jobs never set it. #15805 muted the notifications in studiobench's browser seed; this covers every browser lane at the backend, including the Playwright scripts that seed nothing. ## Change - `UNSLOTH_DISABLE_UPDATE_CHECK: '1'` at job level in every job that installs Playwright's browsers or runs studiobench: `studio-windows-ui-smoke` / `studio-mac-ui-smoke` `ui-smoke`, `studio-ui-smoke` `ui-indicator`, `studiobench-ui-parity` `arms` / `verdict`, `studiobench-ci` `selftests`, `studio-inline-images` `images`, `studio-composer-compatibility` `composer`, `studio-frontend-ci` `build` / `windows`. Jobs without a real Studio backend are unaffected by it. - `tests/studio/test_studiobench_ci_update_checks_off.py` now discovers those jobs across all workflows (installs Playwright browsers, runs studiobench, or boots Studio for Playwright) instead of checking two named files, so a new UI lane cannot ship without the switch. A `KNOWN` set of five lanes fails the guard if discovery stops recognising them. The step-level override check and the backend-name check are unchanged. No update-flow lane is touched: `studio-update-smoke` / `studio-windows-update-smoke` do not drive a browser, and `playwright_update_banner_layout.py` (Mac UI smoke) stubs `/api/llama/update-status` and `/api/studio/update-status` with `context.route`, so it does not depend on the backend's check. ## Testing - The guard: 14 passed with this change; against main's workflows it fails for all 10 uncovered jobs, the Windows UI lane and parity arms included. - All 124 test files that read `.github/workflows`: main and this branch fail the same single test (`test_cached_paths_hold_no_credentials.py::test_model_cache_variables_are_not_treated_as_credential_homes`, pre-existing on this host); 6058 passed on main, 6069 here (the new parametrized cases).
Keep main's MediaHeaderActions step-down for the header links; carry over the UI-scaled header minimum that the header column, settings rail, Train rail and resize handle share. [skip ci]
[skip ci]
|
Review record for #15798, carried over from the mirror it was reviewed on: danielhanchen/unsloth-staging-review#646. The mirror's single commit is a squashed replay of this PR's change (same 8 files, same lines); every fix below was committed here, so nothing was replayed back. Round 1: reviewed mirror
|
The sibling Video/Images shortcuts added in #15520 could be cut off when the window narrowed. Since then, #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 fixed13rem, 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-scaleplus the header right inset, falling back to the window-control inset) replaces the fixed13remminimum for the Images and Video header column and the settings rail cap, so the pill always has room for its scaled size.0pxheader inset wins over the window-control fallback, matching the CSSvar().useMediaRailWidth.Audio keeps its existing
13remminimum.Validation:
MediaHeaderActionsunchanged (same cells as main).npm run typecheckpasses; targeted header, rail-cap and UI-spacing tests pass (38/38); the frontend contract tests intests/studio/test_desktop_reliability_frontend_contract.pynow pin the scaled minimum for Images and Video (45/45).Before (main) and after, 1280px wide at 160% UI scale: