Skip to content

Commit ef66fb8

Browse files
claude[bot]Trigger.dev RepoOps
authored andcommitted
feat(webapp): default the cancel in-progress runs option to on for billing limits
**Before:** the first time you configured a billing limit, the "Cancel in-progress runs when this limit is reached" checkbox started unchecked. Unless you noticed it and ticked it, runs that were already executing when the limit was reached kept going until they finished, so spend could keep climbing past the limit even though new triggers were already being held. **After:** the checkbox now starts checked for a limit that has not been configured yet, so cancelling already-executing runs is the default. Organizations that have already saved a billing limit keep whatever they chose, including an explicit opt-out. **How:** the form's initial checked state for an unconfigured limit is now on instead of off. Nothing about saved settings or submitted values changed: a missing checkbox on submit is still read as off, so unticking the box and saving still disables cancellation. Mono-RevId: c1068f09f9a8db53e45bf3f91c879569becccb25
1 parent 7842bd5 commit ef66fb8

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
area: webapp
3+
type: improvement
4+
---
5+
6+
The "Cancel in-progress runs when this limit is reached" option on the billing limit form is now enabled by default when you first configure a limit, so already-executing runs stop instead of continuing past the limit. Organizations that have already saved a billing limit keep their existing choice.

apps/webapp/app/components/billing/BillingLimitConfigSection.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,10 @@ export function BillingLimitConfigSection({
115115
billingLimit.isConfigured && billingLimit.mode === "custom"
116116
? (billingLimit.amountCents / 100).toFixed(2)
117117
: "";
118-
const savedCancelInProgressRuns = billingLimit.isConfigured && billingLimit.cancelInProgressRuns;
118+
// Unconfigured limits default to cancelling in-progress runs; saved configs keep their stored choice.
119+
const savedCancelInProgressRuns = billingLimit.isConfigured
120+
? billingLimit.cancelInProgressRuns
121+
: true;
119122

120123
// Unconfigured limit starts with nothing selected.
121124
const resetMode: "" | "none" | "plan" | "custom" = billingLimit.isConfigured ? savedMode : "";

0 commit comments

Comments
 (0)