feat(webapp): billing limits — pause, reject, recovery, and settings UI#3996
Conversation
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (89)
💤 Files with no reviewable changes (2)
✅ Files skipped from review due to trivial changes (5)
🚧 Files skipped from review as they are similar to previous changes (81)
📜 Recent review details⏰ Context from checks skipped due to timeout. (25)
🧰 Additional context used🧠 Learnings (1)📚 Learning: 2026-05-14T14:54:39.095ZApplied to files:
🪛 LanguageTool.server-changes/billing-limits.md[grammar] ~9-~9: Ensure spelling is correct (QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1) 🔇 Additional comments (1)
WalkthroughThis PR adds billing-limit data contracts, platform and worker support, pause-source-aware environment handling, a billing-limits settings page, and related tests and docs. It introduces new schemas and API helpers for billing limits and entitlements, a Redis-backed worker with reconcile and resolve orchestration, pause/resume logic keyed by 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
5c1a4bf to
ac87dcd
Compare
@trigger.dev/build
trigger.dev
@trigger.dev/core
@trigger.dev/python
@trigger.dev/react-hooks
@trigger.dev/redis-worker
@trigger.dev/rsc
@trigger.dev/schema-to-json
@trigger.dev/sdk
commit: |
ac87dcd to
80b0a02
Compare
80b0a02 to
18bce2f
Compare
18bce2f to
c338591
Compare
c338591 to
31b6df9
Compare
31b6df9 to
3200c8a
Compare
3200c8a to
7763a7a
Compare
7763a7a to
6d9aa23
Compare
6d9aa23 to
cc28bfd
Compare
cc28bfd to
2a89262
Compare
2a89262 to
b478344
Compare
b478344 to
ff448c9
Compare
5eb8d46 to
ecf6630
Compare
1662563 to
6608555
Compare
d118481 to
acd5af7
Compare
acd5af7 to
f8874c4
Compare
b631c0d to
0109cbb
Compare
190c01a to
8a5d58d
Compare
8a5d58d to
4bf8326
Compare
4bf8326 to
c1935f8
Compare
Adds billing limit enforcement: pause/reject when a limit is hit, recovery and resolve flows, bulk-cancel of queued/in-progress runs, the settings + usage UI, and the supporting schema, worker, and reconciliation services.
c1935f8 to
4ac82e5
Compare
Summary
Adds Billing Limits to the webapp.
Customers can set a monthly spend cap. When usage crosses the limit, billable environments enter a grace period. If the limit is not resolved before grace expires, new triggers are rejected until the organization increases or removes the limit.
The webapp consumes billing-limit state from the billing platform and enforces it across environments, queues, and trigger creation.
Depends on the matching cloud billing PR.
User-facing changes
Billing Limits settings
New
/settings/billing-limitspage replaces the standalone billing-alerts page.Configure:
Configure billing alerts and notification emails.
Resolve active billing limits by increasing or removing the limit.
Org-wide banners
Adds banners for:
Usage page
Shows the configured billing limit on the spend chart.
Enforcement
Billable environments are paused when an org enters grace.
New triggers are rejected once grace expires.
Billing-limit pauses cannot be manually resumed.
New environments created during grace/rejected inherit the correct paused state.
Recovery supports:
Infrastructure
BILLING_LIMITas an environment pause source.Test plan
queueandnew_only).Notes
isConfigured: falsemeans no billing limit has been configured yet.mode: "none"means the customer explicitly opted out.