Skip to content

Commit 79014b7

Browse files
marcusclaude
andcommitted
fix: Change 'c' key to skip cleanup instead of advance to cleanup
In merge workflow, pressing 'c' during waiting-for-merge step now cancels and keeps the worktree in place instead of skipping ahead to cleanup. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 6340b7b commit 79014b7

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

internal/plugins/worktree/plugin.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1332,10 +1332,10 @@ func (p *Plugin) handleMergeKeys(msg tea.KeyMsg) tea.Cmd {
13321332
}
13331333

13341334
case "c":
1335-
// Skip to cleanup (if PR is merged or user wants to force cleanup)
1335+
// Skip cleanup - close modal and leave worktree in place
13361336
if p.mergeState.Step == MergeStepWaitingMerge {
1337-
p.mergeState.StepStatus[MergeStepWaitingMerge] = "done"
1338-
return p.advanceMergeStep()
1337+
p.cancelMergeWorkflow()
1338+
return nil
13391339
}
13401340

13411341
case "s":
@@ -1742,7 +1742,7 @@ func (p *Plugin) Commands() []plugin.Command {
17421742
cmds = append(cmds, plugin.Command{ID: "continue", Name: "Push", Description: "Push branch", Context: "worktree-merge", Priority: 2})
17431743
case MergeStepWaitingMerge:
17441744
cmds = append(cmds, plugin.Command{ID: "continue", Name: "Check", Description: "Check merge status", Context: "worktree-merge", Priority: 2})
1745-
cmds = append(cmds, plugin.Command{ID: "cleanup", Name: "Cleanup", Description: "Skip to cleanup", Context: "worktree-merge", Priority: 3})
1745+
cmds = append(cmds, plugin.Command{ID: "skip-cleanup", Name: "Skip", Description: "Skip cleanup, keep worktree", Context: "worktree-merge", Priority: 3})
17461746
case MergeStepDone:
17471747
cmds = append(cmds, plugin.Command{ID: "continue", Name: "Done", Description: "Close modal", Context: "worktree-merge", Priority: 2})
17481748
}

internal/plugins/worktree/view.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1357,7 +1357,7 @@ func (p *Plugin) renderMergeModal(width, height int) string {
13571357
sb.WriteString("\n")
13581358
sb.WriteString(dimText("Checking status every 30 seconds"))
13591359
sb.WriteString("\n\n")
1360-
sb.WriteString(dimText("Press Enter to check now, 'c' to skip to cleanup"))
1360+
sb.WriteString(dimText("Press Enter to check now, 'c' to skip cleanup"))
13611361

13621362
case MergeStepCleanup:
13631363
sb.WriteString("Cleaning up worktree and branch...")

0 commit comments

Comments
 (0)