feat(fm): remote↔remote copy/move via a local relay#36
Merged
Conversation
…o hosts) Copying/moving between two *different* remote hosts (two remote panes on different `node_id`s) used to give up with a "route it through a local pane" toast. Now it relays automatically through this machine. - `relay_remote_to_remote` replaces the RemoteToRemote arm of `route_copy_move`. - `relay_one` (off the main thread) does the whole hop for one entry: download from host A into a unique local temp, upload the temp to host B, then always clean up the temp. Directories relay recursively by reusing `plan_dir_transfer` for both the download and the upload leg. - Move is safe: the source on host A is deleted **only after** the upload to host B has fully succeeded — and the delete runs on the same blocking thread, so a failed relay can never lose data (and no remote delete blocks the UI). One relay runs per selected entry; progress is per-item (a per-byte transfer task across two hops is a possible follow-up). Verified: `cargo check -p warp` clean; `cargo test -p warp --lib sftp_manager` — 263 passed, 0 failed, including 3 new tests (file copy-relay, file move-relay with source removed, and a recursive directory relay, all between two hosts). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
What
Copying/moving between two different remote hosts (two remote panes on different hosts) used to give up with a "route it through a local pane" toast. Now F5/F6 relays automatically through this machine.
How
relay_remote_to_remotereplaces theRemoteToRemotearm ofroute_copy_move.relay_one(off the main thread) does the whole hop for one entry: download from host A into a unique local temp, upload the temp to host B, then always clean up the temp. Directories relay recursively by reusingplan_dir_transfer(from feat(fm): cross-connection directory transfers (copy + move) #35) for both the download and the upload leg.One relay runs per selected entry; progress is per-item (a per-byte transfer task across two hops is a possible follow-up).
Verification
cargo check -p warp— clean, 0 errors/warnings.cargo test -p warp --lib sftp_manager— 263 passed, 0 failed, including 3 new tests: file copy-relay, file move-relay (source removed on host A), and a recursive directory relay — all between two different hosts.Files
app/src/sftp_manager/browser.rs(relay_remote_to_remote+relay_one+relay_temp_path),browser_integration_tests.rs(tests).Backlog after this
Last cross-connection backlog item: an overwrite prompt on cross-connection conflicts (today existing target files are skipped, consistent with the pre-existing behaviour).
🤖 Generated with Claude Code