-
Notifications
You must be signed in to change notification settings - Fork 246
Open
Description
Summary
The backend already supports merging worktree changes locally via worktreeMerge (which calls WorktreeService.mergeWorktreeChanges), but there is no UI entry point to use this feature.
Current Behavior
-
The only "Merge" option in the UI is "Merge into Main" (
FileChangesPanel.tsx), which:- Pushes the branch to remote
- Creates a PR via
gh pr create - Merges the PR via
gh pr merge
-
The
worktree:mergeIPC handler exists and is exposed viawindow.electronAPI.worktreeMerge(), but no UI component calls it.
Proposed Feature
Add a UI option to perform a local-only merge that:
- Runs
git merge <worktree-branch>in the main project directory - Does not push to remote or create a PR
- Optionally cleans up the worktree after merge
Use Case
This would be useful for:
- Users working on private/local projects without a remote
- Quick local iterations where PR review is not needed
- Users who prefer to push manually after reviewing merged changes locally
Code Reference
The backend implementation already exists:
// src/main/services/WorktreeService.ts
async mergeWorktreeChanges(projectPath: string, worktreeId: string): Promise<void> {
const worktree = this.worktrees.get(worktreeId);
const defaultBranch = await this.getDefaultBranch(projectPath);
await execFileAsync('git', ['checkout', defaultBranch], { cwd: projectPath });
await execFileAsync('git', ['merge', worktree.branch], { cwd: projectPath });
await this.removeWorktree(projectPath, worktreeId);
}IPC is registered in src/main/services/worktreeIpc.ts and exposed in src/main/preload.ts.
Questions
- Is this an intentional omission, or was UI integration planned but not yet implemented?
- Would a PR adding this UI feature be welcome?
Thanks for building such a great tool! 🙏
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels