Skip to content

fix: close editor/diff tabs should navigate to visual neighbor tab - #693

Merged
AmethystLiang merged 1 commit into
mainfrom
close-tab-should-go-to-prev-tab
Apr 16, 2026
Merged

AmethystLiang merged 1 commit into
mainfrom
close-tab-should-go-to-prev-tab

Conversation

@AmethystLiang

Copy link
Copy Markdown
Contributor

Summary

  • closeFile() now also calls closeUnifiedTab() after removing the file from openFiles, so closing editor/diff/conflict-review tabs picks the visual neighbor via pickNeighbor(group.tabOrder) — matching terminal/browser tab close behavior
  • Updated /electron skill with Orca-specific CDP launch recipe and broader trigger keywords

Test plan

  • All 1715 tests pass
  • TypeScript typecheck clean
  • Validated in running Electron app via CDP: close middle tab → right neighbor, close rightmost → left neighbor, close last editor → terminal fallback

closeFile() only removed the file from openFiles and picked the next
active file by array position. Terminal and browser closes already went
through closeUnifiedTab() which uses pickNeighbor(group.tabOrder) for
visual neighbor selection. Add the same closeUnifiedTab() call to
closeFile() so editor, diff, and conflict-review tab closes behave
consistently.

Also update the /electron skill with Orca-specific CDP launch recipe
and broader trigger keywords for more reliable invocation.
@AmethystLiang
AmethystLiang merged commit 0c48f0a into main Apr 16, 2026
1 check passed
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).
brennanb2025 added a commit that referenced this pull request Apr 19, 2026
Make openSeededEditorTabs take worktreeId explicitly so tests don't
depend on activeWorktreeId (which the Landing test deliberately clears).
Tighten neighbor-picking assertions to the exact file IDs closeFile
selects, so PR #693's regression would actually fail instead of passing
any "some open file is active" check. Narrow the worktree-switch test
to what a store-level spec can actually observe (per-worktree state
preservation across a round-trip) instead of claiming to detect
renderer hangs it can't see.
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
…tablyai#693)

closeFile() only removed the file from openFiles and picked the next
active file by array position. Terminal and browser closes already went
through closeUnifiedTab() which uses pickNeighbor(group.tabOrder) for
visual neighbor selection. Add the same closeUnifiedTab() call to
closeFile() so editor, diff, and conflict-review tab closes behave
consistently.

Also update the /electron skill with Orca-specific CDP launch recipe
and broader trigger keywords for more reliable invocation.
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