Repository navigation
Open file links beside their source tab's group - #30399
Conversation
Clicking a file link in a terminal or agent chat now opens the file in an editor next to that tab, not in whichever group happens to have focus. A new "Open in this group" row pins the file to the source group when that group has neighbors. - Capture the source tab at click time, so focus changes during path resolution don't redirect the file. - Rank candidate groups by adjacency: a neighbor already showing the file, then a neighbor showing an editor, then any neighbor, then the source group. - "Open in this group" never falls back to a browser, system app, or other group. If the group is gone or the target is not an editor, it shows a toast and does nothing. - Line reveals target the exact view that was opened, and are dropped if that view closes before the editor applies them.
Reconciliation removed every empty group, so an empty split pane the user had made beside a tab was collapsed on the next pass. A file link opened from that tab then landed in the source group instead of the empty pane. Reconciliation now removes only groups that stale-tab cleanup emptied, and keeps panes that were already empty. Tests cover terminal and agent-session sources in both worktree and folder workspaces.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to
|
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
a547f6af-ff5f-4eec-985f-01868552dc8f
📒 Files selected for processing: 38
src/renderer/src/components/native-chat/native-chat-file-link.test.tssrc/renderer/src/components/native-chat/native-chat-file-link.tssrc/renderer/src/components/native-chat/native-chat-link-target-actions.tssrc/renderer/src/components/native-chat/native-chat-owner-selectors.test.tsxsrc/renderer/src/components/terminal-pane/floating-file-link-selection.test.tssrc/renderer/src/components/terminal-pane/terminal-file-link-actions.test.tssrc/renderer/src/components/terminal-pane/terminal-file-link-actions.tssrc/renderer/src/components/terminal-pane/terminal-file-link-editor-open.tssrc/renderer/src/components/terminal-pane/terminal-file-link-hit-testing.tssrc/renderer/src/components/terminal-pane/terminal-file-open-in-group-toast.tssrc/renderer/src/components/terminal-pane/terminal-file-open-routing.tssrc/renderer/src/components/terminal-pane/terminal-link-click-fallback.test.tssrc/renderer/src/components/terminal-pane/terminal-link-file-open-routing.test.tssrc/renderer/src/components/terminal-pane/terminal-link-handlers-test-fixtures.tssrc/renderer/src/components/terminal-pane/terminal-link-handlers-test-harness.tssrc/renderer/src/components/terminal-pane/terminal-link-handlers.tssrc/renderer/src/components/terminal-pane/terminal-link-open-beside-source.test.tssrc/renderer/src/components/terminal-pane/terminal-link-osc-file-targets.test.tssrc/renderer/src/components/terminal-pane/terminal-link-wsl-path-mapping.test.tssrc/renderer/src/components/terminal-pane/terminal-osc-link-routing.tssrc/renderer/src/components/terminal-pane/terminal-pane-mount-preparation.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/fr.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/renderer/src/store/slices/editor-open-link-placement.test.tssrc/renderer/src/store/slices/editor/actions/open-file-action.tssrc/renderer/src/store/slices/editor/actions/open-file-apply.tssrc/renderer/src/store/slices/editor/tabs/editor-open-adjacent-group.test.tssrc/renderer/src/store/slices/editor/tabs/editor-open-adjacent-group.tssrc/renderer/src/store/slices/editor/tabs/editor-open-target-group.tssrc/renderer/src/store/slices/editor/tabs/editor-tab-content-type.tssrc/renderer/src/store/slices/editor/types/editor-files-slice.tssrc/renderer/src/store/slices/editor/types/editor-open-link-intent.tssrc/renderer/src/store/slices/tabs/tabs-reconciliation-empty-groups.test.tssrc/renderer/src/store/slices/tabs/tabs-reconciliation.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
Problem
When you click a file link in a terminal or agent chat, Orca opened the file in whichever editor group was active. That often was not the pane next to the chat or terminal you clicked from, so the file landed somewhere you were not looking.
Solution
File links now open in the group next to the tab that printed them. If that tab has no suitable neighbor, the file opens in its own group. A new "Open in this group" row in the link menu pins the file to the clicked tab's own group. If that group is gone or the link resolves to something that cannot open there (a browser page, a folder, or a file on another workspace), Orca shows an error toast and does not open anything else.
ELI5
You click a file name in a terminal or chat. Orca now opens that file in the panel beside where you clicked, not in some random panel.
What Changed
Why
The source tab is captured when you click, so the file opens where you expect even if the path takes a moment to resolve. Refusing an explicit request beats silently opening it somewhere else. Automatic placement uses the existing layout tree rather than a new layout model.
Linked Issue
If you do not have one and are an outside contributors, your PR wiil be ignored. Refs is not sufficient. Link an actual issue
Fixes # (TODO: no issue linked)
Visual Proof
TODO: add BEFORE/AFTER video or screenshots of link opening beside the source group.
Testing
Unit tests added for placement ranking, link-intent capture, explicit-group refusal, reveal scoping, and empty-group reconciliation.
TODO: manual test notes and platforms tested (not confirmed in this PR).
I manually tested these changes locally
Automated tests added/updated, or explained why not below
AI Disclosure
TODO: confirm whether AI tooling was used.
Review
Agent skill upstream boundary
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance.
TODO: reviewer to confirm the SSH and runtime host paths (the resolved execution host is now computed before the sibling-workspace check), Windows/WSL path mapping, and the mobile and remote wire surfaces are unaffected.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)