Skip to content

feat: show Cursor monthly usage on the status bar - #16815

Closed
ivo922 wants to merge 16 commits into
stablyai:mainfrom
ivo922:feat/cursor-status-bar-rate-limits
Closed

ivo922 wants to merge 16 commits into
stablyai:mainfrom
ivo922:feat/cursor-status-bar-rate-limits

Conversation

@ivo922

@ivo922 ivo922 commented Aug 27, 2026 •

Copy link
Copy Markdown

ELI5

The status bar can now show how much of your Cursor monthly plan you have used, the same way it already shows Grok. It reads the login that cursor-agent login saved on this machine. No extra Orca Cursor login, and no Stats or Accounts pane.

What Changed

  • Add Cursor as a rate-limit provider (cursor + cursorAuthConfigured).
  • Read the local access token from cursor-agent's own auth.json (~/.cursor/auth.json on macOS, %APPDATA%\Cursor\auth.json on Windows, $XDG_CONFIG_HOME/cursor/auth.json on Linux). No process spawn and no Cursor IDE state.vscdb read.
  • Fetch GetCurrentPeriodUsage and map planUsage.totalPercentUsed onto the existing monthly window; optional Auto/API percents become named buckets.
  • Wire the status-bar toggle, default-on hydration for existing profiles, CLI gating, and compact chip.

Out of scope on purpose: Stats usage pane, Accounts pane, token refresh/rotation, SSH/WSL remote token reads.

Why

Cursor is a first-class agent in Orca but had no live quota chip, so you had to leave the app to check cursor.com/dashboard/spending. This follows the Grok path: local session, monthly %, existing status-bar machinery.

Linked Issue

Related to #15516 (status-bar portion only; this PR does not add the Accounts pane that ticket also asks for).

Overlaps existing open PRs #13837 and #8669. This one is narrower: status bar only, cursor-agent auth only, compact chip shows Cursor Models.

Visual Proof

Detailed view:

image

Compact view:

image

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

Local checks:

  • pnpm lint passed
  • pnpm typecheck passed
  • pnpm build passed
  • Focused tests: 14 files, 251 passed (auth, fetcher, service orchestration, status-bar gating/visibility/copy/chip, hydration, Appearance search)
  • Full pnpm test was started after rebase; it hung on unrelated renderer timeouts (dashboard, editor, terminal). Cursor files above were green. CI on this PR should be the source of truth for the full suite.

Manual: macOS, Cursor signed in via cursor-agent login. Compact chip showed Cursor Models instead of Other models.

Not tested here: Windows, Linux, SSH remotes (expected: degrade to not available; tokens are local-host only, same as Grok).

AI Disclosure

Implemented with Cursor (Grok 4.6).

Review

AI review report

  • Cross-platform: auth.json path mirrors cursor-agent's own resolution via path.join: Darwin ~/.cursor/, Windows %APPDATA%\Cursor\ (fallback ~/AppData/Roaming), Linux $XDG_CONFIG_HOME/cursor/ or ~/.config/cursor/. Unix-seconds billing timestamps reuse the Claude seconds/ms split.
  • SSH / remote / local: Auth and fetch run in desktop main against the local cursor-agent session. No SSH or WSL token probe. If Cursor is only signed in on a remote host, the chip stays unavailable. Folder workspaces are unaffected (this is host-local usage, not worktree-scoped).
  • Agents / integrations: Cursor-only behind explicit 'cursor' checks. Other providers unchanged. Not added to INDIVIDUALLY_REFRESHABLE_PROVIDERS (no Stats refresh button).
  • Performance: Reuses the existing fetchAll poller; the Cursor auth-file read is folded into the Cursor promise so it never stalls Claude/Codex/Grok.
  • UI: Reuses Grok status-bar segment, Appearance toggle, AgentIcon, and tokens. No new colors. Compact chip prefers Cursor Models; verbose/tooltip still list both buckets.
  • Security: Token is not logged, persisted in Orca, or put in error strings; filesystem errors are replaced with fixed messages so the auth path never reaches the renderer. Stale 401/403 copy tells the user to run cursor-agent login again; Orca does not refresh/rotate Cursor credentials. Dashboard POST uses Authorization: Bearer only.

