Skip to content

feat(branch): delete a branch on its remote#9

Merged
danielss-dev merged 1 commit into
mainfrom
delete-remote-branches
Jun 23, 2026
Merged

feat(branch): delete a branch on its remote#9
danielss-dev merged 1 commit into
mainfrom
delete-remote-branches

Conversation

@danielss-dev

Copy link
Copy Markdown
Owner

What

Adds a Delete branch on <remote> action to the sidebar remote-branch menu, closing the gap where a branch could be pruned locally but not on origin.

How

  • Core (network.rs): Repo::delete_remote_branch runs git push <remote> --delete refs/heads/<branch>, shelled out and streamed through the existing run_git_streaming (credentials/progress free), mirroring the tag-delete path. The ref is fully-qualified behind a -- so a stray name can't be read as a git option.
  • The push also drops the local refs/remotes/<remote>/<branch> tracking ref, so the refreshRefs after a successful delete clears the sidebar row with no optimistic bookkeeping.
  • IPC/UI: repo_branch_delete_remote command + repoBranchDeleteRemote wrapper + deleteRemoteBranch(remote, branch) store action → a confirm-gated, danger-styled menu item.

Verification

  • cargo check -p strand-core -p strand-tauri — clean
  • pnpm --filter ./ui exec tsc --noEmit — clean
  • End-to-end bare-remote run confirming both the remote branch and the local tracking ref are removed

Docs: TASKS.md rows flipped + dated shipped note in ROADMAP.md. README left unchanged (already covered at the right altitude).

🤖 Generated with Claude Code

Adds a "Delete branch on <remote>" action to the sidebar remote-branch
menu, closing the gap where a branch could be pruned locally but not on
origin.

Core `Repo::delete_remote_branch` runs `git push <remote> --delete
refs/heads/<branch>`, shelled out and streamed through the existing
`run_git_streaming` (credentials/progress free), mirroring the tag-delete
path. The ref is fully-qualified behind a `--` so a stray name cannot be
read as a git option. The push also drops the local remote-tracking ref,
so a refs refresh clears the sidebar row with no optimistic bookkeeping.

Wires `repo_branch_delete_remote` IPC + `repoBranchDeleteRemote` wrapper
+ `deleteRemoteBranch` store action through to the confirm-gated menu
item. Verified with cargo check, tsc, and an end-to-end bare-remote run.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@danielss-dev danielss-dev merged commit 26ebb56 into main Jun 23, 2026
2 checks passed
@danielss-dev danielss-dev deleted the delete-remote-branches branch June 23, 2026 18:19
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.

1 participant