consolidate checkout status handling and improve git detection

This commit is contained in:
Mohamed Boudra
2026-02-03 14:50:15 +07:00
parent ad632cb3bd
commit 14b0db55b0
12 changed files with 369 additions and 188 deletions
@@ -440,7 +440,11 @@ export function GroupedAgentList({
});
const checkout = checkoutQuery.data ?? null;
const activeBranchLabel = checkout?.isGit
? (checkout.currentBranch ?? checkout.baseRef ?? "git")
? ((checkout.currentBranch && checkout.currentBranch !== "HEAD"
? checkout.currentBranch
: null) ??
checkout.baseRef ??
"git")
: null;
const canArchive = !isRunning && !agent.requiresAttention;