Repository navigation
fix(native-chat): drop Open in new tab from the file link menu - #39950
Merged
Merged
Conversation
Chat file links share the terminal's row builder, which added the row whenever the source tab had a split or neighbor. Open file already places the file beside the chat, so the extra row was noise. Terminal links keep it.
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 4 minutes. View limit details
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. |
8 of 9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
When you click a file name in an agent's chat reply, the little menu no longer offers "Open in new tab". It now shows Open file, Open with default app and Reveal in Finder.
What Changed
buildFileLinkActions, which adds "Open in new tab" whenever the source tab can be split or has a neighbor group. A newomitOpenInNewTaboption on that builder's deps drops the row, andnativeChatFileLinkActionssets it. The click popover, the right-click menu and linked images in chat all go through that one function, so all three change together.Why
Open file already places the file beside the chat (the default since #30399), so the extra row added little in chat and made the menu longer. Terminal file links keep the row: the ask was chat only, and the terminal is where the explicit "open in this group" action came from. Web links in chat are untouched; their "Open in new tab" comes from a separate builder (
buildHttpLinkActions). Filtering the row out after the builder ran would have meant matching on a label, so the builder takes the option instead.Mobile chat has no such row, so nothing changes there.
Linked Issue
No issue; requested internally.
Visual Proof
Click popover, before and after:
(screenshot removed: contained real product data)
(screenshot removed: contained real product data)
Right-click menu, before and after:
(screenshot removed: contained real product data)
(screenshot removed: contained real product data)
Testing
Hidden dev build on macOS, real Claude chat that printed a
Files changed:link. Clicked and right-clicked the link before and after the change and read the menu rows from the DOM. After the change, Open file still openedopen-editor-html-preview.tsin an editor tab beside the chat. Ran the existing file-link tests (native-chat-host-file-open.test.ts,terminal-link-open-beside-source.test.ts) andpnpm check:changed.No test added: it would only pin a menu row list.
Risk
Chat users who used "Open in new tab" to pin a file to the chat's own group lose that row; Open file still opens it beside the chat. Terminal, web-link and mobile menus are unchanged. Back out with a plain revert.
Level: Low
AI Disclosure
Review
Agent skill upstream boundary
Notes
Renderer-only change to which rows a menu offers. No platform, SSH, wire or saved-data impact.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)