From 957011d8fea5b093220f8940ce35416c7d04f26a Mon Sep 17 00:00:00 2001 From: Ishaan Gupta Date: Mon, 3 Aug 2026 19:00:50 +0530 Subject: [PATCH] Remove paid plugin UI --- apps/web/app/auth/connect/page.tsx | 122 +----------------- apps/web/components/integrations-view.tsx | 5 - .../integrations/plugins-detail.tsx | 59 +-------- .../onboarding-brain/step-sources.tsx | 6 +- apps/web/components/select-spaces-modal.tsx | 5 - apps/web/components/settings/billing.tsx | 2 +- 6 files changed, 7 insertions(+), 192 deletions(-) diff --git a/apps/web/app/auth/connect/page.tsx b/apps/web/app/auth/connect/page.tsx index 0f96e52c..d123c3cd 100644 --- a/apps/web/app/auth/connect/page.tsx +++ b/apps/web/app/auth/connect/page.tsx @@ -4,8 +4,7 @@ import { useAuth } from "@lib/auth-context" import { useSession } from "@lib/auth" import { cn } from "@lib/utils" import { dmSans125ClassName } from "@/lib/fonts" -import { useCustomer } from "autumn-js/react" -import { ArrowRight, Loader, XCircle } from "lucide-react" +import { ArrowRight, XCircle } from "lucide-react" import Image from "next/image" import { useRouter, useSearchParams } from "next/navigation" import { Suspense, useEffect, useState } from "react" @@ -107,7 +106,7 @@ function getPluginName(client: string): string { return PLUGIN_INFO[client]?.name ?? "External Tool" } -type Status = "loading" | "creating" | "success" | "error" | "upgrade" +type Status = "loading" | "creating" | "success" | "error" const pageWrapperClass = "flex items-center justify-center min-h-screen bg-background p-4" @@ -121,10 +120,8 @@ function AuthConnectContent() { const router = useRouter() const { data: session, isPending } = useSession() const { org, organizations, isRestoring } = useAuth() - const autumn = useCustomer() const [status, setStatus] = useState("loading") const [error, setError] = useState(null) - const [isUpgrading, setIsUpgrading] = useState(false) const callback = params.get("callback") const client = params.get("client") @@ -184,10 +181,6 @@ function AuthConnectContent() { }) if (!res.ok) { - if (res.status === 403) { - setStatus("upgrade") - return - } const errorData = (await res.json().catch(() => ({}))) as { message?: string } @@ -208,20 +201,6 @@ function AuthConnectContent() { } } - async function handleUpgrade() { - try { - setIsUpgrading(true) - const safeSuccessUrl = `${window.location.origin}${window.location.pathname}?callback=${encodeURIComponent(callback ?? "")}&client=${encodeURIComponent(validClient ?? "")}` - await autumn.attach({ - planId: "api_pro", - successUrl: safeSuccessUrl, - }) - } catch (err) { - console.error("Upgrade failed:", err) - setIsUpgrading(false) - } - } - // Show a spinner while session/org data is loading or while we're about // to redirect to onboarding (prevents a brief flash of the connect card). const isAuthLoading = isPending || isRestoring || organizations === null @@ -312,103 +291,6 @@ function AuthConnectContent() { ) } - if (status === "upgrade") { - return ( -
-
-
-
- {pluginInfo ? ( - {pluginInfo.name} - ) : ( - - )} -
-
-

- {pluginInfo?.name ?? displayName} -

-

- {pluginInfo?.description ?? - `A paid plan is required to use ${displayName} with Supermemory.`} -

