feat: show the disks' free space #6
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/storage"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Roadmap phase 6, first half.
API
GET /api/storage(needs a session): for each disk ofPLANKTON_DISKS,path,available,total_bytes(statvfs f_blocks × f_frsize),free_bytes,reserve_bytes(PLANKTON_MIN_FREE_GB),usable_bytes,pending_bytes(what the session's unfinished torrents on that disk will still write) androom_bytes(usable − pending), plustotalsover the available disks. Read underadd_lock.The room computation is now one function,
downloads::disk_rooms, shared by the disk choice ofPOST /api/downloads, the room check ofPATCHand this route.DiskStatusgainstotal_bytesandreserve_bytes(so/healthshows them too). A disk with more pending than usable now has a room of 0 instead of being skipped: same outcome for any real download.Web
disk <room> free(sum of the room over the disks, mono 11px), each disk in the tooltip, a warning when a disk is missing. Polled every 30 s, and refreshed after a download is added or removed and when metadata loads.used · + selection · X free after / X shortbelow. Start is disabled with "Not enough space: deselect X or free some disk." when it does not fit. The "filed into" path moved under the library select.Checks
cargo fmt, clippy
-D warnings, 129 tests (3 new for the route: two disks with a reserve, a missing disk, pending bytes after adding a torrent); svelte-check and vite build. Screenshots taken against the real backend on two scratch disks.Docs: README API row and Storage section, ROADMAP,
bruno/storage.yml.🤖 Generated with Claude Code