Skip to content

feat(fm): cross-connection copy local↔remote (F5, increment C)#29

Merged
iret77 merged 1 commit into
mainfrom
feat/fm-cross-connection
Jul 4, 2026
Merged

feat(fm): cross-connection copy local↔remote (F5, increment C)#29
iret77 merged 1 commit into
mainfrom
feat/fm-cross-connection

Conversation

@iret77

@iret77 iret77 commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator

Extends the MC copy verb across connections: F5 between a local pane and a remote pane now routes each source file through the transfer engine (upload or download) — with progress and cancel, like any other transfer.

What lands

  • plan_transfer(source_fs, target_fs) — pure routing decision: DirectSameFs | Upload | Download | RemoteToRemote. Fully unit-tested.
  • Registry now also holds backends (set_backend / backend_for, dropped on close) so a local pane can upload through the remote pane's session. others() returns targets across filesystems.
  • Dispatch in copy_or_move_to_other_pane: same fs keeps the direct backend copy/rename (increment B); local↔remote spawns an upload/download via a shared spawn_transfer_with_backend that mirrors the proven drag-and-drop transfer path. Existing targets are skipped (checked on whichever side owns the destination).

Honest deferrals (reported, never half-done): directories across connections, move across connections, and two-different-remote-hosts. These are the remainder of increment C.

Verified: cargo check -p warp 0 errors/0 warnings; 248 sftp + 5 registry + 6 keynav tests green — including 2 new synchronous routing tests (local→remote starts an upload; cross-connection move is deferred, source untouched) plus the plan/backend unit tests.

🤖 Generated with Claude Code

Extends F5 beyond the same filesystem: copying between a local pane and
a remote pane now routes each source file through the transfer engine
(upload or download), so it shows progress and can be cancelled like any
other transfer.

- fm_registry: a pure `plan_transfer(source_fs, target_fs)` decides the
  route (DirectSameFs | Upload | Download | RemoteToRemote); the registry
  now also holds each pane's backend handle (`set_backend`/`backend_for`,
  dropped on close) so a local pane can upload through the remote pane's
  session. `others()` returns targets across filesystems.
- browser: copy_or_move_to_other_pane dispatches on the plan — same fs
  keeps the direct backend copy/rename; local↔remote spawns an
  upload/download via a shared `spawn_transfer_with_backend` that mirrors
  the proven drag-and-drop transfer path. Existing targets are skipped
  (checked on whichever side owns the destination).
- Honest deferrals (reported, never half-done): directories across
  connections, move across connections, and two-different-remote-hosts.

Verified: cargo check -p warp 0/0; 248 sftp + 5 registry + 6 keynav
tests green (2 new cross-connection routing tests + plan/backend units).
No build triggered here.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@iret77 iret77 merged commit 32508fc into main Jul 4, 2026
2 checks passed
@iret77 iret77 deleted the feat/fm-cross-connection branch July 4, 2026 10:32
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