Repository navigation
Studio: show the exact call arguments in expanded web search cards - #17927
Conversation
Codex Review Summary: ✅ CompletedThis 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 Summary: ❌ FailedThis 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 |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. 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". |
…d model (Windows race) (#17944) ## 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 (#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.
Fixes #17918
Problem
When a web search tool card is expanded, Studio only shows the parsed query (or URL) in the header and the returned links. The exact arguments the model sent are never shown. For a normal call that is fine, but when a call is malformed or cut off (for example llama-server dies with a Vulkan device lost error mid call), the card is blank and there is no way to see what the model actually asked for. The arguments are already saved with the chat message (
argsTexton the tool-call part), they were just not rendered by this card. The generic tool card already showsargsText; the dedicated web search card did not.Change
The expanded, finished web search card now ends with a small
Argumentsdisclosure, closed by default, that shows the call'sargsTextas inert monospace text (bidi controls escaped, same treatment as the URL pane above it). Nothing else in the card moves:ArgumentslineNo backend, persistence or API change: the text comes from the tool-call part the frontend already stores and replays.
Tests
tests/web-search-args-disclosure.test.ts(new): the finished branch of the card renders a<details data-slot="tool-web-search-args">withescapeBidiControls(argsText), and the card readsargsTextfrom its props. Both fail on main, pass here.web-fetch-parked-url,web-search-action-variants,tool-card-arg-coercion) pass.npm run typecheck,eslintandprettier --checkon the changed files are clean.Before / after
A chat seeded with two finished
web_searchcalls: a normal one, and an empty one ({}with no result, the shape a call cut off mid stream leaves). Both cards expanded,Argumentsopened on the after side. Before: the empty card shows nothing. After: each card shows the exact call text.Also checked on the after build in Firefox and WebKit: the disclosure is closed by default, opens on click, and shows the same text.