- {thread.branch ? (
+ {checkoutThread.branch ? (
<>
-
+
-
+
>
) : showsScratchMachine ? (
@@ -1563,10 +1565,11 @@ export const SidebarSearchResultRow = memo(function SidebarSearchResultRow(props
JSON.stringify([thread.environmentId, gitCwd]),
gitStatus.data,
);
+ const checkoutThread = withoutRemovedCheckout(thread, visibleGitStatus);
const branchMismatch = resolveLocalCheckoutBranchMismatch({
- effectiveEnvMode: thread.worktreePath === null ? "local" : "worktree",
- activeWorktreePath: thread.worktreePath,
- activeThreadBranch: thread.branch,
+ effectiveEnvMode: checkoutThread.worktreePath === null ? "local" : "worktree",
+ activeWorktreePath: checkoutThread.worktreePath,
+ activeThreadBranch: checkoutThread.branch,
currentGitBranch: visibleGitStatus?.refName ?? null,
});
const modelInstanceId = thread.runtime?.providerInstanceId ?? thread.modelSelection.instanceId;
@@ -1679,7 +1682,7 @@ export const SidebarSearchResultRow = memo(function SidebarSearchResultRow(props