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
This commit is contained in:
Ben Senescu 2026-08-07 14:21:01 -04:00 committed by GitHub
parent f048dc3bd1
commit 16b6d38ea8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 2 deletions

View File

@ -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 (
<div className="grid gap-x-8 gap-y-8 md:grid-cols-2">
{toolCategories.map((cat) => (
{visibleCategories.map((cat) => (
<div key={cat.label}>
<h3 className="text-xs font-semibold uppercase tracking-wide text-base-content/50">
{cat.label}

View File

@ -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: <GscCard projectId={projectId} connected={gscConnected} />,
},
...(ga4Connected || !activation.ga4.cardDismissedAt
...(!GA4_CARD_HIDDEN &&
(ga4Connected || !activation.ga4.cardDismissedAt)
? [
{
key: "ga4",