Skip to content

Chat UI gate: open the model picker once the selector names the loaded model (Windows race) - #17944

Merged
danielhanchen merged 1 commit into
mainfrom
fix-chat-ui-picker-wait-resident
Nov 16, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
fix-chat-ui-picker-wait-resident

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Summary

The Windows Chat UI Tests lane still fails intermittently at the model picker step after #17902 (seen on the staging run of #17927, whose base includes #17902):

playwright_chat_ui.py, line 1470: search.fill("")
TimeoutError: Locator.fill: Timeout 60000ms exceeded.
  waiting for get_by_placeholder(re.compile(r"Search.*models?", re.IGNORECASE)).visible.first

The job's screenshots show the race:

  • 03c-model-picker-open: the selector still reads Select model and the picker is open and expanded, showing Search on device models and Loading models. After the reload the frontend has not yet learned which model is resident, so the picker opens expanded (isExpanded = expanded || !chosenName) and the driver finds and fills the search.
  • 03d-model-picker-search-qwen: a moment later the residency check lands, the chip reads gemma-3-270m-it-GGUF, and the picker collapses to the loaded model's row (Model picker: collapse on load, logo-only row icons, steadier first open #17839's collapse on load). The search field is gone, so the next fill() waits 60 s for it.

On Linux the residency check usually lands before the click, so the picker opens collapsed and #17902's expand handles it; the slower Windows runner opens it first.

The collapse itself is intended, and a person opening the picker in that first moment after a reload is a narrow case, so this changes the driver, not the product.

Change

  • tests/studio/playwright_chat_ui.py: before opening the picker, wait (up to 30 s, polling the page) until the model selector no longer reads Select model, i.e. the frontend knows the model loaded above. If it never does, the step logs a warning and goes on as before, so the step still reports the real failure.
  • tests/studio/test_chat_ui_picker_collapsed_row.py: the search step must wait for the selector to name the model before it clicks it.

Testing

  • test_chat_ui_picker_collapsed_row.py and every test that reads playwright_chat_ui.py: 78 passed. With the driver reverted to main, the new check fails.
  • The wait against a scripted page in Chromium (Playwright 1.64): a selector that switches from Select model to the model name after 1.5 s settles after 1.6 s; one that never switches times out with a readable message, which the step logs as a warning.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-16T08:44:18.243143Z f8ccd6b Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: f8ccd6b51d

ℹ️ 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 4389873 into main Nov 16, 2026
@danielhanchen
danielhanchen deleted the fix-chat-ui-picker-wait-resident branch November 16, 2026 08:58
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