Skip to content

Explain branch deletion restrictions and show worktree paths #143

Closed

Description

@m4rocks

Keep branch rows visible and explain why deletion is unavailable.

  • Distinguish the current branch, origin's default branch, remote-only branches and branches checked out in another worktree.
  • Show the holding worktree's path.
  • List external worktrees as well as m4code-managed ones.
  • Keep external-worktree deletion restricted as it is today.
  • Avoid presenting a failed Git lookup as a confirmed deletion restriction.
  • Test branch restrictions and worktree discovery.

The current branch picker only attaches a delete action when a branch is eligible. It provides no reason for several other cases. Branches are loaded through Git's porcelain output, while the initial worktree rows come from cached libgit2 discovery.

Branch rows show deletion restrictions and holding paths. The worktree list refreshes from Git and includes external and missing worktrees; missing folders cannot be selected. External-worktree deletion remains restricted. Git tests cover the branch reasons and worktree paths containing spaces and newlines. Git lookup errors are surfaced instead of becoming an empty deletion list.

Validation: cargo build --locked; cargo test --locked --quiet -- --test-threads=1 (454 passed, 31 ignored); cargo clippy --locked --all-targets -- -D warnings; git diff --check. Plugin tests: claude plugin test mod (29 passed). Changes are uncommitted.

Activity

  1. m4rocks commented on Nov 23, 2026

    @m4rocks
    OwnerAuthor

    Done in #145; every item is in main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions