From c089cdfa758988e02254619b564e4bbfe42dc8a6 Mon Sep 17 00:00:00 2001 From: Matthew Meszaros Date: Fri, 4 Sep 2026 06:09:09 -0700 Subject: [PATCH] =?UTF-8?q?fix:=20address=20review=20findings=20on=20the?= =?UTF-8?q?=20upgrade=20surfaces=20=E2=80=94=20resolve=20a=20catalog=20pla?= =?UTF-8?q?n=20to=20the=20server=20plan=20by=20exact=20name=20before=20fal?= =?UTF-8?q?ling=20back=20to=20an=20unambiguous=20prefix=20so=20an=20operat?= =?UTF-8?q?or-added=20'Starter=20Legacy'=20cannot=20capture=20Starter's=20?= =?UTF-8?q?checkout,=20stop=20a=20plan=20that=20does=20not=20unlock=20the?= =?UTF-8?q?=20requested=20feature=20from=20offering=20to=20buy=20it,=20hon?= =?UTF-8?q?our=20the=20dialog's=20aria-modal=20by=20moving=20and=20contain?= =?UTF-8?q?ing=20focus=20and=20restoring=20it=20on=20close,=20and=20pin=20?= =?UTF-8?q?the=20odometer=20digit=20geometry=20against=20flex=20shrink?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/components/app/billing/PlanCard.tsx | 9 ++++- web/src/components/layout/UpgradeDialog.tsx | 38 +++++++++++++++++++++ web/src/components/ui/RollingNumber.tsx | 4 ++- web/src/hooks/useUpgradeFlow.ts | 20 +++++++---- 4 files changed, 63 insertions(+), 8 deletions(-) diff --git a/web/src/components/app/billing/PlanCard.tsx b/web/src/components/app/billing/PlanCard.tsx index 8e3f846f..cbabbcb2 100644 --- a/web/src/components/app/billing/PlanCard.tsx +++ b/web/src/components/app/billing/PlanCard.tsx @@ -102,7 +102,10 @@ export default function PlanCard({ ? "Custom volume" : `${plan.sendsPerDay.toLocaleString()} emails / day`; - const showCta = canAct && !below && !isCurrent; + // A gated card that does not unlock the requested feature must not offer to + // buy it: checkout would succeed and leave the user still locked out of the + // thing they clicked. + const showCta = canAct && !below && !isCurrent && unlocks; return ( Current plan + ) : gated && !unlocks ? ( +
+ Does not unlock {feature} +
) : below ? (