Repository navigation
fix: terminal shortcuts firing in wrong worktree - #542
Merged
Merged
Conversation
…tabs Hidden worktrees kept their focusedGroupId, so their TerminalPanes registered window-level keydown handlers alongside the visible worktree's. All handlers fired on every shortcut because stopPropagation does not block sibling listeners on the same target. - Pass focusedGroupId as undefined for hidden worktrees so their TerminalPanes never get isActive=true - Upgrade all stopPropagation to stopImmediatePropagation as defense-in-depth - Replace single-value auto-create guard with a Set so closing the last tab no longer spawns a replacement terminal
brennanb2025
added a commit
that referenced
this pull request
Apr 12, 2026
This reverts commit 0a6ab88.
This was referenced Apr 12, 2026
brennanb2025
added a commit
that referenced
this pull request
Apr 12, 2026
Reapplies the fixes from #542 which were reverted in #546 as part of the #520 revert chain. - Replace single-value initialTabCreationGuardRef with a Set so closing the last tab no longer auto-spawns a replacement terminal - Upgrade all stopPropagation to stopImmediatePropagation as defense-in-depth against duplicate window-level keydown handlers The focusedGroupId change from #542 is omitted because it targeted TabGroupSplitLayout from #520, which remains reverted. The current code already gates isActive on isVisible, providing the same protection.
4 tasks done
brennanb2025
added a commit
that referenced
this pull request
Apr 19, 2026
Adds Playwright coverage for two high-regression areas identified from the last 200 PRs: - worktree-lifecycle.spec.ts: guards removeWorktree cleanup (#532), worktree switch with right sidebar open (#598/#628/#726), and cross-worktree tab isolation (#542/#554). - tab-close-navigation.spec.ts: guards visual-neighbor activation on editor/diff close (#693) and Landing fallback when the last visible surface closes (#677).
3 tasks done
enrick-dev
pushed a commit
to enrick-dev/orca
that referenced
this pull request
Oct 15, 2026
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.
Summary
focusedGroupId, so their TerminalPanes registeredwindow-level keydown handlers alongside the visible worktree's. Cmd+D, Cmd+W, etc. fired in all worktrees becausestopPropagationdoesn't block sibling listeners on the same target.closeActivePanehandlers fired, showing the confirmation modal multiple times.Changes
Terminal.tsx: PassfocusedGroupId={undefined}for hidden worktrees so their TerminalPanes getisActive=falseand never register keyboard handlers.keyboard-handlers.ts: Upgrade allstopPropagation()→stopImmediatePropagation()as defense-in-depth, so even if multiple handlers are active onwindow, only the first one processes the event.Terminal.tsx: Replace single-valueinitialTabCreationGuardRefwith aSet<string>tracking initialized worktrees. Once a worktree has had tabs, closing all of them won't auto-spawn a replacement.Test plan