diff --git a/PLAN.md b/PLAN.md index e8b9923..c861c93 100644 --- a/PLAN.md +++ b/PLAN.md @@ -327,17 +327,19 @@ something long in one, switch away and back, refresh — it's all still there. users`, `hamlab user-rm `; `hamlab install` names the first account after the service user. Not done: a read-only viewer role. - **Space tab** — **shipped 2026-09-22** (`internal/space`, `internal/api/space.go`, - `Space.tsx`), asked for as "exactly WizTree": what is using a disk. A **disk** is picked at - the top, not a partition: the scan covers every filesystem the disk backs — its partitions' - mountpoints, and for a disk in a ZFS pool every mounted dataset of the pool (any of `tank`'s - eight disks shows `tank`). The walk runs as a helper process, `hamlab space-walk `, + `Space.tsx`), asked for as "exactly WizTree": what is using a disk. The unit is a whole + volume, picked from a dropdown at the top: a **disk on its own** (every filesystem its + partitions back) or a **ZFS pool as a whole** (every mounted dataset) — a pool's member + disks are listed under it with the layout (raidz2, 8 disks: sda …) and never offered + apart, since one disk's share of a pool means nothing (Mitchell's call, same day, after a + first cut that listed the disks as chips). The walk runs as a helper process, `hamlab space-walk `, as root through `priv` when the host allows (so `/var/lib/docker` and `/root` count), 32 workers reading directories depth-first, never crossing a filesystem boundary by itself; each root is grafted into one tree at its path. Files under 128 KiB are not kept one by one but summed per folder as "N smaller files" — what keeps a scan of millions of files to tens of MB in the daemon; the tree crosses back as a varint stream (`codec.go`), and the helper's memory goes with it. core's root: 646k files in ~1.2 s. Progress (files, bytes, current - folder) every 250 ms; Cancel sends SIGTERM. The page: disk chips → Scan/Rescan → **Folders** + folder) every 250 ms; Cancel sends SIGTERM. The page: picker → Scan/Rescan → **Folders** (a tree largest-first: size, share of parent as a bar, files, folders, modified; expand in place) over a **treemap** of the selected folder — squarified, nested to the file, tiles coloured by kind (video, images, audio, archives & disk images, documents, code & config,