Add terminal selection copy action#2904
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 Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
ApprovabilityVerdict: Approved Adds a standard 'Copy' action to the terminal selection context menu using existing clipboard utilities. Self-contained UI enhancement with proper error handling and no runtime behavior changes beyond the new menu option. You can customize Macroscope's approvability policy. Learn more. |
|
please disregard my previous approval. It was intended for my fork, and I am not a member of the pingdotgg/t3code team. |
cee3070 to
7ebecc8
Compare
Dismissing prior approval to re-evaluate 7ebecc8
Dismissing prior approval to re-evaluate 948a0cd
Dismissing prior approval to re-evaluate 820e554
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 3 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 820e554. Configure here.

What Changed
Added "Copy" action to terminal context menu that's shown right after selection.
Why
Currently, copying from terminal requires too many actions:
UI Changes
Before:

After:

Checklist
Note
Low Risk
Single-file UI change in terminal selection handling; reuses existing clipboard helper with localized error handling and no auth or data-model changes.
Overview
Extends the post-selection terminal context menu so users can Copy without dismissing the menu and using a separate shortcut.
The menu now shows Add to chat and Copy via exported
TERMINAL_SELECTION_ACTION_MENU_ITEMS. Choosing Copy writes the raw xterm selection throughwriteTextToClipboard; failures surface as a[terminal]system message. Add to chat behavior is unchanged (normalized text, clear selection). Dismissing the menu (null) is treated as a no-op instead of being conflated with a choice.Reviewed by Cursor Bugbot for commit 0bf347c. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add 'Copy' action to terminal selection context menu
copyoption alongside the existingadd-to-chatitem in the terminal selection context menu inThreadTerminalDrawer.tsx.writeTextToClipboard; on failure, prints an error message directly to the terminal.selectionActionOpenReftoselectionActionMenuOpenRefto track menu open state and prevent re-entry while the menu is visible.Macroscope summarized 0bf347c.