feat(web): add branch deletion from the branch picker#2879
Conversation
- 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
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
ApprovabilityVerdict: 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. |
What Changed
Adds the ability to delete a git branch directly from the branch picker in the branch toolbar.
vcsDeleteBranchRPC method wired across contracts, server, and client (rpc.ts,ipc.ts,git.ts,wsRpcClient.ts,ws.ts).GitVcsDriverCore.ts,GitVcsDriver.ts,GitWorkflowService.ts).BranchToolbarBranchSelector.tsx) with a confirmation dialog before deleting.deleteRemoteBranchOnDeletesetting (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
Checklist
Note
Add branch deletion from the branch picker in the web UI
BranchToolbarBranchSelectorthat calls a newvcs.deleteBranchRPC endpoint; shows a confirmation dialog before proceeding.deleteRemoteBranchOnDeleteclient setting (defaults totrue), configurable via the General settings panel.GitCommandError, a second dialog offers a force-delete fallback.git.ts, RPC wiring inrpc.ts, Git driver implementation inGitVcsDriverCore.ts, and WS handler inws.ts. Missing remote branches are treated as non-fatal.deleteRemoteBranchOnDeletedefaults totrue, so existing users will have remote deletion enabled by default after upgrade.Macroscope summarized 30507a0.