From d682c74469acc73fae86f6e0a95247b8c122294b Mon Sep 17 00:00:00 2001 From: Mohamed Boudra Date: Thu, 12 Feb 2026 13:41:41 +0700 Subject: [PATCH] Fix explorer tab fallback when checkout status is unresolved --- packages/app/src/components/explorer-sidebar.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/app/src/components/explorer-sidebar.tsx b/packages/app/src/components/explorer-sidebar.tsx index 36a660b1c..6357616c3 100644 --- a/packages/app/src/components/explorer-sidebar.tsx +++ b/packages/app/src/components/explorer-sidebar.tsx @@ -262,13 +262,14 @@ function SidebarContent({ const { theme } = useUnistyles(); const { status } = useCheckoutStatusQuery({ serverId, cwd }); const isGit = status?.isGit ?? false; + const hasResolvedCheckoutStatus = status !== null; // Switch to Files tab if Changes tab is hidden and user was on it useEffect(() => { - if (!isGit && activeTab === "changes") { + if (hasResolvedCheckoutStatus && !isGit && activeTab === "changes") { onTabPress("files"); } - }, [isGit, activeTab, onTabPress]); + }, [hasResolvedCheckoutStatus, isGit, activeTab, onTabPress]); return (