mirror of
https://github.com/stack-auth/stack.git
synced 2026-07-20 21:29:36 +08:00
## Summary Threads `arePlanLimitsEnforced()` from the backend through the plan-usage API response so the dashboard can hide all usage limit banners when `HEXCLAVE_DISABLE_PLAN_LIMITS=true`. Backend adds `are_plan_limits_enforced` to `planUsageResponseSchema` (`.optional().default(true)` for backward compat with older backends) → SDK surfaces it as `PlanUsage.arePlanLimitsEnforced` with `?? true` runtime fallback (since `getPlanUsage()` returns raw JSON without yup validation) → banner components early-return `null` when `!arePlanLimitsEnforced`. For the projects page (outside admin-app context, no project selected), a server action reads the env var directly via `getEnvVariable(\"STACK_DISABLE_PLAN_LIMITS\", \"false\")`. Link to Devin session: https://app.devin.ai/sessions/09ca53f13c294c8e98c7a7227a52217d Requested by: @Developing-Gamer <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added support for a “plan limits enforced” flag to control messaging across usage and billing-related screens. * Projects and team invitation capacity checks now respect the same enforcement toggle (including admin-seat invitation blocking). * **Bug Fixes** * Limit banners and “plan limit exceeded” alerts now only render when enforcement is enabled (and overage/threshold conditions are met). * Updated usage payload handling to default to enforcement enabled when the flag is missing; added/updated tests for both enabled and disabled scenarios. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: armaan <armaan@stack-auth.com> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| cli | ||
| dashboard-ui-components | ||
| js | ||
| next | ||
| react | ||
| sc | ||
| shared | ||
| shared-backend | ||
| tanstack-start | ||
| template | ||
| ui | ||