Repository navigation
fix(picker): flash success feedback after alt-x removes worktree - #4669
Conversation
worktrunk-bot
left a comment
There was a problem hiding this comment.
The success flash can report that the branch was kept when removal actually deleted it. worktree_removal_keeps_branch predicts retention before the background operation, but an approved pre-remove hook can integrate the branch before remove_removed_worktree_silently captures fresh refs and delete_branch_if_safe decides its fate. The worktree path is then gone, so this else arm shows “kept branch” while the morphed / branch row points to a missing branch. Please base the confirmation and final row state on the observed branch fate after removal.
worktrunk-bot
left a comment
There was a problem hiding this comment.
The branch-deleted path needs the same settled preview refresh as the normal row-drop path. When this was the last selected row, the picker can keep showing the removed branch's preview after the row disappears.
Co-authored-by: Worktrunk Bot <[email protected]>
worktrunk-bot
left a comment
There was a problem hiding this comment.
CI's lint check fails because cargo fmt rewrites the new test assignment.
Co-authored-by: Worktrunk Bot <[email protected]>
…don't overflow (max-sixty#4682) `truncate_visible` summed per-`char` widths, so a VS16 emoji presentation sequence such as `♻️` (`U+267B U+FE0F`) measured 1 + 0 = 1 cell, while the terminal and the rest of the layout (`UnicodeWidthStr::width`) count it as 2. A truncated Message cell starting with one came out one cell wider than its column, which wraps the row in `wt list | cat` and throws off the progressive renderer's cursor math. The loop now walks grapheme clusters and measures each with the string width, so the kept prefix agrees with every other width measure and a cut can no longer split a base character from its selector. `unicode-segmentation` 1.12 was already in `Cargo.lock` transitively; this adds it as a direct dependency. The new assertions in `test_truncate_visible` fail on the old loop (`"♻️ refactor:…"`, 13 cells for a 12-cell budget) and pass now. Running the issue's repro at `COLUMNS=100` against the fixed build, both Message cells (`✨ feat: ad…` and `♻️ refactor…`) are 12 cells. Closes max-sixty#4681 — automated triage Co-authored-by: worktrunk-bot <[email protected]>
|
Hi maintainers! I've updated my PR branch with the latest However, GitHub is still showing Could you please take a look and let me know if any further action is needed from my side? Thanks for your time! |
|
Nothing more is needed from you. The branch is up to date, every check passes (including GitHub shows |
Tend's review approved any PR with no defect. Submit said "If there are no issues, approve with an empty body — silence means correct", and a `code-review` finding needs a file, line and failure scenario, so a correct change that wasn't worth its cost got an `APPROVE` unless another check, such as the duplication check, turned its cost into a finding. A repository overlay asking for a `COMMENT` on such changes didn't override that default: worktrunk's reviews opened its proportionality rule and approved anyway (max-sixty/worktrunk#4664, max-sixty/worktrunk#4665, max-sixty/worktrunk#4666, max-sixty/worktrunk#4670, max-sixty/worktrunk#4689, max-sixty/worktrunk#4694). Submit now says an `APPROVE` tells the maintainer the whole PR is worth merging. Before one, including after a trivial increment, the session says who loses what if the PR never merges and how they come to need it, what it adds that later changes must keep working, and the cheapest other way to get the benefit. It approves when the benefit pays for what the PR adds and nothing materially cheaper exists; otherwise it posts a `COMMENT` naming the cost or the cheaper way. On a self-authored PR, where the review stays silent instead of approving, the same weighing runs before that silence, so a correct bot PR that isn't worth merging is raised as a concern, which Review's "carry its weight" bullet used to ask for. That bullet goes, since Submit now owns the judgment. A `COMMENT` that holds the verdict names its reason once, as a merge-readiness hold already did, so a later push doesn't restate it, and a re-targeted review that empties takes its verdict from Submit instead of approving. ## Evidence Eleven trajectory cases (`evals/cases/review-worth-*`) replay real worktrunk PRs at their reviewed heads. On 20 Nov, with main (including #1646 and #1712) merged in, this PR's review skill ran against main's, three attempts per case per arm. On the four PRs that independent reviewers judged not worth merging as written (max-sixty/worktrunk#4664, max-sixty/worktrunk#4665, max-sixty/worktrunk#4666, max-sixty/worktrunk#4694), these attempts held the verdict and named the cost or a cheaper route: | Executor | main | This PR | | --- | --- | --- | | Codex gpt-6.1-sol | 6 of 10 (2 attempts failed on model capacity) | 10 of 12 | | Claude Opus 5.5 | 2 of 12 | 7 of 12 | - Main's six Codex holds are on max-sixty/worktrunk#4666 and max-sixty/worktrunk#4694, which the old text approved in all three attempts on the 5 Nov base. Each review of max-sixty/worktrunk#4666 names the second cache as a copy of the existing cached `git remote get-url` lookup, the kind of copy #1646 widened the duplication check to flag; the reviews of max-sixty/worktrunk#4694 name the hand-written URL parsing as more than the IPv6 fix needs. This PR also holds max-sixty/worktrunk#4665 and max-sixty/worktrunk#4664 (2 of 3 each), which main's text approved in every attempt that completed. - On the PRs that should be approved (max-sixty/worktrunk#4334, max-sixty/worktrunk#4469, max-sixty/worktrunk#4668, max-sixty/worktrunk#4669, max-sixty/worktrunk#4680), Codex approved in all 15 attempts on each arm. Claude, run on this PR's text only, held max-sixty/worktrunk#4668 in 3 of 3, citing a `git rev-parse` per noted directory on every pane refresh and a narrower fix, and held max-sixty/worktrunk#4669 (2 of 3) and max-sixty/worktrunk#4680 (1 of 3) over defects. - On the 5 Nov base, not re-run: a standing hold that should survive a test-only push stayed silent 6/6, a hold on a per-render cost stayed held 6/6, and `review-landing-continuation` passed 3/3 on Codex. ## Costs A trivial follow-up push now gets a whole-PR read. > _This was written by Claude Code on behalf of max-sixty_
Fixes #4636
When using
alt-xto remove a worktree but keep its unmerged branch, the picker optimistically morphs the row. Previously, if the background removal succeeded, it didn't provide any visual feedback to confirm the action (unlike the failure paths).This updates the background thread to flash a transient success message (
Removed <branch> worktree; kept branch) in the header once it confirms the worktree directory is actually gone.Also updated
test_apply_morphs_unmerged_worktree_to_branch_rowto wait for and assert this new header flash.