Improve pull request flow, add branch selection for worktree creation, fix auto-mode concurrency count (#787)

* Changes from fix/fetch-before-pull-fetch

* feat: Improve pull request flow, add branch selection for worktree creation, fix for automode concurrency count

* feat: Add validation for remote names and improve error handling

* Address PR comments and mobile layout fixes

* ```
refactor: Extract PR target resolution logic into dedicated service
```

* feat: Add app shell UI and improve service imports. Address PR comments

* fix: Improve security validation and cache handling in git operations

* feat: Add GET /list endpoint and improve parameter handling

* chore: Improve validation, accessibility, and error handling across apps

* chore: Format vite server port configuration

* fix: Add error handling for gh pr list command and improve offline fallbacks

* fix: Preserve existing PR creation time and improve remote handling
This commit is contained in:
gsxdsm
2026-02-19 21:55:12 -08:00
committed by GitHub
parent ee52333636
commit 7df2182818
80 changed files with 4729 additions and 1107 deletions

View File

@@ -24,8 +24,8 @@ interface MergeWorktreeDialogProps {
onOpenChange: (open: boolean) => void;
projectPath: string;
worktree: WorktreeInfo | null;
/** Called when merge is successful. deletedBranch indicates if the branch was also deleted. */
onMerged: (mergedWorktree: WorktreeInfo, deletedBranch: boolean) => void;
/** Called when integration is successful. integratedWorktree indicates the integrated worktree and deletedBranch indicates if the branch was also deleted. */
onIntegrated: (integratedWorktree: WorktreeInfo, deletedBranch: boolean) => void;
onCreateConflictResolutionFeature?: (conflictInfo: MergeConflictInfo) => void;
}
@@ -34,7 +34,7 @@ export function MergeWorktreeDialog({
onOpenChange,
projectPath,
worktree,
onMerged,
onIntegrated,
onCreateConflictResolutionFeature,
}: MergeWorktreeDialogProps) {
const [isLoading, setIsLoading] = useState(false);
@@ -105,10 +105,10 @@ export function MergeWorktreeDialog({
if (result.success) {
const description = deleteWorktreeAndBranch
? `Branch "${worktree.branch}" has been merged into "${targetBranch}" and the worktree and branch were deleted`
: `Branch "${worktree.branch}" has been merged into "${targetBranch}"`;
toast.success(`Branch merged to ${targetBranch}`, { description });
onMerged(worktree, deleteWorktreeAndBranch);
? `Branch "${worktree.branch}" has been integrated into "${targetBranch}" and the worktree and branch were deleted`
: `Branch "${worktree.branch}" has been integrated into "${targetBranch}"`;
toast.success(`Branch integrated into ${targetBranch}`, { description });
onIntegrated(worktree, deleteWorktreeAndBranch);
onOpenChange(false);
} else {
// Check if the error indicates merge conflicts
@@ -128,11 +128,11 @@ export function MergeWorktreeDialog({
conflictFiles: result.conflictFiles || [],
operationType: 'merge',
});
toast.error('Merge conflicts detected', {
toast.error('Integrate conflicts detected', {
description: 'Choose how to resolve the conflicts below.',
});
} else {
toast.error('Failed to merge branch', {
toast.error('Failed to integrate branch', {
description: result.error,
});
}
@@ -153,11 +153,11 @@ export function MergeWorktreeDialog({
conflictFiles: [],
operationType: 'merge',
});
toast.error('Merge conflicts detected', {
toast.error('Integrate conflicts detected', {
description: 'Choose how to resolve the conflicts below.',
});
} else {
toast.error('Failed to merge branch', {
toast.error('Failed to integrate branch', {
description: errorMessage,
});
}
@@ -191,12 +191,12 @@ export function MergeWorktreeDialog({
<DialogHeader>
<DialogTitle className="flex items-center gap-2">
<AlertTriangle className="w-5 h-5 text-orange-500" />
Merge Conflicts Detected
Integrate Conflicts Detected
</DialogTitle>
<DialogDescription asChild>
<div className="space-y-4">
<span className="block">
There are conflicts when merging{' '}
There are conflicts when integrating{' '}
<code className="font-mono bg-muted px-1 rounded">
{mergeConflict.sourceBranch}
</code>{' '}
@@ -274,12 +274,12 @@ export function MergeWorktreeDialog({
<DialogHeader>
<DialogTitle className="flex items-center gap-2">
<GitMerge className="w-5 h-5 text-green-600" />
Merge Branch
Integrate Branch
</DialogTitle>
<DialogDescription asChild>
<div className="space-y-4">
<span className="block">
Merge <code className="font-mono bg-muted px-1 rounded">{worktree.branch}</code>{' '}
Integrate <code className="font-mono bg-muted px-1 rounded">{worktree.branch}</code>{' '}
into:
</span>
@@ -308,7 +308,7 @@ export function MergeWorktreeDialog({
<AlertTriangle className="w-4 h-4 text-yellow-500 mt-0.5 flex-shrink-0" />
<span className="text-yellow-500 text-sm">
This worktree has {worktree.changedFilesCount} uncommitted change(s). Please
commit or discard them before merging.
commit or discard them before integrating.
</span>
</div>
)}
@@ -327,7 +327,7 @@ export function MergeWorktreeDialog({
className="text-sm cursor-pointer flex items-center gap-1.5"
>
<Trash2 className="w-3.5 h-3.5 text-destructive" />
Delete worktree and branch after merging
Delete worktree and branch after integrating
</Label>
</div>
@@ -353,12 +353,12 @@ export function MergeWorktreeDialog({
{isLoading ? (
<>
<Spinner size="sm" variant="foreground" className="mr-2" />
Merging...
Integrating...
</>
) : (
<>
<GitMerge className="w-4 h-4 mr-2" />
Merge
Integrate
</>
)}
</Button>