Repository navigation
Conversation
… Cursor usage display
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughCursor monthly plan usage now uses Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to Cursor’s monthly percentage prefers its total percentage while retaining a fallback, and the status bar uses Cursor Models as its headline when available. No unresolved user-facing regression is evident; the PR is mergeable subject to normal checks. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 1 system. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Important
The main-process change drops the used / limit fallback for the Cursor Plan window. That fails an existing, unmodified test (cursor-fetcher.test.ts) and silently hides the quota for accounts whose response omits totalPercentUsed. Details inline.
Reviewed changes
- Cursor Plan percent source —
mapCursorUsageSummarynow readsplan.totalPercentUseddirectly instead of preferringused / limit, so a base allowance atused == limitno longer reports 100%. - Cursor compact headline and sort order —
tightestSectionprefers theCursor Modelsbucket for Cursor accounts in bothgetTightestUsageSectionandproviderMaxUsed; every other provider keeps the plain max reduce. - Tests — mapping and renderer tests updated for the new selection, plus non-Cursor isolation and worst-first sort tests.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
|
@Dacadev97 can you include screenshots? Then I can merge |
totalPercentUsed now wins for the monthly Plan window, but an account whose Cursor response omits totalPercentUsed (used/limit only) was silently losing its Plan quota entirely. Fall back to poolPercent's used/limit derivation only when totalPercentUsed is absent.
|
@pullfrog you were right — verified and fixed in 7d0f02b.
All 38 tests across |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Incremental review of the delta since the prior pullfrog review (163a6640ee → 7d0f02b3bd):
- Restored the
used/limitPlan fallback —mapCursorUsageSummarynow computesplanPercentasfiniteNumber(plan?.totalPercentUsed) ?? poolPercent(plan, 'totalPercentUsed'), sototalPercentUsedstays authoritative while responses that omit it (onlyused/limit) still publish a Plan window. - Prior feedback addressed — this is exactly the fallback the previous review asked for;
cursor-fetcher.test.ts:70is green again and the "no allowance" degradation path is closed.
Verified locally: pnpm test src/main/rate-limits plus the two touched status-bar test files → 665 passed, 0 failed. Only cursor-usage-mapping.ts changed in the new commit; the renderer selection logic reviewed in the prior pass is unchanged.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
ℹ️ No critical issues — one stale doc line inline.
Reviewed changes
- Cursor Plan percent source restored —
mapCursorUsageSummarynow treatstotalPercentUsedas authoritative when present and falls back topoolPercent(plan, 'totalPercentUsed')(theused / limitpair) only when the account's response omits it, so a Pro Plus base allowance no longer reports 100% while quota-less responses keep their Plan window.cursor-fetcher.test.ts:70is green again; the 38 tests across the three Cursor suites pass locally.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
| * Percent consumed for the on-demand pool. `used / limit` wins over | ||
| * `totalPercentUsed`: the raw pair is internally consistent, while the percentage | ||
| * is pre-rounded for the dashboard's own copy and disagrees with it on real accounts. |
There was a problem hiding this comment.
This docstring still scopes poolPercent to "the on-demand pool", but 7d0f02b now also calls it for the Plan window's fallback (mapCursorUsageSummary line 160). The precedence it describes is accurate; only the scope phrase is stale.
Technical details
# Stale scope in `poolPercent` docstring
## Affected sites
- `src/main/rate-limits/cursor-usage-mapping.ts:104` — "for the on-demand pool" no longer matches the two call sites: `mapCursorUsageSummary` calls it for `plan` (line 160) and for `onDemand` (line 151).
## Required outcome
- Docstring names a generic usage pool rather than only on-demand.| * Percent consumed for the on-demand pool. `used / limit` wins over | |
| * `totalPercentUsed`: the raw pair is internally consistent, while the percentage | |
| * is pre-rounded for the dashboard's own copy and disagrees with it on real accounts. | |
| * Percent consumed for a usage pool. `used / limit` wins over | |
| * `totalPercentUsed`: the raw pair is internally consistent, while the percentage | |
| * is pre-rounded for the dashboard's own copy and disagrees with it on real accounts. |
|
Thanks @Dacadev97 for the original proposal. The credited successor #24830 has now merged into main at |



ELI5
When Cursor Pro Plus accounts consume their base allowance, the status bar incorrectly showed 100% usage even when model pools still had available capacity. This change ensures Cursor displays the actual tightest model pool percentage instead of falsely reporting 100%.
What Changed
planPercentnow readstotalPercentUseddirectly instead of preferring the rawused/limitratio.getTightestUsageSectionandproviderMaxUsedprioritize the primaryCursor Modelsbucket when picking the headline percentage and sorting for Cursor.Why
totalPercentUsedmatches how sibling pool percentages (Cursor ModelsandOther Models) are already derived.Cursor Modelsfor Cursor accounts surfaces the relevant quota metric without altering behavior for any other provider (Claude, Codex, Gemini).Linked Issue
Fixes #23515
Visual Proof
N/A - Numeric usage selection change in existing status bar label; no layout, styling, or element additions.
Testing
Ran existing test suite and added comprehensive tests covering
totalPercentUsedextraction,Cursor Modelsbucket prioritization, and non-Cursor provider isolation:src/main/rate-limits/cursor-usage-mapping.test.tssrc/renderer/src/components/status-bar/UsageRosterPanel.test.tsxsrc/renderer/src/components/status-bar/provider-segment-monthly-window.test.tsxAI Disclosure
Built through this repo's agentic pipeline (enrich → plan → implement → review → qa-code → address-review) — implement split across Cursor (parser) and Claude (headline picker), plan/review on Claude, gated by strict TDD (RED before each source change, GREEN after).
Review
provider-segment-monthly-window.test.tsxexplicitly asserts Claude/Codex/Gemini keep the unmodifiedmax(usedPercent)reduce.finiteNumber/nullish-coalescing read and a linear scan over ≤4 sections; no new loops, allocations, or I/O.Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
Ensure no issues in: Security, Cross-platoform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Checklist
N/Awith reasonpnpm lint(unscoped, full repo) andpnpm typecheckpass.pnpm testpasses for the touched files.pnpm build's desktop/renderer/web-client steps succeed; itsbuild-mobile-web-app-bundlestep fails locally becausemobile/node_modulesisn't installed in this checkout (node_modulesis untracked/branch-independent, so this is a local install gap, not something this diff introduced or could fix) — unrelated to this change, which touches nomobile/code.