Four window tests built a local fixture, set app.remote, then looked up
the fixture's own paths. On Windows those are C:\ paths, which a Unix
host never sends and POSIX rules do not resolve. remote_view_over roots
the scanned fixture at the temporary directory on Unix, keeping the
nothing-deleted checks real, and at /srv/fixture on Windows.
SSH hosts are Unix: the remote command, the embedded scanners and the
delete script are POSIX shell and Linux tools. But remote paths were
joined, split and compared with std::path, which follows the client. On
a Windows client that joined /home/x and child into /home/x\child, so
marks, the trail and the exported delete script named files that do not
exist on the host, and a Unix name containing \ or : failed the whole
scan.
PathStyle (core) holds both rules: Native is std::path for local scans,
Posix is /-separated for SSH hosts. path_of, mark lookup and display,
crumbs, the trail, mark containment and the progress line now go through
it. On Unix clients the two agree, so nothing changes there.
Marks are keyed by exact path text, since PathBuf equality on Windows
treats \ as a separator. The client refuses a Windows host by name, and
checks the header's home and disk root as well as its root. The SSH CLI
refuses a root that is not /-rooted. The round-trip tests that run the
helper locally are Unix-only, since the local machine is the host; new
hand-built streams and a window test cover a Unix host on every client.
Windows clients rejected every path an SSH host sent. The helper is
Unix-only, so remote roots are /-rooted, but Path::is_absolute also
wants a drive letter on Windows. Root discovery, the scan header and
the picker now check remote paths with is_remote_absolute, which
agrees with is_absolute on Unix.
The volume picker test compared against the unresolved temporary
path. Accepting a local root canonicalizes it, and the temporary
directory is /var -> /private/var on macOS and an 8.3 short name on
Windows runners.
spawn_command and wait in remote.rs are only used by the Unix tests,
so clippy -D warnings failed on Windows. Gate them on unix.
The list `?` opens could only be closed from the keyboard, so a hand on
the mouse had to go back to it. Its heading now ends in a Close button,
and a press outside the card closes it as Escape does. A press on the
card is the card's own, and neither reaches the screen behind.
The dimmed page and its heading are `modal` and `page_header`, which
take the function that closes them, so another page can be built on
them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The git probe sets GIT_ALLOW_PROTOCOL=none: a scanned checkout's own
configuration could otherwise name a transport for git to run while
disktree only meant to read its status.
The removal guard no longer passes a path whose real location cannot be
read while its parent is there to read; a link leading out of the scanned
root could hide behind that failure.
The NTFS file-table reader bounds what a crafted volume can make it do:
attribute-list records are capped, a table that claims more than its
runs hold is refused, and a directory graph with a cycle stops the walk
so the scan falls back to the ordinary one.
Byte totals saturate instead of overflowing; release builds check
overflow, so a wrapped sum was a panic.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Switching the metric re-ranks the tree in place instead of cloning it,
which on a whole disk is tens of millions of nodes copied to change an
order. A frame builds label text only for the tiles whose labels it will
draw, and reuses the set of marked crumbs until the marks or the tree
change. The sibling menu names only the rows it shows, layout picks its
kept children with a partial sort, and `Node::find` walks a real queue.
The free-space ticker asks the volume off the UI thread, since a network
or sleeping drive can take seconds to answer, and shift-scroll panning is
clamped like every other way of moving the view.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bold alone lost to the hover fill: with the pointer on another row, two
rows were filled and nothing said which was saved. The saved preset now
keeps a check wherever the highlight goes, and the pointer moves the same
single highlight the arrow keys do. The menu is wider so Drain My Battery
still fits beside the check.
The free space meter measures the scanned volume, but the projection added
every marked target's bytes. A mark on another volume -- which -X crosses
into, and a disk mounted inside the tree can hold -- gives its space back
there, so the meter lent one disk another's.
Attribute each target to the volume its bytes return to, by the rule the
scan itself bounds a volume with (mount source and type, not a device
number), and project only what comes back to the scanned volume. Marks on
other volumes, snapshot subvolumes, and paths the mount table cannot place
are reported as "not counted here" rather than added; every marked target
is still removable, and the delete list still totals every byte.
A home directory of 2.6 million directories and 17 million files is
19.7 million nodes, so every field of Node is paid that many times: its
120 bytes were 2.36 GB of the scan's 3.27 GB peak.
- own_bytes and own_files are no longer stored. After aggregate a leaf's
own figures always equal its totals, and only the selection line reads
a directory's, so Node::own_bytes() and own_files() sum the direct
children when asked. A leaf's bytes is now the measured size and the
only input; de-duplication zeroes it for a second name, as it zeroed
own_bytes before.
- dirs is a u32, which packs beside the one-byte fields.
- inode is Option<(u64, NonZeroU64)>: no file has inode or file record
zero, so None fits in the niche and the pair costs 16 bytes, not 24.
Node::identity() gives the plain pair.
On the same home directory, peak memory for a scan falls from 3,267 MB
to 2,588 MB and node storage from 2,359 MB to 1,731 MB. Trees are
identical to upstream's with de-duplication off (1.25 million nodes
across ~/src, /Applications and /System/Applications, both size modes),
and the totals are identical with it on. a_node_stays_small holds the
size on 64-bit targets.
Whole-drive scans on an 18-core Apple silicon Mac (medians of three) took
209 s and 433 CPU-seconds with 4 workers, 133 s and 580 with 8, and 137 s
and 1,314 with 18. The tooltip said more than Balanced finishes "only about
20% sooner for about twice the CPU", which those runs contradict: 8 is a
third faster than 4, and 18 is no faster than 8 at over twice its CPU.
Other platforms keep the shape without numbers, since it was not measured
there.
The preset control added a second row to the top bar and a stacked-button
popup that marked the choice with the accent outline, unlike every other
menu in the app. It is now one framed control after Depth: a four-bar
signal gauge whose tooltip names the preset, its worker count and the
cost of going above Balanced (about 20% sooner for about twice the CPU,
with the fans at full speed on macOS).
The menu is built like the sibling menu: a caption header with the CPU
count, name, share-of-CPUs bar and worker count per row, the current
preset in bold, and the arrow keys, Enter and Escape. A preset that would
run no more workers than the one below it on this machine is shown but
disabled, and the arrows step over it. Labels say "workers" throughout.
With the settings back on one line, a long trail could clip the current
crumb's menu chevron. The trail now packs to its end, so it gives up its
start instead.
Right-clicking a tile in the treemap selects it and shows it in Finder,
File Explorer or the file manager, the same reveal `o` already does.
The platform work is GPUI's reveal_path, which runs detached on every
system. On macOS a ctrl-click arrives as a right-click, so it reveals
too; cmd-click still marks.