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): a second Escape in the theme CSS editor closes the theme editor - #41692
In the theme editor's Custom CSS box, Escape is meant to stop Tab from indenting so the next Tab leaves the box ("Press Escape, then Tab to leave."). But the box swallowed every Escape, not just that first one, so pressing Escape again never closed the theme editor the way it does from every other field.
Change
The CSS box now handles Escape only while Tab still indents, or when the key is held down and repeating. The first Escape still releases Tab and keeps the editor open, and holding it does not close the editor. A second press reaches the theme editor, which closes, and Settings stays open.
Scope
A one-line fix of an obvious bug in a component added in #35247, so it has no issue. Web and desktop only: mobile has no theme CSS editor.
Verification
A browser test focuses the Custom CSS box beside the Settings dialog, presses Escape, sends a held-key repeat, then presses Escape again. It fails on main, where the second press does nothing, and passes with the fix: the first press and the repeat keep the editor open, the second press closes it, and Settings stays open. An AI agent ran the test on both revisions, vp run check:changed and the captures below.
Setup: Linux, Chromium (T3 Browser panel), light theme, 1280×800, isolated dev state with no seeded data (vp run dev --no-seed) on each commit. Steps: Settings → Appearance → Create theme → Custom CSS → type .sidebar { border-radius: 12px; } → Escape → Escape
Before (4ce9f8c1b87)
After (d7774c45b14)
A second Escape in Custom CSS leaves the theme editor open
A second Escape in Custom CSS closes the theme editor and Settings stays open
Not shown: after the first Escape the head build looks the same as the Before image: the editor stays open with the hint "Tab moves to the next control." Focusing the box again still turns Tab indenting back on. Holding Escape is covered by the test, not the captures. Desktop runs the same web component.
Reviewing files that changed from the base of the PR and between d7774c4 and 318002a.
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 Custom CSS editor now disables Tab indentation on Escape only when indentation is active or the event is a repeat. A browser test covers successive Escape events and the resulting dialog state.
Changes: Theme editor Escape handling
Layer / File(s)
Summary
Escape condition and dialog coverage apps/web/src/components/settings/ThemeCssEditor.tsx, apps/web/src/components/settings/ThemeEditorPanel.browser.test.tsx
The Escape condition checks whether Tab indentation is active or the event is a repeat. The browser test verifies that the first two Escape events leave both dialogs open, and that the next closes the theme editor while Settings remains open.
The first Escape in the Custom CSS box stops Tab from indenting, and a second Escape closes the theme editor while Settings stays open. No concrete merge risk remains.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the actual change: a second Escape in the theme CSS editor now closes the theme editor. It follows the conventional commit form and matches the raw summary (Escape handling in ThemeCss…
Description check
The description follows the template. It has Problem, Change, Scope, and Verification sections. The Problem and Change sections explain the bug and the fix. Scope explains why no issue is linked and g…
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 names the actual change: a second Escape in the theme CSS editor now closes the theme editor. It follows the conventional commit form and matches the raw summary (Escape handling in ThemeCssEditor.handleKeyDown) and the PR objectives.
Full details: Description check
Explanation
The description follows the template. It has Problem, Change, Scope, and Verification sections. The Problem and Change sections explain the bug and the fix. Scope explains why no issue is linked and gives the web and desktop reach. Verification names a focused browser test, shows before and after captures, and states what was not shown. It also gives the model and harness, as the template asks. It does not add a Conventional Commit title beyond the PR title, and the template's comment asks for a conventional commit title, which the title satisfies.
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; 4 remain after this review.
Real web app, Chromium, 1280×1000, light appearance, fresh synthetic state on each commit. Open Settings → Appearance → Create theme → Custom CSS; enter .sidebar { border-radius: 12px; }. First Escape releases Tab indentation; repeated keydowns while held keep both panels open. Release Escape and press it again: base keeps the theme editor open; head closes only the theme editor and leaves Appearance settings open.
Proven: scenarios:prove exited 0, failing on base and passing 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:XS0-9 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.
Problem
In the theme editor's Custom CSS box, Escape is meant to stop Tab from indenting so the next Tab leaves the box ("Press Escape, then Tab to leave."). But the box swallowed every Escape, not just that first one, so pressing Escape again never closed the theme editor the way it does from every other field.
Change
The CSS box now handles Escape only while Tab still indents, or when the key is held down and repeating. The first Escape still releases Tab and keeps the editor open, and holding it does not close the editor. A second press reaches the theme editor, which closes, and Settings stays open.
Scope
A one-line fix of an obvious bug in a component added in #35247, so it has no issue. Web and desktop only: mobile has no theme CSS editor.
Verification
A browser test focuses the Custom CSS box beside the Settings dialog, presses Escape, sends a held-key repeat, then presses Escape again. It fails on main, where the second press does nothing, and passes with the fix: the first press and the repeat keep the editor open, the second press closes it, and Settings stays open. An AI agent ran the test on both revisions,
vp run check:changedand the captures below.Setup: Linux, Chromium (T3 Browser panel), light theme, 1280×800, isolated dev state with no seeded data (
vp run dev --no-seed) on each commit.Steps: Settings → Appearance → Create theme → Custom CSS → type
.sidebar { border-radius: 12px; }→ Escape → Escape4ce9f8c1b87)d7774c45b14)Links: #35247, #25130
Not shown: after the first Escape the head build looks the same as the Before image: the editor stays open with the hint "Tab moves to the next control." Focusing the box again still turns Tab indenting back on. Holding Escape is covered by the test, not the captures. Desktop runs the same web component.
Generated with Gemini 4 Neon in T3 Code Nightly