Skip to content

Turn the trail into a path field to type or paste where to go - #90

Open
armada45-pixel wants to merge 1 commit into
tobi:mainfrom
armada45-pixel:path-field
Open

armada45-pixel wants to merge 1 commit into
tobi:mainfrom
armada45-pixel:path-field

Conversation

@armada45-pixel

@armada45-pixel armada45-pixel commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

One of a set of small PRs that replace #87 and #88, one feature each. Rebased onto 1.5.0 (73bdbb3); they touch neighbouring lines in state.rs, views.rs and tests.rs, so whichever merges later will need another rebase; I'll do those as they come up.

A click on the empty space beside the breadcrumb trail, or ctrl l (⌘L on macOS), turns the trail into a bordered text field holding the current path, like a file manager's address bar. Copy it, or type or paste another and press Enter. Escape, or moving focus elsewhere, puts the trail back.

  • A path inside the scanned tree is a step within it, with no new scan.
  • A path above the root widens the scan, reusing what is measured.
  • Anything else is scanned from scratch. A file names the directory it is in.
  • ~ is the home directory; a bare D: on Windows is that drive's root; quotes from Explorer's "Copy as path" are trimmed.
  • A path that does not exist, or is relative, is said in a notice and not tried.

While the field is open, keys are text: c, ? and the rest do not act on the screen behind it.

Why. The trail shows where you are but could not be typed into. Going to a known path meant clicking down to it or restarting from the command line.

Verified. cargo xtask lint is green on Windows and all 100 disktree-app tests pass, including a new one for SSH mode. 9 tests in disktree-cli, disktree-core and disktree-scanner (btrfs, hardlink and cache tests) fail on Windows on an unchanged 1.5.0 too, so the full cargo xtask test run is red there for reasons outside this PR.

Since 1.5.0. The field sits next to the new source button. In an SSH session a typed path is read from the remote tree, or widened or rescanned over SSH; it is never looked up on this machine.

Not verified. Nothing was run on Linux or macOS. On this branch the feature was exercised through the window-harness tests only; the app was not launched from it. No test covers closing on blur, Enter in the real input (the tests call go_to_path), or ~ and bare drive-letter expansion. ⌘L is untested.

🤖 Generated with Claude Code

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.

Over SSH the typed path is the host's: it is never looked up on this
machine, it must be a POSIX path, and the tree, or a scan over SSH,
says whether it is there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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