Skip to content

feat(web): add branch deletion from the branch picker#2879

Open
imabdulazeez wants to merge 1 commit into
pingdotgg:mainfrom
imabdulazeez:aa/delete-branch-feature
Open

feat(web): add branch deletion from the branch picker#2879
imabdulazeez wants to merge 1 commit into
pingdotgg:mainfrom
imabdulazeez:aa/delete-branch-feature

Conversation

@imabdulazeez
Copy link
Copy Markdown
Contributor

@imabdulazeez imabdulazeez commented May 30, 2026

What Changed

Adds the ability to delete a git branch directly from the branch picker in the branch toolbar.

  • New vcsDeleteBranch RPC method wired across contracts, server, and client (rpc.ts, ipc.ts, git.ts, wsRpcClient.ts, ws.ts).
  • Implemented in the Git VCS driver (GitVcsDriverCore.ts, GitVcsDriver.ts, GitWorkflowService.ts).
  • Trash icon in the branch picker (BranchToolbarBranchSelector.tsx) with a confirmation dialog before deleting.
  • Force-delete path for branches that have unmerged commits.
  • New deleteRemoteBranchOnDelete setting (settings.ts, SettingsPanels.tsx) that controls whether the matching remote branch is also deleted.

Why

There was no way to delete a branch from within the app — you had to drop to a terminal. Branches accumulate after merges/abandoned work, and the branch picker is the natural place to clean them up. The optional remote-cleanup setting keeps the destructive remote action opt-in rather than implicit.

UI Changes

Delete button image
Delete confirmation popup image
Settings menu image

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes (only after screenshots applicable)
  • I included a video for animation/interaction changes

Note

Add branch deletion from the branch picker in the web UI

  • Adds a delete button per branch in BranchToolbarBranchSelector that calls a new vcs.deleteBranch RPC endpoint; shows a confirmation dialog before proceeding.
  • Supports optional remote branch deletion controlled by a new deleteRemoteBranchOnDelete client setting (defaults to true), configurable via the General settings panel.
  • If the initial delete fails with a GitCommandError, a second dialog offers a force-delete fallback.
  • Implements the full stack: new contract schemas in git.ts, RPC wiring in rpc.ts, Git driver implementation in GitVcsDriverCore.ts, and WS handler in ws.ts. Missing remote branches are treated as non-fatal.
  • Risk: deleteRemoteBranchOnDelete defaults to true, so existing users will have remote deletion enabled by default after upgrade.

Macroscope summarized 30507a0.

- add vcsDeleteBranch RPC method across contracts, server, and client
- show trash icon in branch picker with confirmation dialogs
- support force delete for branches with unmerged commits
- add deleteRemoteBranchOnDelete setting to control remote cleanup
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 30, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 8a6a10a3-b254-4730-bd15-8fb0832e61ee

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels May 30, 2026
@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp Bot commented May 30, 2026

Approvability

Verdict: Needs human review

Unable to check for correctness in 30507a0. This PR introduces a complete new feature (branch deletion from UI) with new git operations, RPC endpoints, UI components (delete buttons, confirmation dialogs), and settings. New features with significant user-facing behavior warrant human review.

You can customize Macroscope's approvability policy. Learn more.

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

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant