Repository navigation
fix(computer-use): preserve clipboard text on Windows, macOS and Linux - #3440
Merged
Merged
Conversation
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.
ComputerUse already exposed
clipboard_getandclipboard_set, but Windows passed writes through a line-oriented PowerShell pipeline, reads ignored the advertisedmax_output_bytes, and clipboard helpers could wait indefinitely. This change makes plain-text reads/writes preserve Unicode, empty strings, and LF/CRLF on Windows, macOS, and Linux.wl-clipboardfor Wayland;xclip/xselfor X11).max_output_byteswhile retaining the oldmax_bytesalias and result fields. Require the control owner lease for reads and deny global clipboard access during window-only sharing.Validation completed locally: Services Core 20 tests including real macOS AppKit round trips on a private named pasteboard; 59 focused Core tool tests; five control contract tests; 11 Desktop admission tests; full Desktop build; Windows and Linux service/test cross-checks; repository hygiene and GitHub configuration checks; shell syntax and diff checks.
Native CI evidence on the final commit: Windows system clipboard round trip passed (one test, zero ignored); macOS clipboard suite passed including the real named AppKit pasteboard (20 tests, zero ignored); isolated Linux X11 and Wayland round trips each passed (one test, zero ignored per display server). All 14 PR checks passed, including the three OS Rust jobs, three CLI jobs, frontend, Linux x64/ARM64 release validation, and the final Rust/CLI result. CI run.
Remote coverage: tool fixtures reject clipboard actions for SSH workspaces and headless hosts before native IO. Relay remote control, Peer Device Mode, and live Detached Dispatch were not exercised end to end. Clipboard operations remain on the executing desktop host; no controller-local fallback is introduced. No persisted shape is changed.