From 32a6055f7c994bb43961d5242e808d1a09020e40 Mon Sep 17 00:00:00 2001 From: Mahesh Sanikommu Date: Tue, 23 Jun 2026 07:31:40 -0700 Subject: [PATCH] Fix integrations page double-refresh on load (#1134) Co-authored-by: Claude Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Vedant Mahajan --- apps/web/components/ensure-workspace.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/web/components/ensure-workspace.tsx b/apps/web/components/ensure-workspace.tsx index 73218af2..0d4a69bb 100644 --- a/apps/web/components/ensure-workspace.tsx +++ b/apps/web/components/ensure-workspace.tsx @@ -20,12 +20,12 @@ export function EnsureWorkspace({ children }: { children: React.ReactNode }) { const pathname = usePathname() const router = useRouter() const searchParams = useSearchParams() - const { session, organizations, isRestoring } = useAuth() + const { session, organizations, isRestoring, isSessionPending } = useAuth() const isPublicAppPage = pathname === "/" && ["integrations", "mcp"].includes(searchParams.get("view") ?? "") - const isGuestPublicAppPage = isPublicAppPage && !session + const isGuestPublicAppPage = isPublicAppPage && !session && !isSessionPending const isOnboarding = pathname.startsWith("/onboarding") useEffect(() => {