Skip to content

Conversation

@KalnuErelis
Copy link

Summary

  • Fixes usage percentage display for Pro+/Ultra Cursor plans
  • Higher-tier plans now show percentage against effective capacity, not nominal limit

Problem

Cursor Pro+/Ultra users saw misleading usage percentages. For example, an Ultra user ($200/mo) with $300 usage would see the Plan bar at 0% left, even though Ultra provides ~$800 effective capacity.

Reference: https://x.com/steipete/status/2014620261715226833

Solution

Introduced plan-tier-aware effective budgets:

Plan Nominal Effective Budget
Pro $20/mo $40
Pro+ $60/mo $120 (3x)
Ultra $200/mo $800 (20x)

The Plan progress bar now calculates percentage as totalUsed / (tierEffectiveBudget + onDemandLimit).

Changes

  • Add CursorPlanTier enum with effective budget values
  • Add CursorEffectiveUsage struct for tier-aware usage data
  • Update CursorStatusSnapshot with plan tier detection and effective percentage calculation
  • Update progress bar to use effective percentage for non-legacy plans
  • Add comprehensive tests

Testing

  • All 24 CursorStatusProbeTests pass
  • Manual verification with Ultra account shows correct percentage

Fixes #154

Higher-tier Cursor plans (Pro+, Ultra) now show usage percentage against
their effective capacity rather than the nominal plan limit.

- Add CursorPlanTier enum with effective budget values per tier
- Add CursorEffectiveUsage struct for tier-aware usage tracking
- Update CursorStatusSnapshot with plan tier detection
- Calculate effective percentage as totalUsed / effectiveBudget
- Add comprehensive tests for tier detection and percentage calculation

Effective budgets calibrated against ~$40 Pro baseline:
- Pro ($20/mo): $40 effective (1x)
- Pro+ ($60/mo): $120 effective (3x)
- Ultra ($200/mo): $800 effective (20x)

Fixes steipete#154

Signed-off-by: Jaunius <jaunius.kadunas@gmail.com>
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 993f7f4418

ℹ️ 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".

Comment on lines 282 to +284
(Double(used) / Double(limit)) * 100
} else {
self.planPercentUsed
self.effectivePercentUsed

Choose a reason for hiding this comment

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

P2 Badge Preserve on-demand fallback when plan is exhausted

Switching the primary meter to effectivePercentUsed means the primary now includes on‑demand capacity, so primary.remainingPercent will stay > 0 until both plan and on‑demand limits are fully consumed. The remaining‑view logic for Cursor explicitly relies on primary.remainingPercent <= 0 to fall back to the on‑demand window (see UsageSnapshot.switcherWeeklyWindow in Sources/CodexBarCore/UsageFetcher.swift lines 146‑161), so after this change a plan can be exhausted and on‑demand in use but the UI will never switch to the on‑demand remaining view. Example: plan used $40 with a $100 on‑demand limit yields ~35.7% primary usage, so the fallback never triggers. Consider using isPlanExhausted or the legacy plan percent for that switch so remaining‑mode still shows on‑demand when the plan is exhausted.

Useful? React with 👍 / 👎.

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.

Incorrect usage count for Cursor

1 participant