feat: add local budget alerts with projected overruns#28
feat: add local budget alerts with projected overruns#28EricGrill wants to merge 1 commit intomm7894215:mainfrom
Conversation
|
Thanks for the contribution. This cannot be merged as-is because the branch conflicts with current After rebasing and resolving the conflict, please also add accessible labels for the new budget inputs. The current number fields only have a placeholder, which is not enough for screen readers. |
This adds a local budget alert flow that lets users set daily, weekly, and monthly budgets in Settings and see a dashboard warning when current spend is over budget or on pace to exceed it. The alert also links straight into the project usage view so the likely driver is easier to inspect. Constraint: Keep the first implementation local-only and avoid adding remote budget storage or notification delivery Rejected: Add cloud-synced budget preferences first | extra account/settings surface for an MVP dashboard alert Confidence: high Scope-risk: moderate Reversibility: clean Directive: Keep budget alerts explainable and tied to visible range math; avoid hiding forecast logic behind opaque scoring Tested: node --test test/budget-alerts.test.js Tested: npm run validate:copy Not-tested: Full npm test (workspace still lacks root dev modules such as esbuild and @sourcegraph/scip-typescript) Not-tested: Browser rendering and interaction for the new settings and dashboard alert UI Related: mm7894215#21
bbe50fc to
0d62d50
Compare
|
Addressed review feedback:
Tests still pass ( |
|
Thanks for picking up #21. Going to close this one too. Budget alerts are a feature where "correct" depends a lot on the user. Flat daily/weekly/monthly thresholds work for some people, but most users I talk to care about a specific plan ceiling (Claude Pro, Codex Plus, Cursor business) or per-project spend, not a rolling global number. The Limits page already covers plan-level rate limits and caps; adding a parallel rolling-budget UI alongside it would mean two competing "are you over?" surfaces. The localStorage-only state also limits the value — alerts that don't follow a user across devices tend to lose trust quickly. If TokenTracker grows budget alerts properly, they'd probably want to live alongside the cloud sync layer rather than ahead of it. Leaving #21 open for now. Appreciate the careful PR. |
Why
Issue #21 asks for actionable budget alerts that warn before spend gets out of hand.
What changed
Verification
node --test test/budget-alerts.test.jsnpm run validate:copyCloses #21