Skip to content

Make the clean picker self-explanatory - #69

Merged
sauravpanda merged 1 commit into
agent/global-claude-worktree-cleanupfrom
agent/interactive-clean-picker-ux
Aug 18, 2026
Merged

Make the clean picker self-explanatory#69
sauravpanda merged 1 commit into
agent/global-claude-worktree-cleanupfrom
agent/interactive-clean-picker-ux

Conversation

@sauravpanda

Copy link
Copy Markdown
Owner

Summary

  • keep the highlighted worktree visible in a terminal-sized scrolling viewport
  • make movement, selection, bulk selection, paging, review, and quit controls explicit
  • make protected rows view-only unless --force is active and keep bulk selection safe-only
  • add a separate review screen before any deletion is confirmed
  • return a useful command-line error when interactive mode is launched without a TTY

Why

The picker rendered every worktree at once. With a laptop-wide list of 110 worktrees, most rows and the active cursor fell outside the visible terminal, making the command appear non-interactive. Selection state and the effect of Enter were also too easy to miss.

Impact

Users now see a bounded list with remaining-row counts, a visible cursor, a live selected count, and direct instructions such as “Space to select” and “Enter to review.” Enter no longer exits directly into deletion; it opens an explicit confirmation screen first.

Validation

  • go build ./...
  • go vet ./...
  • go test ./... -count=1
  • go test -race ./... -count=1
  • real PTY smoke test against 110 Claude worktrees; exited with q and made no changes

Dependency

This is a stacked PR targeting the cleanup branch from #68. After #68 merges, this PR can be retargeted to main.

@sauravpanda
sauravpanda marked this pull request as ready for review August 18, 2026 22:45
@sauravpanda
sauravpanda merged commit 7713f8a into agent/global-claude-worktree-cleanup Aug 18, 2026
2 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