Skip to content

fix(terminal): restore clipboard shortcuts and suppress ask popup#263

Closed
viniraioli wants to merge 3 commits into
crynta:mainfrom
viniraioli:fix/terminal-clipboard-shortcuts
Closed

fix(terminal): restore clipboard shortcuts and suppress ask popup#263
viniraioli wants to merge 3 commits into
crynta:mainfrom
viniraioli:fix/terminal-clipboard-shortcuts

Conversation

@viniraioli
Copy link
Copy Markdown
Contributor

What

Restore standard clipboard behavior in terminal and coding-agent sessions, and prevent the Ask Agent selection popup from appearing outside editor tabs.

Why

Windows users currently lose Ctrl+V inside coding agents, and Ctrl+C sends SIGINT even when terminal text is selected. The Ask Agent popup also overlaps copy actions on terminal selections. Closes #240.

How

  • Intercept terminal clipboard shortcuts by platform so copy prefers the current terminal selection and Windows Ctrl+V reads from the system clipboard.
  • Route DOM paste events on the xterm host through erm.paste(...).
  • Clear the Ask Agent popup unless the active tab is an editor.

Testing

  • pnpm exec tsc --noEmit clean
  • Manual smoke-test of the affected feature
  • (If you touched src-tauri/) cargo check clean
  • (If UI) tested in pnpm tauri dev

Screenshots / GIFs

N/A - behavior-only UI change.

Notes for reviewer

I did not run a full manual Windows smoke test in pnpm tauri dev; this is validated by typecheck and targeted code inspection against the issue #240 repro steps.

@viniraioli viniraioli requested a review from crynta as a code owner May 15, 2026 05:05
Copilot AI review requested due to automatic review settings May 15, 2026 05:05
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates terminal and app selection behavior by improving platform-specific keyboard handling and clipboard integration.

Changes:

  • Add a custom xterm addon + shortcut handler to support terminal copy/paste behavior.
  • Switch Ctrl+Backspace modifier detection to use platform constants instead of UA sniffing.
  • Prevent the “Ask” popup from persisting when the active tab is not the editor.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/modules/terminal/lib/rendererPool.ts Adds terminal clipboard handling (paste addon + copy/paste shortcuts) and improves platform modifier detection.
src/app/App.tsx Uses a ref for current tab kind to close the ask popup when not in the editor tab.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/modules/terminal/lib/rendererPool.ts Outdated
@viniraioli viniraioli closed this by deleting the head repository May 16, 2026
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.

Ctrl+C triggers termination instead of copy, and Ctrl+V doesn't work inside coding agents (Claude Code, OpenCode)

2 participants