From 16b6d38ea8ea103c29ed5ef2440a8148f67aad61 Mon Sep 17 00:00:00 2001 From: Ben Senescu <44480372+bensenescu@users.noreply.github.com> Date: Fri, 7 Aug 2026 14:21:01 -0400 Subject: [PATCH] fix(dashboard): hide GA4 connect card until OAuth app is approved (#463) * fix(dashboard): hide GA4 connect card until OAuth app is approved * fix(ai-mcp): hide Google Analytics tool category until OAuth app is approved --- src/client/features/ai-mcp/AvailableTools.tsx | 10 +++++++++- src/client/features/dashboard/DashboardPage.tsx | 7 ++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/client/features/ai-mcp/AvailableTools.tsx b/src/client/features/ai-mcp/AvailableTools.tsx index 31f4cfa..97d6881 100644 --- a/src/client/features/ai-mcp/AvailableTools.tsx +++ b/src/client/features/ai-mcp/AvailableTools.tsx @@ -207,10 +207,18 @@ const toolCategories: ToolCategory[] = [ }, ]; +// Google hasn't approved the GA4 OAuth app yet, so connecting fails. +// Flip to false once the app is approved. +const GA4_TOOLS_HIDDEN = true; + +const visibleCategories = GA4_TOOLS_HIDDEN + ? toolCategories.filter((cat) => cat.label !== "Google Analytics") + : toolCategories; + export function AvailableTools() { return (
- {toolCategories.map((cat) => ( + {visibleCategories.map((cat) => (

{cat.label} diff --git a/src/client/features/dashboard/DashboardPage.tsx b/src/client/features/dashboard/DashboardPage.tsx index 598b0b9..de98772 100644 --- a/src/client/features/dashboard/DashboardPage.tsx +++ b/src/client/features/dashboard/DashboardPage.tsx @@ -27,6 +27,10 @@ import { import { setProjectDomain } from "@/serverFunctions/projects"; import type { DashboardHeroStep } from "@/types/schemas/dashboard"; +// Google hasn't approved the GA4 OAuth app yet, so connecting fails. +// Flip to false once the app is approved. +const GA4_CARD_HIDDEN = true; + const HERO_COPY: Record< DashboardHeroStep, { title: string; body: string; cta: string } @@ -332,7 +336,8 @@ export function DashboardPage({ projectId }: { projectId: string }) { hasData: gscConnected, node: , }, - ...(ga4Connected || !activation.ga4.cardDismissedAt + ...(!GA4_CARD_HIDDEN && + (ga4Connected || !activation.ga4.cardDismissedAt) ? [ { key: "ga4",