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 && (
+
+
+
+
+
+ )}
);