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 project icon search clears it without closing the dialog - #41856
In Settings → Projects → Choose icon, the "Search all Lucide icons" field had no Escape handling. With a query typed, Escape closed the whole "Choose project icon" dialog, dropping the color and icon already picked, instead of clearing the search. The field also used type="search", which Chromium clears natively on Escape even while an IME is composing.
type="text" with role="searchbox", so the browser no longer clears the field on its own.
Escape with a query clears it and keeps the dialog 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)
Add any project, then open Settings → Projects → the project → Choose icon.
Type rocket into the icon search.
Press Escape.
Before (main)
After (this PR)
After the fix, a second Escape closes "Choose project icon" and leaves Settings open. The clearing Escape stops at the search field, so neither the icon picker nor the Settings dialog behind it sees it.
Verification
An AI agent ran each check below.
New ProjectIconPickerDialog.browser.test.tsx: the field is type="text", an IME Escape (both the isComposing and the Safari keyCode 229 shape) keeps rocket, 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.
This PR changes the test suite by +1 test cases (browser +1, unit 0, server 0).
New browser test files: apps/web/src/components/settings/ProjectIconPickerDialog.browser.test.tsx.
Each browser test file costs CI seconds of module loading before its first test runs; a unit test costs milliseconds.
Keep tests that would fail for a real reason, and test logic below the UI where it can be. See Testing.
Reviewing files that changed from the base of the PR and between 56c1c3a and 5109641.
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 project icon search input now handles Escape explicitly and uses a text input with the searchbox role. A browser test checks Escape behavior during and after composition, while clearing the query, and when closing the dialog.
Changes: Project icon picker Escape handling
Layer / File(s)
Summary
Escape handling and browser validation apps/web/src/components/settings/ProjectIconPickerDialog.tsx, apps/web/src/components/settings/ProjectIconPickerDialog.browser.test.tsx
The search input uses a text input with the searchbox role. Escape during IME composition is ignored. Escape clears a nonempty query or a repeated key event and stops propagation. The browser test checks query clearing and dialog close behavior.
This change stops Escape in the icon search from discarding the selected icon and color when a query is present. The change is small and localized, with a browser test covering the intended behavior, so merge risk is minimal.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title is a conventional commit that names the main change: Escape in the project icon search now clears the query without closing the dialog. It matches the raw summary, which shows Escape clearin…
Description check
The description follows the template. It has a Problem section that describes the Escape behavior and reproduction steps, and a Change section that explains the type="text" and role="searchbox" switch…
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 is a conventional commit that names the main change: Escape in the project icon search now clears the query without closing the dialog. It matches the raw summary, which shows Escape clearing the query and stopping propagation only when appropriate. It is specific and concise.
Full details: Description check
Explanation
The description follows the template. It has a Problem section that describes the Escape behavior and reproduction steps, and a Change section that explains the type="text" and role="searchbox" switch and the Escape guards. The Scope section is missing a linked issue and a maintainer request. It cites related PRs (#41616, #41749, #41764) but does not link a bug issue or explain why no issue is needed. The Verification section is detailed, with test results and guard-removal checks. It also reports before and after screenshots and names the agent and model, as the template asks.
Resolution
Consider linking the issue that shows the bug in the Scope section, or explaining why a small fix needs no issue.
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; 7 remain after this review.
Environment on both sides: Linux web app, headless Chromium, 1280×800, dark theme, fresh isolated databases with a synthetic server project and Replay thread.
Steps: Settings → Projects → server → Choose icon; select Red and type rocket. Press Escape once. Reopen with Red/rocket, hold Escape through repeated keydowns, release, then press Escape separately. Reopen with Red/rocket, append ろ using CDP Input.imeSetComposition, then press Escape.
Proven: scenario failed on base and passed on head; runner exit 0. Base dismissed the picker and discarded the draft; repeated keydowns also dismissed Settings. Head cleared only the query, preserved focus and Red, stayed open during repeats, and closed on a separate press. Composition Escape erased the query on base and preserved rocketろ on head.
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:S10-29 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 → Projects → Choose icon, the "Search all Lucide icons" field had no Escape handling. With a query typed, Escape closed the whole "Choose project icon" dialog, dropping the color and icon already picked, 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 #41616, #41749 and #41764:
type="text"withrole="searchbox", so the browser no longer clears the field on its own.Repro (Linux, Chromium,
vp run dev --no-seed)rocketinto the icon search.After the fix, a second Escape closes "Choose project icon" and leaves Settings open. The clearing Escape stops at the search field, so neither the icon picker nor the Settings dialog behind it sees it.
Verification
An AI agent ran each check below.
ProjectIconPickerDialog.browser.test.tsx: the field istype="text", an IME Escape (both theisComposingand the SafarikeyCode 229shape) keepsrocket, 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:changedpasses.Generated with Claude Opus 5.5 in T3 Code Nightly