- Starts your 14-day free trial. No credit card needed. + Included in your 14-day trial.
From 0695ca421bb5fba4f7165f086f84948d8fcee991 Mon Sep 17 00:00:00 2001 From: MaheshtheDev <38828053+MaheshtheDev@users.noreply.github.com> Date: Thu, 13 Aug 2026 06:58:47 +0000 Subject: [PATCH] feat(web): take a card before the Company Brain trial starts (#1459) Onboarding now opens a trial step that collects a card through Stripe checkout before the brain is enabled, with a timeline showing today's $0, the day-12 reminder, and the day-14 charge. - Only leaves the card step once the API confirms the trial is live - Brain home shows a setup banner and dims what the trial unlocks - Recovers orgs that abandoned checkout instead of stranding them - Adds the organization ID to account settings, copyable from the label --- .../components/brain-home/brain-home-view.tsx | 21 +- .../brain-home/connections-board.tsx | 47 +++- apps/web/components/dashboard-view.tsx | 2 + .../company-brain-onboarding.tsx | 51 +++- .../onboarding-brain/research-action-rail.tsx | 2 +- .../onboarding-brain/step-trial.tsx | 239 ++++++++++++++++++ apps/web/components/settings/account.tsx | 19 +- apps/web/components/slack-connect-card.tsx | 24 +- apps/web/components/trial-setup-banner.tsx | 41 +++ apps/web/hooks/use-trial-status.ts | 34 +++ apps/web/lib/analytics.ts | 5 + 11 files changed, 451 insertions(+), 34 deletions(-) create mode 100644 apps/web/components/onboarding-brain/step-trial.tsx create mode 100644 apps/web/components/trial-setup-banner.tsx create mode 100644 apps/web/hooks/use-trial-status.ts diff --git a/apps/web/components/brain-home/brain-home-view.tsx b/apps/web/components/brain-home/brain-home-view.tsx index 06a00ba6f..3501c5e8f 100644 --- a/apps/web/components/brain-home/brain-home-view.tsx +++ b/apps/web/components/brain-home/brain-home-view.tsx @@ -8,6 +8,8 @@ import { ArrowRight, Check, FileText, Loader2, UserPlus } from "lucide-react" import { useQueryState } from "nuqs" import { useSettingsModal } from "@/components/settings/settings-modal" import { useBrainTrial } from "@/hooks/use-brain-trial" +import { TrialSetupBanner } from "@/components/trial-setup-banner" +import { useTrialStatus } from "@/hooks/use-trial-status" import { dmSans125ClassName } from "@/lib/fonts" import { useViewMode } from "@/lib/view-mode-context" import { @@ -170,6 +172,7 @@ export function BrainHomeView() { const o = useBrainOverview() const trial = useBrainTrial() const board = useConnectionsBoard() + const { needsSetup } = useTrialStatus() // Rows with no reported state (older orgs, pre-Slack) don't count or render. const milestones = [ ...(o.researchStatus != null ? [o.researchStatus === "done"] : []), @@ -186,6 +189,7 @@ export function BrainHomeView() { return (
- Give your Slack agent live access to the apps your team already uses. + {needsSetup + ? "Starts with your trial." + : "Give your Slack agent live access to the apps your team already uses."}
- {connectedCount > 0 - ? "Things your agent can answer now:" - : "Connect a tool and your agent can answer:"} + {needsSetup + ? "Starts with your trial." + : connectedCount > 0 + ? "Things your agent can answer now:" + : "Connect a tool and your agent can answer:"}
-- Starts your 14-day free trial. No credit card needed. + Included in your 14-day trial.
+ Meet @supermemory +
++ We take a card now so Company Brain keeps working when the trial + ends. Cancel any time before then and you won't be charged. +
+
+
+ {endedTrial + ? "Your Company Brain trial has ended" + : "Finish setting up Company Brain"} +
++ {endedTrial + ? "Move to Max or Scale to switch the brain back on." + : "Add a card to start your 14-day trial. $0 today."} +
+