Skip to content

VFS (SSH, SMB)#33

Merged
kromych merged 6 commits into
mainfrom
feat/vfs
Jul 5, 2026
Merged

VFS (SSH, SMB)#33
kromych merged 6 commits into
mainfrom
feat/vfs

Conversation

@kromych

@kromych kromych commented Jul 5, 2026

Copy link
Copy Markdown
Owner

No description provided.

kromych and others added 6 commits July 4, 2026 16:58
The doc examples still imported from `edit`, the upstream crate name,
so `cargo test --workspace` failed to compile the doctests.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Ctrl+O switches to the primary screen buffer (the output of previously
run commands) until Ctrl+O or Esc is pressed, the FAR panels-off model.
The macOS Copy alternative moves from Ctrl+O to Ctrl+C to free the key.

The TUI enter/leave escape sequences and the suspend/restore sequencing
move into platform (with_tui_suspended, run_foreground) so interactive
foreground commands and the user-screen view share one implementation.
run_foreground takes a prepared Command and pauses for acknowledgement
on failure, which later lets other callers run programs that must own
the terminal.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A synchronous client for the SFTP v3 wire protocol
(draft-ietf-secsh-filexfer-02 as implemented by OpenSSH) over any
Read + Write transport, with the posix-rename@openssh.com and
statvfs@openssh.com extensions. Tests run the client against an
in-memory mock server and, where installed, the real OpenSSH
sftp-server binary over pipes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Panel paths of the form ssh://[user@]host[:port]/path address a remote
filesystem through a vfs layer that mirrors the std::fs calls the
application needs and routes them to per-host SFTP connections. The
transport is a spawned `ssh -s <host> sftp` subsystem, so keys, agents,
and ~/.ssh/config behave exactly like plain ssh; on Unix a connection
master is bootstrapped interactively with the TUI suspended and worker
channels attach to its socket with BatchMode. Path algebra on remote
paths is lexical POSIX (vfs::join/parent/normalize), never
PathBuf::join, which would corrupt URLs on Windows.

Browsing, sorting, quick view, copy, move, rename, mkdir, and delete
work on remote directories; copies stream through this host with byte
progress and remain cancellable. Enter on a remote file downloads it
to a temporary directory and opens it on completion (a Download job);
a download cancelled from the progress dialog discards the partial
file instead of opening it. The command line runs commands on the
remote host over `ssh -t` in the panel's directory, and hosts from
~/.ssh/config appear as roots in the change-root dialog.

Panels sample free space at refresh time instead of statvfs per frame,
which would be a round trip on remote panels.

Live end-to-end coverage is gated on RUF4_SSH_E2E_DEST /
RUF4_SSH_CONFIG pointing at a disposable sshd.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
cd smb://[user@]host/share/path opens an SMB share through the
operating system's native client and the panel then works on an
ordinary local directory: Windows rewrites the URL to a UNC path,
macOS mounts with mount_smbfs under ~/.ruf4/mnt (a marker file beside
the mountpoint lets an unmounted share remount when revisited through
history), Linux mounts in user space with gio mount (GVFS). Credential
prompts run with the panels hidden, like the ssh bootstrap. Mounted
shares appear in the change-root dialog next to the local drives.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@kromych kromych merged commit ed1fc6f into main Jul 5, 2026
10 checks passed
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