Commit Graph
17 Commits
Author SHA1 Message Date
Mark SilversteinandClaude Opus 5.5 fdb2e42e5e fix: never delete into a filesystem mounted inside a target
remove_dir_all crosses mount boundaries, so permanently deleting a marked
directory emptied anything mounted below it (sshfs, NFS, a USB disk, a
bind mount) before failing with EBUSY on the mount point. A one-filesystem
scan never shows that content, so it was data the user never saw.

The plan now refuses a target with a mount point beneath it, and the
removal walks the tree itself with openat(O_NOFOLLOW), stopping at a
directory on another device or mount (statx mount ID, which also sees
same-filesystem bind mounts).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 13:57:48 +08:00
Tobi Lutke bf6cbbfbee 0.9.1 v0.9.1 2026-09-24 17:27:34 -06:00
Tobi Lutke 010f8ca972 README: marking covers everything inside 2026-09-24 17:19:51 -06:00
Tobi Lutke 15aed9135f Marking a directory marks everything inside it
Removing a directory takes its contents, so everything inside a marked
directory is drawn marked: the same danger fill and label, with the ring
only on the outermost so the mosaic does not become a grid of borders.

A mark absorbs the marks already inside it, and a path inside a marked
directory cannot be marked on its own: Space says which mark it goes
with, and the panel's button becomes "Unmark <directory>".
2026-09-24 17:19:36 -06:00
Tobi Lutke 59096e4744 A better screenshot; actions/checkout v5 (Node 24) 2026-09-24 17:29:52 -05:00
Tobi Lutke 92f4031216 0.9.0: screenshot, CI, and release builds
- The README opens with a screenshot, and says how to install a release.
- CI lints and tests every push and pull request on a pinned toolchain.
- Pushing a v* tag builds a release on the oldest supported Ubuntu (for
  glibc reach), checks the tag against Cargo.toml, runs the tests, and
  publishes disktree-<version>-x86_64-linux.tar.gz with a checksum. The
  archive carries install.sh, which installs the binary, desktop entry
  and icon into ~/.local without a Rust toolchain.
- The desktop entry passes a path (%f), not a URI, to disktree.
v0.9.0
2026-09-24 17:13:38 -05:00
Tobi Lutke e2c397b4b0 The trail moves to the top bar, with sibling menus
Each crumb in the tree has a ▾ listing its siblings, largest first, with a
share bar in each one's colour and its size: a jump sideways without
going up. The current crumb opens it on a click too. Arrows, Home, End
and Enter work inside it; Escape or a click outside closes it. A deep
trail folds its middle into an ellipsis.

The scan totals move under it, as one quiet line beside the legend.
2026-09-24 16:55:14 -05:00
Tobi Lutke c11c86f50f app: a trail from /, and typeahead filtering
- The trail always starts at /. Directories above the scanned root are
  dimmer; clicking one widens the scan to there, reusing the tree already
  measured, with the current view kept until the wider tree lands. g goes
  to the whole disk. The Home | Whole disk switch is gone.
- / filters: as you type, only matches keep their colour (the directories
  holding them step back less); Enter lays out only the matches at their
  size, with the largest selected; Escape clears. The search runs off the
  UI thread, newest keystroke wins, and an early Enter applies on arrival.
2026-09-24 16:51:31 -05:00
Tobi Lutke 23b9e5d21b core: memoized widening and name filtering
- scan: spawn_with takes a Known subtree and reuses it where the walk
  reaches it, so widening from ~ to / reads only what is outside ~.
- filter: which nodes match a name, ignoring ASCII case without
  allocating. Matches are kept whole; their ancestors are kept sized by
  what matched beneath them.
- treemap: layout_filtered lays out only what a filter keeps.
2026-09-24 16:51:31 -05:00
Tobi Lutke f67fd56174 Whole-disk launcher action; README for the redesign 2026-09-24 16:42:08 -05:00
Tobi Lutke 75d657d57a app: colour that means something, a side panel, the whole disk
- Tiles are coloured by kind at one muted level, lighter with depth, and
  hatched where the space can be had back. Age mode colours by last write.
  Top-level directories carry a strip of their colour.