Agent skill upstream boundary

  • Not applicable, or this change follows docs/reference/agent-skill-sharing-upstream-boundary.md and copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

  • Cursor has no 5-hour session window; primary surface is monthly.
  • Settings target for Cursor is null (CLI-owned auth, like Kimi and Grok).
  • X: add handle before merge shout-out.

Checklist

  • This PR is small and focused
  • I explained what changed and why (including ELI5)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

Made with Cursor

ivo922 and others added 9 commits August 27, 2026 08:13
API/"Other models" can be more consumed than included Cursor models, so highest-used was the wrong summary.

Co-authored-by: Cursor <[email protected]>
Type-aware oxlint rejected non-exhaustive Cursor failureKind switches, so those branches are plain ifs.

Co-authored-by: Cursor <[email protected]>
Compact chip favored Cursor Models and hid higher Other models
usage; render both bars so API spend is visible at a glance.
@ivo922
ivo922 marked this pull request as ready for review August 27, 2026 17:04
@ivo922
ivo922 requested a review from brennanb2025 as a code owner August 27, 2026 17:04
@coderabbitai

coderabbitai Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: defeea7a-2782-4956-a708-bd8ec7ac4208

📥 Commits

Reviewing files that changed from the base of the PR and between c75a3bd and b09bbca.

📒 Files selected for processing (22)
  • mobile/src/components/accounts-snapshot.ts
  • src/main/rate-limits/cursor-auth.test.ts
  • src/main/rate-limits/cursor-auth.ts
  • src/main/rate-limits/cursor-fetcher.test.ts
  • src/main/rate-limits/cursor-fetcher.ts
  • src/main/rate-limits/rate-limit-service-test-harness.ts
  • src/main/rate-limits/service-account-target-selection.test.ts
  • src/main/rate-limits/service-antigravity-usage.test.ts
  • src/main/rate-limits/service-inactive-account-previews.test.ts
  • src/main/rate-limits/service-live-claude-usage.test.ts
  • src/main/rate-limits/service-minimax-usage.test.ts
  • src/main/rate-limits/service-refresh-orchestration.test.ts
  • src/main/rate-limits/service-window-activation.test.ts
  • src/main/rate-limits/service/service-full-cycle-preparation.ts
  • src/renderer/src/components/settings/appearance-status-bar-cursor-toggle-search.ts
  • src/renderer/src/components/settings/appearance-status-bar-search.test.ts
  • src/renderer/src/components/status-bar/status-bar-provider-visibility.test.ts
  • src/renderer/src/components/status-bar/status-bar-provider-visibility.ts
  • src/renderer/src/components/status-bar/usage-error-copy.test.ts
  • src/renderer/src/components/status-bar/usage-error-copy.ts
  • src/renderer/src/i18n/locales/en.json
  • src/shared/rate-limit-state-factory.ts
🚧 Files skipped from review as they are similar to previous changes (4)
  • src/main/rate-limits/service-minimax-usage.test.ts
  • src/renderer/src/components/settings/appearance-status-bar-cursor-toggle-search.ts
  • src/renderer/src/components/status-bar/status-bar-provider-visibility.ts
  • src/main/rate-limits/rate-limit-service-test-harness.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

This change adds Cursor CLI authentication through auth.json and fetches Cursor usage from the DashboardService endpoint. It integrates Cursor into rate-limit state, refresh orchestration, provider visibility, and failure handling. It adds Cursor status-bar defaults, gating, usage buckets, icons, settings search entries, localization, and rendering. Tests cover authentication, fetching, orchestration, state migration, provider visibility, and status-bar output.

Merge Risk: ⚪ Minimal · up to b09bb

