Skip to content

feat(fm): remote↔remote copy/move via a local relay#36

Merged
iret77 merged 1 commit into
mainfrom
feat/fm-remote-relay
Jul 5, 2026
Merged

feat(fm): remote↔remote copy/move via a local relay#36
iret77 merged 1 commit into
mainfrom
feat/fm-remote-relay

Conversation

@iret77

@iret77 iret77 commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

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_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 (from feat(fm): cross-connection directory transfers (copy + move) #35) 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).

Verification

  • cargo check -p warp — clean, 0 errors/warnings.
  • cargo test -p warp --lib sftp_manager263 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

…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>
@iret77 iret77 merged commit 1ddca23 into main Jul 5, 2026
2 checks passed
@iret77 iret77 deleted the feat/fm-remote-relay branch July 5, 2026 15:33
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.

1 participant