Repository navigation
Studio: keep Images, Video and Hub search typing responsive - #15306
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. |
|
@codex review |
|
@codex security review |
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 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". |
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
The guard keeps the list of browser drivers that run under the one-retry wrapper in |
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. 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". |
|
Thank you for the quick fix! I must wonder though, how come nobody has reported this before? No one ever edits their image editing instruction as they see the preview? Or as a new idea comes up? I was going to request as a feature queuing edits, but I'm afraid there'll be no audience 😅 |
…ugh its aliases (#15319) ## Problem `Repo tests (CPU, studio)` is red on main since #15233, so every PR based on it fails the same check (for example #15306 and #15307): ``` tests/studio/test_model_picker_contracts.py::test_a_multi_quant_parent_row_still_has_no_gear E AssertionError: the multi-quant parent row lost the spacer that stands in for a gear ``` #15233 replaced the empty gutter spacer on an On Device multi-quant parent row with a chevron in the same column, wrapped in `ROW_ACTIONS_PINNED_CLASS`, which is `cn(ROW_ACTIONS_CLASS, "opacity-100")`. The guard only accepted the literal name `ROW_ACTIONS_CLASS`, so it read the renamed reference as a missing gutter. Bisected locally: the test passes at 61cfbaa and fails from 2563513 (#15233) onwards. ## Product or test The product is fine. What the guard protects is that the parent row has no gear, because `playwright_model_config.py` finds gears by their accessible name (`Inference settings for ...`) and reads "no gear" as "this row expands". The new chevron is an `aria-hidden` button with no label, so the driver still sees no gear. The test was too literal. ## Fix - The gutter is matched through `ROW_ACTIONS_CLASS` and every constant whose definition is built from it, read from `pickers.tsx` itself, so a future alias does not reopen this. A new test checks that reader (it finds at least one alias on main, and ignores a `ROW_ACTIONS_*` constant that does not build on the gutter class). - The check now reads the expandable branch of the parent row. Before, the partial-repo branch's row-menu gutter also satisfied it, so removing the gutter from the branch that expands still passed. - New: that branch must not contain an `aria-label`, since a labelled control there is what would break the driver's inference. ## Verification - `tests/studio/test_model_picker_contracts.py`: 202 passed on main's source (1 failed before this change). - Sabotage, each run against main's `pickers.tsx` with one edit: - gutter class removed from the expandable branch: fails (passed with the old guard) - `<ModelLoadSettingsAction />` added to that gutter: fails - the chevron button given `aria-label="Inference settings for x"`: fails - The guard also passes against the pre-#15233 `pickers.tsx` (61cfbaa).
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? 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". |
|
@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". |
Fixes #15221
On the Linux desktop app, typing in the Images prompt / Instruction box echoed at a few characters per second, and scrolling the Edit pane lagged, whether or not a generation was running. Chat and the browser build were fine.
Cause
The Linux desktop app renders through WebKitGTK, which repaints the whole view for every keystroke or scroll step. Two things made each of those repaints expensive on the Images page:
shadow-sm, a blurred box shadow. In WebKitGTK that blur over a ~780 px image costs about 150 ms per repaint. Removing only that shadow took typing from 5.5 to about 23 chars/s; disabling backdrop blur, animations,field-sizingor the checkerboard background did not move it.Changes
index.css:html.tauri.render-linux .media-stage-shadow { box-shadow: none; }. The full-size image and live preview on Images, and the clip and live preview on Video, carrymedia-stage-shadow. Only the Linux desktop app matches, so macOS, Windows and every browser keep the shadow exactly as today.DeferredTextarea: the Images and Video prompt boxes echo keystrokes themselves and hand them to the page in astartTransition, so a slow page render yields to the next key instead of sitting in front of it. Values the page sets itself (recall, Enhance caption, transparency button, embedding triggers, workflow switch) still replace the box's text, and leaving the box commits any pending text, so a Generate click right after typing reads the full prompt.smoke-deferred-prompt.html+tests/studio/playwright_composer_deferred_prompt.py(wired into the Composer compatibility matrix): a deliberately slow owner; asserts every key lands, the owner never renders inside a keystroke's input event, Generate right after typing gets the full text, and owner-set values replace the draft.tests/media-stage-shadow.test.tspins the CSS scope and the class on every shadowed full-size media element;tests/hub-search-keeps-auto-preview.test.tspins the Hub guard.No UI or flow changes: same controls, same behaviour, same look everywhere except the faint shadow under the big image in the Linux desktop app.
Results
WebKitGTK 2.50.4 (the engine the Linux desktop app embeds), real GDK key events at 30 keys/s (an autorepeat rate),
tauri+render-linuxclasses as in the app, Edit page with a 1328 px image selected, 40 characters per run, 3 runs each:Frame interval p90 while typing went from 126 to 154 ms to 18 to 33 ms.
Chromium (Playwright, same page), per-key time to the next frame, median: 33 ms to 23 ms unthrottled, 139 ms to 84 ms with 6x CPU throttling. Every run typed the exact text.
Also checked on gfx1151 (Strix Halo, the reporter's hardware) CI machines with real Z-Image-Turbo generations: GPU-composited Chromium on Linux and Edge on Windows kept up at about 60 chars/s, so the GPU work itself does not starve the window; the slowdown is specific to WebKitGTK painting this page.
Video prompt (same pattern, the page re-rendered on every keystroke), loaded model mocked:
Model Hub search, split view (Chromium, typing
qwen, 3 runs each):With a model opened by the user, typing still closes it on the first key as before (navigations 8 to 2, same end URL).
Other surfaces checked the same way in WebKitGTK and already responsive (28 to 29 chars/s, like Chat): every Audio workflow with a text box (Text to Speech, Clone, Edit, Music), the Data Recipe editor, and the Library, Projects, Scheduled tasks, Export and API monitor search boxes.
Tests
npm test(13957 pass),npm run typecheck,tsc -p tsconfig.app.jsontests/studio/playwright_composer_deferred_prompt.pypasses on Chromium, Firefox and WebKit; with a plain controlled textarea in its place it fails withthe owner rendered inside 37 of 37 keystrokestests/studio/test_playwright_suites_run_in_ci.pyScreenshots
Edit page in WebKitGTK 2.50.4 with the desktop app's
tauriandrender-linuxclasses, image selected and text typed. The layout is the same on both sides; only the faint shadow under the large image is gone, and that shadow was what made every keystroke repaint slow (typing went from about 6 to about 29 chars/s at a 30 keys/s autorepeat).