stack/packages
Bilal Godil 59ef500f7e Treat canceled-at-period-end subscriptions as still in effect
Canceling a subscription without a Stripe backing (test mode, free plans)
writes status=canceled with endedAt set to the end of the current period,
so the customer keeps their entitlements until then. But every read path
classified subscriptions with isActiveSubscription (active/trialing only),
so during the paid-through window the owned product fell through to the
one-time-purchase branch: the account settings payments tab showed
"One-time purchase" with no end date and no way to tell the plan was
winding down, and plan usage reported the free plan while the paid plan's
quotas were still in effect.

Introduce isSubscriptionInEffect (status-agnostic, endedAt-based — the
same semantics Bulldozer's grant timefold and ensure-free-plan already
use) and use it at the read sites: product list classification, plan
usage resolution, and the switch route's sub-vs-OTP occupancy check.
Write sites keep isActiveSubscription so wound-down subs can't be
re-canceled or switched from. The product list now also computes
is_cancelable instead of hardcoding it, double-canceling returns a
dedicated error instead of claiming the product is an OTP, and the
Stripe cancel path uses cancel_at_period_end instead of canceling
immediately, matching the promise made by the confirmation dialog.
The account settings panels render "Ends on <date>" for winding-down
subscriptions.
2026-07-16 13:19:07 -07:00
..
cli Fix flaky payment e2e tests: await async Stripe webhook processing + deterministic fixtures (#1746) 2026-07-10 20:22:47 -07:00
dashboard-ui-components [Fix]: OOM Risk with Data Table (#1766) 2026-07-14 11:06:41 -07:00
js chore: update package versions 2026-07-06 23:34:27 +00:00
next chore: update package versions 2026-07-06 23:34:27 +00:00
react chore: update package versions 2026-07-06 23:34:27 +00:00
sc chore: update package versions 2026-07-06 23:34:27 +00:00
shared Update reminders 2026-07-13 15:34:36 -07:00
shared-backend chore: update package versions 2026-07-06 23:34:27 +00:00
tanstack-start chore: update package versions 2026-07-06 23:34:27 +00:00
template Treat canceled-at-period-end subscriptions as still in effect 2026-07-16 13:19:07 -07:00
ui chore: update package versions 2026-07-06 23:34:27 +00:00