Public: anyone can read this; the crew can change it.

A test pins deleting a branch in the local terminal: `d` refuses unmerged work, `D` says it will lose it, both ask first #7067

shipped production is serving it opened this has it
opened this

The branch list (src/tui/local/branches.ts) sends delete and force delete through a confirm that states the difference. No test presses either.

Done:

  • [ ] A new test makes a merged branch and an unmerged one. d on the merged one asks "Delete branch", and confirming removes it.
  • [ ] d on the unmerged one is refused in words, and the branch stays.
  • [ ] D asks "Force delete branch", and its body says commits will be lost. Escape keeps the branch; confirming removes it.
  • [ ] On the current branch, d and D are disabled.

Files: test/tui-local-branch-delete.test.ts

The test drives createLocalApp (src/tui/local/app.ts) over a real temporary repository, as test/tui-local.test.ts does. If it finds the behaviour wrong, fix the screen in the same pull and say so. If the check fails in a test this pull does not touch, name it in the pull rather than widening the change.

Before pushing: bun x tsc --noEmit and the new test.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs