Skip to content

feat(remove): say what each worktree is before it is ticked - #40

Merged
pfriedrix merged 1 commit into
masterfrom
feature/remove-picker-statuses
Aug 8, 2026
Merged

feat(remove): say what each worktree is before it is ticked#40
pfriedrix merged 1 commit into
masterfrom
feature/remove-picker-statuses

Conversation

@pfriedrix

Copy link
Copy Markdown
Owner
  • The picker offered a branch name and a path; the merge verdict, the dirty count and the reclaimable size only appeared in the confirmation, which is after the choice. Both lcc remove and --merged now draw one table — MERGE, STATUS, AGE, FREES, SPENT — off the same row type and through the same picker, in lcc list's vocabulary.
  • The trade is a slower first paint: the verdict per branch, a git status per worktree, one GitHub call for the branches nothing local vouches for, one du and one transcript scan now cover the whole repo instead of the selection. Those share an Io.Group so the wait is roughly the slowest rather than the sum, and --local still asks nothing over the network.
  • The column header is new to prompt.checkbox and has to be reserved for in pageSize, or the erase walk eats scrollback on a short terminal. Driven end to end through a pty against a scratch repo — plain picker, selection, confirmation, and a real --merged -y removal — on top of 292 unit tests (+3).

The picker offered a branch name and a path, and nothing else. Whether
the work had landed, whether anything was uncommitted, how much the
removal hands back — the three facts that decide it — were printed in
the confirmation, which is after the choice. Picking meant guessing and
then reading back what you had guessed at.

The list is a table now: the merge verdict, the worktree's dirty count,
the age of the last commit, the disk it frees, what Claude Code spent in
it, then the path with its flags and whatever Xcode is holding. The
words are lcc list's, because a status that reads one way there and
another way here is two things to learn instead of one.

It costs a slower first paint. The verdict per branch, a git status per
worktree, one GitHub call for the branches nothing local vouches for,
one du and one transcript scan now cover the whole repo rather than the
selection; the verdicts and the status calls share an Io.Group so the
wait is roughly the slowest of them rather than their sum, and --local
still asks nothing over the network. Measuring only the ticked rows
stays cheaper and puts the numbers back where they cannot be used.

--merged already had most of the columns, so both modes build the same
row and go through the same picker rather than two that drift apart. The
column header is new to prompt.checkbox and has to be reserved for in
pageSize: the frame is erased by walking the cursor up screen.lines, and
a line the page size does not know about scrolls the terminal instead.
@pfriedrix
pfriedrix merged commit 8118791 into master Aug 8, 2026
1 check passed
@pfriedrix
pfriedrix deleted the feature/remove-picker-statuses branch August 8, 2026 12:30
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