Skip to content

Commit 57db5c1

Browse files
gnick18claude
andcommitted
fix(billing): accept BILLING_LIVE=1 in the upgrade nudge (was true-only)
WelcomePage read NEXT_PUBLIC_BILLING_LIVE === "1" but the upgrade nudge read === "true", so setting the flag to 1 turned on the welcome copy while leaving the nudge dark. Both now accept "1" or "true" so the value can't drift. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent faba5ef commit 57db5c1

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

frontend/src/components/welcome/WelcomePage.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,9 @@ function R2Demo({ name, label }: { name: string; label: string }) {
152152
* Vercel ALONGSIDE the server BILLING_ENABLED / AI_BILLING_ENABLED and redeploy
153153
* (see docs/proposals/2026-06-13-billing-go-live-checklist.md). Kept a separate
154154
* flag because the server switch is not readable from this client component. */
155-
const BILLING_LIVE = process.env.NEXT_PUBLIC_BILLING_LIVE === "1";
155+
const BILLING_LIVE =
156+
process.env.NEXT_PUBLIC_BILLING_LIVE === "1" ||
157+
process.env.NEXT_PUBLIC_BILLING_LIVE === "true";
156158

157159

158160
/** A check glyph for the trust-block lists, sky-blue. The single inline check

frontend/src/lib/billing/upgrade-nudge.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,10 @@ export function subscribeUpgradeNudge(listener: Listener): () => void {
6969
/** Whether the nudge is active at all (billing live on the client). Dormant in
7070
* beta, so callers at produce-feature paywalls can fire freely without guarding. */
7171
export function isUpgradeNudgeActive(): boolean {
72-
return process.env.NEXT_PUBLIC_BILLING_LIVE === "true";
72+
// Accept both "1" and "true" so the flag value never has to match exactly one
73+
// form, the WelcomePage check reads it the same way.
74+
const v = process.env.NEXT_PUBLIC_BILLING_LIVE;
75+
return v === "1" || v === "true";
7376
}
7477

7578
/**

0 commit comments

Comments
 (0)