The compact Cursor display now matches its tooltip, and no merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 78.95% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 76 functions across 55 files. (1 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the primary change: adding Cursor monthly usage to the status bar.
Description check ✅ Passed The description covers the required sections, linked issue, UI evidence, testing, AI disclosure, scope, compatibility considerations, and checklist. It also clearly documents that the full test suite …
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 78.95% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 76 functions across 55 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
src/renderer/src/components/status-bar/UsageRosterPanel.tsx (1)

57-59: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Centralize isCursorUsageBucket with the existing StatusBar.tsx classifier to prevent the two allowlists from diverging. As per coding guidelines: “Extend or generalize it instead of building a parallel version.”

Source: Coding guidelines


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1dbda1fc-2766-402c-bdc1-1f63db5c11dd

📥 Commits

Reviewing files that changed from the base of the PR and between 9253634 and 039011f.

📒 Files selected for processing (46)
  • src/main/codex-accounts/service-reset-credit-test-fixtures.ts
  • src/main/rate-limits/cursor-auth.test.ts
  • src/main/rate-limits/cursor-auth.ts
  • src/main/rate-limits/cursor-fetcher.test.ts
  • src/main/rate-limits/cursor-fetcher.ts
  • src/main/rate-limits/rate-limit-service-test-harness.ts
  • src/main/rate-limits/service-account-target-selection.test.ts
  • src/main/rate-limits/service-antigravity-usage.test.ts
  • src/main/rate-limits/service-inactive-account-previews.test.ts
  • src/main/rate-limits/service-live-claude-usage.test.ts
  • src/main/rate-limits/service-minimax-usage.test.ts
  • src/main/rate-limits/service-refresh-orchestration.test.ts
  • src/main/rate-limits/service-window-activation.test.ts
  • src/main/rate-limits/service.ts
  • src/main/runtime/rpc/methods/client-ui-schemas.ts
  • src/main/runtime/rpc/methods/client-ui.test.ts
  • src/renderer/src/components/settings/AppearanceWindowSidebarSection.tsx
  • src/renderer/src/components/settings/appearance-status-bar-cursor-toggle-search.ts
  • src/renderer/src/components/settings/appearance-status-bar-ports-toggle-search.ts
  • src/renderer/src/components/settings/appearance-status-bar-search.test.ts
  • src/renderer/src/components/settings/appearance-status-bar-search.ts
  • src/renderer/src/components/stats/GrokUsagePane.test.tsx
  • src/renderer/src/components/status-bar/StatusBar.tsx
  • src/renderer/src/components/status-bar/UsageRosterPanel.test.tsx
  • src/renderer/src/components/status-bar/UsageRosterPanel.tsx
  • src/renderer/src/components/status-bar/provider-segment-monthly-window.test.tsx
  • src/renderer/src/components/status-bar/status-bar-agent-gating.test.ts
  • src/renderer/src/components/status-bar/status-bar-agent-gating.ts
  • src/renderer/src/components/status-bar/status-bar-provider-visibility.test.ts
  • src/renderer/src/components/status-bar/status-bar-provider-visibility.ts
  • src/renderer/src/components/status-bar/tooltip.test.ts
  • src/renderer/src/components/status-bar/tooltip.tsx
  • src/renderer/src/components/status-bar/usage-error-copy.test.ts
  • src/renderer/src/components/status-bar/usage-error-copy.ts
  • src/renderer/src/components/status-bar/usage-provider-settings-target.test.ts
  • src/renderer/src/components/status-bar/usage-provider-settings-target.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/store/slices/rate-limits.ts
  • src/renderer/src/store/slices/ui-hydration-workspace-preferences.test.ts
  • src/renderer/src/store/slices/ui.ts
  • src/renderer/src/web/preload-api/web-rate-limits-api.ts
  • src/shared/persisted-ui-state-types.ts
  • src/shared/rate-limit-types.test.ts
  • src/shared/rate-limit-types.ts
  • src/shared/status-bar-defaults.ts
  • src/shared/ui-chrome-types.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Comment thread src/main/rate-limits/cursor-auth.ts Resolved
Comment thread src/shared/rate-limit-types.ts Resolved
ivo922 and others added 2 commits August 27, 2026 20:54
Aborted refresh left `cursor-agent status` running up to 10s and
blocked queued refreshes. Share Cursor bucket labels so producer
and status-bar filters cannot diverge.

Co-authored-by: Cursor <[email protected]>
CodeRabbit pre-merge check requires ≥80% JSDoc on functions
touched by the diff.

Co-authored-by: Cursor <[email protected]>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/renderer/src/components/status-bar/UsageRosterPanel.tsx (1)

165-170: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Update the compact-mode tooltip.

This branch renders every Cursor bucket, but UsageRosterPanel.compactTooltip still says “only the tightest window.” Change the tooltip text to match the compact Cursor layout.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7271ffc2-f5c8-4eef-850e-a08b22cb78f6

📥 Commits

Reviewing files that changed from the base of the PR and between 039011f and dd3ca12.

📒 Files selected for processing (9)
  • src/main/rate-limits/cursor-auth.test.ts
  • src/main/rate-limits/cursor-auth.ts
  • src/main/rate-limits/cursor-fetcher.ts
  • src/main/rate-limits/service-refresh-orchestration.test.ts
  • src/main/rate-limits/service.ts
  • src/renderer/src/components/status-bar/StatusBar.tsx
  • src/renderer/src/components/status-bar/UsageRosterPanel.tsx
  • src/shared/cursor-usage-buckets.ts
  • src/shared/rate-limit-types.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/renderer/src/components/status-bar/StatusBar.tsx
  • src/shared/rate-limit-types.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Comment thread src/main/rate-limits/cursor-auth.ts Resolved
@ivo922

ivo922 commented Aug 29, 2026

Copy link
Copy Markdown
Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Upstream split three monoliths this branch had edited into modules;
re-applied the Cursor wiring onto the new files:
- rate-limits/service.ts -> service/{state,types,configuration,
  result-policy,polling,full-cycle-preparation,full-cycle-application}
- status-bar/StatusBar.tsx -> use-status-bar-controller,
  StatusBarProviderSegment, StatusBarVisibilityMenu
- store/slices/ui.ts -> ui/ui-slice-hydration-actions (defaults table)

Also: keep minimaxApiKeyConfigured alongside cursorAuthConfigured,
wait for Grok to settle in the slow-Cursor-auth test (cycle now spans
prepare/apply awaits), and catalog the cursorKeyword i18n string.
@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

Upstream added createEmptyRateLimitState(); add the Cursor fields to the
factory and take its call sites in the store, web preload, and test
fixtures. Follow the MiniMax fetcher move to rate-limits/minimax/ and
keep the Cursor usage-error strings beside the new MiniMax expiry copy.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: 1c5c388a-09c1-4658-9dc8-04078ac66a3d

📥 Commits

Reviewing files that changed from the base of the PR and between d53cbed and c75a3bd.

📒 Files selected for processing (55)
  • src/main/codex-accounts/service-reset-credit-test-fixtures.ts
  • src/main/rate-limits/cursor-auth.test.ts
  • src/main/rate-limits/cursor-auth.ts
  • src/main/rate-limits/cursor-fetcher.test.ts
  • src/main/rate-limits/cursor-fetcher.ts
  • src/main/rate-limits/rate-limit-service-test-harness.ts
  • src/main/rate-limits/service-account-target-selection.test.ts
  • src/main/rate-limits/service-antigravity-usage.test.ts
  • src/main/rate-limits/service-inactive-account-previews.test.ts
  • src/main/rate-limits/service-live-claude-usage.test.ts
  • src/main/rate-limits/service-minimax-usage.test.ts
  • src/main/rate-limits/service-refresh-orchestration.test.ts
  • src/main/rate-limits/service-window-activation.test.ts
  • src/main/rate-limits/service/service-configuration.ts
  • src/main/rate-limits/service/service-full-cycle-application.ts
  • src/main/rate-limits/service/service-full-cycle-preparation.ts
  • src/main/rate-limits/service/service-polling.ts
  • src/main/rate-limits/service/service-result-policy.ts
  • src/main/rate-limits/service/service-state.ts
  • src/main/rate-limits/service/service-types.ts
  • src/main/runtime/rpc/methods/client-ui-schemas.ts
  • src/main/runtime/rpc/methods/client-ui.test.ts
  • src/renderer/src/components/settings/AppearanceWindowSidebarSection.tsx
  • src/renderer/src/components/settings/appearance-status-bar-cursor-toggle-search.ts
  • src/renderer/src/components/settings/appearance-status-bar-ports-toggle-search.ts
  • src/renderer/src/components/settings/appearance-status-bar-search.test.ts
  • src/renderer/src/components/settings/appearance-status-bar-search.ts
  • src/renderer/src/components/stats/GrokUsagePane.test.tsx
  • src/renderer/src/components/status-bar/StatusBarProviderSegment.tsx
  • src/renderer/src/components/status-bar/StatusBarVisibilityMenu.tsx
  • src/renderer/src/components/status-bar/UsageRosterPanel.test.tsx
  • src/renderer/src/components/status-bar/UsageRosterPanel.tsx
  • src/renderer/src/components/status-bar/provider-segment-monthly-window.test.tsx
  • src/renderer/src/components/status-bar/status-bar-agent-gating.test.ts
  • src/renderer/src/components/status-bar/status-bar-agent-gating.ts
  • src/renderer/src/components/status-bar/status-bar-provider-visibility.test.ts
  • src/renderer/src/components/status-bar/status-bar-provider-visibility.ts
  • src/renderer/src/components/status-bar/tooltip.test.ts
  • src/renderer/src/components/status-bar/tooltip.tsx
  • src/renderer/src/components/status-bar/usage-error-copy.test.ts
  • src/renderer/src/components/status-bar/usage-error-copy.ts
  • src/renderer/src/components/status-bar/usage-provider-settings-target.test.ts
  • src/renderer/src/components/status-bar/usage-provider-settings-target.ts
  • src/renderer/src/components/status-bar/use-status-bar-controller.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/store/slices/rate-limits.ts
  • src/renderer/src/store/slices/ui-hydration-workspace-preferences.test.ts
  • src/renderer/src/store/slices/ui/ui-slice-hydration-actions.ts
  • src/renderer/src/web/preload-api/web-rate-limits-api.ts
  • src/shared/cursor-usage-buckets.ts
  • src/shared/persisted-ui-state-types.ts
  • src/shared/rate-limit-types.test.ts
  • src/shared/rate-limit-types.ts
  • src/shared/status-bar-defaults.ts
  • src/shared/ui-chrome-types.ts
🚧 Files skipped from review as they are similar to previous changes (43)
  • src/main/rate-limits/rate-limit-service-test-harness.ts
  • src/main/rate-limits/cursor-fetcher.test.ts
  • src/main/rate-limits/service-window-activation.test.ts
  • src/shared/cursor-usage-buckets.ts
  • src/main/runtime/rpc/methods/client-ui-schemas.ts
  • src/renderer/src/components/status-bar/usage-provider-settings-target.test.ts
  • src/renderer/src/components/stats/GrokUsagePane.test.tsx
  • src/main/rate-limits/service-account-target-selection.test.ts
  • src/main/rate-limits/service-live-claude-usage.test.ts
  • src/main/rate-limits/service-minimax-usage.test.ts
  • src/renderer/src/store/slices/rate-limits.ts
  • src/renderer/src/components/status-bar/tooltip.test.ts
  • src/shared/status-bar-defaults.ts
  • src/renderer/src/components/settings/appearance-status-bar-ports-toggle-search.ts
  • src/renderer/src/components/settings/AppearanceWindowSidebarSection.tsx
  • src/renderer/src/components/status-bar/usage-provider-settings-target.ts
  • src/shared/ui-chrome-types.ts
  • src/shared/rate-limit-types.test.ts
  • src/renderer/src/web/preload-api/web-rate-limits-api.ts
  • src/renderer/src/components/status-bar/status-bar-agent-gating.test.ts
  • src/main/rate-limits/service-inactive-account-previews.test.ts
  • src/renderer/src/components/status-bar/tooltip.tsx
  • src/shared/persisted-ui-state-types.ts
  • src/main/codex-accounts/service-reset-credit-test-fixtures.ts
  • src/main/rate-limits/service-antigravity-usage.test.ts
  • src/renderer/src/components/status-bar/status-bar-agent-gating.ts
  • src/renderer/src/components/settings/appearance-status-bar-search.test.ts
  • src/main/runtime/rpc/methods/client-ui.test.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/components/settings/appearance-status-bar-cursor-toggle-search.ts
  • src/renderer/src/components/settings/appearance-status-bar-search.ts
  • src/renderer/src/components/status-bar/UsageRosterPanel.test.tsx
  • src/renderer/src/components/status-bar/status-bar-provider-visibility.ts
  • src/renderer/src/components/status-bar/provider-segment-monthly-window.test.tsx
  • src/shared/rate-limit-types.ts
  • src/main/rate-limits/cursor-auth.test.ts
  • src/main/rate-limits/cursor-auth.ts
  • src/renderer/src/components/status-bar/usage-error-copy.test.ts
  • src/renderer/src/components/status-bar/UsageRosterPanel.tsx
  • src/renderer/src/components/status-bar/status-bar-provider-visibility.test.ts
  • src/renderer/src/store/slices/ui-hydration-workspace-preferences.test.ts
  • src/main/rate-limits/cursor-fetcher.ts
  • src/main/rate-limits/service-refresh-orchestration.test.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.

ivo922 added 2 commits September 7, 2026 13:08
Drop the Cursor IDE state.vscdb token fallback. The status-bar chip is
CLI-gated (hidden unless cursor-agent is on PATH), so an IDE-only token
could configure auth for a chip the user can never see.

The CLI path also never worked: `cursor-agent status --format json` only
reports `hasAccessToken`, never the token, so it always resolved to
`missing` and the IDE db was the only source that ever produced a chip.

Read the CLI's own session file instead, resolving the path the way the
CLI does: ~/.cursor/auth.json (darwin), %APPDATA%\Cursor\auth.json
(win32), $XDG_CONFIG_HOME/cursor/auth.json (Linux). No process spawn, so
the abort-signal plumbing on the auth read is gone; a token-less file
maps to `missing` (signed out) and filesystem errors are sanitized so
the auth path never reaches the renderer. Copy now points at
`cursor-agent login`.

Also list 'cursor' in the mobile ProviderRateLimitsSchema enum for parity
with the other status-bar providers.
Check `signal.aborted` before assigning the flag so a cycle whose result
is discarded cannot flip the durable Cursor auth signal.

Addresses CodeRabbit review on service-full-cycle-preparation.ts.
@ivo922

ivo922 commented Sep 7, 2026

Copy link
Copy Markdown
Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@nwparker

Copy link
Copy Markdown
Contributor

Heads up — I've opened #22633, which brings Cursor usage tracking together from this PR and the other open attempts (#8669, #11780, #13837, #16815, #18119, #20469, #21833). You're credited as a co-author on the commit; your work is in there.

The one thing I changed structurally: none of the open PRs read the macOS Keychain, and that's where cursor-agent 2026.06+ actually stores the session. On an up-to-date macOS install there's no ~/.cursor/auth.json at all, so the auth.json PRs find nothing, and the state.vscdb PRs find nothing for CLI-only users. #22633 reads keychain → auth.json → Cursor IDE in order, so it works either way.

Could you try it on your account and tell me if the numbers are right? There's an installable build here:

https://github.com/stablyai/orca-adhoc/releases/tag/v1.4.211-adhoc.20260924221219

macOS is signed and notarized, so it installs through Orca's updater. Windows is unsigned — grab orca-windows-setup.exe and run it once (SmartScreen will warn), and every switch after that works in-app. To go back, switch channels in Settings → Updates.

What I'd love checked, since I couldn't: the live numbers on a working paid plan. The only Cursor account on this machine has an expired token, so I verified the credential discovery and every error path end-to-end, but never saw real percentages render. If the pools (Cursor Models / Other Models / On-demand) and the plan total match what cursor.com/dashboard shows you, that's the confirmation I'm missing. If they don't, tell me what you see versus the dashboard and I'll fix it.

Also useful if you're on a plan shape I couldn't test: unlimited/Ultra, on-demand enabled, teams, or the older request-quota billing.

@nwparker

Copy link
Copy Markdown
Contributor

Update: new build, please use this one instead —

https://github.com/stablyai/orca-adhoc/releases/tag/v1.4.211-adhoc.20260924232116

The build I linked earlier has been deleted, because review found three bugs in it that would have hit you directly:

  • An expired CLI token hid a valid Cursor IDE session. If you ever ran cursor-agent login and now work mainly in the IDE, the old build told you "sign-in expired" forever while a perfectly good session sat unused. A live session now wins regardless of where it's stored.
  • A null field in the response threw away the whole reading, so some accounts would have shown no usage at all.
  • Cursor's pools rendered with no number — icon and an empty bar. That one only showed up on a healthy account, which is exactly what I couldn't test.

Same ask as before, and the same one thing I still can't verify myself: do the numbers match your cursor.com dashboard? Install instructions are unchanged — macOS through Orca's updater, Windows via orca-windows-setup.exe once past SmartScreen, Settings → Updates to go back.

@ivo922 ivo922 closed this by deleting the head repository Nov 19, 2026
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