Skip to content

Add terminal selection copy action#2904

Open
tarik02 wants to merge 7 commits into
pingdotgg:mainfrom
tarik02:feat/terminal-context-menu-copy-upstream-main
Open

Add terminal selection copy action#2904
tarik02 wants to merge 7 commits into
pingdotgg:mainfrom
tarik02:feat/terminal-context-menu-copy-upstream-main

Conversation

@tarik02

@tarik02 tarik02 commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

What Changed

Added "Copy" action to terminal context menu that's shown right after selection.

Why

Currently, copying from terminal requires too many actions:

  1. Select region.
  2. Dismiss context menu (disgusting).
  3. Copy with separate context menu click/ctrl+c/command+c/whatever.

UI Changes

Before:
2026-06-02_08-32_1

After:
2026-06-02_08-32

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

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 through writeTextToClipboard; 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

  • Adds a copy option alongside the existing add-to-chat item in the terminal selection context menu in ThreadTerminalDrawer.tsx.
  • The copy action writes raw selection text to the clipboard via writeTextToClipboard; on failure, prints an error message directly to the terminal.
  • Renames selectionActionOpenRef to selectionActionMenuOpenRef to track menu open state and prevent re-entry while the menu is visible.

Macroscope summarized 0bf347c.

@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: b97796a8-c159-46e8-a116-12bc0d30c67f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Jun 2, 2026
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Jun 2, 2026
@macroscopeapp

macroscopeapp Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: 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.

0rdep

This comment was marked as outdated.

0rdep added a commit to 0rdep/t3code that referenced this pull request Jun 3, 2026
@0rdep

0rdep commented Jun 3, 2026

Copy link
Copy Markdown

please disregard my previous approval. It was intended for my fork, and I am not a member of the pingdotgg/t3code team.

@juliusmarminge
juliusmarminge force-pushed the feat/terminal-context-menu-copy-upstream-main branch from cee3070 to 7ebecc8 Compare June 16, 2026 18:17
@macroscopeapp
macroscopeapp Bot dismissed their stale review June 16, 2026 18:18

Dismissing prior approval to re-evaluate 7ebecc8

macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Jun 16, 2026
@macroscopeapp
macroscopeapp Bot dismissed their stale review June 19, 2026 05:32

Dismissing prior approval to re-evaluate 948a0cd

macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Jun 19, 2026
Comment thread apps/web/src/components/ThreadTerminalDrawer.tsx Outdated
@macroscopeapp
macroscopeapp Bot dismissed their stale review July 18, 2026 08:12

Dismissing prior approval to re-evaluate 820e554

Comment thread apps/web/src/components/ThreadTerminalDrawer.tsx Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 3 potential issues.

Fix All in Cursor

❌ 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.

Comment thread apps/web/src/components/ThreadTerminalDrawer.tsx Outdated
Comment thread apps/web/src/components/ThreadTerminalDrawer.tsx Outdated
Comment thread apps/web/src/components/ThreadTerminalDrawer.tsx Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants