You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(web): Esc in provider model filter clears it without closing Settings - #42076
In Settings → Providers, a provider with more than 8 models shows a Filter models field above its model list (Codex lists 11). The field had no Escape handling. With a filter typed, Escape closed the whole Settings dialog instead of clearing the filter.
Fix
The same pattern as the other Settings and dialog search fields (#41815, #41856):
Escape with a filter typed clears it and keeps Settings open, with focus still in the field. Escape on an empty field closes Settings as before.
Auto-repeat keydowns from a held Escape are swallowed, so holding Escape clears the filter without also closing Settings.
An Escape that ends an IME composition leaves the filter as it is and Settings open.
Before / after
Setup: Linux, Chromium (T3 Code Browser panel), light theme, 1280×800 viewport, fresh isolated vp run dev --no-seed data.
Steps: Settings → Providers → Codex → type gpt-6 in Filter models → Esc → Esc
Before (f15d908)
After (ed136d5)
gpt-6 typed in Filter models
gpt-6 typed in Filter models
One Esc closed all of Settings
One Esc cleared the filter, all 11 models are back, and Settings stayed open
A second Esc closed Settings
Testing
An AI agent ran each check below.
A new browser test in ProviderModelsSection.browser.test.tsx renders the section inside the real Settings modal with 9 models. An IME Escape (both the isComposing and the Safari keyCode 229 shape) keeps the filter, a real Escape clears it without closing and keeps focus, a held auto-repeat Escape does not close, and a second Escape closes Settings. It fails on main. It also fails with stopPropagation(), the repeat check, the isComposing check, or the keyCode 229 check removed. It passes here, and the whole file passes 7/7 in 3 of 3 runs (--maxWorkers=1).
vp run check:changed passed.
The before/after captures above, in the web app's Browser panel against an isolated dev server, pressing a real Esc key.
Scope
This fixes one field in one component and follows the Escape handling already merged for the other Settings search fields, so it did not need an issue first.
Not shown
Desktop: the desktop app uses the same web Settings component.
Mobile: mobile has its own provider settings screen, which this change does not touch.
Reviewing files that changed from the base of the PR and between ed136d5 and 72c2ded.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
The model filter now clears on normal Escape. It ignores Escape during IME composition and repeated Escape when the filter is empty. A browser test checks filter clearing, focus retention, and Settings dismissal.
Changes: Model filter Escape handling
Layer / File(s)
Summary
Filter Escape behavior and browser validation apps/web/src/components/settings/ProviderModelsSection.tsx, apps/web/src/components/settings/ProviderModelsSection.browser.test.tsx
The filter ignores Escape during IME composition and repeated Escape when empty. Otherwise, it clears the filter and stops Escape propagation. The browser test checks composition handling, filter clearing, focus retention, and Settings dismissal.
Pressing Escape in the provider model filter now clears the text without closing Settings, and a second Escape closes it. The change is small, limited to one web component, and easy to revert, so merge risk is minimal.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title "fix(web): Esc in provider model filter clears it without closing Settings" states the main change. The diff adds Escape handling to the model filter in Settings → Providers so Escape clears…
Description check
The description follows the repository template. It covers the problem (Escape closed Settings while a filter was typed), the change (clear the filter, swallow auto-repeat, ignore IME composition Esca…
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 "fix(web): Esc in provider model filter clears it without closing Settings" states the main change. The diff adds Escape handling to the model filter in Settings → Providers so Escape clears the filter and keeps Settings open. It follows the conventional commit format and matches the changeset, so it passes.
Full details: Description check
Explanation
The description follows the repository template. It covers the problem (Escape closed Settings while a filter was typed), the change (clear the filter, swallow auto-repeat, ignore IME composition Escape), and scope (one field, follows existing Escape handling in #41815 and #41856). Verification gives specific browser test coverage, the test counts, and before/after captures of a real Esc key. The Problem section is not a separate heading, but the content is present. The description also says the author used an AI agent, and it names the model and harness at the end as the template asks. Desktop and mobile impact are noted. Overall it is mostly complete, so it passes.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.
Environment: real web app, headless Chromium, 1280×800, dark theme, fresh isolated databases and identical synthetic project/Replay thread setup. Codex listed 11 models; gpt-6 narrowed the list to seven.
Steps: Open Settings → Providers → Codex, focus Filter models, enter gpt-6, then press Escape. Base closes Settings. Head clears the filter and retains focus with Settings open. On head, repeat:true Escape keeps Settings open; isComposing:true Escape preserves gpt-6 and focus; a normal Escape clears, and a fresh Escape on empty closes Settings.
Proven: scenarios:prove exited 0, failing on base and passing on head.
Repeat and composition checks dispatch browser KeyboardEvents; native OS IME composition and physical held-key timing were not exercised.
Not shown:
Native OS IME composition and physical held-key timing were not exercised; isComposing:true and repeat:true KeyboardEvents were dispatched in the real browser app.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size:XS0-9 changed lines (additions + deletions).vouch:unvouchedAuthor is not yet trusted in the VOUCHED list.
2 participants
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.
In Settings → Providers, a provider with more than 8 models shows a Filter models field above its model list (Codex lists 11). The field had no Escape handling. With a filter typed, Escape closed the whole Settings dialog instead of clearing the filter.
Fix
The same pattern as the other Settings and dialog search fields (#41815, #41856):
Before / after
Setup: Linux, Chromium (T3 Code Browser panel), light theme, 1280×800 viewport, fresh isolated
vp run dev --no-seeddata.Steps: Settings → Providers → Codex → type
gpt-6in Filter models → Esc → Escf15d908)ed136d5)gpt-6typed in Filter modelsgpt-6typed in Filter modelsTesting
An AI agent ran each check below.
ProviderModelsSection.browser.test.tsxrenders the section inside the real Settings modal with 9 models. An IME Escape (both theisComposingand the SafarikeyCode 229shape) keeps the filter, a real Escape clears it without closing and keeps focus, a held auto-repeat Escape does not close, and a second Escape closes Settings. It fails onmain. It also fails withstopPropagation(), therepeatcheck, theisComposingcheck, or thekeyCode 229check removed. It passes here, and the whole file passes 7/7 in 3 of 3 runs (--maxWorkers=1).vp run check:changedpassed.Scope
This fixes one field in one component and follows the Escape handling already merged for the other Settings search fields, so it did not need an issue first.
Not shown
Generated with Claude Opus 5.5 in T3 Code Nightly