Skip to content

fix(web): Esc clears the ACP Registry search without closing Add provider - #42163

Closed
zs-andy wants to merge 1 commit into
pingdotgg:mainfrom
zs-andy:fix/acp-registry-search-escape
Closed

zs-andy wants to merge 1 commit into
pingdotgg:mainfrom
zs-andy:fix/acp-registry-search-escape

Conversation

@zs-andy

@zs-andy zs-andy commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Problem

In Settings → Providers → Add provider → Show more, pressing Escape while the Search ACP Registry (Search agents…) input has a query bubbles straight to AddProviderInstanceDialog's <Dialog> and closes the entire Add provider dialog instead of clearing the search. Because the input also uses type="search", browsers natively clear it on Escape even during an active IME composition.

Expected behavior:

  1. Pressing Escape while composing with an IME cancels only the composition without clearing the search or closing the dialog.
  2. Pressing Escape when the search has text (including spaces) clears the search immediately, keeps focus in the input, and keeps the Add provider dialog open (holding Escape repeats also keep the dialog open).
  3. Pressing Escape again while the search is empty closes the Add provider dialog.

Change

  • Add clear() to useAcpRegistrySearch in apps/web/src/components/settings/AcpRegistrySearchStep.tsx so clearing with Escape resets both the input text and submitted query immediately without waiting for the 300 ms debounce.
  • Switch the Search ACP Registry InputGroupInput from type="search" to type="text" with role="searchbox" and enterKeyHint="search", matching PullRequestSearchInput, VoiceSettingsPanel, and TextGeneratorsSettings.
  • Add an onKeyDown handler for unmodified Escape: stops propagation during IME composition (isComposing or keyCode === 229) without clearing; prevents default, stops propagation, and calls registry.clear() when query is non-empty (or stops propagation on event.repeat when held); lets Escape bubble to close the dialog when empty and not repeating.
  • Add a browser test in apps/web/src/components/settings/AcpRegistrySearchStep.browser.test.tsx covering IME composition Escape, non-empty and spaces-only queries, immediate query reset, held Escape repeat, and closing the dialog on the next Escape.

Scope

Small, focused bug fix in a single component (AcpRegistrySearchStep.tsx) matching the established Escape handling across other Settings search inputs (#42076, #42093, #42129, #42130); no separate issue is needed for this obvious dialog-dismissal bug.

Verification

  • Confirmed red before fix: ./node_modules/.bin/vp test run apps/web/src/components/settings/AcpRegistrySearchStep.browser.test.tsx failed on the new test because pressing Escape with "gemini" in the search input closed the Add provider dialog.
  • Confirmed green after fix:
    • ./node_modules/.bin/vp test run apps/web/src/components/settings/AcpRegistrySearchStep.browser.test.tsx apps/web/src/components/settings/AddProviderInstanceDialog.environment.browser.test.tsx (all passed)
    • ./node_modules/.bin/vp fmt --check (passed)
    • ./node_modules/.bin/vp lint --report-unused-disable-directives (passed)
    • ./node_modules/.bin/vp run --filter @t3tools/web typecheck (passed)
    • ./node_modules/.bin/knip --workspace apps/web --exports --preprocessor ./scripts/knip-schemas.ts --no-config-hints (passed)
  • Not checked manually in a live desktop window with a real OS IME; automated Chromium browser tests verify the dialog, focus, repeat, and synthetic IME isComposing / keyCode: 229 flows.

Repro in the app:

  1. Open Settings → Providers, click Add provider, and click Show more.
  2. Focus Search agents… (Search ACP Registry) and type a query (e.g. gemini or spaces).
  3. Press Escape once: the search clears, focus stays in the input, and the Add provider dialog stays open.
  4. Press Escape again while empty: the Add provider dialog closes.

Prepared with Antigravity (Gemini) in T3 Code.

@github-actions github-actions Bot added the vouch:unvouched Author is not yet trusted in the VOUCHED list. label Nov 24, 2026
@zs-andy

zs-andy commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

Closing as a duplicate of #42158, which was opened a few minutes earlier — apologies for the overlap!

@zs-andy zs-andy closed this Nov 24, 2026
@github-actions github-actions Bot added the size:S 10-29 changed lines (additions + deletions). label Nov 24, 2026
@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Nov 24, 2026
@juliusmarminge juliusmarminge added takeover:needs-julius Takeover done; route gate says Julius decides and removed takeover:in-progress A takeover lead is working on this PR labels Nov 24, 2026
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). takeover:needs-julius Takeover done; route gate says Julius decides 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