Skip to content

fix(worktree): exit on Esc at branch name prompt - #39

Merged
andrewchng merged 5 commits into
mainfrom
issue-36-worktree-flow-esc-on-branch-name-prompt-should-exi
Aug 1, 2026
Merged

fix(worktree): exit on Esc at branch name prompt#39
andrewchng merged 5 commits into
mainfrom
issue-36-worktree-flow-esc-on-branch-name-prompt-should-exi

Conversation

@andrewchng

@andrewchng andrewchng commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • Esc (and Ctrl+C) on the worktree Branch name: prompt cancels the flow and exits Sessionizer instead of trapping the user in free-text input
  • Empty Enter still re-prompts (Branch name cannot be empty); cancel is not conflated with empty submit
  • Matches picker cancel elsewhere (null → clean return without creating a worktree)

Context

In the worktree flow, Esc on the candidate picker means “create a new branch.” After that, the free-text Branch name: step used Node readline, which does not treat Esc as cancel. Sessionizer itself only uses fzf pickers (Esc → empty selection → leave); this adds the same cancel semantics to the one free-text step worktree has that Sessionizer does not.

Test plan

  • bun test (148 pass)
  • tsc --noEmit
  • Manual: worktree flow → project → Esc on candidate picker (or no candidates) → at Branch name:, press Esc → plugin exits, no worktree created
  • Manual: same path, Enter empty → re-prompt; type a name and Enter → create as before

Closes #36

andrewchng and others added 5 commits August 1, 2026 13:54
Treat Esc/Ctrl+C in the free-text Branch name step as cancel so the
worktree flow leaves Sessionizer without creating a worktree, matching
picker cancel elsewhere.

Closes #36
Raw-mode readline Esc does not reliably cancel or exit Herdr plugin
panes. Collect the branch name with fzf free-text so Esc uses the same
abort path as Sessionizer pickers and the pane closes cleanly.
@andrewchng
andrewchng merged commit c38fe20 into main Aug 1, 2026
1 check 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.

Worktree flow: Esc on branch name prompt should exit Sessionizer

1 participant