Skip to content

fix(web): Esc in ACP Registry search clears it without closing Add provider - #42158

Merged
juliusmarminge merged 3 commits into
pingdotgg:mainfrom
only21mil:fix/web-acp-registry-search-escape-clear
Nov 24, 2026
Merged

juliusmarminge merged 3 commits into
pingdotgg:mainfrom
only21mil:fix/web-acp-registry-search-escape-clear

Conversation

@only21mil

Copy link
Copy Markdown
Contributor

In Settings → Providers → Add provider → Show more, the "Or choose from ACP Registry" search had no Escape handling. With a query typed, Escape closed the whole Add provider dialog instead of clearing the search. The field also used type="search", which Chromium clears natively on Escape even while an IME is composing.

Fix

The same pattern as #41764, #41856 and #42076:

  • type="text" with role="searchbox", so the browser no longer clears the field on its own, and enterKeyHint="search", so phone keyboards still show a Search key.
  • Escape with a query clears it and keeps Add provider open, with focus still in the search. Escape on an empty field closes the dialog as before.
  • Auto-repeat keydowns from a held Escape are swallowed, so holding Escape clears the query without also closing the dialog.
  • Escape during IME composition does nothing.

Repro (Linux, Chromium, vp run dev --no-seed)

  1. Open Settings → Providers → Add provider → Show more.
  2. Type cline into the ACP Registry search.
  3. Press Escape.
Before (main) After (this PR)
Before: cline typed into the ACP Registry search After: cline typed into the ACP Registry search
Before: one Escape closed Add provider After: one Escape cleared the search and kept Add provider open

After the fix, a second Escape closes Add provider and leaves Settings open. Desktop runs the same web component; mobile has no ACP Registry search.

Verification

An AI agent ran each check below.

  • New test in AcpRegistrySearchStep.browser.test.tsx, with the step inside a real Dialog: the field is type="text" with a Search key hint, an IME Escape (both the isComposing and the Safari keyCode 229 shape) keeps gemini, a real Escape clears it without closing and keeps focus, a held auto-repeat Escape does not close, and a second Escape closes. It fails on main and passes here in 3 of 3 runs (vp test run ... --maxWorkers=1). Removing any one guard (isComposing, keyCode 229, repeat, stopPropagation) makes it fail.
  • vp run check:changed passes.

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:S 10-29 changed lines (additions + deletions). labels Nov 24, 2026
@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The ACP Registry search input now uses text input with search semantics and handles Escape according to composition state, query content, and key repetition. A browser test checks query clearing, focus retention, and dialog closing.

Changes: ACP registry search

Layer / File(s) Summary
Search input Escape behavior and browser coverage
apps/web/src/components/settings/AcpRegistrySearchStep.tsx, apps/web/src/components/settings/AcpRegistrySearchStep.browser.test.tsx
The input uses type="text", the searchbox role, and a search enter-key hint. During composition, Escape leaves the query unchanged. Outside composition, Escape clears a nonempty query without closing the dialog. The browser test checks focus, repeated Escape, and subsequent dialog closing.

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

Change: Bug fix

Possibly related PRs

  • pingdotgg/t3code#41938: Applies similar search input and IME Escape handling to the Open-source licenses search.

Suggested reviewers: macroscopeapp, maria-rcks

Merge Risk: Minimal · up to 000a8

This change makes Escape clear the ACP Registry search without closing the Add provider dialog, and Escape on an empty field still closes it. The change is localized and has browser test coverage. No merge-blocking risk was found.

Pre-merge checks: Passed 3 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Description check Inconclusive The description follows the template. It has a Problem section (Escape closed the dialog while a query was typed, and type="search" caused native clearing during IME composition), a Change section (ty… Add an issue link to the Scope section, or explain why a small fix of this obvious bug needs no issue. If a maintainer requested this PR, link that request. The Scope section currently cites only related PRs, which does not show the bug rep…
Passed Passed checks: 3 passed

Check name Status Explanation
Title check Passed The title names the main change: Escape in the ACP Registry search now clears the query without closing the Add provider dialog. It uses the conventional commit form with a fix(web) scope, and it matc…
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 names the main change: Escape in the ACP Registry search now clears the query without closing the Add provider dialog. It uses the conventional commit form with a fix(web) scope, and it matches the changeset's behavior change.

Full details: Description check

Explanation

The description follows the template. It has a Problem section (Escape closed the dialog while a query was typed, and type="search" caused native clearing during IME composition), a Change section (type="text" with role="searchbox", Escape clear and close rules, repeat and IME guards), a Scope section that references prior related PRs (#41764, #41856, #42076) but does not link a specific issue and does not say why no issue is needed, and a Verification section with a new browser test, run counts, guard-removal checks, and before/after screenshots. The Scope section is the main gap: it should link the issue showing the bug, or explain why no issue is needed for this small fix. The template's note about the scope limit for fixes is relevant here.

Resolution

Add an issue link to the Scope section, or explain why a small fix of this obvious bug needs no issue. If a maintainer requested this PR, link that request. The Scope section currently cites only related PRs, which does not show the bug report. Otherwise the description meets the template.

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 840b27e and 000a839.

Files selected for processing: 2

  • apps/web/src/components/settings/AcpRegistrySearchStep.browser.test.tsx
  • apps/web/src/components/settings/AcpRegistrySearchStep.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 and others added 2 commits November 24, 2026 13:24
…search-escape-clear

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…arch

Hold Escape during IME composition inside the search so it cannot close Add provider, ignore modified or already-handled Escape, and prevent the native clear, as the Voice model search on main does. Drop test assertions on input attributes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@juliusmarminge

Copy link
Copy Markdown
Member

Evidence

Real web app, Chromium, 1280×800, light theme, fresh isolated data on each commit. Open Settings → Providers → Add provider → Show more, enter cline, wait for Cline, then press Escape. Base closes Add provider; head clears the query while keeping the dialog open and search focused. scenarios:prove exited 0: failed on base, passed on head. Runtime paths are redacted.

Before After
00070b8031 000a839a38
Before: Escape dismisses Add provider After: Escape clears the focused search and keeps Add provider open
Before recording After recording

Scenario source

Head also passed dispatched repeat and composition-marked Escape checks, and closed on a separate Escape with an empty search.

Not shown:

  • Native IME composition and Chromium's native IME clearing were not exercised with an operating-system input method; the real app received a dispatched isComposing KeyboardEvent.
  • Physical held-key autorepeat was represented by a dispatched repeat KeyboardEvent. Base stops at the first-Escape failure, so these additional checks ran only on head.

@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 0c13b2b 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
juliusmarminge added a commit that referenced this pull request Nov 24, 2026
#42158 landed the same Escape handling on main. Keep main's version and
test, with this branch's addition: Escape clears the submitted query at
once instead of through the typing debounce.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 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