Skip to content

fix: Auto pool spend shows $0 when bonusSpend is absent - #3

Merged
pj-workspace merged 1 commit into
mainfrom
fix/auto-pool-spend-display
Jul 29, 2026
Merged

pj-workspace merged 1 commit into
mainfrom
fix/auto-pool-spend-display

Conversation

@pj-workspace

Copy link
Copy Markdown
Owner

Summary

  • Fix Auto + Composer pool showing $0.00 when Cursor API no longer returns bonusSpend/autoSpend and totalSpend == includedSpend.
  • Derive Auto pool spend from aggregated first-party model costs, with fallback to totalSpend - API used.
  • Wire the same logic through spending breakdown and all dashboard rows that previously read plan.bonusSpend directly.

Test plan

  • ./scripts/build-app.sh release succeeds
  • Open app → 用量 tab → Auto + Composer card shows ~$30.65 spend (not $0.00)
  • 花费 / 账单 tabs → Auto Bonus spend row matches pool card
  • API pool still shows ~$2.78 used; total spend ~$34.06

Production Risk

Low — display-only fix for spend derivation; no auth or billing API changes.

Made with Cursor

…absent

Cursor no longer returns bonusSpend/autoSpend while totalSpend equals
includedSpend, which made Auto + Composer show $0.00. Sum first-party
model costs from aggregated usage and fall back to total minus API used.

Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot AI review requested due to automatic review settings July 29, 2026 05:31
@pj-workspace
pj-workspace merged commit 31638de into main Jul 29, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants