From b62a87942abe46af3453680059c5cf994240ce62 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 16 Oct 2026 14:57:13 +0000 Subject: [PATCH] fix(onboarding): remove the paid team plan from the onboarding plan step The plan step offered "With my team" ($15/user/mo), which routed to a team onboarding flow that no longer exists in the app. Only the free personal plan is offered now, a stale persisted team/org selection is reset to personal, and the continuation prompt that resumed the removed team/org flows is no longer shown. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_018Ry8i7UiPSEffvjYXpZRfx --- .../getting-started/onboarding-view.tsx | 209 ++++++++---------- 1 file changed, 88 insertions(+), 121 deletions(-) diff --git a/apps/web/modules/onboarding/getting-started/onboarding-view.tsx b/apps/web/modules/onboarding/getting-started/onboarding-view.tsx index 8d8b0ea8871e..772d52bfe0eb 100644 --- a/apps/web/modules/onboarding/getting-started/onboarding-view.tsx +++ b/apps/web/modules/onboarding/getting-started/onboarding-view.tsx @@ -12,7 +12,6 @@ import posthog from "posthog-js"; import { useEffect, useRef, useTransition } from "react"; import { OnboardingCard } from "../components/OnboardingCard"; import { OnboardingLayout } from "../components/OnboardingLayout"; -import { OnboardingContinuationPrompt } from "../components/onboarding-continuation-prompt"; import { PlanIcon } from "../components/plan-icon"; import { type PlanType, useOnboardingStore } from "../store/onboarding-store"; @@ -23,17 +22,17 @@ type OnboardingViewProps = { export const OnboardingView = ({ userEmail }: OnboardingViewProps) => { const router = useRouter(); const { t } = useLocale(); - const { selectedPlan, setSelectedPlan, resetOnboardingPreservingPlan } = useOnboardingStore(); + const { selectedPlan, setSelectedPlan, resetOnboarding } = useOnboardingStore(); const previousPlanRef = useRef(null); const [isPending, startTransition] = useTransition(); const hasTeamMembership = false; const isPendingMembership = false; - // Reset onboarding data when visiting this page, but preserve the selected plan + // Full reset (not preserving the plan) so a "team" plan persisted from before the paid team plan was + // removed falls back to the free personal plan instead of routing to the removed team flow. useEffect(() => { - resetOnboardingPreservingPlan(); - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [resetOnboardingPreservingPlan]); + resetOnboarding(); + }, [resetOnboarding]); // If user has any team membership (pending or accepted), redirect them directly to personal onboarding // This handles the case where users sign up with an invite token (membership is auto-accepted) @@ -75,13 +74,7 @@ export const OnboardingView = ({ userEmail }: OnboardingViewProps) => { }); } startTransition(() => { - if (selectedPlan === "organization") { - router.push("/onboarding/organization/details"); - } else if (selectedPlan === "team") { - router.push("/onboarding/teams/details"); - } else if (selectedPlan === "personal") { - router.push("/onboarding/personal/settings"); - } + router.push("/onboarding/personal/settings"); }); }; @@ -91,7 +84,8 @@ export const OnboardingView = ({ userEmail }: OnboardingViewProps) => { organization: "users", }; - const allPlans = [ + // Only the free personal plan is offered; paid team and organization plans are not part of onboarding. + const plans = [ { id: "personal" as PlanType, title: t("onboarding_plan_personal_title"), @@ -100,32 +94,8 @@ export const OnboardingView = ({ userEmail }: OnboardingViewProps) => { icon: planIconByType.personal, variant: "single" as const, }, - { - id: "team" as PlanType, - title: t("onboarding_plan_team_title"), - badge: t("onboarding_plan_team_badge"), - description: t("onboarding_plan_team_description"), - icon: planIconByType.team, - variant: "team" as const, - }, - { - id: "organization" as PlanType, - title: t("onboarding_plan_organization_title"), - badge: t("onboarding_plan_organization_badge"), - description: t("onboarding_plan_organization_description"), - icon: planIconByType.organization, - variant: "organization" as const, - }, ]; - // Only show organization plan for company emails - const plans = allPlans.filter((plan) => { - if (plan.id === "organization") { - return false; - } - return true; - }); - const selectedPlanData = plans.find((plan) => plan.id === selectedPlan); // Show loading state while checking for team membership or if redirecting @@ -138,93 +108,90 @@ export const OnboardingView = ({ userEmail }: OnboardingViewProps) => { } return ( - <> - - - {/* Left column - Main content */} - - - - }> - {/* Card */} -
-
- {/* Plan options */} - { - const planType = value as PlanType; - setSelectedPlan(planType); - posthog.capture("onboarding_plan_selected", { - plan_type: planType, - }); - }} - className="flex w-full flex-col gap-1 rounded-[10px]"> - {plans.map((plan) => { - const isSelected = selectedPlan === plan.id; - - return ( - button]:right-6 [&>button]:left-auto [&>button]:mt-0 [&>button]:transform" - )} - classNames={{ - container: "flex w-full items-center gap-3 p-5 pr-12", - }}> -
-
-

{plan.title}

- - {plan.badge} - -
- + + {/* Left column - Main content */} + + +
+ }> + {/* Card */} +
+
+ {/* Plan options */} + { + const planType = value as PlanType; + setSelectedPlan(planType); + posthog.capture("onboarding_plan_selected", { + plan_type: planType, + }); + }} + className="flex w-full flex-col gap-1 rounded-[10px]"> + {plans.map((plan) => { + const isSelected = selectedPlan === plan.id; + + return ( + button]:right-6 [&>button]:left-auto [&>button]:mt-0 [&>button]:transform" + )} + classNames={{ + container: "flex w-full items-center gap-3 p-5 pr-12", + }}> +
+
+

{plan.title}

+ {plan.badge} -

- {plan.description} -

- - ); - })} - -
+ + {plan.badge} + +

+ {plan.description} +

+
+ + ); + })} +
- - - {/* Right column - Icon display */} -
- - {selectedPlanData && ( - - )} -
- - + + + {/* Right column - Icon display */} +
+ + {selectedPlanData && ( + + )} + +
+ ); };