Skip to content

fix(web): Esc in the license search closes it without closing Settings - #41647

Open
only21mil wants to merge 2 commits into
pingdotgg:mainfrom
only21mil:fix/web-settings-license-search-escape
Open

only21mil wants to merge 2 commits into
pingdotgg:mainfrom
only21mil:fix/web-settings-license-search-escape

Conversation

@only21mil

Copy link
Copy Markdown
Contributor

Pressing Escape in the Open-source licenses search (Settings → About → Open-source licenses) cleared the search and also closed Settings. The search's key handler called preventDefault() but not stopPropagation(), and the Settings dialog's Escape dismiss ignores defaultPrevented.

The handler now stops the event, so Escape closes only the search, and the next Escape closes Settings. The keybindings search (#35161) and the Files search (#41616) let Escape through when they are empty because those fields are always on screen. This search only appears after you click its icon, so Escape always closes it first, even when it is empty.

A browser test renders the panel inside the real Settings modal. It fails on main, where Settings closes on the first Escape, and passes with the fix. An AI agent (Claude Opus 5.5, Claude Code in T3 Code) ran the test on both revisions, vp run check:changed and the browser captures below.

Setup: Linux, Chromium (T3 Browser panel), light theme, 1280×800, fresh isolated dev state (vp run dev --no-seed) on each commit. Server addresses are redacted.
Steps: Settings → About → Open-source licenses → search icon → type react → Escape

Before (0fd87d3c2e8) After (6d28e10b6ca)
Escape in the license search closes Settings Escape clears the license search and Settings stays open
Escape in the license search closes Settings Escape clears the license search and Settings stays open

Links: #35161, #41616

Not shown: desktop runs the same web component. Mobile uses a native search screen with no Escape handling, so it is unchanged.

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:XS 0-9 changed lines (additions + deletions). labels Nov 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

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/OpenSourceLicenses.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.

@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

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 6d28e10 and 02c58c8.

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 license search Escape handler now stops the key event from propagating. A browser test checks that Escape closes search while keeping Settings open, then closes Settings when pressed again.

Changes: License search Escape handling

Layer / File(s) Summary
Escape handling and browser validation
apps/web/src/components/settings/OpenSourceLicenses.tsx, apps/web/src/components/settings/OpenSourceLicenses.browser.test.tsx
The Escape handler stops event propagation before clearing the query and closing search. The browser test checks that Escape closes search without closing Settings, that reopening search starts empty, and that a later Escape closes Settings.

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

Change: Bug fix

Suggested reviewers: maria-rcks

Merge Risk: Minimal · previous review 6d28e

Pressing Escape in the license search now closes only the search, and a second Escape closes Settings. The change is small and localized, and the behavior is covered by a browser test, so merge risk is minimal.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the fix and its scope: Escape in the license search closes only the search, not Settings. It matches the changeset, which stops Escape propagation in the license search input and adds …
Description check Passed The description states the problem, the cause (preventDefault without stopPropagation, and the Settings dismiss ignoring defaultPrevented), and the fix. It gives reproduction steps, environment detail…
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 fix and its scope: Escape in the license search closes only the search, not Settings. It matches the changeset, which stops Escape propagation in the license search input and adds a browser test for that behavior. The title uses a conventional commit prefix and is specific.

Full details: Description check

Explanation

The description states the problem, the cause (preventDefault without stopPropagation, and the Settings dismiss ignoring defaultPrevented), and the fix. It gives reproduction steps, environment details, before/after screenshots, a test description, and the agent/model used. It also links related issues #35161 and #41616. It does not follow the template's Scope section exactly: it does not explain why no issue is needed, although it links related issues and describes a bug fix. Verification reports a test that fails on main and passes with the fix, and the screenshots meet the UI evidence requirement.

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 221bc8a and 6d28e10.

Files selected for processing: 2

  • apps/web/src/components/settings/OpenSourceLicenses.browser.test.tsx
  • apps/web/src/components/settings/OpenSourceLicenses.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.

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Nov 23, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). takeover:in-progress A takeover lead is working on this PR 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