-
- - {pluginInfo && ( -
    - {pluginInfo.features.map((feature) => ( -
  • - - - {feature} - -
  • - ))} -
- )} - - - - - View all plans - -
-
-
- ) - } - if (status === "error") { return (
diff --git a/apps/web/components/integrations-view.tsx b/apps/web/components/integrations-view.tsx index a4a4ded6..12031cd9 100644 --- a/apps/web/components/integrations-view.tsx +++ b/apps/web/components/integrations-view.tsx @@ -2747,11 +2747,6 @@ export function IntegrationsView({ credentials: "include", }) if (!res.ok) { - if (res.status === 403) { - throw new Error( - "Plugin access was denied. Check your plan or try again.", - ) - } const errorData = (await res.json().catch(() => ({}))) as { message?: string } diff --git a/apps/web/components/integrations/plugins-detail.tsx b/apps/web/components/integrations/plugins-detail.tsx index f924a8fb..cb50ecaf 100644 --- a/apps/web/components/integrations/plugins-detail.tsx +++ b/apps/web/components/integrations/plugins-detail.tsx @@ -415,48 +415,10 @@ function PluginRow({ ) } -type TierFilter = "all" | "pro" | "free" - -const TIER_FILTERS: { value: TierFilter; label: string }[] = [ - { value: "all", label: "All" }, - { value: "pro", label: "Pro" }, - { value: "free", label: "Free" }, -] - -function TierFilterToggle({ - value, - onChange, -}: { - value: TierFilter - onChange: (value: TierFilter) => void -}) { - return ( -
- {TIER_FILTERS.map((filter) => ( - - ))} -
- ) -} - export function PluginsDetail() { const { org } = useAuth() const autumn = useCustomer() const queryClient = useQueryClient() - const [tierFilter, setTierFilter] = useState("all") const [connectingPlugin, setConnectingPlugin] = useState(null) const [finishSetupPluginId, setFinishSetupPluginId] = useState( null, @@ -572,11 +534,6 @@ export function PluginsDetail() { credentials: "include", }) if (!res.ok) { - if (res.status === 403) { - throw new Error( - "Plugin access was denied. Check your plan or try again.", - ) - } const errorData = (await res.json().catch(() => ({}))) as { message?: string } @@ -635,17 +592,12 @@ export function PluginsDetail() { ) const visibleRows = useMemo(() => { - const filtered = catalogRows.filter((id) => { - if (tierFilter === "free") return isFreeTierPlugin(id) - if (tierFilter === "pro") return !isFreeTierPlugin(id) - return true - }) // Connected plugins float to the top (stable within each group). - return [...filtered].sort( + return [...catalogRows].sort( (a, b) => Number(connectedPluginIds.has(b)) - Number(connectedPluginIds.has(a)), ) - }, [catalogRows, tierFilter, connectedPluginIds]) + }, [catalogRows, connectedPluginIds]) const dialogPlugin = newKey.pluginId ? PLUGIN_CATALOG[newKey.pluginId] @@ -684,12 +636,7 @@ export function PluginsDetail() { )} >
-
- Plugins - {catalogRows.length > 0 && ( - - )} -
+ Plugins
{visibleRows.map((pluginId) => { const plugin = PLUGIN_CATALOG[pluginId] diff --git a/apps/web/components/onboarding-brain/step-sources.tsx b/apps/web/components/onboarding-brain/step-sources.tsx index 5535392d..d3733991 100644 --- a/apps/web/components/onboarding-brain/step-sources.tsx +++ b/apps/web/components/onboarding-brain/step-sources.tsx @@ -149,11 +149,7 @@ const PLAN_CARDS: PlanCardDefinition[] = [ credits: "$20", productId: "api_pro", description: "For people building with AI memory", - features: [ - "Auto top-up when balance runs low", - "All plugins (Claude Code, Cursor, Hermes...)", - "Priority support", - ], + features: ["Auto top-up when balance runs low", "Priority support"], }, { id: "max", diff --git a/apps/web/components/select-spaces-modal.tsx b/apps/web/components/select-spaces-modal.tsx index c9a06dd0..7b7398c6 100644 --- a/apps/web/components/select-spaces-modal.tsx +++ b/apps/web/components/select-spaces-modal.tsx @@ -394,11 +394,6 @@ export function SelectSpacesModal({ credentials: "include", }) if (!res.ok) { - if (res.status === 403) { - throw new Error( - "Plugin access was denied. Check your plan or try again.", - ) - } const errorData = (await res.json().catch(() => ({}))) as { message?: string } diff --git a/apps/web/components/settings/billing.tsx b/apps/web/components/settings/billing.tsx index b46da2c2..b8e366a4 100644 --- a/apps/web/components/settings/billing.tsx +++ b/apps/web/components/settings/billing.tsx @@ -137,6 +137,7 @@ const PLAN_CARDS: PlanCardDefinition[] = [ features: [ "Pay-as-you-go after $5 runs out", "Full search and memory access", + "All plugins (Claude Code, Cursor, Hermes...)", "Email support", ], }, @@ -151,7 +152,6 @@ const PLAN_CARDS: PlanCardDefinition[] = [ features: [ "Auto top-up when balance runs low", "Google Drive, Notion, OneDrive & Granola connectors", - "All plugins (Claude Code, Cursor, Hermes...)", "Priority support", ], },