Skip to content

fix: reapply terminal shortcuts firing in wrong worktree - #554

Merged
brennanb2025 merged 1 commit into
mainfrom
brennanb2025/reapply-cmd-fire-wrong-worktree
Apr 12, 2026
Merged

brennanb2025 merged 1 commit into
mainfrom
brennanb2025/reapply-cmd-fire-wrong-worktree

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Apr 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

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.

Test plan

  • Open two worktrees, switch between them, then Cmd+D in the active one — split should only appear in the visible worktree
  • Split a pane, then Cmd+W — close dialog should appear at most once
  • Close the last terminal tab (idle shell) — no replacement tab should auto-spawn
  • Activate a brand-new worktree with no tabs — first terminal should still auto-create

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.
@brennanb2025
brennanb2025 merged commit 08d2c0c into main Apr 12, 2026
1 check passed
@brennanb2025
brennanb2025 deleted the brennanb2025/reapply-cmd-fire-wrong-worktree branch April 12, 2026 22:46
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).
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant