Repository navigation
feat(clipboard): forward copies through Herdr and SSH - #417
Merged
Merged
Conversation
Route buffer and agent copies through native, OSC 52, tmux or explicit command providers. Keep detached clipboard effects transient and request client reads only for paste actions. Add bounded delivery, diagnostics, documentation and regression coverage. Validation: clippy, fmt, Linux/Windows compile checks, 3542 selected tests and live Ghostty/tmux paste checks. The excluded visual-block stack test also fails unchanged main.
Contributor
|
@codex review |
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 23d9913a11
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
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.
Copies in Red currently target the clipboard on the machine running the editor. Over SSH or
herdr --remote, this leaves the attached client's clipboard unchanged, even when applications such as Neovim copy successfully through the same connection.Route buffer, agent, and plugin copies through the active frontend. Auto selects OSC 52 for SSH, tmux, and persistent Herdr panes, including panes without SSH variables; local sessions retain native clipboard behavior. Add explicit backend selection, bounded terminal writes, visible delivery failures, and
red clipboarddiagnostics. Remote paste uses Red's register or the terminal paste shortcut without querying the client's clipboard.Detached sessions forward transient copies to the current attachment, including background plugin copies, and discard pending delivery on disconnect. Native paste is requested only during paste actions. Detach IPC becomes version 4; restart older detached owners before using an updated frontend. The plugin host API version is unchanged.
Refresh Wasmtime/Cranelift and TLS certificate dependencies to address all four RustSec findings from the security audit. Pending copy effects survive multi-chunk detached pastes until the frontend consumes them.
How to Test
red clipboard. ExpectOsc52andherdr=true, including whenSSH_CONNECTIONandSSH_TTYare absent. Runred clipboard --test-copy, then paste into an application on the client machine and check the Unicode test token.yy, and paste on the client. The exact line should arrive. Repeat withred --detach=clipboard-check; detach with Ctrl+Backslash and reattach withred --attach clipboard-check. Reconnect must not replay the earlier copy.-c 'clipboard.max_bytes=3', then yank a longer line. Expect a size error without changing the external clipboard;pmust still paste the full line inside Red. With OSC 52, the terminal paste shortcut remains the route for external clipboard text.red clipboardselectsNative, then verify native copy and paste still work.Validation: all-target/all-feature Clippy passes, 25 focused clipboard tests and all 30 detached mouse-selection tests pass, and all 5 detach tests pass with
RUST_MIN_STACK=8388608. Four retained PTY smoke scenarios verify routing, exact Unicode OSC 52 output, oversized-copy register fallback, and detached copy/no reconnect replay. This verifies terminal output, not an actual desktop paste through the user's Herdr remote client.The configured local registry lacks main's locked
zip 9.0.4. Local checks used an isolated source copy withzip =9.0.3and Wasmtime=48.0.5; neither pin is included in this PR. The updated lockfile uses published crate checksums and dependency metadata;cargo auditreports zero vulnerabilities and no warnings. CI passes against the exact updated dependency set on Linux, macOS, and Windows, including Clippy, runtime/plugin checks, performance, and the security audit. The detach suite's default-stack overflow also reproduces on unchanged main with the same compatibility dependencies.