Skip to content

fix(web): an IME Escape no longer closes the theme editor or ends inspection - #42332

Merged
juliusmarminge merged 2 commits into
pingdotgg:mainfrom
omaribrahim6:fix/theme-editor-ime
Nov 24, 2026
Merged

juliusmarminge merged 2 commits into
pingdotgg:mainfrom
omaribrahim6:fix/theme-editor-ime

Conversation

@omaribrahim6

Copy link
Copy Markdown
Contributor

In the floating theme editor (Settings → Appearance → Create theme or Edit theme), pressing Escape to cancel an IME candidate window while typing in a field closed the editor, dropping unsaved changes. The panel's Escape handler had no composition check. Three other Escape paths in the editor had the same gap:

  • While Inspect app colors was on, its document capture listener took the IME Escape, ended inspection and prevented the key.
  • The Custom CSS editor guarded isComposing but not keyCode 229, so it prevented that key and turned off Tab indentation.
  • The color picker popover, portaled outside the panel, closed and reverted the color edit. Base UI's dismiss skips composing keys and its compositionend window, but treats a bare keyCode 229 as a dismiss request.

All four now ignore IME keys (isComposing, or keyCode === 229), as in #41784 and #41837. The panel still stops propagation of an IME Escape, and the picker cancels a 229 dismiss. A plain Escape closes the editor, leaves inspection, or reverts and closes the picker as before.

How input reached the app: the accent color was typed through the real app in headless Chromium. No OS IME was available, so the IME Escape is a keydown with the shapes browsers send during composition (a bare keyCode 229, then isComposing: true), dispatched on the field from page script. The plain Escape is a real key press.

Before (main) After
IME Escape closes the theme editor IME Escape keeps the theme editor and the typed accent

After the fix, a plain Escape still closes the editor:

Plain Escape closes the theme editor

Tested:

  • Extended four existing cases in ThemeEditorPanel.browser.test.tsx. The editor and inspection tests cover three IME Escape shapes, starting with a bare keyCode 229, and verify each stays unprevented. The Custom CSS test checks that a bare 229 stays unprevented. The picker test checks that a bare 229 keeps the popover open and preserves the edit. All four fail on main and pass with this change; all 8 cases in the file pass.
  • vp run check:changed: format, lint, knip, typecheck, tests and React compiler pass.

Prepared with Claude Opus 5.5 in T3 Code (Claude Code harness).

🤖 Generated with Claude Code

…pection

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 24, 2026 18:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Nov 24, 2026
@coderabbitai

coderabbitai Bot commented Nov 24, 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 3838428 and 1a516b1.

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

Theme editor Escape handlers now ignore composing events and events with keyCode 229. Browser tests verify that these events do not close the editor or Settings, end inspection, revert picker edits, or prevent the Custom CSS Escape event.

Changes: IME Escape handling

Layer / File(s) Summary
Guard Escape handling across theme editors
apps/web/src/components/settings/ThemeEditorPanel.tsx, apps/web/src/components/settings/ThemeColorPicker.tsx, apps/web/src/components/settings/ThemeCssEditor.tsx, apps/web/src/components/settings/ThemeEditorPanel.browser.test.tsx
Theme editor, inspection, picker, and Custom CSS handlers ignore composing or keyCode 229 Escape events. Browser tests cover those interactions and verify regular Escape behavior remains in place.

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

Change: Bug fix

Possibly related PRs

  • pingdotgg/t3code#41955: Changes the same theme editor, inspection, and Custom CSS handlers to ignore IME Escape events.
  • pingdotgg/t3code#27472: Defines the color picker’s Escape dismissal behavior that this change guards for IME events.
  • pingdotgg/t3code#25130: Changes Escape handling in the theme editor and inspection listener.

Suggested reviewers: erik-bobinski, maria-rcks, macroscopeapp

Merge Risk: Minimal · previous review 38384

