diff --git a/frontend/src/components/dialogs/tasks/GitActionsDialog.tsx b/frontend/src/components/dialogs/tasks/GitActionsDialog.tsx
index 1ad76fbb..29298dfc 100644
--- a/frontend/src/components/dialogs/tasks/GitActionsDialog.tsx
+++ b/frontend/src/components/dialogs/tasks/GitActionsDialog.tsx
@@ -35,7 +35,9 @@ function GitActionsDialogContent({
task,
}: GitActionsDialogContentProps) {
const { t } = useTranslation('tasks');
- const { data: branchStatus } = useBranchStatus(attempt.id);
+ const { data: branchStatus, error: branchStatusError } = useBranchStatus(
+ attempt.id
+ );
const { isAttemptRunning } = useAttemptExecution(attempt.id);
const { error: gitError } = useGitOperationsError();
const { repos, selectedRepoId } = useAttemptRepo(attempt.id);
@@ -83,6 +85,7 @@ function GitActionsDialogContent({
selectedAttempt={attempt}
task={task}
branchStatus={branchStatus ?? null}
+ branchStatusError={branchStatusError}
isAttemptRunning={isAttemptRunning}
selectedBranch={getSelectedRepoStatus()?.target_branch_name ?? null}
layout="vertical"
diff --git a/frontend/src/components/tasks/Toolbar/GitOperations.tsx b/frontend/src/components/tasks/Toolbar/GitOperations.tsx
index 66b163c8..9efb7731 100644
--- a/frontend/src/components/tasks/Toolbar/GitOperations.tsx
+++ b/frontend/src/components/tasks/Toolbar/GitOperations.tsx
@@ -35,6 +35,7 @@ interface GitOperationsProps {
selectedAttempt: Workspace;
task: TaskWithAttemptStatus;
branchStatus: RepoBranchStatus[] | null;
+ branchStatusError?: Error | null;
isAttemptRunning: boolean;
selectedBranch: string | null;
layout?: 'horizontal' | 'vertical';
@@ -46,6 +47,7 @@ function GitOperations({
selectedAttempt,
task,
branchStatus,
+ branchStatusError,
isAttemptRunning,
selectedBranch,
layout = 'horizontal',
@@ -463,7 +465,12 @@ function GitOperations({
)}
{/* Right: Actions */}
- {selectedRepoStatus && (
+ {branchStatusError && !selectedRepoStatus ? (
+
+
+
{t('git.errors.branchStatusUnavailable')}
+
+ ) : selectedRepoStatus ? (
- )}
+ ) : null}
);
diff --git a/frontend/src/i18n/locales/en/tasks.json b/frontend/src/i18n/locales/en/tasks.json
index 7bac2b3d..51c3e240 100644
--- a/frontend/src/i18n/locales/en/tasks.json
+++ b/frontend/src/i18n/locales/en/tasks.json
@@ -257,7 +257,8 @@
"changeTargetBranch": "Failed to change target branch",
"pushChanges": "Failed to push changes",
"mergeChanges": "Failed to merge changes",
- "rebaseBranch": "Failed to rebase branch"
+ "rebaseBranch": "Failed to rebase branch",
+ "branchStatusUnavailable": "Unable to fetch branch status. You can still change the target branch."
},
"pr": {
"open": "Open PR #{{number}}",
diff --git a/frontend/src/i18n/locales/es/tasks.json b/frontend/src/i18n/locales/es/tasks.json
index 610eebb2..319c75d0 100644
--- a/frontend/src/i18n/locales/es/tasks.json
+++ b/frontend/src/i18n/locales/es/tasks.json
@@ -235,7 +235,8 @@
"changeTargetBranch": "Error al cambiar rama de destino",
"mergeChanges": "Error al fusionar cambios",
"pushChanges": "Error al enviar cambios",
- "rebaseBranch": "Error al hacer rebase de la rama"
+ "rebaseBranch": "Error al hacer rebase de la rama",
+ "branchStatusUnavailable": "No se puede obtener el estado de la rama. Aún puedes cambiar la rama de destino."
},
"labels": {
"taskBranch": "Rama de tarea"
diff --git a/frontend/src/i18n/locales/ja/tasks.json b/frontend/src/i18n/locales/ja/tasks.json
index bcfafd5f..cff3b1e5 100644
--- a/frontend/src/i18n/locales/ja/tasks.json
+++ b/frontend/src/i18n/locales/ja/tasks.json
@@ -235,7 +235,8 @@
"changeTargetBranch": "ターゲットブランチの変更に失敗しました",
"mergeChanges": "変更のマージに失敗しました",
"pushChanges": "変更のプッシュに失敗しました",
- "rebaseBranch": "ブランチのリベースに失敗しました"
+ "rebaseBranch": "ブランチのリベースに失敗しました",
+ "branchStatusUnavailable": "ブランチのステータスを取得できません。ターゲットブランチの変更は引き続き可能です。"
},
"labels": {
"taskBranch": "タスクブランチ"
diff --git a/frontend/src/i18n/locales/ko/tasks.json b/frontend/src/i18n/locales/ko/tasks.json
index c2107836..f2a5e05e 100644
--- a/frontend/src/i18n/locales/ko/tasks.json
+++ b/frontend/src/i18n/locales/ko/tasks.json
@@ -235,7 +235,8 @@
"changeTargetBranch": "대상 브랜치를 변경하지 못했습니다",
"mergeChanges": "변경사항을 병합하지 못했습니다",
"pushChanges": "변경사항을 푸시하지 못했습니다",
- "rebaseBranch": "브랜치를 리베이스하지 못했습니다"
+ "rebaseBranch": "브랜치를 리베이스하지 못했습니다",
+ "branchStatusUnavailable": "브랜치 상태를 가져올 수 없습니다. 대상 브랜치는 여전히 변경할 수 있습니다."
},
"labels": {
"taskBranch": "작업 브랜치"
diff --git a/frontend/src/i18n/locales/zh-Hans/tasks.json b/frontend/src/i18n/locales/zh-Hans/tasks.json
index 4be3833b..3475ca0f 100644
--- a/frontend/src/i18n/locales/zh-Hans/tasks.json
+++ b/frontend/src/i18n/locales/zh-Hans/tasks.json
@@ -270,7 +270,8 @@
"changeTargetBranch": "更改目标分支失败",
"pushChanges": "推送更改失败",
"mergeChanges": "合并更改失败",
- "rebaseBranch": "变基分支失败"
+ "rebaseBranch": "变基分支失败",
+ "branchStatusUnavailable": "无法获取分支状态。您仍然可以更改目标分支。"
},
"pr": {
"open": "打开 PR #{{number}}",
diff --git a/frontend/src/i18n/locales/zh-Hant/tasks.json b/frontend/src/i18n/locales/zh-Hant/tasks.json
index 4c62ec0b..72125554 100644
--- a/frontend/src/i18n/locales/zh-Hant/tasks.json
+++ b/frontend/src/i18n/locales/zh-Hant/tasks.json
@@ -270,7 +270,8 @@
"changeTargetBranch": "變更目標分支失敗",
"pushChanges": "推送變更失敗",
"mergeChanges": "合併變更失敗",
- "rebaseBranch": "重基底分支失敗"
+ "rebaseBranch": "重基底分支失敗",
+ "branchStatusUnavailable": "無法取得分支狀態。您仍然可以變更目標分支。"
},
"pr": {
"open": "開啟 PR #{{number}}",
diff --git a/frontend/src/pages/ProjectTasks.tsx b/frontend/src/pages/ProjectTasks.tsx
index 52aa897a..1b3caf75 100644
--- a/frontend/src/pages/ProjectTasks.tsx
+++ b/frontend/src/pages/ProjectTasks.tsx
@@ -102,10 +102,12 @@ function DiffsPanelContainer({
attempt,
selectedTask,
branchStatus,
+ branchStatusError,
}: {
attempt: Workspace | null;
selectedTask: TaskWithAttemptStatus | null;
branchStatus: RepoBranchStatus[] | null;
+ branchStatusError?: Error | null;
}) {
const { isAttemptRunning } = useAttemptExecution(attempt?.id);
@@ -118,6 +120,7 @@ function DiffsPanelContainer({
? {
task: selectedTask,
branchStatus: branchStatus ?? null,
+ branchStatusError,
isAttemptRunning,
selectedBranch: branchStatus?.[0]?.target_branch_name ?? null,
}
@@ -284,7 +287,9 @@ export function ProjectTasks() {
const isTaskView = !!taskId && !effectiveAttemptId;
const { data: attempt } = useTaskAttemptWithSession(effectiveAttemptId);
- const { data: branchStatus } = useBranchStatus(attempt?.id);
+ const { data: branchStatus, error: branchStatusError } = useBranchStatus(
+ attempt?.id
+ );
const rawMode = searchParams.get('view') as LayoutMode;
const mode: LayoutMode =
@@ -1000,6 +1005,7 @@ export function ProjectTasks() {
attempt={attempt}
selectedTask={selectedTask}
branchStatus={branchStatus ?? null}
+ branchStatusError={branchStatusError}
/>
)}