Skip to content

Feature Request: Add UI option for local merge without PR #1269

@Areo-Joe

Description

@Areo-Joe

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:

    1. Pushes the branch to remote
    2. Creates a PR via gh pr create
    3. Merges the PR via gh pr merge
  • The worktree:merge IPC handler exists and is exposed via window.electronAPI.worktreeMerge(), but no UI component calls it.

Proposed Feature

Add a UI option to perform a local-only merge that:

  1. Runs git merge <worktree-branch> in the main project directory
  2. Does not push to remote or create a PR
  3. 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

  1. Is this an intentional omission, or was UI integration planned but not yet implemented?
  2. Would a PR adding this UI feature be welcome?

Thanks for building such a great tool! 🙏

Metadata

Metadata

Assignees

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