spec: persistent weekly USD spend status bar (#9965)#10224
spec: persistent weekly USD spend status bar (#9965)#10224lonexreb wants to merge 1 commit intowarpdotdev:masterfrom
Conversation
There was a problem hiding this comment.
Overview
This spec proposes an opt-in status-bar indicator for rolling 7-day Agent spend, with click-through to Billing & Usage and no new telemetry. The direction is clear, but several behavior contracts are underspecified enough that implementations could show the wrong spend window or account context.
Concerns
- Define which billing scope the indicator represents for users with personal and team/workspace billing contexts.
- Align the user-facing label with the rolling-7-day requirement instead of using wording that implies a calendar week.
- Specify the source-of-truth and stale/error behavior needed to satisfy the ≤2s post-turn update requirement.
- Expand tests to cover the hidden-unavailable state, refresh timing, and tooltip totals.
Verdict
Found: 0 critical, 3 important, 1 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
| ## Goal | ||
|
|
||
| Add an opt-in persistent indicator at the bottom-right of the Warp | ||
| window showing the user's running 7-day rolling USD spend on Agent |
There was a problem hiding this comment.
| - B1. New setting | ||
| `agents.show_weekly_spend_status: bool` (default `false`, | ||
| `SyncToCloud::Globally(RespectUserSyncSetting::Yes)`). | ||
| - B2. When ON, a status-bar item shows "$XX.XX this week" in the |
There was a problem hiding this comment.
this week conflicts with the rolling-7d requirement and reads as calendar-week spend; choose one wording/window so the label, tooltip, and acceptance criteria cannot diverge.
| same status-bar slot used by other agent indicators (verify slot | ||
| by grepping the existing status-bar render path). | ||
| - B3. The indicator updates on every agent turn finish AND on a | ||
| 60-second timer (cheap; the spend value comes from the same |
There was a problem hiding this comment.
same billing model that already polls is not precise enough for the ≤2s update contract; identify the model/API, whether the value is server-confirmed or locally estimated after turn finish, and how stale/error states are handled.
| the existing `setting_changed` event with the boolean value. | ||
| - The indicator is read-only — it cannot send the value anywhere. | ||
|
|
||
| ## Test plan |
There was a problem hiding this comment.
💡 [SUGGESTION] Extend the test plan to cover billing-unavailable hiding, the ≤2s post-turn refresh, and the tooltip's rolling-7d/month totals; those are explicit acceptance criteria but currently untested.
Spec for #9965. Opt-in (
agents.show_weekly_spend_status, default false) status-bar indicator showing rolling 7-day Agent spend. Click opens Settings → Billing. Hidden when billing data is unavailable (avoids misleading $0.00).Closes (spec-only) #9965.