GeezerVison is showing github.com — fix(web): Esc in the text generator model search clears it without closing the dialog by only21mil · Pull Request #42130 · pingdotgg/t3code
Conversation
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" with role="searchbox" and enterKeyHint="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
- Type
mini in Search models.
- Press Esc.
|
Before |
After |
Typed mini |
 |
 |
| After one Esc |
 |
 |
Pressing Esc again with the search empty closes the models dialog and leaves Settings open.
Tests
- New
TextGeneratorsSettings.browser.test.tsx covers 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:changed passes.
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
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
This PR changes the test suite by +1 test cases (browser +1, unit 0, server 0).
New browser test files: apps/web/src/components/settings/TextGeneratorsSettings.browser.test.tsx.
Each browser test file costs CI seconds of module loading before its first test runs; a unit test costs milliseconds.
Keep tests that would fail for a real reason, and test logic below the UI where it can be. See Testing.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Nov 24, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review.
Walkthrough
-
The model search field now uses searchbox semantics and handles Escape based on IME composition, query content, and key repeat. A browser test checks search clearing, focus retention, and dialog closure.
Changes: Model Search Escape Handling
| Layer / File(s) |
Summary |
Handle Escape in model search apps/web/src/components/settings/TextGeneratorsSettings.tsx, apps/web/src/components/settings/TextGeneratorsSettings.browser.test.tsx |
The search field uses a text input with searchbox semantics. Escape during IME composition leaves the query unchanged. Escape clears a non-empty query and stops propagation. Browser tests check focus and dialog behavior, including repeated Escape. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Possibly related PRs
Suggested labels: bugfix
Suggested reviewers: maria-rcks, macroscopeapp
Merge Risk: Minimal · up to 0590d
-
This change makes Escape in the model search field clear the query first and close the dialog on a second press. It is localized to one settings dialog, and no merge-blocking risk was identified.
Pre-merge checks: 3 · 1
-
Failed checks: 1 inconclusive
| Check name |
Status |
Explanation |
Resolution |
| Description check |
 |
The description follows the template. Problem: Esc closed the models dialog while the search box held text, and it also closed during held-Esc and IME composition. Change: the input is now type text w… |
Link the issue that shows this bug, or explain why a small fix of this obvious bug needs no issue. If a maintainer asked for this PR, link that request. Otherwise the remaining sections are complete. |
Passed checks: 3 passed
-
| Check name |
Status |
Explanation |
| Title check |
 |
The title names the main change: Escape in the text generator model search now clears the query without closing the dialog. It uses a conventional commit prefix and plain language, and it matches the … |
| Linked Issues check |
 |
Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check |
 |
Check skipped because no linked issues were found for this pull request. |
Full details: Title check
-
Explanation
The title names the main change: Escape in the text generator model search now clears the query without closing the dialog. It uses a conventional commit prefix and plain language, and it matches the raw summary and objectives.
Full details: Description check
-
Explanation
The description follows the template. Problem: Esc closed the models dialog while the search box held text, and it also closed during held-Esc and IME composition. Change: the input is now type text with role searchbox and enterKeyHint search, and Esc handling is adjusted. Scope: it cites related Settings searches (#41856, #41764, #42076) but does not link an issue showing the bug, and it does not say why no issue is needed. Verification: it lists a new browser test with results, a passing check:changed run, and before/after screenshots. The Scope section is the main gap.
Resolution
Link the issue that shows this bug, or explain why a small fix of this obvious bug needs no issue. If a maintainer asked for this PR, link that request. Otherwise the remaining sections are complete.
Finishing Touches
-
Generate unit tests (beta)
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info
-
Run configuration
-
Commits
-
Reviewing files that changed from the base of the PR and between b5f704d and 0590d35.
Files selected for processing: 1
-
apps/web/src/components/settings/TextGeneratorsSettings.tsx
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Evidence
Real 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 mini, then press Escape.
On head, a subsequent Escape on the empty search closes the dialog. The scenario runner failed on base and passed on head.
Scenario and stand-in server
Not shown:
- Held-Escape repeats were not exercised; the scenario sends discrete Escape presses.
- IME composition Escape was not exercised; no composing input-method session was configured.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
size:S
10-29 changed lines (additions + deletions).
vouch:unvouched
Author is not yet trusted in the VOUCHED list.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|