Skip to content

fix(chat): offer to open linked files in the source tab group - #45791

Open
1aifanatic wants to merge 1 commit into
stablyai:mainfrom
1aifanatic:fix/chat-open-file-in-tab
Open

1aifanatic wants to merge 1 commit into
stablyai:mainfrom
1aifanatic:fix/chat-open-file-in-tab

Conversation

@1aifanatic

@1aifanatic 1aifanatic commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

A file linked in an Orca chat can open next to the chat, including when the chat runs on a paired computer.

What Changed

Native chat had suppressed the file menu’s existing “Open in new tab” action. Show it when the source tab has an eligible tab group. The shared open action preserves the file’s host and the line and column from the link.

Why

The existing file action already knows the host and tab group that own the link. Showing that action gives chat users an explicit destination for a file.

Linked Issue

Fixes #44424

Visual Proof

The two captures show the file menu for the same HTML link in a paired-host chat.

Before (dark)
After (dark)

Testing

Rendered the actual file menu before and after in Chromium. Exercised the action against the file-routing boundary with a paired host, a source chat, and a line and column. Ran the changed-file gate.

Risk

Low. Explicit tab opening reuses the route already used by terminal file links. Reverting the change restores the previous UI.

AI Disclosure

Prepared with OpenAI Codex (GPT-6).

Review

Checked both chat link menu entry points and the eligibility check for the source tab group. The routing probe used a paired-host HTML link with a line and column.

Agent skill upstream boundary

  • This contribution uses Orca’s own implementation and documentation.

Notes

Local verification ran on macOS. The browser evidence uses a headless Chromium fixture.

Checklist

  • Linked the issue and described the user-visible change.
  • Reviewed the affected host and compatibility paths.
  • Ran pnpm check:changed before pushing.

@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

File-link actions no longer set or check omitOpenInNewTab. The “Open in new tab” row is now controlled by the remaining worktree, host-resolution, and source-group conditions. TerminalFileLinkActionDeps no longer declares the removed option.

Severity of issue fixed: Medium

Merge Risk: Minimal · up to 69634

Native chat file links regain the "Open in new tab" option when the source tab has an eligible tab group. The existing "Open file" behavior is unchanged, and no merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: native chat file links now offer “Open in new tab” from the source tab group. It uses the conventional fix(chat) prefix and is specific, so it passes.
Linked Issues check Passed [#44424] requests an optional "Open in new tab" row for file links in agent chat. It should open the file in the chat's tab group at full width. At the reviewed head, native-chat-link-target-actions.t…
Out of Scope Changes check Passed The change set is limited to two files. native-chat-link-target-actions.ts no longer sets omitOpenInNewTab for file links. terminal-file-link-actions.ts removes the omitOpenInNewTab field and its chec…
Description check Passed The description covers the main template sections and explains the user-visible change and routing mechanism. It includes linked issue #44424, before-and-after captures, a low-risk rating, a revert no…
Full details: Linked Issues check

Explanation

[#44424] requests an optional "Open in new tab" row for file links in agent chat. It should open the file in the chat's tab group at full width. At the reviewed head, native-chat-link-target-actions.ts builds file actions through buildFileLinkActions with nativeChatFileOpenDeps. That function passes sourceTabId, runtimeEnvironmentId, and hostFileOnly: true, and it no longer sets omitOpenInNewTab. In terminal-file-link-actions.ts, the openInGroupRow is now shown when !worktreeRoot, fileContext.sourceHostResolved, and canOpenLinkInSourceGroup(state, worktreeId, sourceTabId) hold. Its run() calls openDetectedFilePath with openInSourceGroupSurface: 'internal', so the row restores the requested option. The "Open file" primary action is unchanged, which matches the issue's side-by-side default. Line and column are passed through from the resolved link. Limitation: I did not re-read openDetectedFilePath or the source-group placement code, so the full-width placement and paired-host routing rest on existing shared routing. I could not read the diff, and the summary reports tests without names, so I did not verify test coverage.

Full details: Out of Scope Changes check

Explanation

The change set is limited to two files. native-chat-link-target-actions.ts no longer sets omitOpenInNewTab for file links. terminal-file-link-actions.ts removes the omitOpenInNewTab field and its check, so the row depends on the existing worktree, host-resolution, and source-group conditions. Both edits directly enable the "Open in new tab" row that #44424 requests. No unrelated behavior was identified. Limitation: the diff tool was unavailable, so the removed-field edit was judged from the head file contents and the summary. I did not confirm that no other caller still sets omitOpenInNewTab, which a type change could affect at compile time.

Full details: Description check

Explanation

The description covers the main template sections and explains the user-visible change and routing mechanism. It includes linked issue #44424, before-and-after captures, a low-risk rating, a revert note, AI disclosure, and the agent skill boundary checkbox. Gaps: Testing does not list platforms beyond macOS, commands, or test files, and the Testing checklist items are not checked. Risk does not discuss SSH or remote-host compatibility in detail, although the change affects paired-host chats. The description does not mention removal of omitOpenInNewTab from the shared action types. Review and Notes are brief.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3cc1dcd6-e930-483f-9222-ff147544993a
Commits

Reviewing files that changed from the base of the PR and between c5ab35e and 6963423.

Files selected for processing: 2

  • src/renderer/src/components/native-chat/links/actions/native-chat-link-target-actions.ts
  • src/renderer/src/components/terminal-pane/links/files/terminal-file-link-actions.ts
Files with no reviewable changes: 1

  • src/renderer/src/components/terminal-pane/links/files/terminal-file-link-actions.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.

onegaop pushed a commit to onegaop/orca that referenced this pull request Nov 27, 2026
Apply stablyai#45791, stablyai#50257, stablyai#48696 and keep artifact links on their conversation host. Preserve the built-in ACP version guard where upstream meeting fork types.
@codinronan

Copy link
Copy Markdown

I'd love to see this merged!

This branch has not been deployed

No deployments
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.

[Feature]: Restore “Open in new tab” for file links in agent chat

2 participants