Repository navigation
Conversation
Contributor
Author
|
Closing as a duplicate of #42158, which was opened a few minutes earlier — apologies for the overlap! |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
In Settings → Providers → Add provider → Show more, pressing
Escapewhile the Search ACP Registry (Search agents…) input has a query bubbles straight toAddProviderInstanceDialog's<Dialog>and closes the entire Add provider dialog instead of clearing the search. Because the input also usestype="search", browsers natively clear it onEscapeeven during an active IME composition.Expected behavior:
Escapewhile composing with an IME cancels only the composition without clearing the search or closing the dialog.Escapewhen the search has text (including spaces) clears the search immediately, keeps focus in the input, and keeps the Add provider dialog open (holdingEscaperepeats also keep the dialog open).Escapeagain while the search is empty closes the Add provider dialog.Change
clear()touseAcpRegistrySearchinapps/web/src/components/settings/AcpRegistrySearchStep.tsxso clearing withEscaperesets both the input text and submitted query immediately without waiting for the 300 ms debounce.Search ACP RegistryInputGroupInputfromtype="search"totype="text"withrole="searchbox"andenterKeyHint="search", matchingPullRequestSearchInput,VoiceSettingsPanel, andTextGeneratorsSettings.onKeyDownhandler for unmodifiedEscape: stops propagation during IME composition (isComposingorkeyCode === 229) without clearing; prevents default, stops propagation, and callsregistry.clear()whenqueryis non-empty (or stops propagation onevent.repeatwhen held); letsEscapebubble to close the dialog when empty and not repeating.apps/web/src/components/settings/AcpRegistrySearchStep.browser.test.tsxcovering IME compositionEscape, non-empty and spaces-only queries, immediate query reset, heldEscaperepeat, and closing the dialog on the nextEscape.Scope
Small, focused bug fix in a single component (
AcpRegistrySearchStep.tsx) matching the establishedEscapehandling across other Settings search inputs (#42076, #42093, #42129, #42130); no separate issue is needed for this obvious dialog-dismissal bug.Verification
./node_modules/.bin/vp test run apps/web/src/components/settings/AcpRegistrySearchStep.browser.test.tsxfailed on the new test because pressingEscapewith"gemini"in the search input closed theAdd providerdialog../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)isComposing/keyCode: 229flows.Repro in the app:
Search ACP Registry) and type a query (e.g.geminior spaces).Escapeonce: the search clears, focus stays in the input, and the Add provider dialog stays open.Escapeagain while empty: the Add provider dialog closes.Prepared with Antigravity (Gemini) in T3 Code.