Show partial spend totals when some subscriptions lack prices - #3001
Conversation
A nil cost on one subscription no longer wipes the currency group header. Co-authored-by: Cursor <cursoragent@cursor.com>
|
🦞👀 Pull request received. I will update this pull request when review starts. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c9f3bf7291
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| dailyPoints: dailyPoints, | ||
| totalTokens: Self.completeIntSum(providers.map(\.totalTokens)), | ||
| totalCost: Self.completeCostSum(providers.map(\.totalCost)), | ||
| totalTokens: Self.knownIntSum(providers.map(\.totalTokens)), |
There was a problem hiding this comment.
Label summed known tokens as partial
When one subscription has totalTokens == nil—for example because its history is malformed or overflows—and another reports tokens, this now stores the known-only sum in CurrencyGroup.totalTokens. The dashboard renders that value as an unqualified “Tracked tokens” total, and Share Stats propagates it as <n> tracked tokens; hasPartialTokens is not consumed anywhere, so users see a lower bound as a complete total. Either keep this aggregate unavailable or propagate and display its partial state as is done for spend.
Useful? React with 👍 / 👎.
|
Codex review: needs changes before merge. Reviewed August 17, 2026, 8:55 AM ET / 12:55 UTC. ClawSweeper reviewWhat this changesThe PR retains priced subscription spend in currency totals when peers lack prices, labels partial spend in the dashboard and Share Stats, and adds localization and regression coverage. Merge readinessKeep open: the branch correctly makes partial spend explicit, but still presents known-only tracked-token sums as complete totals on this unchanged head. Priority: P2 Review scores
Verification
How this fits togetherCodexBar combines per-provider usage snapshots into currency groups for the Usage & Spend dashboard and Share Stats. Those aggregates feed visible spend and tracked-token summaries as well as copied statistics. flowchart LR
A[Provider usage snapshots] --> B[Currency group aggregation]
B --> C[Known totals and partial state]
C --> D[Usage and Spend dashboard]
C --> E[Share Stats payload]
D --> F[Visible account summary]
E --> G[Copied statistics]
Before merge
Findings
Agent review detailsSecurityNone. Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Propagate explicit partial-token state through both consumers, matching the established partial-spend treatment, and add complete-versus-partial regression coverage. Do we have a high-confidence way to reproduce the issue? Yes—construct a currency group with one known token total and one nil token total; this head returns the known-only sum and renders it without a partial marker. Is this the best way to solve the issue? No—the spend path is appropriately marked, but the same known-only token semantics need explicit propagation or restoration of the former fail-closed behavior. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 14e300389e9e. LabelsLabel justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
After-fix proofThe motivating live dashboard was Codex priced (~$329.61 / 30d) with Claude and Cursor as spend unavailable, so the USD group header was This PR’s aggregation keeps the priced subtotal. The Share Stats card below is the same SwiftUI renderer the app uses, generated from this stacked branch (#3009 includes
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
Native Usage & Spend section (stacked #3009 includes this SHA)Priced Claude stays in the currency total while Cursor is spend unavailable. 30d: Partial token @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
Native Usage & Spend (this machine)30天: USD header is @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
🦞👀 Command router queued. I will update this comment with the next step. |
Summary
Note