Skip to content

Release 2.13.2: copy what you highlight, paste with Ctrl+V on Windows - #3

Merged
jgassens merged 4 commits into
mainfrom
claude/dazzling-allen-4wc19o
Oct 4, 2026
Merged

jgassens merged 4 commits into
mainfrom
claude/dazzling-allen-4wc19o

Conversation

@jgassens

@jgassens jgassens commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Copy on Mac: Safari copied a blank line, and Chrome needed Option held. A plain left drag went to tmux (copy mode), and the page rebuilt the text from pointer cells plus tmux's OSC 52 echo; multi-line drags also picked up tmux's [0/0] marker. forceNativeTerminalSelection makes a plain left press inside the terminal look like xterm's forced-selection press (Option on Apple platforms via /^Mac/, Shift elsewhere after clearing the old selection), and mouseup copies xterm's own selection, so the copy equals the highlight. Wheel scrolling still reaches tmux. Trade-off: left clicks and taps no longer reach tmux or programs that read the mouse.
  • Paste on Windows/Linux: xterm sent plain Ctrl+V to Codex as a raw ^V, so nothing pasted and Codex reported "clipboard unavailable … X11". isBrowserPasteShortcut hands Ctrl+V (and Ctrl+Shift+V, Shift+Insert) to the browser's paste event, for text and images. Programs no longer receive ^V there. Apple platforms are unchanged.
  • Image pasted twice: imageFilesFromTransfer now uses items only when files is empty.
  • Terminal proxy: the image service forwards /terminal (pages and the WebSocket) with http-proxy 1.18.1 directly instead of http-proxy-middleware. That removes micromatch/braces (GHSA-vfj7-8cjw-p6xm, no fixed release), so npm audit --audit-level=high passes again.
  • New CI job, Terminal copy (browser) (dev/terminal-copy-e2e): runs the add-on's tmux config on a private tmux server, a checksummed ttyd 1.7.7 and the image service under Playwright Chromium as Mac and as Windows. It checks that the copy equals the highlight, that tmux never takes the drag, that Windows Ctrl+V pastes text and uploads an image exactly once, and that the wheel scrolls.
  • Version 2.13.2 and a changelog entry.

Verification

  • All four checks pass on 86696d2: Source and tests (including npm audit), Terminal copy (browser), and both container builds.
  • The e2e fails on the earlier code: on main every drag case fails; on a9db284 the drag cases fail on an extra character and Windows Ctrl+V pasted nothing.
  • Fable reviewed a9db284, 8abe48c and 86696d2 and found nothing blocking. Its findings were addressed, apart from one optional follow-up: an error listener on the upgrade socket before terminalProxy.ws(), a gap that predates this PR.
  • A session on the user's Windows 11 machine confirmed in real Chrome that the copy matches the highlight and that the Ctrl+V approach pastes into Codex.

🤖 Generated with Claude Code

https://claude.ai/code/session_012wmNZaAvWRdkfLtjKo7fND

A plain left drag in the terminal went to tmux, which highlighted in copy
mode, and the page then rebuilt the text from pointer coordinates and the
OSC 52 echo. In Safari that copied a blank line, and on multi-line drags it
also picked up tmux's [0/0] copy-mode marker. Option-drag, which forces
xterm's own selection, copied correctly. Make every plain left press in the
terminal look like that forced-selection press to xterm (Option on Apple
platforms, Shift elsewhere), so the highlighted text is what gets copied;
wheel scrolling still reaches tmux.

Add a real-browser CI job (dev/terminal-copy-e2e) that runs the add-on's
tmux config, ttyd and the image service, drags in Chromium on Apple and
non-Apple platforms, and checks the clipboard and that tmux never takes the
drag. It fails on the previous code and passes on this one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012wmNZaAvWRdkfLtjKo7fND
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-04T14:13:43.735670Z a9db284 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

jgassens commented Oct 4, 2026

Copy link
Copy Markdown
Owner Author

Source and tests fails only at npm audit --audit-level=high, on GHSA-vfj7-8cjw-p6xm in braces (via http-proxy-middleware → micromatch). That failure is not caused by this PR. It is the same advisory described on #2: it fails on main too, no patched braces exists, and this PR changes no npm dependencies. All Python and image-service tests in the job ran before the audit step and passed.


Generated by Claude Code

…es once

- Windows/Linux: xterm turned Ctrl+V into a raw ^V for Codex, which then
  failed to read an X11 clipboard in the container. Ctrl+V, Ctrl+Shift+V
  and Shift+Insert now go to the browser's paste there (text and images).
- When xterm drew the highlight, copy its selection instead of rebuilding
  it from pointer cells, which rounded differently and could copy one more
  character (Fable review). Detect Apple platforms the way xterm does.
- A clipboard image appears in both files and items with fresh timestamps,
  so one paste uploaded twice; use items only when files is empty.
- e2e: private tmux server, fail fast if the service never starts, assert
  copy == highlight at a half-cell release point, and check Windows Ctrl+V
  text paste and a single image upload. It fails on the previous commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012wmNZaAvWRdkfLtjKo7fND
@jgassens jgassens changed the title Release 2.13.2: copy what you highlight, in Safari and Chrome on Mac Release 2.13.2: copy what you highlight, paste with Ctrl+V on Windows Oct 4, 2026
claude added 2 commits October 4, 2026 14:22
…dows/Linux

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012wmNZaAvWRdkfLtjKo7fND
…ware

npm audit --audit-level=high fails on GHSA-vfj7-8cjw-p6xm in braces, which
has no fixed release and reaches the image service only through
http-proxy-middleware -> micromatch. The middleware added nothing this one
fixed /terminal mount needs beyond what http-proxy (its own engine, same
1.18.1) does, so use http-proxy directly: same target, changeOrigin and ws,
the /terminal prefix stripped by the Express mount for pages and explicitly
for upgrades, and a 502 or socket close on proxy errors. npm audit now
reports 0 vulnerabilities; the ttyd Unix-socket integration test and the
real-browser e2e pass, and a dead ttyd yields a 502 without taking the
service down.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012wmNZaAvWRdkfLtjKo7fND
@jgassens
jgassens merged commit 01ce898 into main Oct 4, 2026
4 checks passed
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