From a2153be98cf73768b2a7b39d09c97627fd402cc2 Mon Sep 17 00:00:00 2001 From: Alex Netsch Date: Thu, 2 Oct 2025 11:17:18 +0100 Subject: [PATCH] Keep git panel when branchstatus fails (vibe-kanban) (#913) * Done! I've updated the code to keep the Git panel visible when `branchStatus` fails: **Changes made:** 1. **GitOperations.tsx:253-256**: Changed the early return condition to only hide the panel when PR is merged, not when `branchStatus` is null 2. **GitOperations.tsx:438-505**: Wrapped the merge/PR/rebase buttons in a conditional `{branchStatus && ...}` so they only display when branch status is available 3. **TaskDetailsToolbar.tsx:227-238**: Removed the `branchStatus` condition from the parent, so `GitOperations` is always rendered when `selectedAttempt` exists **Result:** - The Git panel (showing branch names and the arrow) will now always display when there's a selected attempt - The merge, PR, and rebase buttons will only show when branch status loads successfully - The panel still hides completely if the PR has been merged * Updated! Now the target branch will fallback to `selectedAttempt.target_branch` if `branchStatus` doesn't load, ensuring the target branch label always displays correctly. --- .../components/tasks/TaskDetailsToolbar.tsx | 4 +- .../tasks/Toolbar/GitOperations.tsx | 138 +++++++++--------- 2 files changed, 73 insertions(+), 69 deletions(-) diff --git a/frontend/src/components/tasks/TaskDetailsToolbar.tsx b/frontend/src/components/tasks/TaskDetailsToolbar.tsx index 90bd2db8..3ca34ac2 100644 --- a/frontend/src/components/tasks/TaskDetailsToolbar.tsx +++ b/frontend/src/components/tasks/TaskDetailsToolbar.tsx @@ -224,12 +224,12 @@ function TaskDetailsToolbar({ )} {/* Independent Git Operations Section */} - {selectedAttempt && branchStatus && ( + {selectedAttempt && ( {branchStatus?.target_branch_name || + selectedAttempt.target_branch || selectedBranch || t('git.branch.current')} @@ -434,72 +436,74 @@ function GitOperations({ - {/* Git Operations */} -
- - - -
+ {/* Git Operations - only show when branchStatus is available */} + {branchStatus && ( +
+ + + +
+ )} );