A declined card left the account in a state with no way out. `past_due` grants
no minutes, so the metering layer resolved the user to the free plan — which
meant /api/me reported status=null, the account page swapped "Manage billing"
for "Upgrade" (hiding the only button that fixes a card), and the checkout guard
then rejected the upgrade with a 409 that every call site swallowed into a
generic "Could not start checkout." Silently free, unwarned, unable to pay.
Found on 25-jul-2026 in prod: 14 subscriptions in this state, all first charges
that failed when the (now retired) 3-day trial ended. The trial is gone, but the
trap is not — a renewal failure or an abandoned 3DS payment reproduces it.
- metering: split `_subscription_row` (raw) from `_active_subscription`
(entitling), and expose both on the balance. Entitlement logic is unchanged.
- /api/me: report status/interval from a row needing attention when no
subscription entitles, plus `has_billing_account` to route the portal button.
- checkout: drop `incomplete` from the blocking states. Stripe collects nothing
on it and expires it within 24h, so blocking only stopped the user's retry.
Give past_due/unpaid a message that names the problem and the fix.
- account page: explain the failed payment inline with a link to the portal
instead of showing a bare "past_due" chip, and keep the portal reachable for
any Stripe relationship, live or broken.
- api client: throw a typed ApiError carrying the server's detail so callers
stop replacing real, actionable messages with generic copy.
Verified against a real DB: past_due stays blocked but visible and fixable,
incomplete can retry, canceled is silent and can subscribe again.
Hasta ahora el único camino al upgrade era fallar contra la cuota. Tres
momentos nuevos, todos con el mismo mensaje ya validado (watermark +
caducidad 7d + minutos):
- Resultados (pico de satisfacción): banner para usuarios free junto a
sus clips recién generados — "Like these clips? Keep them forever →" —
que abre la modal de upgrade en modo 'upsell' (copy adaptado: aún
tienen minutos, se vende permanencia y limpieza, no "te quedaste sin").
- Medidor del header: para free abre la modal de upgrade en vez de ir a
account — antes no existía ningún camino visible a los planes desde el
dashboard sin fallar primero.
- Email "tus clips se borran mañana": warn_free_expiring() en el sweeper
avisa el día 6 de los 7 de retención free, con descarga o upgrade como
salidas. Aversión a la pérdida honesta: la fecha es real y hoy se
borraba en silencio, lo que no convertía a nadie. Dedupe en memoria
(peor caso tras restart: un duplicado).
Eventos UpsellModalSeen/UpsellModalCheckout separados de los del muro
para medir cada momento por su lado.
Verificado: lógica del aviso probada contra la DB local (clip de 6.5d
avisa, el de 8d ya purgeable no, segundo pase no duplica); 141 tests y
build del dashboard en verde.
De 76 impactos del muro 402 en 72h solo 4 llegaron a checkout y la única
compra fue un top-up: la modal antigua ofrecía packs de minutos sueltos
como opción principal, el upgrade a plan era un párrafo NO clickable y
un StarBanner empujaba a GitHub en pleno momento de compra.
Nueva modal (mismo fichero/props, cero cambios en App.jsx):
- Starter destacado + Creator al lado como ancla de precio; bullets del
valor real de pagar: 5x/15x minutos, sin watermark, clips permanentes
(los free caducan a 7 dias) y prioridad de cola sobre free — todo
cierto, sin escasez inventada ni cuentas atras falsas.
- Copy goal-gradient con los datos del 402: "this video needs X min and
you have Y left — upgrade and it starts processing right away".
- "cancel anytime" como reversion de riesgo; top-ups relegados a un link
discreto que expande; StarBanner fuera.
- Eventos QuotaWallSeen / QuotaWallCheckout para medir la conversion del
muro, que hasta ahora era invisible.
El email de sin-minutos replica el mismo mensaje (perdida + plan concreto
+ CTA unico) y por fin deja rastro en logs al enviarse.
Verificado end-to-end en local: usuario free con cuota agotada via DB,
402 real de /api/process, modal con datos reales y packs expandibles.
- Plan free resuelto en metering (sin fila Stripe): 20 min/mes para cuentas
Google, período sintético de mes natural con reset automático
- TRIAL_DAYS=0 para nuevos checkouts; trials en curso grandfathered
- Watermark drawtext en clips free (pasada única post-render, sobrevive
subtítulos/hooks); thumbnails IA solo de pago
- Anti-abuso: 3 jobs/día por cuenta, 5 por IP, rate-limit de probes,
contador mensual de GB de proxy con alerta Telegram a 100 GB
- Clips free caducan a 7 días (purge_free_expired); purge_expired respeta
a cancelados que ahora son free
- Galería UGC pública pasa a opt-in (share_to_gallery, antes publicaba
producto+guion de todos los usuarios sin permiso)
- Emails: clips listos (con star-ask) y sin-minutos (cooldown 24h)
- Frontend: card Free en pricing, copy sin trial (landing/legal/gates),
StarBanner en resultados y TopUpModal, upsell de watermark
Full visual rework to a single locked design system (design.md, Lumen
Night Foundry): dark violet canvas, molten-brass accent, Instrument
Serif + Geist + JetBrains Mono, hairline cards, zero gradients and
zero glassmorphism.
- Landing: marquee hero with real vertical demo clip in an instrument
bezel, meter strip, smart-crop before/after section, cloud-first
copy (start free trial primary, self-host demoted to secondary),
text density cut, SEO surfaces preserved (single h1, ids, FAQs,
comparison table intact)
- App: workbench restyle — sidebar with mono ordinals, unified header,
settings/ai-agent/dashboard views on shared tokens; per-feature
gradient identities retired
- Shared UI: new Modal, SegmentedControl and StepIndicator replace 8+
duplicated modal shells and 2 wizard steppers
- New pricing paywall page (#/pricing): demo proof strip, honest trust
signals, billing FAQ
- Routing: app logo links back to landing via #landing without
resetting the skip-landing preference
- Responsive: audited and fixed at 320/375/414/768px (no horizontal
scroll, tables scroll in-container, single-line CTAs)
- ScheduleWeekModal translated to English; ProcessingAnimation comment
noise removed
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>