1. Core Scanner [DONE]
2. Filesystem Model [DONE]
3. Analysis Engine [DONE]
4. Zone Intelligence [DONE]
5. Permission Handling [DONE]
6. Scan Accuracy [DONE]
──────── backend baseline ────────
7. TUI [DONE: see notes below]
8. Historical Monitoring [NEXT]
9. Output & Automation
10. Packaging
Rootwatch stays read-only. Safe remediation is a separate, later track.
Scanner (one statx per entry, no per-entry allocation, O(N + D log K + M)),
multi-filesystem model with storage pools and explicit scan scope, scoring with
confidence/age/growth/expectation, /tmp · /home · Nix intelligence, optional
privileged comparison, per-pool coverage and completeness. See README.md.
Ticket numbers refer to the Ratatui roadmap (RW-TUI-nnn).
- 001 Ratatui + tui-input (crossterm backend only, via Ratatui's re-export: one crossterm version)
- 002
src/tui/module structure; scanner/analysis do not depend on it - 003 Terminal lifecycle: raw mode, alternate screen, mouse capture, restore on exit, restore inside the panic hook (release builds abort, so no destructor would run), resize
- 004 Semantic
Commands; all key bindings incommand.rs - 005 One event channel for terminal input, ticks and worker results
- 006
AppState; results held inArc, immutable while displayed
- 007 Scan and analysis run on a worker thread; the UI thread never scans
- 008
ScanStatus+ live progress (entries, directories, bytes, current path) from a lock-free sink in the scanner (ScanConfig::progress,Noneby default) - 009 Rescan (
r): full state reset, no overlapping scans, no stale event can leak
- 010 Header / tabs / main / footer; "Terminal too small" below 80×24
- 011 Shared formatting and styles (
tui/fmt.rs) - 012 Contextual footer; least important hints drop first,
? Helpandq Quitnever do
- 013–014 Overview (verdict, risk, coverage, pressure, largest areas, finding counts, warning banner)
- 015–018 Findings table, details pane,
/filter (path, title, kind, severity, expectation, class; AND of terms) - 019–022 Tree: projection over
DirectoryIndex, expand/collapse, severity/score/badges, details pane, name search with jump-to-match - 023 Largest files: sort (size / age / path), filter, details
- 024 Coverage: completeness badge, gaps, denied/unreadable/pruned/skipped lists, scrollable
- 025 Storage pools with their scanned and skipped mounts
- 026–028 Zones: temporary data, home, Nix (GC estimate shown as QUERIED / NOT QUERIED / UNAVAILABLE)
- 029 Search prompt (
/) on Findings, Tree, Files, Pools (tui-input) - 030 Navigation model (j/k h/l Enter Esc Tab g/G / r q,
1–7,?) - 031 Mouse: wheel, row click, tab click (never required)
- 032 Tested at 80×24, 100×30, 120×40, 160×50 and below the minimum
- 033 Command mapping · 034 tree projection · 035 filtering
- 036
TestBackendrender tests (every view, empty, failed, scanning, partial coverage, too small) - 037 Scan->worker->event->state->render integration: success, rescan, failure, permission errors (run as an unprivileged user), incomplete coverage, empty tree, subtree scan, multiple pools, Nix not queried / unavailable
- Real-terminal checks:
scripts/pty_smoke.py(alternate screen, quit, Ctrl-C, navigation, resize) andscripts/pty_panic.py(panic restores the terminal)
- 038
--tui; report mode stays the default;--privilegedis rejected with--tui - 039 Report-mode behaviour unchanged (existing report/scan tests untouched and green; the TUI worker produces the same totals and coverage as a direct scan)
- [~] 040 Docs: keyboard reference, architecture, coverage/confidence, terminal requirements, text captures in
docs/screenshots/. No GIF/PNG screenshots yet.
--privilegedis not available in the TUI (sudo needs the terminal for its password prompt).- Tree search matches directory names only; the index holds directories, not individual files.
- Findings are capped at 200 and Largest files at 200.
SIGTERM/SIGHUPare not handled specially (a killed process cannot restore the terminal;resetfixes it). Normal exit,q, Ctrl-C and panics are all covered.- Verified in a pseudo-terminal harness and
TestBackend, not yet by hand on real terminal emulators or on NixOS.
Persistent baselines are storage plus lifecycle around the existing in-memory Baseline;
they do not block the TUI, which already shows growth when a baseline is supplied.
- Persist
Baseline - Load the previous baseline automatically
- Versioned on-disk format
- Compare the current scan against history ("since last scan" findings)
- Per-filesystem history
- Growth trends and velocity
- Historical risk changes
- TUI trend view
- JSON schema and stable machine-readable output
- Exit-code contract (severity-based)
- Config file, CLI/config precedence
- Custom attention zones and severity thresholds
- Quiet / verbose modes
- Documentation
- Nix derivation (
PKG-CLI-rootwatch.nix), add toPKG-CLI-monitoring.nix - Flake output,
nixos-rebuildtest - Installation documentation, release packaging