Skip to content

feat(tui): interactive TUI enhancements — drill-down, disk visualization, bug fixes - #2

Merged
connectwithprakash merged 5 commits into
mainfrom
chore/tui-default-feature
Feb 19, 2026
Merged

connectwithprakash merged 5 commits into
mainfrom
chore/tui-default-feature

Conversation

@connectwithprakash

@connectwithprakash connectwithprakash commented Feb 19, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Enable tui as a default feature so diskard -i works without --features tui
  • Add drill-down directory inspector with selection and deletion within nested directories
  • Add disk usage visualization: summary header with color-coded gauge bar and live reclaimable/selected counters
  • Add proportional inline size bars to results and drill-down views
  • Fix non-deterministic scan ordering by running recognizers sequentially
  • Fix dir_size on macOS by canonicalizing symlinked paths

Test plan

  • cargo install --path . installs with TUI support
  • diskard -i launches interactive mode with disk summary header
  • Gauge bar color reflects disk pressure (green <70%, yellow 70-85%, red >85%)
  • Inline size bars scale proportionally to the largest finding
  • l/→ enters drill-down; size bars normalize to largest entry in current directory
  • Selecting items updates "Selected" counter in header live
  • d in drill-down deletes checked items and rescans
  • cargo test — all 35 tests pass
  • cargo clippy --all-targets — no warnings

On macOS, temp directories go through /var which is a symlink to
/private/var. jwalk fails to walk the unresolved path, returning 0.
Users can now select individual files/subdirs inside the drill-down
view and delete them with d → y. Adds checkboxes, Space/a toggles,
and a ConfirmDrillDown flow that trashes selected entries and rescans.
Running all recognizers in parallel via rayon's par_iter caused file
descriptor exhaustion — each recognizer uses jwalk (also rayon-based)
for dir_size, and the combined concurrent directory walking exceeded
the OS open-file limit. Failed reads were silently swallowed by
.filter_map(|e| e.ok()), causing dir_size to return 0 and findings
to be randomly dropped.

Switches to sequential iteration. The scan is I/O-bound so parallel
recognizers provided no real speedup. Also removes the direct rayon
dependency (jwalk still uses it internally).
…e size bars

Add a disk summary header showing total/used/free space with a color-coded
gauge bar (green <70%, yellow 70-85%, red >85%) and live reclaimable/selected
counters. Add proportional inline size bars to both results and drill-down
views, normalized to the largest item in each list.

Closes #2
@connectwithprakash connectwithprakash changed the title chore: enable tui feature by default feat(tui): interactive TUI enhancements — drill-down, disk visualization, bug fixes Feb 19, 2026
@connectwithprakash
connectwithprakash merged commit b2b6c8f into main Feb 19, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant