Skip to content

Show Cursor plan usage in dollars#423

Open
bald-ai wants to merge 1 commit intosteipete:mainfrom
bald-ai:codex/cursor-dollar-display
Open

Show Cursor plan usage in dollars#423
bald-ai wants to merge 1 commit intosteipete:mainfrom
bald-ai:codex/cursor-dollar-display

Conversation

@bald-ai
Copy link
Contributor

@bald-ai bald-ai commented Feb 25, 2026

Summary

  • show Cursor primary usage labels in dollars (used/left and over-limit) instead of percentage text in menu cards
  • show dollar text for Cursor in the menu bar brand+text mode, with no percent fallback
  • persist cursorPlanCost in UsageSnapshot so dollar labels survive serialization
  • keep Cursor parser dollar-first by avoiding percent-only fallback when plan limit is missing

Tests

  • swift test --filter MenuCardModelTests --filter CursorStatusProbeTests --filter StatusItemAnimationTests
  • pnpm check
  • ./Scripts/compile_and_run.sh

Refs: #398 (comment)
Fixes #398

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: 605c65a021

ℹ️ 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 +849 to +850
} else {
primaryCustomLabel = "Usage unavailable"

Choose a reason for hiding this comment

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

P2 Badge Fallback to request label when Cursor plan cost is missing

Legacy Cursor accounts intentionally have cursorPlanCost == nil while still providing a valid request-based primary window (CursorStatusSnapshot.toUsageSnapshot computes primary from requestsUsed/requestsLimit). This branch unconditionally replaces the primary label with "Usage unavailable" whenever plan dollars are absent, so those users lose the only textual usage signal in the menu card despite having real usage data. Keep the percent/request label as a fallback when dollar data is unavailable.

Useful? React with 👍 / 👎.

}

private func cursorMenuBarDollarText(snapshot: UsageSnapshot?) -> String? {
guard let cost = snapshot?.cursorPlanCost, cost.limit > 0 else { return nil }

Choose a reason for hiding this comment

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

P2 Badge Preserve Cursor menu bar text for request-based plans

The Cursor-specific early return routes all menu-bar text through cursorMenuBarDollarText, and that helper returns nil whenever cursorPlanCost is absent. For legacy request-based Cursor plans, plan cost is expected to be missing but primary usage is still valid, so brand+text mode now renders no text at all instead of usage. Falling back to the existing MenuBarDisplayText path when dollar data is unavailable would avoid regressing those accounts.

Useful? React with 👍 / 👎.

@bald-ai
Copy link
Contributor Author

bald-ai commented Feb 25, 2026

Hi, displaying dollars offers way better info for Cursor specifically than % as it can go over 100.

@bald-ai
Copy link
Contributor Author

bald-ai commented Feb 25, 2026

Does it still make sense to support legacy Cursor accounts? I would just cut it, it has been a long time since they changed the pricing (4. 7. 2025). If lots of people somehow still have old accounts, we can put it back. I find it highly unlikely that people who use Codexbar will have legacy accounts.

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.

Feature request: Add a display of the total amount spent on tokens.

1 participant