Skip to content

feat: add map command, XDG config, and rule-based sweep#10

Merged
amiller68 merged 3 commits into
mainfrom
feat/map-config-sweep
May 28, 2026
Merged

feat: add map command, XDG config, and rule-based sweep#10
amiller68 merged 3 commits into
mainfrom
feat/map-config-sweep

Conversation

@amiller68

Copy link
Copy Markdown
Contributor

Summary

  • oops map — dust-style proportional tree replacing the icicle view. One line per entry, proportional bars, readable sizes, indented hierarchy. APFS-aware (handles firmlinks when scanning /). Volume context bar at the top shows scanned/other/free.
  • oops config — XDG config system at ~/.config/oops/config.toml. Auto-creates on first run. Shows loaded rules, lets users add custom rules or disable built-ins.
  • oops sweep rewrite — rule-based engine with 14 built-in rules (was hardcoded to ~8 patterns). Now finds 44 GiB vs old 13 GiB. --exec for interactive cleanup (y/N/a/q). --rule to filter by name.
  • UI restructure — split ui.rs into ui/ module (colors.rs, output.rs, mod.rs) following jig's pattern. Per-command rendering in commands/map/render.rs.
  • Terminal scaling — bars and truncation now scale to terminal width instead of hardcoded column counts.

Test plan

  • oops map ~/ — proportional tree with volume context
  • oops map / — APFS-aware, no double counting, numbers add up
  • oops sweep ~/ — rule-based results, 14 rules active
  • oops sweep ~/ --exec — interactive cleanup flow
  • oops sweep ~/ --rule rust-target -v — filter + verbose
  • oops config — auto-creates config, shows rules with +/- indicators
  • Add custom rule to config.toml, verify sweep picks it up
  • oops config init when config exists — says "already exists"
  • cargo clippy && cargo fmt --check && cargo test — all clean

🤖 Generated with Claude Code

amiller68 and others added 3 commits May 26, 2026 14:39
Replace the old icicle visualization with a dust-style proportional tree
(oops map) that shows one entry per line with proportional bars, readable
sizes, and indented hierarchy. APFS-aware: redirects to the data volume
when scanning / to avoid double-counting via firmlinks.

Add XDG config system (~/.config/oops/config.toml) with 14 built-in
sweep rules that users can extend or disable. Sweep now uses configurable
rules instead of hardcoded patterns, finding 44 GiB vs the old 13 GiB.
Interactive cleanup with --exec (y/N/a/q per match).

New commands: oops map (alias m), oops config (alias c).
Restructured ui.rs into ui/ module (colors.rs, output.rs, mod.rs)
with per-command rendering in commands/map/render.rs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
drill, tree, overview, and top are all subsumed by map:
- drill = map --expand 1
- tree = map -n 20 --expand 20
- overview = map --depth 1
- top has a niche (flat ranking) but its overlap with map outweighs the value

Remove them. Running `oops` with no subcommand now runs map directly.
Keep volumes/vol since `df -h` doesn't have nice capacity bars.

Strip obsolete renderers (render_drill_*, render_tree_node, render_top_entries,
render_dir_breakdown, proportion_bar, SYM_BLOCK_MED) and the unused
explicit_path field on Ctx.

Update README, CLAUDE.md, wiki, and docs to reflect the smaller surface.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Resolves modify/delete conflicts: keep deletes for drill.rs, overview.rs,
top.rs, tree.rs, and ui.rs (intentionally removed in this branch).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@amiller68 amiller68 merged commit c55c7b0 into main May 28, 2026
2 checks passed
@amiller68 amiller68 deleted the feat/map-config-sweep branch May 28, 2026 17:01
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