Repository navigation
Release 2.13.2: copy what you highlight, paste with Ctrl+V on Windows - #3
Merged
Merged
Conversation
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
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Owner
Author
|
Source and tests fails only at 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
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
[0/0]marker.forceNativeTerminalSelectionmakes 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.^V, so nothing pasted and Codex reported "clipboard unavailable … X11".isBrowserPasteShortcuthands 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.imageFilesFromTransfernow usesitemsonly whenfilesis empty./terminal(pages and the WebSocket) withhttp-proxy1.18.1 directly instead ofhttp-proxy-middleware. That removesmicromatch/braces(GHSA-vfj7-8cjw-p6xm, no fixed release), sonpm audit --audit-level=highpasses again.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.Verification
86696d2: Source and tests (includingnpm audit), Terminal copy (browser), and both container builds.mainevery drag case fails; ona9db284the drag cases fail on an extra character and Windows Ctrl+V pasted nothing.a9db284,8abe48cand86696d2and found nothing blocking. Its findings were addressed, apart from one optional follow-up: anerrorlistener on the upgrade socket beforeterminalProxy.ws(), a gap that predates this PR.🤖 Generated with Claude Code
https://claude.ai/code/session_012wmNZaAvWRdkfLtjKo7fND