This change stops IME Escape key presses from closing the theme editor, ending inspection, or reverting color edits, while plain Escape behaves as before. No merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: an IME Escape no longer closes the theme editor or ends color inspection. The changeset covers that behavior in ThemeEditorPanel, ThemeCssEditor, and ThemeColorPicker,…
Description check Passed The description follows the template. It has a Problem section with the reproduction context, a Change section that explains the fix across the four paths, a Scope section that cites related PRs #4178…
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 main change: an IME Escape no longer closes the theme editor or ends color inspection. The changeset covers that behavior in ThemeEditorPanel, ThemeCssEditor, and ThemeColorPicker, and the title states it in a conventional commit format. It is a bit long at 76 characters, but it is specific and accurate.

Full details: Description check

Explanation

The description follows the template. It has a Problem section with the reproduction context, a Change section that explains the fix across the four paths, a Scope section that cites related PRs #41784 and #41837 as the pattern but does not link an issue or explain why no issue exists, and a Verification section with specific tests, results, and before/after screenshots. The Scope section is the only gap. It should link the bug report or state why no issue is needed, since the template asks for this. The template's model attribution line is present.

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 11c63a9 and 3838428.

Files selected for processing: 4

  • apps/web/src/components/settings/ThemeColorPicker.tsx
  • apps/web/src/components/settings/ThemeCssEditor.tsx
  • apps/web/src/components/settings/ThemeEditorPanel.browser.test.tsx
  • apps/web/src/components/settings/ThemeEditorPanel.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

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

Copy link
Copy Markdown
Member

Evidence

On both commits, open Settings → Appearance → Create theme and enter Aurora. Select Japanese–Romaji Hiragana, type kana (かな candidate window), and press physical Escape in Theme name, Theme name with inspection enabled, expanded Custom CSS, and the Accent picker after setting #e11d48. Repeat ordinary Escape from fresh editors on the U.S. layout. Finally replay bare Escape/keyCode=229/isComposing=false into CSS and picker fields.

Native environment for both sides: macOS 26.6.2, Apple silicon, headed Chrome 156.0.8078.4, dark appearance, 1400×650 viewport, separate fresh databases and synthetic demo projects. Every native composing Escape arrived as key=Escape, keyCode=229, isComposing=true. Videos record the browser viewport receiving physical macOS keystrokes; native candidate windows appear in the supporting stills.

Before After
Commit 8261b23226 1a516b1a4d
Native candidate window before Escape Before: native candidate window After: native candidate window
Theme name: editor closed → preserved Before: editor closed After: unsaved name preserved
Inspection: ended → preserved Before: inspection ended After: inspection preserved
CSS: editor closed → editor and Tab indentation preserved Before: CSS editor closed After: CSS and Tab indentation preserved
Native picker case: open and #e11d48 preserved on both Before: picker preserved After: picker preserved
Replayed bare 229 in CSS: Tab mode disabled → preserved Before: Tab indentation disabled After: Tab indentation preserved
Replayed bare 229 in picker: closed/reverted → preserved Before: picker closed and Accent reverted After: picker and #e11d48 preserved
Scripted interactions and ordinary-Escape controls Before video After video

Ordinary Escape behaved identically on both commits: it closed the editor, ended inspection while retaining the editor, disabled CSS Tab indentation while retaining the editor, and closed the picker while reverting Accent to its dark-theme starting value #346bf1. A single composing Escape dismisses the candidate list while leaving marked かな text; the unsaved Aurora prefix survives on head.

Native driver · Input-source helper · Setup and reproduction · Before events and state · After events and state.

Input-source settings were restored and verified against their original selected and enabled values.

Supplemental scenario

Linux Chromium, light appearance, 1280×800. This replays the exact recorded macOS composing event rather than generating a native IME candidate. scenarios:prove exited 0: the scenario failed on base and passed on head.

Before After
Commit 8261b23226 1a516b1a4d
Before composing Escape Before: unsaved Aurora After: unsaved Aurora
After composing Escape Before: editor closed After: editor preserved
Result Failed: Theme name no longer existed Passed: Theme name retained Aurora

Scenario driver

Not shown:

  • Native Safari IME event delivery was not verified. Its bare keyCode 229 shape was replayed in the real Chromium app, establishing handler behavior rather than Safari's generation of the event.

