Repository navigation
fix(web): Esc in the text generator model search clears it without closing the dialog - #42130
Conversation
|
This PR changes the test suite by +1 test cases (browser +1, unit 0, server 0). New browser test files: Keep tests that would fail for a real reason, and test logic below the UI where it can be. See Testing. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
…rs-model-search-escape
…tings searches Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
EvidenceReal web app, light theme, 1280×800, fresh isolated state on both commits. Add a Custom text generator backed by a local 12-model listing; open Show models, search
On head, a subsequent Escape on the empty search closes the dialog. The scenario runner failed on base and passed on head. Not shown:
|


Pressing Esc in the Search models box of a text generator's models dialog closed the whole dialog, so you lost your place instead of clearing what you typed. Holding Esc, or pressing it while an IME was composing, did the same.
The search box now works like the other Settings searches (#41856, #41764, #42076): the first Esc clears a non-empty search and keeps focus there, a second Esc on the empty box closes the dialog, held-Esc repeats can't close it, and Esc during IME composition is left to the IME. The input is
type="text"withrole="searchbox"andenterKeyHint="search", because a native search input clears itself on Escape even during composition.Setup
Web on Linux (Chrome), dev build with no seeded data. A custom OpenAI-compatible text generator pointed at a local stub that lists 12 models, so the dialog shows its search box. Settings → Providers → Text generators → ⋮ → Show models.
Steps
miniin Search models.miniPressing Esc again with the search empty closes the models dialog and leaves Settings open.
Tests
TextGeneratorsSettings.browser.test.tsxcovers IME Esc, the first Esc clearing, a held-Esc repeat, and the second Esc closing. It fails on main (the dialog closes on the first Esc) and passes here.vp run check:changedpasses.An AI agent ran each of these checks. Mobile is not affected: it has no text generator models dialog. Desktop renders this same web component.
Generated with Claude Opus 5.5 in T3 Code Nightly