Skip to content

fix(web): Esc in provider model filter clears it without closing Settings - #42076

Merged
juliusmarminge merged 2 commits into
pingdotgg:mainfrom
only21mil:fix/web-provider-models-filter-escape-clear
Nov 24, 2026
Merged

juliusmarminge merged 2 commits into
pingdotgg:mainfrom
only21mil:fix/web-provider-models-filter-escape-clear

Conversation

@only21mil

Copy link
Copy Markdown
Contributor

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
gpt-6 typed in Filter models gpt-6 typed in Filter models
One Esc closed all of Settings One Esc cleared the filter and Settings stayed open
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
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.

Generated with Claude Opus 5.5 in T3 Code Nightly

@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Nov 24, 2026
@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration

Commits

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.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: juliusmarminge, stienswout, maria-rcks

Merge Risk: Minimal · previous review ed136

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: Passed 4

Check name Status Explanation
Title check Passed 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 Passed 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 Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed 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
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 38634aa and ed136d5.

Files selected for processing: 2

  • apps/web/src/components/settings/ProviderModelsSection.browser.test.tsx
  • apps/web/src/components/settings/ProviderModelsSection.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Nov 24, 2026
@juliusmarminge

Copy link
Copy Markdown
Member

Evidence

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.

Before After
Commit 47329274bc 72c2ded8f4
Populated filter Before: gpt-6 filter After: gpt-6 filter
First Escape Before: Settings closes After: filter clears and retains focus
Repeated Escape First Escape already closes Settings After: Settings stays open
Composition Escape First Escape already closes Settings After: filter unchanged
Fresh Escape on empty — After: Settings closes
Recording Before interaction After interaction

Scenario script

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.

@juliusmarminge juliusmarminge added takeover:ready Takeover done; auto-lands when gates pass and removed takeover:in-progress A takeover lead is working on this PR labels Nov 24, 2026
@juliusmarminge
juliusmarminge merged commit 26f4c75 into pingdotgg:main Nov 24, 2026
56 checks passed
@juliusmarminge juliusmarminge removed the takeover:ready Takeover done; auto-lands when gates pass label Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants