Commit 186a139
committed
fix(webapp): billing alert preview uses current limit instead of stale saved amount
After a customer raised their billing limit, the alert-threshold percentage
preview kept calculating dollar amounts against the previous limit until they
re-saved their alerts. This happened because the preview reused the alert
record's snapshotted amount whenever saved percentage levels existed.
The preview now returns the snapshot only when it still matches the current
effective/plan limit, and otherwise falls back to the current effective limit,
so the preview reflects the saved billing limit immediately. Adds a regression
test covering the raised-limit scenario.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TywtuVBcXSNVTV6nJbgLk81 parent 11d8a05 commit 186a139
3 files changed
Lines changed: 18 additions & 3 deletions
File tree
- .server-changes
- apps/webapp
- app/components/billing
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | 318 | | |
322 | 319 | | |
323 | 320 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
93 | 105 | | |
94 | 106 | | |
95 | 107 | | |
| |||
0 commit comments