Repository navigation
Scan another machine over SSH, read-only, from the path field - #101
Open
armada45-pixel wants to merge 3 commits into
Open
armada45-pixel wants to merge 3 commits into
armada45-pixel wants to merge 3 commits into
Conversation
The trail shows where you are but could not be typed into, so going somewhere known meant clicking down to it or starting again from the command line. A click on the empty space beside the trail, or ctrl l, now makes the trail a text field holding the current path, as a file manager's address bar does: Enter goes there, Escape or a click elsewhere puts the trail back. A path inside the tree is a step within it, one above the root widens the scan and keeps what is measured, and anything else is scanned from scratch. A file names its directory. A path that does not exist, or is not a full one, is said in a notice and the field stays open to fix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Typing user@host:/path, a Host from the SSH config as host:/path, or ssh://user@host:port/path into the path field scans that directory on another machine. The other machine does the walk: GNU find lists the tree through the user's own ssh, which never prompts, and the tree is built here from the listing. A listing ssh did not finish is an error, not half a tree whose totals would be believed. A remote tree holds another machine's paths, and the same path may exist here. So while one is on screen nothing marks, removes, reveals or probes a path: marks are dropped, marking, removal and the file manager say why not, git, the free-space meter and the administrator and privacy hints are skipped, and the Mark button and the mark and review hints are not offered. A local root puts all of it back. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two places still took the remote root for a path here. The picker asked which local volume holds it, and a plain path typed into the field was looked for in the remote tree, where a directory of the same name would be stepped into. The picker now lists this machine's volumes as they are, and a typed local path is scanned as a local root. Co-Authored-By: Claude Opus 5.5 <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.
One of a set of small PRs that replace #87 and #88, one feature each. They touch neighbouring lines in
state.rs,views.rsandtests.rs, so whichever merges later will need a rebase; I'll do those as they come up.Builds on #90 (the path field is the way in), so that PR's commit is the first one here. Review the last two commits; I'll rebase once #90 merges.
Typing an address into the path field (
ctrl l) scans a directory on another machine:user@host:/path, as scp writes ithost:/path, wherehostis aHostfrom~/.ssh/config, in whatever case it is typedssh://user@host:2222/pathHow it works. The other machine does the walk. GNU
find -printfruns there through the user's ownssh(BatchMode=yes,ConnectTimeout=10,--before the target, the path shell-quoted with a trailing slash so a symlinked start is entered). The tree is built here from the NUL-separated listing. Nothing is installed remotely and disktree never prompts for a password. A listing that ssh did not finish (exit 255) is an error, not half a tree whose totals would be believed.A remote scan is read-only. Its tree holds another machine's paths, and the same path may exist on this one. While
Disktree::remoteis set:space mark/c reviewhints, the tooltip's mark hint and the Marked section's prompt are not offered;~, and the root is named with its machine;AGENTS.mdgains the house rule "A remote scan is read-only".Verified.
cargo xtask lintandcargo xtask testare green on Windows (71 app tests, 164 core).remote.rsunit tests cover address parsing (rejectingC:/x,http://and dash-led targets), shell quoting, building the tree from a listing, hidden entries and apparent size, host case matching against the SSH config, an empty listing, and exit 255. A window-harness test sets a remote over a real tree and checks that the Mark button and hints disappear, thatspace, reveal and removal are refused with a reason, that a typed local path becomes a local scan, and that a local root restores marking.The same code was run against a real host on the combined branch (#88), from Windows through the system OpenSSH to a Linux machine with GNU find 4.10: a home directory of 820,923 files and 106,027 directories in 3.6 s, with the size, file and directory totals matching
findrun on the host itself; a symlinked start (/bin); a host typed in the wrong case; and a host that does not exist.sshwas confirmed to exit 255 for a session dropped from the far end and for an unknown host key.Not verified. No real connection was made from this split branch itself. Nothing was run on Linux or macOS as the scanning side. The remote side needs GNU
find, so a macOS or BSD target will fail with find's own message. A connection dropped mid-scan inside the app was not tried.🤖 Generated with Claude Code