From eaa4b836564e9bbc17e031e594845eeed42176f2 Mon Sep 17 00:00:00 2001 From: Ishaan Gupta Date: Wed, 10 Jun 2026 21:18:10 +0530 Subject: [PATCH] fix(web): harden integrations upgrade plan id --- apps/web/components/integrations-view.tsx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/apps/web/components/integrations-view.tsx b/apps/web/components/integrations-view.tsx index 6379aa89..9b90227e 100644 --- a/apps/web/components/integrations-view.tsx +++ b/apps/web/components/integrations-view.tsx @@ -2425,10 +2425,11 @@ export function IntegrationsView({ } } - const handleUpgrade = async (planId: "api_pro" | "api_max" = "api_pro") => { + const handleUpgrade = async (planId?: unknown) => { + const checkoutPlanId = planId === "api_max" ? "api_max" : "api_pro" try { const result = await autumn.attach({ - planId, + planId: checkoutPlanId, successUrl: `${window.location.origin}/?view=integrations`, }) if (result?.paymentUrl) { @@ -2741,7 +2742,7 @@ export function IntegrationsView({ } if (claudeCodeConnected) return if (claudeCodeNeedsPro) { - handleUpgrade() + handleUpgrade("api_pro") return } createPluginKeyMutation.mutate("claude_code") @@ -2818,7 +2819,7 @@ export function IntegrationsView({ title="Connect another agent" onClick={() => { if (needsProUpgrade) { - handleUpgrade() + handleUpgrade("api_pro") return } trackCard(item) @@ -2850,7 +2851,7 @@ export function IntegrationsView({ } if (needsProUpgrade) { return ( - handleUpgrade()}> + handleUpgrade("api_pro")}> Upgrade ) @@ -3020,7 +3021,7 @@ export function IntegrationsView({ { if (needsProUpgrade) { - handleUpgrade() + handleUpgrade("api_pro") return } trackCard(item) @@ -3465,7 +3466,7 @@ export function IntegrationsView({
{connectedDialogNeedsPro ? ( - handleUpgrade()}> + handleUpgrade("api_pro")}> Upgrade to connect more