Skip to content

sweep 1.0: new interactive screen, projects, sorting, mouse, Rust and Python - #2

Merged
devloop01 merged 38 commits into
mainfrom
release-1.0
Nov 4, 2026
Merged

devloop01 merged 38 commits into
mainfrom
release-1.0

Conversation

@devloop01

@devloop01 devloop01 commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

sweep 1.0. The interactive screen moves to Charm's Bubble Tea, Bubbles and Lip Gloss, and gains projects, sorting, a key list and mouse support. sweep now also cleans Rust and Python build folders.

Screen

  • Styled list: highlighted cursor row, [ ] / [✓] checkboxes, column names, a spinner while scanning or deleting, free disk space in the header, and a key bar that shows only keys that do something.
  • d (or ⌫) opens a confirm dialog. Cancel has focus first, so a held-down d deletes nothing. Enter acts on the row: it selects a folder, or collapses or opens a project. It never deletes.
  • t lists folders under their project. A monorepo (Turborepo, Nx, Lerna, pnpm or npm/Yarn workspaces, Cargo workspaces) counts as one project. Other projects are labelled by framework or language (Next.js, SvelteKit, Astro, Rust, Python, ...). ←/→ collapse and open a project, tab jumps to the next one, and c collapses or opens all of them.
  • s sorts by size, name, or last change. The sorted column is marked.
  • ? lists every key. o shows a folder in Finder.
  • Mouse: scroll, click rows, checkboxes, ▾/▸, column names, and dialog buttons. A click hits the folder that was drawn there, even if the list re-sorted since.

New targets

  • Rust and Maven target folders get the same git check as dist and build.
  • Python tool caches: .pytest_cache, .mypy_cache and .ruff_cache. __pycache__ and .venv are left out.

Safety

  • dist, build, out and target in a repo are deleted only when an ignore rule names them (dist/, /build, **/target), with nothing inside tracked. Before, "nothing tracked" was enough, so a build/ holding new, uncommitted files could be deleted. A catch-all * (a repo around the home folder) doesn't count.
  • New tests: 60 random sessions of keys and clicks with real deletes on a folder full of traps (symlinks out, a swapped folder, tracked and uncommitted files, .git, apps, odd names). Each checks that only the picked folders disappear and every other file is byte-for-byte unchanged. Planted bugs in the selection, dialog, click, cursor, symlink and git code were each caught.
  • Project rows are never folders. They can't reach the delete path, and a test checks that deleting through a Turborepo row leaves turbo.json and package.json in place.
  • Quitting waits for running deletions, including on SIGTERM/SIGHUP, at end of input, and if Bubble Tea's Run ends with an error.
  • sweep waits for the terminal's background-colour reply before quitting, so the reply doesn't land in the shell.

Other

  • Wording cleanup in help, messages, README and DEVELOPMENT.md.
  • Dependabot now also updates Go modules.
  • The printed list (sweep -n, -y) gains a Touched column ("3mo ago") and free disk space on the total line. It stays flat, so it pipes well.
  • The release binary grows from about 6.3 MB to 7.8 MB.

Replaces #1, which GitHub closed when its branch was renamed.

Testing

go test -race ./... passes. I checked the screen by hand in a real terminal: dialog, project view, collapse, sort, the key list, mouse clicks, and Rust and Python projects.

🤖 Generated with Claude Code

- Bubble Tea owns the terminal: raw input, key parsing, the alternate
  screen, resizes, restoring on exit. The hand-written versions are gone.
- The list and its rules (cursor follows folders, the enter guard,
  selections) are unchanged in screen.
- Paths are cut by display width, so wide characters no longer overflow.
- Closing stdin no longer quits; Ctrl-D and a hangup still do.
@changeset-bot

changeset-bot Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 5de8d5b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@devloop01
devloop01 merged commit 9e00c89 into main Nov 4, 2026
1 check passed
@devloop01
devloop01 deleted the release-1.0 branch November 4, 2026 12:46
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