From 87dc5a667fe6ce226c6cc557e86266be74ff390a Mon Sep 17 00:00:00 2001 From: Ishaan Gupta Date: Wed, 10 Jun 2026 21:17:05 +0530 Subject: [PATCH] Fix integration setup plan gating --- apps/web/components/integrations-view.tsx | 40 ++++++++--------------- 1 file changed, 14 insertions(+), 26 deletions(-) diff --git a/apps/web/components/integrations-view.tsx b/apps/web/components/integrations-view.tsx index 2a103425..9156abf6 100644 --- a/apps/web/components/integrations-view.tsx +++ b/apps/web/components/integrations-view.tsx @@ -305,7 +305,6 @@ interface BaseItem { icon: ReactNode docsUrl?: string pro?: boolean - max?: boolean kind: ItemKind simpleTitle?: string dev?: boolean @@ -444,7 +443,7 @@ const SECTIONS: Array<{ tagline: "Sync AI meeting notes into your memory", simpleTitle: "Your meeting notes, ready to recall", icon: , - max: true, + pro: true, }, ], }, @@ -536,7 +535,7 @@ export function DetailWrapper({ ) } -function ProChip({ children = "Pro" }: { children?: ReactNode }) { +function ProChip() { return ( - {children} + Pro ) } @@ -1708,7 +1707,6 @@ function ItemCard({ name, tagline, pro, - max, isNew, docsUrl, leftIndicator, @@ -1721,7 +1719,6 @@ function ItemCard({ name: string tagline: string pro?: boolean - max?: boolean isNew?: boolean docsUrl?: string leftIndicator?: ReactNode @@ -1772,7 +1769,7 @@ function ItemCard({ {name} {isNew && } - {max ? Max : pro && } + {pro && }

(null) @@ -2408,10 +2403,10 @@ export function IntegrationsView({ } } - const handleUpgrade = async (planId: "api_pro" | "api_max" = "api_pro") => { + const handleUpgrade = async () => { try { const result = await autumn.attach({ - planId, + planId: "api_pro", successUrl: `${window.location.origin}/?view=integrations`, }) if (result?.paymentUrl) { @@ -2826,6 +2821,11 @@ export function IntegrationsView({ { trackCard(item) + if (!PLUGIN_CATALOG[item.pluginId]?.usesOAuth) { + if (connectingPlugin) return + createPluginKeyMutation.mutate(item.pluginId) + return + } setFinishSetupPluginId(item.pluginId) }} /> @@ -2860,8 +2860,7 @@ export function IntegrationsView({ case "connector": { const count = connectionsByProvider[item.provider].length const isGranola = item.provider === "granola" - const needsPlanUpgrade = - !isAutumnLoading && (isGranola ? !hasMaxProduct : !hasProProduct) + const needsProUpgrade = !isAutumnLoading && !hasProProduct if (count > 0) { return (

@@ -2873,10 +2872,6 @@ export function IntegrationsView({ onClick={() => { trackCard(item) if (isGranola) { - if (!hasMaxProduct) { - handleUpgrade("api_max") - return - } setGranolaModalOpen(true) return } @@ -2892,11 +2887,9 @@ export function IntegrationsView({
) } - if (needsPlanUpgrade) { + if (needsProUpgrade) { return ( - handleUpgrade(isGranola ? "api_max" : "api_pro")} - > + Upgrade ) @@ -2907,10 +2900,6 @@ export function IntegrationsView({ onClick={() => { trackCard(item) if (isGranola) { - if (!hasMaxProduct) { - handleUpgrade("api_max") - return - } setGranolaModalOpen(true) return } @@ -3027,7 +3016,6 @@ export function IntegrationsView({ name={item.name} tagline={item.tagline} pro={item.pro} - max={item.max} isNew={item.isNew} docsUrl={item.docsUrl} leftIndicator={renderLeftIndicator(item)}