Skip to content

fix(app): copying from a terminal no longer plays the mac alert sound, and copy on select is honoured - #122

Open
pumfleet wants to merge 4 commits into
mainfrom
fix/terminal-copy-paste
Open

pumfleet wants to merge 4 commits into
mainfrom
fix/terminal-copy-paste

Conversation

@pumfleet

Copy link
Copy Markdown
Contributor

What you get

  • ⌘C in a terminal copies without the Mac alert sound. The terminal draws its own selection, so the page has none; ⌘C fell through to the menu bar's Copy, which had nothing to copy, and macOS beeped. The terminal now takes ⌘C and copies its selection itself. Words selected on the page (a chat, not the terminal) still go through the normal copy.
  • ⌘A selects all of a terminal's text, scrollback included. With Ghostty it used to type an "a".
  • Settings → Terminal → Copy on select does what it says. It was never wired: ghostty-web copied every selection (overwriting whatever you'd copied from a chat), and xterm.js never did. Both renderers now follow the setting, which is off by default, so selecting leaves the clipboard alone until ⌘C.

Linux keeps Ctrl+Shift+C / Ctrl+Shift+V; that handling moved into terminalClipboardKey (lib/terminal-keys.ts) next to the Mac keys, with unit tests.

Notes

Tests

  • pnpm test: new terminal-keys.test.ts cases for Mac and Linux clipboard keys
  • e2e/terminal-keys.spec.ts: ⌘A then ⌘C copies, and pointer selection with Copy on select on/off, for ghostty and xterm
  • App checks, build, tsc -p e2e and the docs build pass locally

🤖 Generated with Claude Code

…, and copy on select is honoured

A terminal's selection is drawn by the terminal, not the page's, so ⌘C
fell through to the menu bar's Copy, which found nothing and beeped. ⌘C
now copies the terminal's selection itself (words selected on the page
still copy as ever), and ⌘A selects all its text instead of typing "a".

Settings → Terminal → Copy on select was never wired: ghostty-web copied
every selection and xterm.js none. TerminalView now copies a pointer
selection only when it's on (off by default), for both renderers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
berth Ready Ready Preview Oct 17, 2026 6:10pm UTC
berth-docs Ready Ready Preview Oct 17, 2026 6:10pm UTC

Request Review

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

2 active deployments
Preview – berth-docs — d087f0f2 Deployed Oct 17, 2026 by vercel[bot]
Preview – berth — d087f0f2 Deployed Oct 17, 2026 by vercel[bot]
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.

2 participants