review(cursor): code review of Total/Auto/API usage PR#227
Closed
Copilot wants to merge 1 commit into
Closed
Conversation
Copilot
AI
changed the title
[WIP] Add total usage and auto usage metrics to cursor
review(cursor): code review of Total/Auto/API usage PR
Feb 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR #226 adds
Total usage,Auto usage,API usagemetrics and renamesIncluded requests→Requests. Review surfaced four issues:Auto usage/API usagepercent lines (L485–505) have noif (!isTeamAccount)guard, so team accounts could render a dollarsTotal usagealongside percent sub-lines. No test covers this path.planUsedfallback undercounts with bonus spend — whentotalSpendis absent, fallback islimit − remaining = includedSpend, which excludesbonusSpend. Affects only the double-fallback path (totalPercentUsednon-finite andtotalSpendmissing), but silently under-reports on plans with bonus credits.pooledLimitas team-detection over-fires —su && typeof su.pooledLimit === "number"treats any account with a numericpooledLimitas team, even whenlimitTypeis"user". Matches documented intent but warrants an inline comment.Bonus spendabsent fromplugin.jsonmanifest — emitted as actx.line.texton team accounts (L472) but has no manifest entry. Fine if text-type lines are intentionally excluded from the manifest; worth confirming.✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
Summary by cubic
Add total usage and auto usage metrics to the cursor module. Both metrics are exposed via the API and shown in the UI so users can see overall activity and automated activity separately.
Written for commit 4aa8ef0. Summary will update on new commits.