feat(web): terminal link context menu actions - #7280
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
e3f1bc3 to
ba7c971
Compare
There was a problem hiding this comment.
One finding: the newly pinned right-click link highlight can be unpinned by a superseded menu flow (browser fallback menu), leaving the open menu with no highlighted target. Details inline.
Posted via Macroscope — UI Consistency
There was a problem hiding this comment.
Reviewed the terminal link changes for UI/interaction consistency. One finding: the new "Add path/link to chat" action silently drops the target when the composer refuses input, unlike the other add-to-chat surface and unlike every other failure path in the terminal context menu. Everything else (menu item shape/labels/icon: "copy", pinned-highlight lifetime, modifier-gated hover matching activation, focused tests) matches existing repo contracts.
Posted via Macroscope — UI Consistency
cb9f05f to
c54a206
Compare
There was a problem hiding this comment.
UI consistency review: one finding on how terminal paths are inserted into the composer.
Posted via Macroscope — UI Consistency
There was a problem hiding this comment.
One finding: terminalLinkChatText can emit a composer file link with an empty label for directory-style terminal links, which renders as a label-less chip in the composer. Details inline.
Posted via Macroscope — UI Consistency
c54a206 to
cf2bb08
Compare
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This PR introduces several new terminal link workflows—editor opening, system or integrated browser navigation, clipboard handling, chat insertion, and persistent link highlighting—across shared terminal and composer code. The cross-component interactive behavior and external side effects are broader than a minor self-contained UI change. You can add or adjust custom eligibility rules. Learn more. |
cf2bb08 to
278b617
Compare
6864071 to
27c4e07
Compare
There was a problem hiding this comment.
One finding: a comment documenting a browser/Electron constraint was dropped from terminalContextMenuItems while the behavior it explains is unchanged. Everything else in the diff looks consistent — the new menu entries reuse the shared ContextMenuItem contract (labels and the copy icon match pullRequestLinkContextMenu / ChatMarkdown's file-link menu), the new "Unable to add to chat" toast matches the sibling flow in FileBrowserPanel, and the pinned link highlight is re-projected through screen coordinates so scrolling and superseded menus don't strand it.
Posted via Macroscope — UI Consistency
|
last failed macroscope check is over a suggested comment, not actually any functionality issues |
be165ee to
a4a9704
Compare
There was a problem hiding this comment.
One finding on the new terminal link context menu: the open-link entry chains into a second context menu for previewable URLs instead of offering the destinations in the menu the user already opened.
Posted via Macroscope — UI Consistency
There was a problem hiding this comment.
One consistency finding: the terminal link's two open destinations are now labelled two different ways depending on the gesture (right-click vs modifier-click). Details inline.
Posted via Macroscope — UI Consistency
c15945b to
386ce1c
Compare
There was a problem hiding this comment.
Reviewed the changed TypeScript against the Effect service conventions. No Effect service definitions, layers, error classes, or runtime boundaries are introduced or modified here: openTerminalLinkInPreview.ts keeps its existing Schema.TaggedErrorClass errors with structural attributes plus a preserved cause, no ManagedRuntime.make, Layer.succeed, or runPromise* usage is added, and no service instances are passed as constructor parameters. One change-discipline nit below.
Posted via Macroscope — Effect Service Conventions
There was a problem hiding this comment.
One finding on the new terminal link menu: Copy path copies the raw matched token, so it can include a :line:col position that no other path-copy action in the app includes.
Posted via Macroscope — UI Consistency
386ce1c to
bf2bf77
Compare
bf2bf77 to
f4fd4ba
Compare
What Changed
Right-clicking a terminal path or URL now offers Open, Add to chat, and Copy for the target under the pointer. The highlight stays for as long as the menu is open.
Add to chat inserts paths with the file chip appearance and URLs as plain text.
Why
Right-clicking threw away the detected target and offered only the selection actions and Paste, so you couldn't open or copy the path or link you were pointing at. Putting this in the context menu is a natural addition.
Behavior precedent
Ghostty-based terminals do the same thing: right-click offers actions for the target under the pointer and pins the highlight while the menu is open.
UI Changes
Before
After
Cap.2026-08-19.at.00.22.13.mp4
Related PRs
Checklist
Implemented by GPT-5.6 Sol and Fable 5 via Codex and T3 Code.
Note
Add terminal link context menu actions for chat, copy, and open
terminalLinkChatTextresolves paths against cwd and strips position suffixes;terminalLinkCopyTextreturns clean URLs or paths without position infoaddTerminalLinkToDraftinChatView, with a toast on failureGhosttyTerminalSurfacepins the link highlight while the context menu is open and passeslinkTextthrough theonContextMenucallbackopenTerminalLinkInPreviewis split into a capability check (canOpenTerminalLinkInPreview) and a direct-open path, withshowTerminalLinkOpenMenupresenting the integrated-vs-system browser choiceGhosttyTerminalSurfaceOptions.onContextMenusignature changes from(event)to(event, linkText)returningvoid | Promise<void>; existing callers must updateMacroscope summarized f4fd4ba.