Skip to content

Fix the model-config Playwright driver for the collapsed single-quant row - #7772

Merged
danielhanchen merged 5 commits into
mainfrom
fix-model-config-driver-sole-quant
Aug 3, 2026
Merged

danielhanchen merged 5 commits into
mainfrom
fix-model-config-driver-sole-quant

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Chat UI Tests has been red on main since #7736, so every PR since has carried a red check that has nothing to do with it.

What broke

#7736 made a GGUF repo with a single quant on disk render as one collapsed row (renderSoleQuantGgufRow, pickers.tsx) and flipped CHAT_SHOW_ALL_QUANTIZATIONS_KEY to default false. That row's click handler changed from expanding the group to selecting the model:

onClick={() => onSelect(c.repo_id, selectMeta)}

and selecting closes the picker (model-selector.tsx, handleSelect calls setOpen(false)).

playwright_model_config.py still did click-the-row-then-find-the-gear. By the time it looked, the popover was unmounted, so open_config returned None and three checks failed:

[ui-modelcfg] FAIL: could not open run-settings for a model matching 'gemma-3-270m'
[ui-modelcfg] FAIL: could not reopen run-settings after reload
[ui-modelcfg] FAIL: Reset button not found in run-settings

The third is a cascade of the second, not an independent finding.

It is the driver, not the product

Both controls are still there. The gear is rendered on the collapsed row (ariaLabel={\Inference settings for ${c.repo_id} ${variant.quant}`}) and Reset is still in model-config-page.tsx`. The CI screenshot from the failing run shows the row with its gear visible, and the server log records no request at all during the failing step, which is what you would expect if no expander was ever mounted.

The structural detail that matters: ModelLoadSettingsAction is a sibling of ModelRow inside the row shell, so it is not under [data-model-picker-option] and cannot be found by scoping into the row.

The fix

Split "bring the row into view" from "click the row", locate the gear by the repo id in its aria-label, and click it without touching the row. Repos with several quants still expand first, so that path is unchanged.

Validation

This one cannot be run locally: it needs a live Studio, a GGUF download and Playwright. I am validating it on staging CI, which runs the same Unsloth UI CI workflow, and will report the result on this PR before asking for a merge.

Regression window, for the record: last green on main was run 30743116312 (sha aa4ea7585); first red was 30753984758. Of the commits in between, only #7736 touches the picker, and its own pre-merge run 30748550544 failed with the byte-identical three assertions, so it was merged red.

… row

Chat UI Tests has been red on main since #7736. That PR made a GGUF repo with
one quant on disk render as a single collapsed row, and flipped the show-all-
quantizations default to false, so the row that used to expand on click now
selects the model and closes the picker.

The driver still clicked the row and then looked for the inference-settings
gear inside the popover, which by then was unmounted, so open_config returned
None and three checks failed: run-settings could not be opened, could not be
reopened after a reload, and the Reset button was reported missing. All three
controls are still in the UI; only the way to reach them changed.

The gear is a sibling of the row rather than a descendant, so it is now located
by the repo id in its aria-label and clicked without touching the row. Repos
with several quants still expand first, which keeps that path working.
chatgpt-codex-connector[bot]

This comment was marked as resolved.

@danielhanchen

Copy link
Copy Markdown
Member Author

Validated on staging CI, since this needs a live Studio, a GGUF download and a browser and cannot be run locally.

Unsloth UI CI is green on the same workflow that is red on main, and the step that was failing, "Drive model-picker per-model-config with Playwright", passes:

[ui-modelcfg] STEP context length 4096 persists
[ui-modelcfg] OK persist(localStorage): customContextLength=4096 stored
[ui-modelcfg] OK persist(request): /api/inference/load max_seq_length=4096
[ui-modelcfg] OK persist(reload): Context Length still 4096 after reload
[ui-modelcfg] STEP reset clears the per-model override
[ui-modelcfg] OK reset: distinctive context cleared from unsloth_model_configs
[ui-modelcfg] STEP advanced (KV cache dtype / tensor parallel) persists
[ui-modelcfg] OK advanced: tensorParallel/kvCacheDtype persisted
[ui-modelcfg] RESULT: PASS

All three checks that fail on main are covered there: run-settings opens, it reopens after a reload, and Reset is found. Mac Studio UI CI is green on the same head.

The workflow had to be enabled on the staging repo first; it was disabled there, which is why the first staged run did not exercise it.

The collapsed single-quant row is painted only after an /api/hub/gguf-variants
fetch that restarts on every reload, and while it is pending the row renders no
gear at all. An absent gear therefore means either a multi-quant repo or a probe
still in flight, and the driver separated the two with fixed sleeps.

If the probe landed during the 700 ms wait before the fallback click, the click
hit the row just as it collapsed, which selects the model and closes the picker:
the failure this branch fixes, reintroduced by timing. The gear is now waited
for rather than counted once, and if the click does close the picker it is
reopened and the gear taken from there.

The multi-quant path is unchanged except that it now waits for the expander's
own async listing rather than a fixed sleep.
chatgpt-codex-connector[bot]

This comment was marked as resolved.

pre-commit-ci Bot and others added 2 commits August 3, 2026 07:59
The row is found with has_text, which Playwright matches case-insensitively,
while the gear used a CSS attribute selector, which does not. A STUDIO_MODEL_HINT
whose casing differed from the repo id would find the row and never its gear, so
both lookups now go through the same case-insensitive match.

The settle cap was an arbitrary six seconds. There is no DOM condition to wait on
instead, since a pending probe and a real multi-quant repo render through the
same branch and the pending flag never reaches the DOM, so the cap is now the 30s
this driver already allows elsewhere. Only a multi-quant repo waits it out.
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Aug 3, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Aug 3, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Aug 3, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

Re-validated on staging after the case-insensitive gear match and the widened settle budget. Unsloth UI CI, Mac Studio UI CI and Core are all green on this head, and the step that is red on main reports RESULT: PASS.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 9d70a95725

ℹ️ 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".

@danielhanchen
danielhanchen merged commit a6160c7 into main Aug 3, 2026
20 of 21 checks passed
@danielhanchen
danielhanchen deleted the fix-model-config-driver-sole-quant branch August 3, 2026 09:42
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