Repository navigation
fix(keybinds): palette and ⌘W work in an extension modal before its iframe has focus - #1394
Merged
Merged
Conversation
…t shell (#1307) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…xtension modal (review a) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
Disposition for review a (head a02dbd4)
|
…d surface (review b) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
Disposition for review b (head 8271290)
|
Juliusolsson05
added a commit
that referenced
this pull request
Sep 27, 2026
…s, pin shell and layer values (#1398 review) The dismiss stack's wiring contract was wrong (a capture-phase Escape pre-empts two-phase inner handlers; effect order is not stacking order for nested mounts). It returns with the useKeybinds wiring after #1394. Stacking between dialogs is by open order, not registry order; the comments now say so. The SidePanel test pins children and layout, and the layer test pins exact values. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
Disposition for review c (MERGE-READY; head
|
Owner
Author
|
READY (W1). 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #1307.
Plan:
docs/plans/2026-09-27-extension-modal-palette-chord.md.Problem
viewBridgekeeps the iframe hidden until ready, and focus stays in the shell until the user clicks into the extension.useKeybinds's extension-modal exemption misses it and the app-ownership gate drops ⌘⇧P.Change
extensionModalFrameForTargetreturns the modal iframe when the target is that iframe (the forwarded case), or when the target's own app-owner element contains it (the host-shell case).<body>(review b). Closing the palette leaves focus on<body>, because the palette is a triggerless Radix Dialog. A key outside every owner resolves against the topmost owned surface, the last in DOM order. That is the extension modal once the palette has closed, and a stacked confirmation while one is open.Tests
Three new cases in
focusModeKeyboardOwnership.renderer.test.tsx, driving the realuseKeybindswith AppHostSurface's DOM shape:agent-code-extension-closeon the iframe and invokes no command. Red on main.The new cases clean up their owner-marked DOM after every test. Otherwise a failing assertion leaves the marker behind and cascades into the other 9 tests in the file.
Verification
npx tsc -bclean.src/renderer/src/workspace/tile-tree,features/command-keybindingsandapps: 59 files, 454 tests at377932db. At8271290a,tile-treepasses (45 files, 302 tests), andnpx tsc -bis clean.🤖 Generated with Claude Code