@juliusmarminge juliusmarminge added takeover:ready Takeover done; auto-lands when gates pass and removed takeover:in-progress A takeover lead is working on this PR labels Nov 24, 2026
@juliusmarminge
juliusmarminge merged commit 98d940f into pingdotgg:main Nov 24, 2026
56 checks passed
@juliusmarminge juliusmarminge removed the takeover:ready Takeover done; auto-lands when gates pass label Nov 24, 2026
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Nov 25, 2026
**v0.1.12-nightly.20261124.5209** · 23 changes from 11 contributors

- **T3 Connect sign-in alerts.** Get notified when a new T3 Connect device signs in.
- **Antigravity quota recovery.** Threads can resume or snooze automatically when Antigravity reports a quota reset time in its error message.
- **Theme editor changes.** Canceling an input method candidate with Escape no longer closes the editor and discards unsaved changes.

### Plus 19 more bug fixes.

<details>
<summary>Full changelog</summary>

## What's Changed
* fix(web): Voice Models language menu resets its search filter on close by @only21mil in pingdotgg/t3code#42321
* feat(connect): tell people when a new T3 Connect device signs in by @juliusmarminge in pingdotgg/t3code#42311
* fix(web): new-commits banner on a PR spans the full header width by @juliusmarminge in pingdotgg/t3code#42342
* fix(web): opening a resolved PR comment keeps its toggle under the cursor by @ipanasenko in pingdotgg/t3code#42312
* fix(web): large SVG project icons come back after their link expires by @smirea in pingdotgg/t3code#42329
* fix(server): Antigravity quota failures keep the 'Resets in' reset time by @juliusmarminge in pingdotgg/t3code#42339
* fix(server): file listing keeps gitignore status when a filename looks like a git pathspec by @only21mil in pingdotgg/t3code#42333
* fix(bitbucket): checkouts cloned from ssh.bitbucket.org match their pull requests by @adrhumphreys-atlas in pingdotgg/t3code#42330
* fix(client): a tab-indented fence line in a PR description code block no longer swaps which video plays by @Marve10s in pingdotgg/t3code#42331
* fix(web): script command field shows both hyphens with ligature fonts by @Mnigos in pingdotgg/t3code#42352
* fix(server): honor sort: "created" when merging IssueService.list entries by @AymanKhan9 in pingdotgg/t3code#42350
* fix(server): a terminal commit refreshes cached Changes totals by @juliusmarminge in pingdotgg/t3code#42365
* fix(web): an IME Escape no longer closes the theme editor or ends inspection by @omaribrahim6 in pingdotgg/t3code#42332
* fix(web): Esc in a font family field closes Settings when no edit is pending by @only21mil in pingdotgg/t3code#42361
* fix(relay): traces no longer record callers' IP addresses or user agents by @juliusmarminge in pingdotgg/t3code#42380
* fix(server): source control discovery no longer runs the auth command of a CLI that is not installed by @juliusmarminge in pingdotgg/t3code#42379
* fix(web): sidebar issue and pull request badges share one component by @Bil0000 in pingdotgg/t3code#42275
* feat(relay): delete a user's relay data when Clerk deletes the user by @juliusmarminge in pingdotgg/t3code#42285
* fix(web): Esc in Theme Editor color filter clears the filter without closing the editor by @juliusmarminge in pingdotgg/t3code#42395
* fix(mobile): analytics uses its own random device id by @juliusmarminge in pingdotgg/t3code#42394
* fix(desktop): Windows desktop applies the saved user telemetry opt-out by @juliusmarminge in pingdotgg/t3code#42376
* fix(web): Enter commits Background Activity interval values by @only21mil in pingdotgg/t3code#42392
* fix(server): analytics no longer reads or sends Codex and Claude account IDs by @gabrielelpidio in pingdotgg/t3code#42299

## New Contributors
* @adrhumphreys-atlas made their first contribution in pingdotgg/t3code#42330

**Full Changelog**: pingdotgg/t3code@v0.1.12-nightly.20261124.5204...v0.1.12-nightly.20261124.5209

</details>


Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.1.12-nightly.20261124.5209
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants