Always enable merge/rebase (vibe-kanban) (#1090)
* Done! I've successfully removed all the branch status conditions that were disabling the merge and rebase buttons: ## Changes Made to `GitOperations.tsx`: 1. **Merge button** (line 433) - ✅ Removed `Boolean((branchStatus.commits_behind ?? 0) > 0) ||` - Now enabled regardless of whether branch is behind 2. **PR/Push button** (line 452) - ✅ Removed `Boolean((branchStatus.commits_behind ?? 0) > 0) ||` - Now enabled regardless of whether branch is behind 3. **Rebase button** (line 477) - ✅ Removed `(branchStatus.commits_behind ?? 0) === 0` - Now enabled regardless of whether branch is behind or not All three buttons will now be available at all times, with the remaining safety checks still in place: - Still disabled during active conflicts - Still disabled when operations are in progress - Still disabled when attempt is running - Merge still disabled when there's an open PR * fmt
This commit is contained in:
@@ -430,7 +430,6 @@ function GitOperations({
|
|||||||
mergeInfo.hasOpenPR ||
|
mergeInfo.hasOpenPR ||
|
||||||
merging ||
|
merging ||
|
||||||
hasConflictsCalculated ||
|
hasConflictsCalculated ||
|
||||||
Boolean((branchStatus.commits_behind ?? 0) > 0) ||
|
|
||||||
isAttemptRunning ||
|
isAttemptRunning ||
|
||||||
((branchStatus.commits_ahead ?? 0) === 0 &&
|
((branchStatus.commits_ahead ?? 0) === 0 &&
|
||||||
!pushSuccess &&
|
!pushSuccess &&
|
||||||
@@ -449,7 +448,6 @@ function GitOperations({
|
|||||||
onClick={handlePRButtonClick}
|
onClick={handlePRButtonClick}
|
||||||
disabled={
|
disabled={
|
||||||
pushing ||
|
pushing ||
|
||||||
Boolean((branchStatus.commits_behind ?? 0) > 0) ||
|
|
||||||
isAttemptRunning ||
|
isAttemptRunning ||
|
||||||
hasConflictsCalculated ||
|
hasConflictsCalculated ||
|
||||||
(mergeInfo.hasOpenPR &&
|
(mergeInfo.hasOpenPR &&
|
||||||
@@ -470,12 +468,7 @@ function GitOperations({
|
|||||||
|
|
||||||
<Button
|
<Button
|
||||||
onClick={handleRebaseDialogOpen}
|
onClick={handleRebaseDialogOpen}
|
||||||
disabled={
|
disabled={rebasing || isAttemptRunning || hasConflictsCalculated}
|
||||||
rebasing ||
|
|
||||||
isAttemptRunning ||
|
|
||||||
hasConflictsCalculated ||
|
|
||||||
(branchStatus.commits_behind ?? 0) === 0
|
|
||||||
}
|
|
||||||
variant="outline"
|
variant="outline"
|
||||||
size="xs"
|
size="xs"
|
||||||
className="border-warning text-warning hover:bg-warning gap-1 shrink-0"
|
className="border-warning text-warning hover:bg-warning gap-1 shrink-0"
|
||||||
|
|||||||
Reference in New Issue
Block a user