Repository navigation
Studio UI: trim comments from the recent picker, context and settings PRs - #17900
Merged
Merged
Conversation
danielhanchen
added a commit
that referenced
this pull request
Nov 16, 2026
…ed Context field (#17902) ## Summary Two intended Studio UI changes merged without their Playwright drivers and contract tests being updated, so these gates are red on main and on every PR: 1. **#17839 collapses the model picker on load.** With a model loaded, opening the picker shows only that model's row (aria-label `<model>: show all models`); the source tabs, the search field and the rows render only after that row is clicked. - `Chat UI` / `Chat UI, API, Update and GGUF inference` (`playwright_chat_ui.py`): `model picker search input not found` (seen on #17839, #17900 and the staging run of #17899). - On the Windows lane the chat driver instead found an attached but hidden `Search ... models` field and timed out after 60 s in `Locator.fill` (staging run of #17899). - Model config gate (`playwright_model_config.py`): `picker shows no rows at all, so the hidden-model check below proves nothing`, then `could not open run-settings`. 2. **#17840 renames the run settings "Context Length" field to "Context".** - `Repo tests (CPU, studio)`: `test_model_picker_contracts.py::test_an_mlx_target_is_offered_a_context_length_not_a_sequence_length` and `::test_run_settings_page_keeps_its_identifying_controls` still assert the old label. - Model config gate: `Context Length input has no numeric default`. `playwright_memory_estimate.py` finds the field the same way. Both product changes are deliberate, so the fix is on the test side. No product code changes. ## Change - `tests/studio/_playwright_robust.py`: new `expand_collapsed_model_picker(scope)` waits for either the expanded picker (the `Model sources` tablist) or the collapsed row, and clicks the row only when the picker opened collapsed. It is a no-op on an already expanded picker, and it only counts controls that are on screen, so a hidden mounted copy is neither clicked nor taken as proof that the picker expanded. The collapsed row suffix, the tablist selector and the run settings context field name (`RUN_SETTINGS_CONTEXT_LABEL = "Context"`) live here once. - `playwright_chat_ui.py`: the search step expands the picker before waiting for the search field, and waits for a visible one. The rest of the step (two queries must show different picker text) is unchanged. - `playwright_model_config.py`, `playwright_memory_estimate.py`: `open_picker()` expands after clicking the trigger; `context_input()` looks the field up by `RUN_SETTINGS_CONTEXT_LABEL` with an exact match, since `Context` is a prefix of other run settings names. - `test_model_picker_contracts.py`: the two run settings assertions read `Context`. - New `tests/studio/test_chat_ui_picker_collapsed_row.py` (CPU) pins the coupling between the drivers and the frontend: - the collapsed row suffix and the `Model sources` tablist are still what `composer-model-picker.tsx` renders, - a settled load still collapses the picker (so the expand click is not dead code), - all three drivers use the helper, the chat search step expands before it waits, and `open_picker()` expands after the trigger click, - `model-config-page.tsx` still names the context field `RUN_SETTINGS_CONTEXT_LABEL`, and both drivers look it up by that name. ## Testing - New test plus `test_model_picker_contracts.py`: 213 passed. - Sabotage: with the three drivers reverted to main, 4 of the new checks fail; without the on-screen filter in the helper, 1 fails; with the field renamed back to `Context Length`, 2 fail. - Every test that reads these drivers or `_playwright_robust.py` (17 files): 345 passed. `tests/studio/test_*.py` on CPU: the only failures are 5 host-specific tests (AMD DRM detection, credential homes, version compat sweep) that do not touch these files. - The helper against a scripted page in real Chromium (Playwright 1.64): a collapsed picker with hidden copies of the tablist and search is expanded and its visible search filled; an expanded picker and a page with neither are left alone; the old attached-only lookup on the collapsed page times out in `fill()`, as on the Windows lane. - The Chat UI and model config Playwright jobs on this PR exercise the drivers end to end.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Comment-only cleanup for the recently merged Studio UI PRs (#17839, #17840, #17841, #17842, #17846). Restating comments are deleted and multi-line explanations are cut to one line; comments that record an invariant or a non-obvious reason stay (for example, why the sticky run settings row must not be wrapped, and why
modelLoadingalone cannot mark a fresh load).Verification
npm run typecheck,npm run build,npm run i18n:check:strict.npm test: passes except two failures that also fail onmainwithout this change:every settings tab sits in exactly one rail group: thecomputer-usetab added in Studio: computer use for local and connected models #17666 is not in a sidebar group; fixed in Settings: show the Computer use tab in the sidebar #17901.node_modulesoutside the project root).