GeezerVison is showing github.com — fix(web): keybindings search ignores modified Esc and keeps focus on a held Esc by only21mil · Pull Request #42419 · pingdotgg/t3code
Conversation
Problem
In Settings -> Keybindings, the "Search keybindings" box clears a non-empty query on Esc and moves focus out when the query is empty. Holding Esc sends auto-repeat keydowns, so the first clears the query and the next repeat sees an empty box and moves focus out—unlike the other settings searches (Settings sidebar, theme, and Voice model), which stay focused while Esc repeats. Modified Esc presses (Shift, Alt, Ctrl, or Meta + Esc) were also handled like a plain Esc, clearing the query and blurring on a second press instead of being ignored.
Reproduced on Linux in the web app, base a149bdc4f6f.
Change
- In
KeybindingsSearchInput (apps/web/src/components/settings/KeybindingsSettings.tsx), the early return now uses the file's existing isBareEscape check, so Esc with Alt, Ctrl, Meta, or Shift is ignored, and the clear branch (preventDefault, stopPropagation, clear) runs when query.length > 0 || event.repeat so a held Esc keeps focus in the box while a plain, unmodified, non-repeat Esc on an empty query takes the same code path as before and IME composition handling stays unchanged. Because the search now ignores Shift+Esc, the key reaches Settings and closes it—the same as Shift+Esc with focus outside any input in Settings—whereas before it cleared the search instead. The Settings sidebar and theme searches still clear on Shift+Esc, while this search now follows the Voice model, ACP Registry, and pull request filter searches.
- In
apps/web/src/components/settings/KeybindingsSettings.browser.test.tsx, extend the existing Dialog Esc test to dispatch a repeat: true Esc keydown after the clear and check that the box stays empty and focused with onOpenChange not called, then refill sidebar, press Shift+Esc, and check that the box keeps sidebar and focus while onOpenChange is called with false (leaving the key to Settings).
Scope
Small fix for an obvious bug in the keybindings search Esc handler, so no issue.
Verification
An AI agent ran all checks below.
Setup: Linux, Chromium web client, light theme, 1280x800, isolated server data with no seed, server named "Test machine", same server for both commits.
Steps: Settings -> Keybindings -> type "terminal" -> Esc -> held (repeat) Esc keydown (1 on a149bdc4f6f, 2 on e1a9b8aa640)
| a149bdc (before) |
e1a9b8a (after) |
 |
 |
| a149bdc: after typing "terminal", Esc clears it, then a held (repeat) Esc moves focus out of the search box |
e1a9b8a: after typing "terminal", Esc clears it, then two held (repeat) Esc keydowns leave the search box empty and still focused |
Steps: Settings -> Keybindings -> type "terminal" -> Shift+Esc
| a149bdc (before) |
e1a9b8a (after) |
 |
 |
| a149bdc: after typing "terminal", Shift+Esc clears the search like a plain Esc |
e1a9b8a: the search ignores Shift+Esc, so Settings handles it and closes |
- Each held repeat was sent as a
repeat: true keydown on the search box (one on the base capture, two on the fixed capture), since the browser panel cannot hold a key.
- Browser test (
apps/web/src/components/settings/KeybindingsSettings.browser.test.tsx): head test on the base source failed with 1 failed | 7 passed (8) at the held-Esc focus check (focus on body); with only the modifier guard removed from the fix, it failed with 1 failed | 7 passed (8) at the Shift+Esc value check (empty instead of sidebar); head passed 3 of 3 runs (8 passed (8)).
- A plain, unmodified, non-repeat Esc on an empty box takes the same code path as before (this PR does not change it); Shift+Esc with focus outside any input in Settings was also checked on
e1a9b8aa640 and closes Settings.
vp run check:changed exited 0 (format, lint, knip 1/2 and 2/2, typecheck across 2 packages, test across 2 files, react compiler on 1 file).
Not shown: desktop was not run separately (it renders the same settings panel); mobile has no keybindings search.
Generated with Gemini 4 Neon in T3 Code Nightly
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Nov 24, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

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 e1a9b8a and bfcb154.
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:
No actionable comments were generated in the recent review.
Walkthrough
-
The keybindings search input now handles bare Escape separately from modified Escape. Browser tests verify query clearing, focus retention, repeated Escape, and Shift+Escape closing Settings.
Changes: Search Escape Handling
| Layer / File(s) |
Summary |
Escape handling and browser coverage apps/web/src/components/settings/KeybindingsSettings.tsx, apps/web/src/components/settings/KeybindingsSettings.browser.test.tsx |
The input uses isBareEscape to handle bare Escape. It clears a nonempty query or handles a repeated event, while modified Escape is not treated as a cancel. Browser tests verify query clearing, focus retention, and Shift+Escape closing Settings. |
Estimated code review effort: 2 (Simple) | ~8 minutes
Change: Bug fix
Possibly related PRs
Suggested reviewers: mihaicrisan04, macroscopeapp
Merge Risk: Minimal · previous review e1a9b
-
Holding Escape in the Keybindings search field now keeps focus, and modified Escape is left to Settings. The change is small and covered by browser tests, so merge risk is minimal.
Pre-merge checks: 4
-
| Check name |
Status |
Explanation |
| Title check |
 |
The title is specific and accurately describes the main change: the keybindings search now ignores modified Esc and keeps focus when Esc is held. It follows the conventional commit format used in the … |
| Description check |
 |
The description follows the template well. It covers Problem (held Esc and modified Esc behavior, with reproduction on Linux and the base commit), Change (the isBareEscape guard and the repeat-aware c… |
| 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 specific and accurately describes the main change: the keybindings search now ignores modified Esc and keeps focus when Esc is held. It follows the conventional commit format used in the template. It names two related behaviors in one line, but both are in the changeset.
Full details: Description check
-
Explanation
The description follows the template well. It covers Problem (held Esc and modified Esc behavior, with reproduction on Linux and the base commit), Change (the isBareEscape guard and the repeat-aware clear branch, plus the test updates), Scope (small obvious bug, no issue linked, justified), and Verification (concrete steps, before/after screenshots, test results, and the check:changed run). It is mostly complete. Minor gaps: the Change section is dense, and the Scope section gives a reason for not linking an issue as the template asks, which is acceptable. The template's agent-attribution line is present.
Finishing Touches
-
Generate unit tests (beta)
-
- 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 11edf88 and e1a9b8a.
Files selected for processing: 2
-
apps/web/src/components/settings/KeybindingsSettings.browser.test.tsx
apps/web/src/components/settings/KeybindingsSettings.tsx
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Evidence
Real web client, Chromium, 1280×800, light theme, fresh synthetic project/thread and Replay (dev) on each commit. Enter terminal, press Escape, send six held-key repeat keydowns, then release. Reopen Keybindings, enter terminal again, and press Shift+Escape.
Scenario source. scenarios:prove exited 0: fails on base and passes on head.
Not shown:
- Alt- and Meta-modified Escape were not exercised; the final paired scenario covers the reported Shift+Escape interaction.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
size:XS
0-9 changed lines (additions + deletions).
vouch:unvouched
Author is not yet trusted in the VOUCHED list.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|