Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
feat(onboarding): compare Free, Pro, and Max below the fold (#7613)
teo10e72f897a8a
diff --git a/apps/web/src/features/gtm-invite/InviteLinksPortal.tsx b/apps/web/src/features/gtm-invite/InviteLinksPortal.tsxindex 0257630243..f657650c2b 100644--- a/apps/web/src/features/gtm-invite/InviteLinksPortal.tsx+++ b/apps/web/src/features/gtm-invite/InviteLinksPortal.tsx@@ -63,7 +63,7 @@ export function InviteLinksPortal() {<h1 class="text-xl font-semibold tracking-tight">Invite links</h1><p class="text-sm text-ink-muted">Personal signup links for prospects. Each one is good for 48 hours- and gives the recipient their first month of Premium free.+ and gives the recipient their first month of Pro free.</p></div></header>diff --git a/apps/web/src/features/gtm-invite/InviteOfferPanel.tsx b/apps/web/src/features/gtm-invite/InviteOfferPanel.tsxindex a9771b4adc..3ae5837c8e 100644--- a/apps/web/src/features/gtm-invite/InviteOfferPanel.tsx+++ b/apps/web/src/features/gtm-invite/InviteOfferPanel.tsx@@ -4,7 +4,6 @@ import { useFeatureFlag } from '@app/lib/analytics/posthog';import { enableAiUsageBilling } from '@core/constant/featureFlags';import ArrowRight from '@phosphor/arrow-right.svg';import Check from '@phosphor/check.svg';-import { useIncludedAiCentsByTier } from '@queries/auth';import type { GtmInviteOffer } from '@service-auth/generated/schemas/gtmInviteOffer';import { Button } from '@ui';import { Index, onMount } from 'solid-js';@@ -14,7 +13,7 @@ const PREMIUM = PLANS[1];/*** Replaces the free/paid plan picker for an account that signed up through a- * GTM invite link: Premium's first month is free, checkout still collects a+ * GTM invite link: Pro's first month is free, checkout still collects a* card, and the promotion is applied server-side when the session is created.*/export function InviteOfferPanel(props: {@@ -25,7 +24,6 @@ export function InviteOfferPanel(props: {}) {const analytics = useAnalytics();const aiUsageBilling = useFeatureFlag(enableAiUsageBilling);- const includedAi = useIncludedAiCentsByTier();onMount(() => {analytics.track('gtm_invite_offer_viewed', {@@ -59,7 +57,7 @@ export function InviteOfferPanel(props: {</span></div><ul class="flex flex-col gap-2">- <Index each={planFeatures(aiUsageBilling().enabled, includedAi())}>+ <Index each={planFeatures(aiUsageBilling().enabled)}>{(feature) => (<li class="flex items-center justify-between gap-2 text-xs"><span class="flex items-center gap-1.5 text-ink-muted">@@ -76,7 +74,7 @@ export function InviteOfferPanel(props: {</div><p class="text-xs leading-relaxed text-ink-muted">- You'll add a card at checkout so Premium keeps going after your{' '}+ You'll add a card at checkout so Pro keeps going after your{' '}{freePeriod()}. Nothing is charged until then, and you can cancelanytime before.</p>@@ -98,7 +96,7 @@ export function InviteOfferPanel(props: {disabled={props.finishing}onClick={() => props.onContinueFree()}>- Continue as Guest instead+ Continue with Free instead</Button></div></div>diff --git a/apps/web/src/features/gtm-invite/InviteWelcome.tsx b/apps/web/src/features/gtm-invite/InviteWelcome.tsxindex 16c216c04c..a03117f00b 100644--- a/apps/web/src/features/gtm-invite/InviteWelcome.tsx+++ b/apps/web/src/features/gtm-invite/InviteWelcome.tsx@@ -158,8 +158,7 @@ export function InviteWelcome() {{details().freeMonths === 1? 'first month': `first ${details().freeMonths} months`}{' '}- of Premium {details().freeMonths === 1 ? 'is' : 'are'} on- us.+ of Pro {details().freeMonths === 1 ? 'is' : 'are'} on us.</p></div><div class="flex flex-col gap-3">diff --git a/apps/web/src/features/onboarding/browser-test/onboarding.browser.e2e.ts b/apps/web/src/features/onboarding/browser-test/onboarding.browser.e2e.tsindex 956d809c34..f386ca337d 100644--- a/apps/web/src/features/onboarding/browser-test/onboarding.browser.e2e.ts+++ b/apps/web/src/features/onboarding/browser-test/onboarding.browser.e2e.ts@@ -84,12 +84,12 @@ test('a deep link survives the inbox OAuth round-trip', async ({ page }) => {await page.getByRole('button', { name: 'Skip for now' }).click();await page.getByRole('button', { name: 'Continue' }).click();await page.getByRole('button', { name: 'Skip for now' }).click();- await page.getByRole('button', { name: 'Continue as Guest' }).last().click();+ await page.getByRole('button', { name: 'Continue with Free' }).last().click();await expectLanded(page, 'Entered Macro at /channel/launch');});-test('Guest continuation lives in the comparison below the trial offer', async ({+test('Free, Pro, and Max appear below the unchanged trial offer', async ({page,}) => {await openFixture(page, '/?view=flow&next=/md/notes');@@ -101,12 +101,41 @@ test('Guest continuation lives in the comparison below the trial offer', async (});await page.reload();- await page.getByRole('button', { name: 'Continue as Guest' }).first().click();+ await expect(heading(page, 'Free Claude & GPT for 30 days.')).toBeVisible();await expect(- page.getByRole('heading', { name: 'Choose what works for you.' })+ page.getByRole('button', { name: 'Start 30 day trial' })).toBeInViewport();- await expect(page.getByRole('table')).toContainText('Haiku');- await page.getByRole('button', { name: 'Continue as Guest' }).last().click();+ const comparison = page.getByRole('table', {+ name: 'Compare Free, Pro, and Max plans',+ });+ await expect(comparison).not.toBeInViewport();+ await page+ .getByRole('button', { name: 'Continue with Free' })+ .first()+ .click();+ await expect(comparison).toBeInViewport();+ for (const name of ['Free', 'Pro', 'Max']) {+ await expect(+ comparison.getByRole('columnheader', { name: new RegExp(`^${name}`) })+ ).toBeVisible();+ }+ await expect(comparison).toContainText('10× usage');+ await expect(comparison).not.toContainText('at cost');+ await page.getByRole('button', { name: 'Continue with Pro' }).click();+ await expect(+ page.getByRole('button', { name: 'Start 30 day trial' })+ ).toBeInViewport();+ await page.setViewportSize({ width: 390, height: 844 });+ await page+ .getByRole('button', { name: 'Continue with Free' })+ .first()+ .click();+ expect(+ await page.evaluate(+ () => document.documentElement.scrollWidth <= window.innerWidth+ )+ ).toBe(true);+ await page.getByRole('button', { name: 'Continue with Free' }).last().click();await expectLanded(page, 'Entered Macro at /md/notes');expect(await fakeEvents(page)).toContainEqual({@@ -115,6 +144,29 @@ test('Guest continuation lives in the comparison below the trial offer', async (});});+test('Max checkout returns with a licensed account and no trial', async ({+ page,+}) => {+ await openFixture(page, '/?view=flow');+ await page.evaluate(() => {+ sessionStorage.setItem(+ 'onboarding-flow-step',+ JSON.stringify({ user: 'macro|[email protected]', step: 'plan' })+ );+ });+ await page.reload();+ await page.getByRole('button', { name: 'Continue with Max' }).click();+ await expectLanded(page, 'Entered Macro at /home');+ expect((await fakeWorld(page)).viewer).toMatchObject({+ tutorialComplete: true,+ licensed: true,+ });+ expect(await fakeEvents(page)).toContainEqual({+ event: 'onboarding_v4_completed',+ data: expect.objectContaining({ plan: 'max' }),+ });+});+test('cancelling checkout returns to a retryable trial offer', async ({page,}) => {@@ -151,7 +203,7 @@ test('an ineligible trial explains itself instead of charging', async ({await page.getByRole('button', { name: 'Start 30 day trial' }).click();await expect(page.getByRole('status', { name: 'Notifications' })).toHaveText(- message+ 'The 30-day trial is only available for your first Pro subscription');await expect(page.getByRole('button', { name: 'Start 30 day trial' })diff --git a/apps/web/src/features/onboarding/components/plan-comparison.tsx b/apps/web/src/features/onboarding/components/plan-comparison.tsxindex 954bb0dcd4..d1afa4e473 100644--- a/apps/web/src/features/onboarding/components/plan-comparison.tsx+++ b/apps/web/src/features/onboarding/components/plan-comparison.tsx@@ -1,15 +1,25 @@-import { For } from 'solid-js';+import { formatPlanPrice, PLANS } from '@app/features/paywall/plans';+import type { AiPlanCatalog } from '@service-auth/ai-billing-types';+import { For, Show } from 'solid-js';+import type { Loadable } from '../context/onboarding-context';import { PLAN_COMPARISON } from '../core/plan-comparison';export function PlanComparison(props: {- disabled?: boolean;- onContinueGuest: () => void;+ catalog: Loadable<AiPlanCatalog>;+ disabled: boolean;+ onRetry: () => void;+ onContinueFree: () => void;onBackToPro: () => void;+ onStartMax: () => void;}) {+ const entries = () => {+ const state = props.catalog;+ return state.t === 'ready' ? state.value.plans : [];+ };return (- <section class="mx-auto w-full max-w-[608px] px-6 pb-20 pt-20 font-[Inter_Variable] text-sm leading-7 text-ink-muted sm:pb-28 sm:pt-24 sm:text-[15px]">+ <section class="mx-auto w-full max-w-3xl px-6 pb-20 pt-20 font-[Inter_Variable] text-sm leading-7 text-ink-muted sm:pb-28 sm:pt-24 sm:text-[15px]"><div class="mb-10 h-px w-12 bg-edge" aria-hidden="true" />- <p class="mb-4 text-xs text-ink-extra-muted">Guest & Pro</p>+ <p class="mb-4 text-xs text-ink-extra-muted">Free, Pro & Max</p><h2tabindex="-1"class="mb-7 text-2xl font-medium leading-8 tracking-tight text-ink outline-none sm:text-[28px] sm:leading-9"@@ -17,95 +27,114 @@ export function PlanComparison(props: {Choose what works for you.</h2><p>- Join your workspace as a Guest for free, with no credit card needed.- Connect up to two email accounts, use Haiku, and keep up to 5 GB of- files. Emails you send include a “Sent with Macro” footer.+ Start with Free, with no credit card needed. Pro unlocks every AI model,+ removes the email watermark, and gives you more storage and team+ features.</p>- <p class="mt-5">- Pro removes the email watermark and account limit, unlocks every AI- model, and gives you more storage and team features.- </p>-- <div class="mt-10">- <table class="w-full table-fixed border-collapse text-left text-xs leading-5 sm:text-sm sm:leading-6">- <caption class="sr-only">- Compare Guest access and Pro features- </caption>- <thead>- <tr class="border-b border-edge">- <th- scope="col"- class="w-[38%] pb-5 pr-3 align-top font-medium text-ink sm:pr-6"- >- What’s included- </th>- <th- scope="col"- class="w-[31%] pb-5 pr-3 align-top font-medium text-ink sm:pr-6"- >- Guest- <span class="mt-1.5 block text-xs font-normal leading-5 text-ink-muted">- Free- </span>- </th>- <th- scope="col"- class="w-[31%] pb-5 align-top font-medium text-ink"- >- Pro- <span class="mt-1.5 block text-xs font-normal leading-5 text-ink-muted [overflow-wrap:anywhere]">- 30 days free, then $40/user/month- </span>- </th>- </tr>- </thead>- <tbody>- <For each={PLAN_COMPARISON}>- {(row) => (- <tr class="border-b border-edge-muted last:border-b-0">+ <p class="mt-5">Max includes everything in Pro with 10× usage.</p>+ <Show when={props.catalog.t === 'error'}>+ <p role="alert" class="mt-5">+ We couldn't load plan prices. You can continue with Free or{' '}+ <button type="button" class="underline" onClick={props.onRetry}>+ try again+ </button>+ .+ </p>+ </Show>+ <table class="mt-10 w-full table-fixed border-collapse text-left text-xs leading-5 sm:text-sm sm:leading-6">+ <caption class="sr-only">Compare Free, Pro, and Max plans</caption>+ <thead>+ <tr class="border-b border-edge">+ <th+ scope="col"+ class="w-[28%] pb-5 pr-2 align-top font-medium text-ink sm:pr-4"+ >+ What’s included+ </th>+ <For each={PLANS}>+ {(plan) => {+ const entry = () =>+ entries().find((item) => item.tier === plan.tier);+ return (<th- scope="row"- class="py-4 pr-3 align-top font-normal text-ink-muted sm:py-5 sm:pr-6"+ scope="col"+ class="w-[24%] pb-5 pr-2 align-top font-medium text-ink last:pr-0 sm:pr-4">- {row.feature}+ {plan.name}+ <span class="mt-1.5 block text-xs font-normal leading-5 text-ink-muted [overflow-wrap:anywhere]">+ {plan.tier === 'free' ? (+ '$0'+ ) : (+ <>+ <Show when={plan.tier === 'premium'}>+ 30 days free, then{' '}+ </Show>+ <span class="block">+ {formatPlanPrice(entry()?.monthly_price_cents) ??+ '—'}+ </span>+ <span class="block">per user / month</span>+ </>+ )}+ </span></th>- <td class="py-4 pr-3 align-top text-ink-muted sm:py-5 sm:pr-6">- {row.guest}- </td>- <td class="py-4 align-top text-ink-muted sm:py-5">- {row.pro}- </td>- </tr>- )}+ );+ }}</For>- </tbody>- <tfoot>- <tr>- <td />- <td class="pt-6 pr-3 align-top sm:pr-6">- <button- type="button"- disabled={props.disabled}- onClick={props.onContinueGuest}- class="flex min-h-10 w-full max-w-40 items-center justify-center gap-2 rounded-full border border-edge px-2 py-2 text-center text-[11px] font-medium leading-4 text-ink-muted hover:border-ink-muted hover:text-ink focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-ink sm:px-3"- >- <span>Continue as Guest</span>- </button>- </td>- <td class="pt-6 align-top">- <button- type="button"- disabled={props.disabled}- onClick={props.onBackToPro}- class="flex min-h-10 w-full max-w-40 items-center justify-center gap-2 rounded-full bg-ink px-2 py-2 text-center text-[11px] font-medium leading-4 text-surface hover:bg-ink/90 focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-ink sm:px-3"+ </tr>+ </thead>+ <tbody>+ <For each={PLAN_COMPARISON}>+ {(row) => (+ <tr class="border-b border-edge-muted last:border-b-0">+ <th+ scope="row"+ class="py-4 pr-2 align-top font-normal sm:py-5 sm:pr-4">- <span>Continue with Pro</span>- </button>- </td>- </tr>- </tfoot>- </table>- </div>+ {row.feature}+ </th>+ <For each={PLANS}>+ {(plan) => (+ <td class="py-4 pr-2 align-top last:pr-0 sm:py-5 sm:pr-4">+ {row.values[plan.tier]}+ </td>+ )}+ </For>+ </tr>+ )}+ </For>+ </tbody>+ <tfoot>+ <tr>+ <td />+ <For each={PLANS}>+ {(plan) => (+ <td class="pt-6 pr-2 align-top last:pr-0 sm:pr-4">+ <button+ type="button"+ disabled={+ props.disabled ||+ (plan.tier === 'max' &&+ !entries().find((item) => item.tier === 'max')+ ?.purchasable)+ }+ onClick={() =>+ plan.tier === 'free'+ ? props.onContinueFree()+ : plan.tier === 'premium'+ ? props.onBackToPro()+ : props.onStartMax()+ }+ class="flex min-h-10 w-full items-center justify-center rounded-full border border-edge px-2 py-2 text-center text-[11px] font-medium leading-4 text-ink-muted hover:border-ink-muted hover:text-ink disabled:opacity-50 focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-ink sm:px-3"+ >+ Continue with {plan.name}+ </button>+ </td>+ )}+ </For>+ </tr>+ </tfoot>+ </table></section>);}diff --git a/apps/web/src/features/onboarding/components/team-setup.tsx b/apps/web/src/features/onboarding/components/team-setup.tsxindex 347cb1c6d6..79f6498a75 100644--- a/apps/web/src/features/onboarding/components/team-setup.tsx+++ b/apps/web/src/features/onboarding/components/team-setup.tsx@@ -16,8 +16,8 @@ export function TeamSetup(props: { children: JSX.Element }) {Built for teams.</h1><h2 class="mt-6 max-w-[440px] text-sm font-normal leading-6 text-ink-muted text-balance sm:text-[15px]">- Bring your team into one workspace. Choose Guest access or upgrade for- more AI and storage.+ Bring your team into one workspace. Choose Free or upgrade for more AI+ and storage.</h2></header><div class="mt-9 w-full">{props.children}</div>diff --git a/apps/web/src/features/onboarding/context/onboarding-context.tsx b/apps/web/src/features/onboarding/context/onboarding-context.tsxindex d67412c084..6c60a7f867 100644--- a/apps/web/src/features/onboarding/context/onboarding-context.tsx+++ b/apps/web/src/features/onboarding/context/onboarding-context.tsx@@ -1,5 +1,6 @@import type { PaidPlanTier } from '@app/features/paywall/plans';import type { AppEvents } from '@app/lib/analytics/app-events';+import type { AiPlanCatalog } from '@service-auth/ai-billing-types';import type { GtmInviteOffer } from '@service-auth/generated/schemas/gtmInviteOffer';import { type Accessor, createContext, useContext } from 'solid-js';import type { CheckoutTerms } from '../core/checkout';@@ -107,6 +108,10 @@ export type OnboardingContext = {joinTeam(inviteId: string): Promise<void>;/** The invite promotion the account holds; null when it has none. */createInviteOffer(): Accessor<Loadable<InviteOffer | null>>;+ createPlanCatalog(): {+ catalog: Accessor<Loadable<AiPlanCatalog>>;+ retry(): void;+ };/** The hosted checkout URL; rejects with a message fit to show. */startCheckout(tier: PaidPlanTier, terms: CheckoutTerms): Promise<string>;/**diff --git a/apps/web/src/features/onboarding/core/checkout.test.ts b/apps/web/src/features/onboarding/core/checkout.test.tsindex 56b264d2c3..a8df39765f 100644--- a/apps/web/src/features/onboarding/core/checkout.test.ts+++ b/apps/web/src/features/onboarding/core/checkout.test.ts@@ -13,7 +13,16 @@ describe('onboardingCheckoutRequest', () => {});});- it('requests the trial only for Premium', () => {+ it('uses standard paid terms for Max', () => {+ expect(+ onboardingCheckoutRequest(ONBOARDING, 'max', 'standard')+ ).toMatchObject({+ plan: 'max',+ onboardingTrial: false,+ });+ });++ it('requests the trial only for Pro', () => {const request = onboardingCheckoutRequest(ONBOARDING, 'max', 'trial');expect(request.plan).toBe('max');expect(request.onboardingTrial).toBe(false);diff --git a/apps/web/src/features/onboarding/core/checkout.ts b/apps/web/src/features/onboarding/core/checkout.tsindex 0cbc115f20..fcb605a7d2 100644--- a/apps/web/src/features/onboarding/core/checkout.ts+++ b/apps/web/src/features/onboarding/core/checkout.ts@@ -6,11 +6,11 @@ export type CheckoutReturn =| { t: 'cancelled' };/**- * What the checkout grants: the automatic first-subscription trial, or the+ * What the checkout grants: standard paid terms, the first-subscription trial, or the* promotion an invite link redeemed (which the server applies, and which a* trial would replace).*/-export type CheckoutTerms = 'trial' | 'invite-offer';+export type CheckoutTerms = 'trial' | 'invite-offer' | 'standard';export type OnboardingCheckoutRequest = {successUrl: string;diff --git a/apps/web/src/features/onboarding/core/plan-comparison.ts b/apps/web/src/features/onboarding/core/plan-comparison.tsindex e86e3c0bf9..2b674d5ecb 100644--- a/apps/web/src/features/onboarding/core/plan-comparison.ts+++ b/apps/web/src/features/onboarding/core/plan-comparison.ts@@ -1,16 +1,30 @@-/** Feature comparison shown below the trial offer. */+import { PLAN_USAGE_LABELS } from '../../paywall/plans';++/** Feature comparison shown below the unchanged trial offer. */export const PLAN_COMPARISON = [- { feature: 'Connected email accounts', guest: 'Up to 2', pro: 'Unlimited' },+ { feature: 'AI usage', values: PLAN_USAGE_LABELS },+ {+ feature: 'Connected email accounts',+ values: { free: 'Up to 2', premium: 'Unlimited', max: 'Unlimited' },+ },{feature: 'Email branding',- guest: '“Sent with Macro” footer',- pro: 'No watermark',+ values: {+ free: '“Sent with Macro” footer',+ premium: 'No watermark',+ max: 'No watermark',+ },+ },+ {+ feature: 'AI models',+ values: { free: 'Haiku', premium: 'All models', max: 'All models' },+ },+ {+ feature: 'Storage',+ values: { free: '5 GB', premium: '1 TB', max: '1 TB' },},- { feature: 'AI models', guest: 'Haiku', pro: 'All models' },- { feature: 'Storage', guest: '5 GB', pro: '1 TB' },{feature: 'Calls, recording & transcription',- guest: 'Not included',- pro: 'Included',+ values: { free: 'Not included', premium: 'Included', max: 'Included' },},] as const;diff --git a/apps/web/src/features/onboarding/create-app-onboarding-context.ts b/apps/web/src/features/onboarding/create-app-onboarding-context.tsindex 4acd4f2f91..03bb73f555 100644--- a/apps/web/src/features/onboarding/create-app-onboarding-context.ts+++ b/apps/web/src/features/onboarding/create-app-onboarding-context.ts@@ -8,7 +8,10 @@ import {createPipedreamCatalogSearch,} from '@core/pipedream/catalog';import { idToDisplayName, idToEmail } from '@core/user/util';-import { useCreateCheckoutSessionMutation } from '@queries/auth';+import {+ useAiBillingPlansQuery,+ useCreateCheckoutSessionMutation,+} from '@queries/auth';import { useCompleteTutorialMutation } from '@queries/auth/tutorial';import { type UserInfoData, useUserInfoQuery } from '@queries/auth/user-info';import { useContactsQuery } from '@queries/contacts/contacts';@@ -190,6 +193,15 @@ export function createAppOnboardingContext(): OnboardingContext {const query = useGtmInviteOfferQuery({ enabled: needsOnboarding });return () => loadableQuery(query, (offer) => offer ?? null);},+ createPlanCatalog: () => {+ const query = useAiBillingPlansQuery();+ return {+ catalog: () => loadableQuery(query, (data) => data),+ retry: () => {+ void query.refetch();+ },+ };+ },startCheckout: (tier, terms) =>checkout.mutateAsync(onboardingCheckoutRequest(diff --git a/apps/web/src/features/onboarding/primitives/flow-finish.test.ts b/apps/web/src/features/onboarding/primitives/flow-finish.test.tsindex f649c0ab64..e162a2eb93 100644--- a/apps/web/src/features/onboarding/primitives/flow-finish.test.ts+++ b/apps/web/src/features/onboarding/primitives/flow-finish.test.ts@@ -42,7 +42,9 @@ describe('leaving onboarding', () => {failures: { checkout: message },});await finish.startPremiumCheckout('premium');- expect(fake.notifications()).toEqual([message]);+ expect(fake.notifications()).toEqual([+ 'The 30-day trial is only available for your first Pro subscription',+ ]);expect(fake.calls()).not.toContain('completeOnboarding');expect(navigate).not.toHaveBeenCalled();expect(redirect).not.toHaveBeenCalled();diff --git a/apps/web/src/features/onboarding/primitives/flow-finish.ts b/apps/web/src/features/onboarding/primitives/flow-finish.tsindex 6ee5efc2fe..60ac94b4bd 100644--- a/apps/web/src/features/onboarding/primitives/flow-finish.ts+++ b/apps/web/src/features/onboarding/primitives/flow-finish.ts@@ -1,4 +1,8 @@-import type { PaidPlanTier, PlanTier } from '@app/features/paywall/plans';+import {+ billingMessage,+ type PaidPlanTier,+ type PlanTier,+} from '@app/features/paywall/plans';import { type Accessor, createSignal } from 'solid-js';import type {CompletionResult,@@ -102,7 +106,7 @@ export function createFlowFinish(} catch (error) {context.notifyFailure(error instanceof Error- ? error.message+ ? billingMessage(error.message): "Couldn't start checkout — please try again");setFinishing(false);@@ -113,7 +117,7 @@ export function createFlowFinish(finishing,afterTarget,persistNext,- /** Finish as a Guest (or with the plan step skipped) and enter the app. */+ /** Finish on Free (or with the plan step skipped) and enter the app. */finishFree: (planSkipped = false) => complete('free', planSkipped),startPremiumCheckout,/** Finish after checkout confirmed payment, recording the tier Stripe returned. */diff --git a/apps/web/src/features/onboarding/tests/fake-onboarding-context.ts b/apps/web/src/features/onboarding/tests/fake-onboarding-context.tsindex ad58a54a89..ba4f2d435f 100644--- a/apps/web/src/features/onboarding/tests/fake-onboarding-context.ts+++ b/apps/web/src/features/onboarding/tests/fake-onboarding-context.ts@@ -1,4 +1,5 @@import type { PaidPlanTier } from '@app/features/paywall/plans';+import type { AiPlanCatalog } from '@service-auth/ai-billing-types';import { createSignal } from 'solid-js';import { createStore, produce, unwrap } from 'solid-js/store';import type {@@ -32,6 +33,7 @@ export type FakeOnboardingWorld = {connectedTools: string[];githubStars: number | undefined;inviteOffer: InviteOffer | null;+ planCatalog: AiPlanCatalog;/** License refreshes left before the Stripe webhook lands; undefined when none is pending. */webhookPollsRemaining: number | undefined;/** How many refreshes a checkout's webhook takes to land. */@@ -45,6 +47,7 @@ export type FakeOnboardingWorld = {| 'catalog'| 'createTeam'| 'joinTeam'+ | 'planCatalog'| 'checkout'| 'completion',string@@ -76,6 +79,31 @@ export function defaultFakeWorld(): FakeOnboardingWorld {connectedTools: [],githubStars: 12_345,inviteOffer: null,+ planCatalog: {+ plans: [+ {+ tier: 'free',+ monthly_price_cents: 0,+ included_ai_cents_per_seat: 100,+ purchasable: false,+ },+ {+ tier: 'premium',+ monthly_price_cents: 4000,+ included_ai_cents_per_seat: 2000,+ purchasable: true,+ },+ {+ tier: 'max',+ monthly_price_cents: 20000,+ included_ai_cents_per_seat: 10000,+ purchasable: true,+ },+ ],+ credit_packs_cents: [],+ overage_limit_min_cents: 0,+ overage_limit_max_cents: 0,+ },webhookPollsRemaining: undefined,webhookDelayPolls: 1,accent: undefined,@@ -225,6 +253,10 @@ export function createFakeOnboarding(});},createInviteOffer: () => () => ({ t: 'ready', value: world.inviteOffer }),+ createPlanCatalog: () => ({+ catalog: () => loadable('planCatalog', () => world.planCatalog),+ retry: () => call('retryPlanCatalog'),+ }),startCheckout: async (tier, terms) => {call(`startCheckout:${tier}:${terms}`);fail('checkout');diff --git a/apps/web/src/features/onboarding/tests/invite-offer-stub.tsx b/apps/web/src/features/onboarding/tests/invite-offer-stub.tsxindex 602dc779d1..a32b8e554a 100644--- a/apps/web/src/features/onboarding/tests/invite-offer-stub.tsx+++ b/apps/web/src/features/onboarding/tests/invite-offer-stub.tsx@@ -14,7 +14,7 @@ export const renderInviteOfferStub: InviteOfferSlot = (offer, actions) => (Claim your free months</button><button type="button" onClick={actions.onContinueFree}>- Continue as Guest instead+ Continue with Free instead</button></section>);diff --git a/apps/web/src/features/onboarding/views/onboarding-flow-view.test.tsx b/apps/web/src/features/onboarding/views/onboarding-flow-view.test.tsxindex 3c23bf414a..d412380d0d 100644--- a/apps/web/src/features/onboarding/views/onboarding-flow-view.test.tsx+++ b/apps/web/src/features/onboarding/views/onboarding-flow-view.test.tsx@@ -62,7 +62,7 @@ const click = (name: string | RegExp) =>fireEvent.click(screen.getByRole('button', { name }));describe('onboarding flow', () => {- it('walks every step and finishes as a Guest', async () => {+ it('walks every step and finishes with Free', async () => {const { fake, navigate } = setup({ next: '/channel/launch' });await heading('Create your workspace');@@ -99,9 +99,9 @@ describe('onboarding flow', () => {);await heading('Free Claude & GPT for 30 days.');- // The scroll cue and the comparison share a label; the comparison's CTA finishes.- const guest = screen.getAllByRole('button', { name: 'Continue as Guest' });- fireEvent.click(guest[guest.length - 1]);+ fireEvent.click(+ screen.getAllByRole('button', { name: 'Continue with Free' }).at(-1)!+ );await waitFor(() =>expect(navigate).toHaveBeenCalledWith('/channel/launch')@@ -219,7 +219,7 @@ describe('onboarding flow', () => {});});- it('finishes for a licensed team member without showing trial or Guest offers', async () => {+ it('finishes for a licensed team member without showing trial or Free offers', async () => {const { navigate, redirect } = setup({resume: 'plan',world: {@@ -238,7 +238,7 @@ describe('onboarding flow', () => {).toBeNull();expect(screen.queryByRole('table')).toBeNull();expect(- screen.queryByRole('button', { name: 'Continue as Guest' })+ screen.queryByRole('button', { name: 'Continue with Free' })).toBeNull();await waitFor(() =>expect(navigate).toHaveBeenCalledExactlyOnceWith('/home')diff --git a/apps/web/src/features/onboarding/views/onboarding-flow-view.tsx b/apps/web/src/features/onboarding/views/onboarding-flow-view.tsxindex 293eca4cf7..23f526cb8f 100644--- a/apps/web/src/features/onboarding/views/onboarding-flow-view.tsx+++ b/apps/web/src/features/onboarding/views/onboarding-flow-view.tsx@@ -5,7 +5,6 @@ import {focusStepHeading,} from '../components/motion/step-change';import { OnboardingShell } from '../components/onboarding-shell';-import { PlanComparison } from '../components/plan-comparison';import { StepFallback } from '../components/step-fallback';import { OnboardingTrustDetails } from '../components/trust-details';import { useOnboardingContext } from '../context/onboarding-context';@@ -20,6 +19,7 @@ import {import { createFlowFinish } from '../primitives/flow-finish';import { createOnboardingFlow } from '../primitives/onboarding-flow';import { EmailStep } from './email-step';+import { PlanComparisonView } from './plan-comparison-view';import { type InviteOfferSlot, PlanStep } from './plan-step';import { StoryStageView } from './story-stage-view';import { TeamStep } from './team-step';@@ -142,13 +142,16 @@ export function OnboardingFlowView(props: {)}</Show>}- explainerLabel={showPlanOffer() ? 'Continue as Guest' : undefined}+ explainerLabel={showPlanOffer() ? 'Continue with Free' : undefined}explainer={showPlanOffer() ? (- <PlanComparison+ <PlanComparisonViewdisabled={finish.finishing()}- onContinueGuest={() => void finish.finishFree()}+ onContinueFree={() => void finish.finishFree()}onBackToPro={() => focusStepHeading(content, true)}+ onStartMax={() =>+ void finish.startPremiumCheckout('max', 'standard')+ }/>) : step() === 'security' ||step() === 'work' ||diff --git a/apps/web/src/features/onboarding/views/plan-comparison-view.tsx b/apps/web/src/features/onboarding/views/plan-comparison-view.tsxnew file mode 100644index 0000000000..578be6aafa--- /dev/null+++ b/apps/web/src/features/onboarding/views/plan-comparison-view.tsx@@ -0,0 +1,19 @@+import { PlanComparison } from '../components/plan-comparison';+import { useOnboardingContext } from '../context/onboarding-context';++/** Load prices only for the below-fold comparison; pending data never suspends setup. */+export function PlanComparisonView(props: {+ disabled: boolean;+ onContinueFree: () => void;+ onBackToPro: () => void;+ onStartMax: () => void;+}) {+ const plans = useOnboardingContext().createPlanCatalog();+ return (+ <PlanComparison+ {...props}+ catalog={plans.catalog()}+ onRetry={plans.retry}+ />+ );+}diff --git a/apps/web/src/features/onboarding/views/plan-step.test.tsx b/apps/web/src/features/onboarding/views/plan-step.test.tsxindex 3121bd91bb..4378ed0c85 100644--- a/apps/web/src/features/onboarding/views/plan-step.test.tsx+++ b/apps/web/src/features/onboarding/views/plan-step.test.tsx@@ -1,9 +1,13 @@import { cleanup, fireEvent, screen, waitFor } from '@solidjs/testing-library';import { afterEach, describe, expect, it, vi } from 'vitest';import type { CheckoutReturn } from '../core/checkout';-import type { FakeOnboardingWorld } from '../tests/fake-onboarding-context';+import {+ defaultFakeWorld,+ type FakeOnboardingWorld,+} from '../tests/fake-onboarding-context';import { renderInviteOfferStub } from '../tests/invite-offer-stub';import { renderWithFakeOnboarding } from '../tests/render';+import { PlanComparisonView } from './plan-comparison-view';import { PlanStep } from './plan-step';afterEach(cleanup);@@ -31,7 +35,72 @@ function setup(return { checkout, finish, guest, fake };}+function setupComparison(world: Partial<FakeOnboardingWorld> = {}) {+ const checkout = vi.fn();+ const guest = vi.fn();+ const back = vi.fn();+ const { fake } = renderWithFakeOnboarding(+ () => (+ <PlanComparisonView+ disabled={false}+ onContinueFree={guest}+ onBackToPro={back}+ onStartMax={() => checkout('max', 'standard')}+ />+ ),+ world+ );+ return { checkout, guest, back, fake };+}+describe('live trial checkout', () => {+ it('offers Free, Pro, and Max with current catalog prices and allowances', () => {+ const catalog = defaultFakeWorld().planCatalog;+ catalog.plans[1].monthly_price_cents = 4500;+ catalog.plans[1].included_ai_cents_per_seat = 1750;+ const { checkout } = setupComparison({ planCatalog: catalog });+ for (const name of ['Free', 'Pro', 'Max']) {+ expect(+ screen.getByRole('columnheader', { name: new RegExp(`^${name}`) })+ ).toBeTruthy();+ }+ expect(+ screen.getByRole('columnheader', { name: /^Pro/ }).textContent+ ).toContain('$45');+ expect(screen.getByText('10× usage')).toBeTruthy();+ expect(screen.queryByText(/17.50/)).toBeNull();+ fireEvent.click(screen.getByRole('button', { name: 'Continue with Max' }));+ expect(checkout).toHaveBeenCalledWith('max', 'standard');+ });++ it('keeps Free available when the catalog fails and disables paid checkout', () => {+ const { checkout, guest } = setupComparison({+ failures: { planCatalog: 'Unavailable' },+ });+ expect(screen.getByRole('alert')).toBeTruthy();+ expect(+ screen+ .getByRole('button', { name: 'Continue with Max' })+ .hasAttribute('disabled')+ ).toBe(true);+ fireEvent.click(screen.getByRole('button', { name: 'Continue with Pro' }));+ expect(checkout).not.toHaveBeenCalled();+ fireEvent.click(screen.getByRole('button', { name: 'Continue with Free' }));+ expect(guest).toHaveBeenCalledOnce();+ expect(checkout).not.toHaveBeenCalled();+ });++ it('does not sell an unavailable paid tier', () => {+ const catalog = defaultFakeWorld().planCatalog;+ catalog.plans[2].purchasable = false;+ setupComparison({ planCatalog: catalog });+ expect(+ screen+ .getByRole('button', { name: 'Continue with Max' })+ .hasAttribute('disabled')+ ).toBe(true);+ });+it('starts hosted checkout without collecting payment details locally', () => {const { checkout, finish } = setup(undefined);expect(screen.queryByRole('textbox')).toBeNull();@@ -121,7 +190,7 @@ describe('live trial checkout', () => {);expect(checkout).toHaveBeenCalledWith('premium', 'invite-offer');fireEvent.click(- screen.getByRole('button', { name: 'Continue as Guest instead' })+ screen.getByRole('button', { name: 'Continue with Free instead' }));expect(guest).toHaveBeenCalledOnce();});diff --git a/apps/web/src/features/paywall/PaywallComponent.tsx b/apps/web/src/features/paywall/PaywallComponent.tsxindex 1e75df18b2..c0690ae9e5 100644--- a/apps/web/src/features/paywall/PaywallComponent.tsx+++ b/apps/web/src/features/paywall/PaywallComponent.tsx@@ -5,10 +5,12 @@ import { useUserId } from '@core/context/user';import { plural } from '@core/util/string';import ArrowSquareOutIcon from '@phosphor/arrow-square-out.svg';import CheckIcon from '@phosphor/check.svg';+import { queryReadyGate } from '@queries/gate';import { useCurrentTeamQuery } from '@queries/team/teams';import { stripeServiceClient } from '@service-stripe/client';import { Button, Tooltip } from '@ui';import { createMemo, For, Show } from 'solid-js';+import { PLAN_BY_TIER } from './plans';export interface PaywallProps {cb: () => Promise<void> | void;@@ -52,7 +54,7 @@ const PaywallComponent = (props: PaywallProps) => {const teamRole = createMemo(() => {const uid = userId();- const currentTeam = team.data;+ const currentTeam = queryReadyGate(team) ? team.data : undefined;if (!currentTeam) return;@@ -108,9 +110,7 @@ const PaywallComponent = (props: PaywallProps) => {<div class="grid grid-cols-1 gap-6 sm:grid-cols-[minmax(0,1fr)_minmax(0,1.2fr)] p-6 sm:px-8 sm:pt-8 sm:pb-4"><section class="flex flex-col gap-4"><div class="flex flex-col gap-2">- <h2 class="text-2xl text-ink font-semibold">- Unlock Premium features- </h2>+ <h2 class="text-2xl text-ink font-semibold">Unlock Pro features</h2><p class="text-sm text-ink-extra-muted">{paywallMetadata()?.description ??'Upgrade your workspace with more AI power, team collaboration, and room to grow.'}@@ -124,7 +124,7 @@ const PaywallComponent = (props: PaywallProps) => {rel="noopener">Learn more about{' '}- {paywallMetadata()!.learnMoreSubject ?? 'Premium'}+ {paywallMetadata()!.learnMoreSubject ?? 'Pro'}<ArrowSquareOutIcon class="size-4" /></a>)}@@ -135,7 +135,7 @@ const PaywallComponent = (props: PaywallProps) => {<section class="h-full flex flex-col gap-3"><div class="flex flex-1 flex-col gap-4 rounded-lg bg-active p-4"><div class="flex flex-col">- <h3 class="text-sm text-ink">Premium features</h3>+ <h3 class="text-sm text-ink">Pro features</h3></div><PremiumFeatures /></div>@@ -144,10 +144,14 @@ const PaywallComponent = (props: PaywallProps) => {<div class="border-t border-t-edge px-8 py-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between"><div class="flex items-baseline gap-1.5 text-xs text-ink/60">- <span class="text-ink font-semibold text-xl leading-6">$40</span>+ <span class="text-ink font-semibold text-xl leading-6">+ ${PLAN_BY_TIER.premium.price}+ </span><span>per seat / per month</span>- <Show when={teamRole() === 'owner' && team.data}>+ <Show+ when={teamRole() === 'owner' && queryReadyGate(team) && team.data}+ >{(team) => (<span class="text-ink-extra-muted text-xs">• {team().members.length}{' '}diff --git a/apps/web/src/features/paywall/plans.test.ts b/apps/web/src/features/paywall/plans.test.tsindex 88bbe5bd15..9b60956ac1 100644--- a/apps/web/src/features/paywall/plans.test.ts+++ b/apps/web/src/features/paywall/plans.test.ts@@ -2,9 +2,10 @@ import { describe, expect, it } from 'vitest';import { PLAN_BY_TIER, PLANS, planFeatures } from './plans';describe('plan catalogs', () => {- it('lists Guest, Premium and Max, cheapest first', () => {+ it('lists Free, Pro and Max, cheapest first', () => {expect(PLANS.map((plan) => plan.tier)).toEqual(['free', 'premium', 'max']);- expect(PLAN_BY_TIER.free.name).toBe('Guest');+ expect(PLAN_BY_TIER.free.name).toBe('Free');+ expect(PLAN_BY_TIER.premium.name).toBe('Pro');expect(PLAN_BY_TIER.max).toEqual({tier: 'max',name: 'Max',@@ -13,20 +14,15 @@ describe('plan catalogs', () => {});});- it('reads every allowance, including the free cap, from the catalog', () => {- const [included, , beyond] = planFeatures(true, {- free: 500,- premium: 1_500,- max: 15_000,- });+ it('describes Max as ten times Pro usage without dollar allowances', () => {+ const [included, , beyond] = planFeatures(true);expect(included.values).toEqual({- free: '$5 / mo at cost',- premium: '$15 / mo at cost',- max: '$150 / mo at cost',+ free: 'Limited usage',+ premium: 'Standard usage',+ max: '10× usage',});expect(beyond.values.free).toBe('Upgrade to continue');- // Unknown until the catalog loads.- expect(planFeatures(true).at(0)?.values.free).toBe('—');+ expect(JSON.stringify(planFeatures(true))).not.toContain('$');});it('hides the usage rows without AI usage billing', () => {diff --git a/apps/web/src/features/paywall/plans.ts b/apps/web/src/features/paywall/plans.tsindex 220423c36c..cacfc72c31 100644--- a/apps/web/src/features/paywall/plans.ts+++ b/apps/web/src/features/paywall/plans.ts@@ -1,3 +1,4 @@+/** API tier identifiers remain stable; `premium` is displayed as Pro. */export type PlanTier = 'free' | 'premium' | 'max';export type Plan = {tier: PlanTier;@@ -15,9 +16,7 @@ export type Plan = {export type IncludedAiCentsByTier = Partial<Record<PlanTier, number>>;/** "$20" for whole dollars, "$12.50" otherwise; undefined while unknown. */-export function formatIncludedAi(- cents: number | undefined-): string | undefined {+export function formatPlanPrice(cents: number | undefined): string | undefined {if (cents === undefined) return undefined;const dollars = cents / 100;return Number.isInteger(dollars)@@ -32,14 +31,14 @@ export type PaidPlanTier = Exclude<PlanTier, 'free'>;const FREE_PLAN = {tier: 'free',- name: 'Guest',+ name: 'Free',price: 0,highlighted: false,} as const satisfies Plan;const PREMIUM_PLAN = {tier: 'premium',- name: 'Premium',+ name: 'Pro',price: 40,highlighted: true,} as const satisfies Plan;@@ -63,6 +62,11 @@ export const PLAN_BY_TIER: Record<PlanTier, Plan> = {max: MAX_PLAN,};+/** Older checkout services still use the API tier's old display name. */+export function billingMessage(message: string): string {+ return message.replace(/\bPremium\b/g, PLAN_BY_TIER.premium.name);+}+interface PlanFeature {label: string;values: Record<PlanTier, string>;@@ -70,25 +74,12 @@ interface PlanFeature {aiUsageBilling?: boolean;}-/**- * The allowance row; amounts come from the plan catalog, "—" until it loads.- * Free's amount is its monthly hard cap.- */-function includedAiRow(includedAi: IncludedAiCentsByTier): PlanFeature {- const perMonth = (tier: PlanTier) => {- const amount = formatIncludedAi(includedAi[tier]);- return amount ? `${amount} / mo at cost` : '—';- };- return {- label: 'AI usage included',- aiUsageBilling: true,- values: {- free: perMonth('free'),- premium: perMonth('premium'),- max: perMonth('max'),- },- };-}+/** Product copy for included usage, relative to Pro rather than dollar allowances. */+export const PLAN_USAGE_LABELS: Record<PlanTier, string> = {+ free: 'Limited usage',+ premium: 'Standard usage',+ max: '10× usage',+};const PLAN_FEATURE_ROWS: PlanFeature[] = [{@@ -118,18 +109,10 @@ const PLAN_FEATURE_ROWS: PlanFeature[] = [},];-/**- * The plan comparison rows. The AI usage rows (included allowance and what- * covers usage beyond it) appear only while AI usage billing is on; callers- * read `enableAiUsageBilling` and pass its value, and pass the catalog's- * allowances from `useIncludedAiCentsByTier` so the amounts are never- * hard-coded here.- */-export function planFeatures(- aiUsageBilling: boolean,- includedAi: IncludedAiCentsByTier = {}-) {- return [includedAiRow(includedAi), ...PLAN_FEATURE_ROWS].filter(- (feature) => !feature.aiUsageBilling || aiUsageBilling- );+/** AI usage rows appear only while usage billing is enabled. */+export function planFeatures(aiUsageBilling: boolean): PlanFeature[] {+ return [+ { label: 'AI usage', values: PLAN_USAGE_LABELS, aiUsageBilling: true },+ ...PLAN_FEATURE_ROWS,+ ].filter((row) => !row.aiUsageBilling || aiUsageBilling);}diff --git a/apps/web/src/features/settings/Billing.tsx b/apps/web/src/features/settings/Billing.tsxindex 46b700a1dc..a6fe6ff177 100644--- a/apps/web/src/features/settings/Billing.tsx+++ b/apps/web/src/features/settings/Billing.tsx@@ -1,6 +1,6 @@import {- formatIncludedAi,PLAN_BY_TIER,+ PLAN_USAGE_LABELS,type PlanTier,} from '@app/features/paywall/plans';import { useAnalytics } from '@app/lib/analytics/analytics-context';@@ -17,7 +17,6 @@ import {useAiBillingSummaryQuery,useChangePlanMutation,useCreateCheckoutSessionMutation,- useIncludedAiCentsByTier,} from '@queries/auth';import { useCurrentTeamQuery } from '@queries/team/teams';import type { PaidPlan } from '@service-auth/ai-billing-types';@@ -29,22 +28,22 @@ import { SettingsCard, SettingsPage, SettingsSection } from './primitives';/*** Plan bullet points. The allowance line appears only with AI usage billing on- * and once the plan catalog has supplied the amount.+ * and describes usage relative to Pro.*/const BILLING_PLAN_FEATURES: Record<PlanTier,- (includedAi: string | undefined) => string[]+ (usage: string | undefined) => string[]> = {- free: (includedAi) => [+ free: (usage) => ['Access to Haiku',- ...(includedAi ? [`${includedAi} of AI usage at cost each month`] : []),+ ...(usage ? [usage] : []),'MCP access','5 GB storage',],- premium: (includedAi) => [+ premium: (usage) => ['All agents','All models',- ...(includedAi ? [`${includedAi} of AI usage at cost each month`] : []),+ ...(usage ? [usage] : []),'No watermark','AI projections','Multiple email inboxes',@@ -52,20 +51,17 @@ const BILLING_PLAN_FEATURES: Record<'Teams','1 TB storage',],- max: (includedAi) => [- 'Everything in Premium',- ...(includedAi ? [`${includedAi} of AI usage at cost each month`] : []),+ max: (usage) => [+ 'Everything in Pro',+ ...(usage ? [usage] : []),'Priority support',],};const PlanFeatures = (props: { tier: PlanTier }) => {const aiUsageBilling = useFeatureFlag(enableAiUsageBilling);- const includedAi = useIncludedAiCentsByTier();const allowance = () =>- aiUsageBilling().enabled- ? formatIncludedAi(includedAi()[props.tier])- : undefined;+ aiUsageBilling().enabled ? PLAN_USAGE_LABELS[props.tier] : undefined;return (<For each={BILLING_PLAN_FEATURES[props.tier](allowance())}>{(label) => (@@ -78,7 +74,7 @@ const PlanFeatures = (props: { tier: PlanTier }) => {);};-/** "3 Premium seats, 1 Max seat" for a team's members. */+/** "3 Pro seats, 1 Max seat" for a team's members. */function describeSeatPlans(members: TeamMember[]): string {const maxSeats = members.filter((member) => (member as TeamMember & { plan?: PaidPlan }).plan === 'max'@@ -86,7 +82,7 @@ function describeSeatPlans(members: TeamMember[]): string {const premiumSeats = members.length - maxSeats;const parts: string[] = [];if (premiumSeats > 0) {- parts.push(`${premiumSeats} Premium ${plural('seat', premiumSeats)}`);+ parts.push(`${premiumSeats} Pro ${plural('seat', premiumSeats)}`);}if (maxSeats > 0) {parts.push(`${maxSeats} Max ${plural('seat', maxSeats)}`);@@ -95,15 +91,11 @@ function describeSeatPlans(members: TeamMember[]): string {}const PlanPrice = (props: { tier: PaidPlan }) => {- const includedAi = useIncludedAiCentsByTier();- const allowance = () => formatIncludedAi(includedAi()[props.tier]);return (<p class="text-ink-extra-muted text-xs">${PLAN_BY_TIER[props.tier].price} per seat / month<ShowFeatureFlag flag={enableAiUsageBilling}>- <Show when={allowance()}>- {(amount) => <> · includes {amount()} of AI usage at cost</>}- </Show>+ <Show when={props.tier === 'max'}> · 10× usage</Show></ShowFeatureFlag></p>);@@ -113,8 +105,6 @@ export const Billing = () => {const permissions = usePermissions();const analytics = useAnalytics();const hasPaid = useHasPaidAccess();- const includedAi = useIncludedAiCentsByTier();- const premiumAllowance = () => formatIncludedAi(includedAi().premium);const userId = useUserId();const team = useCurrentTeamQuery();const summary = useAiBillingSummaryQuery();@@ -143,7 +133,7 @@ export const Billing = () => {return team.owner_id === uid ? 'owner' : 'member';});- // The billing summary knows the tier (Premium vs Max); the license status is+ // The billing summary knows the tier (Pro vs Max); the license status is// the fallback while it loads or when the user is on the free plan.const tier = createMemo((): PlanTier => {if (summary.isSuccess) return summary.data.tier;@@ -179,7 +169,7 @@ export const Billing = () => {? aiUsageBilling().enabled? 'Upgraded to Max. Your larger AI allowance applies right away.': 'Upgraded to Max.'- : 'Switched to Premium.'+ : 'Switched to Pro.');} catch (error) {console.error(error);@@ -292,7 +282,7 @@ export const Billing = () => {<section class="flex flex-col gap-4 p-4"><header class="flex items-center gap-2"><div class="flex flex-col">- <h2 class="text-lg font-medium text-ink">Premium</h2>+ <h2 class="text-lg font-medium text-ink">Pro</h2><PlanPrice tier="premium" /></div><Button@@ -378,13 +368,11 @@ export const Billing = () => {disabled={changePlan.isPending}onClick={() => void handleChangePlan('premium')}>- Switch to Premium+ Switch to Pro</button>{' '}- ($40 per seat / month+ (${PLAN_BY_TIER.premium.price} per seat / month<ShowFeatureFlag flag={enableAiUsageBilling}>- <Show when={premiumAllowance()}>- {(amount) => <> with {amount()} of AI usage at cost</>}- </Show>+ with standard usage</ShowFeatureFlag>).</p>diff --git a/apps/web/src/features/settings/Team.tsx b/apps/web/src/features/settings/Team.tsxindex 2b7532775d..93c9484eba 100644--- a/apps/web/src/features/settings/Team.tsx+++ b/apps/web/src/features/settings/Team.tsx@@ -1,10 +1,4 @@-import {- formatIncludedAi,- type IncludedAiCentsByTier,- PLANS,- type Plan,- type PlanTier,-} from '@app/features/paywall/plans';+import { PLANS } from '@app/features/paywall/plans';import { SlackImport } from '@app/features/slack-import/slack-import';import { useFeatureFlag } from '@app/lib/analytics/posthog';import { toast } from '@core/component/Toast/Toast';@@ -41,7 +35,6 @@ import XIcon from '@phosphor/x.svg';import {useAiBillingSummaryQuery,useGithubLinkStatusQuery,- useIncludedAiCentsByTier,} from '@queries/auth';import {useJoinTeamMutation,@@ -174,32 +167,24 @@ function RoleSelect(props: {type PlanOption = { value: PaidPlan; label: string; description: string };-/** "$40 · $20 of AI" once the catalog has the allowance, otherwise "$40". */-function planOption(plan: Plan, includedAi: string | undefined): PlanOption {- return {- value: plan.tier as PaidPlan,- label: plan.name,- description: includedAi- ? `$${plan.price} · ${includedAi} of AI`- : `$${plan.price}`,- };-}-/** Every paid plan a seat can be moved to, cheapest first. */-function planOptionsFor(- includedAi: IncludedAiCentsByTier,- aiUsageBilling: boolean-): PlanOption[] {- const allowance = (tier: PlanTier) =>- aiUsageBilling ? formatIncludedAi(includedAi[tier]) : undefined;+function planOptionsFor(aiUsageBilling: boolean): PlanOption[] {return PLANS.flatMap((plan) =>- plan.tier === 'free' ? [] : [planOption(plan, allowance(plan.tier))]+ plan.tier === 'free'+ ? []+ : [+ {+ value: plan.tier,+ label: plan.name,+ description: `$${plan.price}${aiUsageBilling && plan.tier === 'max' ? ' · 10× usage' : ''}`,+ },+ ]);}/*** The plan a member's seat is billed at. Until the generated `TeamMember`- * schema carries `plan`, read it defensively; every seat starts on Premium.+ * schema carries `plan`, read it defensively; every seat starts on Pro.*/function memberPlan(member: TeamMember): PaidPlan {const plan = (member as TeamMember & { plan?: PaidPlan }).plan;@@ -211,9 +196,8 @@ function PlanSelect(props: {onChange: (plan: PaidPlan) => void;disabled?: boolean;}) {- const includedAi = useIncludedAiCentsByTier();const aiUsageBilling = useFeatureFlag(enableAiUsageBilling);- const options = () => planOptionsFor(includedAi(), aiUsageBilling().enabled);+ const options = () => planOptionsFor(aiUsageBilling().enabled);const selectedOption = () =>options().find((option) => option.value === props.value) ?? options()[0];diff --git a/apps/web/src/lib/core/constant/PaywallState.tsx b/apps/web/src/lib/core/constant/PaywallState.tsxindex a86e940e62..4be343f68a 100644--- a/apps/web/src/lib/core/constant/PaywallState.tsx+++ b/apps/web/src/lib/core/constant/PaywallState.tsx@@ -36,7 +36,8 @@ export const PaywallMessages: Record<PaywallKey, PaywallMessageMetadata> = {},[PaywallKey.CHAT_LIMIT]: {title: 'Chat limit reached',- description: 'Upgrade to keep creating agent chats with premium AI access.',+ description:+ 'Upgrade to keep creating agent chats with access to every AI model.',learnMoreUrl: 'https://docs.macro.com/product/agents',learnMoreSubject: 'agents',},@@ -47,20 +48,20 @@ export const PaywallMessages: Record<PaywallKey, PaywallMessageMetadata> = {learnMoreSubject: 'agents',},[PaywallKey.O1_LIMIT]: {- title: 'Smart models are premium',+ title: 'Smart models require Pro or Max',description: 'Upgrade to use Macro’s most capable AI models.',learnMoreUrl: 'https://docs.macro.com/product/agents',learnMoreSubject: 'agents',},[PaywallKey.CANVAS_CLIKED]: {- title: 'AI canvases are premium',+ title: 'AI canvases require Pro or Max',description:'Upgrade to generate diagrams, whiteboards, and visual drafts with AI.',learnMoreUrl: 'https://docs.macro.com/product/canvas',learnMoreSubject: 'canvases',},[PaywallKey.SAVED_PROMPT]: {- title: 'Saved prompts are premium',+ title: 'Saved prompts require Pro or Max',description: 'Upgrade to save reusable prompts for faster workflows.',learnMoreUrl: 'https://docs.macro.com/product/snippets',learnMoreSubject: 'saved prompts',diff --git a/apps/web/src/lib/queries/auth/ai-billing.ts b/apps/web/src/lib/queries/auth/ai-billing.tsindex 2e213d3725..52131421bf 100644--- a/apps/web/src/lib/queries/auth/ai-billing.ts+++ b/apps/web/src/lib/queries/auth/ai-billing.ts@@ -3,6 +3,7 @@ import type { AiPlanTier, PaidPlan } from '@service-auth/ai-billing-types';import { authServiceClient } from '@service-auth/client';import { useMutation, useQuery } from '@tanstack/solid-query';import { queryClient } from '../client';+import { queryReadyGate } from '../gate';import { authKeys } from './keys';import { invalidateUserInfo } from './user-info';@@ -63,7 +64,7 @@ export function useIncludedAiCentsByTier(): () => Partial<const plans = useAiBillingPlansQuery();return () =>Object.fromEntries(- (plans.isSuccess ? plans.data.plans : []).map((plan) => [+ (queryReadyGate(plans) ? plans.data.plans : []).map((plan) => [plan.tier,plan.included_ai_cents_per_seat,])diff --git a/apps/web/src/lib/queries/team/members.ts b/apps/web/src/lib/queries/team/members.tsindex 0786ca585b..1b8864510b 100644--- a/apps/web/src/lib/queries/team/members.ts+++ b/apps/web/src/lib/queries/team/members.ts@@ -87,7 +87,7 @@ type SetTeamMemberPlanCallbacks = MutationCallbacks<>;/**- * Move one member's seat between Premium and Max. Team admins only; the+ * Move one member's seat between Pro and Max. Team admins only; the* team's subscription is re-billed (prorated) and that seat's AI allowance* changes at once, so the billing summary is refreshed too.*/@@ -105,7 +105,7 @@ export function useSetTeamMemberPlanMutation(invalidateTeam(teamId);void invalidateAiBillingSummary();toast.success(- plan === 'max' ? 'Seat moved to Max' : 'Seat moved to Premium'+ plan === 'max' ? 'Seat moved to Max' : 'Seat moved to Pro');},diff --git a/docs/AGENT_GUIDE/login.md b/docs/AGENT_GUIDE/login.mdindex f31beefcd0..81280b890d 100644--- a/docs/AGENT_GUIDE/login.md+++ b/docs/AGENT_GUIDE/login.md@@ -115,7 +115,7 @@ redirect; after authentication the accent is saved to the user's theme and setupresumes at work email. Regular `/app/login` retains the direct sign-in screen.The steps are workspace color, feature interests, security, work Google account,-personal Google account, tools, team, and the trial offer. Color selection forks+personal Google account, tools, team, and plan selection. Color selection forksthe default Macro Light or Macro Dark theme for the current mode and pins thecustom accent palette; it does not modify a built-in theme. Interests are visualpreferences only. Security and Google steps have a Read more section below the fold.@@ -144,16 +144,22 @@ The confirmed tutorial save updates the session cache before leaving. A successffinish must not show "Couldn't finish setup — please try again", including whena background session refresh overlaps it.-The trial offer contains no card fields or wallet buttons. Its primary button-requests an automatic 30-day Premium trial through Stripe Checkout; no coupon-code is required. Stripe collects the payment method for billing after the trial.-Only a customer's first subscription qualifies, including canceled subscriptions-in that check. Ineligible trial requests show an error instead of opening an-immediately paid checkout. Standard purchases retain their existing billing terms.-Cancellation returns to this step. A successful return-polls the server's license state, completes onboarding, and enters the app without-an extra confirmation click. A pending webhook shows a retryable confirmation-state. The Guest scroll cue opens a comparison with a separate Guest continuation.+The final screen keeps the “Free Claude & GPT for 30 days” headline and trial+button above the fold. The “Continue with Free” scroll cue opens the pricing grid+below, comparing Free, Pro, and Max. The grid loads monthly subscription prices+from the billing catalog and describes Max as 10× Pro usage, without displaying+dollar-denominated included AI allowances. Free completes onboarding without a+card. Pro returns to the trial offer; Max starts standard paid checkout.+The trial button requests 30 days free through Stripe Checkout, with no coupon+required. Stripe collects the payment method for billing after the trial. Only a+customer's first subscription qualifies, including canceled subscriptions in that+check. Ineligible requests show an error instead of opening an immediately paid+checkout. Invite promotions retain their own offer and terms.+Cancellation returns to this step. A successful return polls the server's license+state, completes onboarding, and enters the app without an extra confirmation+click. A pending webhook shows a retryable confirmation state. If the catalog+cannot load, Free remains available, Pro still returns to the trial offer, and+Max checkout stays disabled until prices can be loaded with the retry action.Both completion paths preserve an original `next` destination and otherwise land on Home (`/app/home`). Old saved email,connector, building, and summary step names are migrated on resume.