- One highlight, the theme's amber: selection, the main action, what the
  marks free. Outlines paint after every fill and snap to device pixels.
- A resizable side panel replaces the bottom bars: the selection with its
  size set large, share, files, last write and git state (changes,
  stashes, unpushed); worth a look; the marked list with a way off it; and
  the disk, free now and after, with the review button carrying the
  saving it would make.
- Home or the whole disk, from the top bar or with g.
- The mosaic stops hovering when the pointer leaves it, so its tooltip
  never covers the panel handle.
2026-09-24 16:42:08 -05:00
Tobi Lutke 5b7361b015 core: kinds, findings, and scanning a whole disk
- classify: a category per node (code, agent scratch, toolchains, synced,
  git, media, documents, cache) from names and shapes — a bare repository
  is git whatever it is called — and a reclaim reason for caches, sync
  history, package stores and build output beside its manifest.
- insights: "worth a look", the largest findings that never nest:
  reclaimable space, agent worktrees, experiments untouched for a month.
- nodes carry their newest write time, rolled up by aggregate.
- space: a mount-table model of a volume. One volume is one mount source,
  so btrfs subvolumes (/home, /var/log) stay in and /proc, tmpfs, /boot,
  network shares and automount points stay out, checked by path so a NAS
  is never mounted to be measured. Staying on the volume is now the
  default; volume_root finds the disk a home directory lives on.
- removal: system trees (/usr, /etc, /var/lib, /nix/store, …) are refused.
- treemap: wider gaps between top-level directories, full name bands only
  at the first level and a slim label row below it.
2026-09-24 16:42:08 -05:00
Tobi Lutke a2b03f3e8c README, agent guide and MIT license 2026-09-24 15:56:19 -05:00
Tobi Lutke 1b5588f114 Install with make: binary, desktop entry and icon
`make install` puts disktree in ~/.local with a desktop entry for the
launcher and a file manager's "Open with" for directories. The build step
always asks cargo, so a stale binary is never installed.
2026-09-24 15:56:19 -05:00
Tobi Lutke cd41a9f7c8 disktree-app: a GPUI treemap explorer for Omarchy
Explore a scanned tree as a mosaic, mark what should go, review the list
and remove it, with the volume's free space live on screen.

- Keyboard and mouse throughout; keys act on the tile under the pointer
  when the pointer moved last. Cursor tooltip above the whole window.
- The wheel magnifies toward a directory until it fills the view, then
  goes into it; tiles telescope from where they were to where they are.
- Review screen with a segmented trash/permanent choice. The trash is the
  default when available; a permanent deletion asks in an alert dialog.
- Layout follows the gpui-kit design guides: every size on one rem scale,
  ctrl =/-/0 interface zoom, and colours derived from the Omarchy theme.
- Window-harness tests draw frames and press keys, end to end.
2026-09-24 15:56:19 -05:00
Tobi Lutke 60209e9cae disktree-core: scan, layout, free space and removal
- scan: dust's approach — one rayon scope, a +1 completion counter per
  directory, bottom-up aggregation — with live progress and cancellation.
  Disk usage by default, hardlinks counted once, symlinks not followed.
- tree: nodes with derived totals; aggregate() is the single source.
- treemap: squarified layout in viewport pixels, a name band per
  subdivided directory, and crumbs that always address the scanned tree.
- space: statvfs, and the projection after removing marked bytes.
- removal: guarded plans (root, home, scanned root, mount points and
  paths outside the root are refused), rm -rf semantics without a shell,
  and trash via trash-put, gio or a built-in XDG implementation.
2026-09-24 15:56:19 -05:00
Tobi Lutke 406dda52d2 Workspace with strict lint gates
A three-member workspace (core, app, xtask) with omatrack's lint policy:
clippy::all and clippy::pedantic are errors, nursery warns, and every
deliberate exception is listed with its reason. `cargo xtask lint` runs
rustfmt --check and clippy with -D warnings; it reports, never fixes.
2026-09-24 15:56:19 -05:00