Repository navigation
Conversation
File links from a lone terminal or chat pane open in a new split beside it (stablyai#30399, stablyai#36915). Add "Open file links beside their source" under Settings > Editor, on by default. Off, an automatic file-link open never creates a split: it opens as a tab in the source group. Existing views, neighbor groups and explicit group targets are unchanged. Mirrors openLinksInAppSplitBeside from stablyai#35254, which covers browser links. Fixes stablyai#39064 Co-Authored-By: Claude Opus 5.5 <[email protected]>
[Low impact] The PR appears safe to merge. SummaryAdds Open file links beside their source, enabled by default.
Source review found no actionable issues. Tests were not run. Visual capture was blocked by missing installed dependencies. Reviews (1) · Last reviewed commit: "feat(editor): setting to open file links..." · Reviewed by Greptile |
|
No actionable comments were generated in the recent review. Walkthrough
Severity of issue fixed: Medium Merge Risk:
|
ELI5
When you click a file path that an agent printed in a terminal or a chat, Orca opens the file in a new split beside it. With both sidebars open, that leaves two narrow columns. This adds a setting to open the file as a normal tab in the same pane instead.
What Changed
Before: a file link opened from a terminal or chat that is the only pane always creates a new split to its right (since #30399 and #36915). Cmd/Ctrl+click goes straight there. In chat, #39950 removed the "Open in new tab" row, so there is no way around it.
After: a new toggle under Settings > General > Editor and diffs > Editor: Open file links beside their source. It is on by default, so nothing changes for anyone. When it is off, an automatic file-link open never creates a split. It opens the file as a tab in the source pane's group.
These cases behave the same with either value:
Mechanism:
resolveEditorLinkOpenPlacement(editor-open-target-group.ts) is the only place that turns an editor file-link open into a split. Every file-link entry point goes through it: Cmd/Ctrl+click in the terminal, the popover's "Open file" row, and native chat file links. They all takeopenDetectedFilePath, thenopenLinkedFileInEditor, thenopenFileForLink, thenapplyOpenFileToState. The split branch now also checkssettings.openFileLinksBesideSource !== false. Also included:true)SETTINGS_CHANGED_WHITELISTentryWhy
#39064, and its comments, ask for this. Users who keep both sidebars visible get the chat or terminal and the file squeezed into half-width columns, on every click.
openLinksInAppSplitBesidefor browser links: one boolean, on by default, which only removes the "create a split" step. This PR does the same for file links and does not touch browser-link placement, so the two PRs do not overlap. If maintainers prefer one setting for both, the two keys merge easily.Linked Issue
Fixes #39064
Related: #43538 (chat links, same request), #35254 (browser links), #34437, #33252.
Visual Proof
Both captures: a lone terminal pane with both sidebars open, then Cmd+click on a file path it printed.
The setting, found by searching "split":
Testing
On macOS, a dev build of this branch (
ORCA_BACKGROUND_LAUNCH=1), driven over CDP. For each case I counted the tab groups in the store before and after the click:I also checked the setting itself. Searching "split" finds it, the toggle flips the stored value, and the value is still
falseafter an app restart.Not run:
openDetectedFilePathpath (use-native-chat-file-link-click.ts), but I did not play them in a live chat.pnpm check:changedpasses (39 checks).No test added: this is a settings toggle around layout placement. The repo's test policy says to prove it by running the app rather than with a unit test.
Performance
None, because this adds one property read to a function that only runs when a file link is opened.
Risk
Level: Low
openFileLinksBesideSourcevalue would be ignored afterwards.AI Disclosure
Claude Code. Claude Opus 5.5 traced the placement path, wrote the brief, reviewed the diff and ran the dev-build validation over CDP. Claude Sonnet 5.5 implemented the change and ran the local gate. I reviewed the result.
Review
Agent skill upstream boundary
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)🤖 Generated with Claude Code