Skip to content

Fix Cursor pace detail when billing cycle quota is depleted#1824

Open
Yuxin-Qiao wants to merge 1 commit into
steipete:mainfrom
Yuxin-Qiao:fix/cursor-depleted-pace
Open

Fix Cursor pace detail when billing cycle quota is depleted#1824
Yuxin-Qiao wants to merge 1 commit into
steipete:mainfrom
Yuxin-Qiao:fix/cursor-depleted-pace

Conversation

@Yuxin-Qiao

@Yuxin-Qiao Yuxin-Qiao commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Hide Cursor billing-cycle pace projection (deficit + run-out copy) once remainingPercent reaches zero.
  • Align Cursor with UsageStore.weeklyPace and CLI behavior so depleted quotas no longer show a misleading "Runs out now" / "即将耗尽" label.
  • Cursor-only diff: no workflow or unrelated automation changes.

Behavior proof (redacted)

Live CLI (CodexBarCLI usage --provider cursor, 2026-07-02)

== Cursor (web) ==
Total: 0% left [------------]
Resets Jul 4 at 11:06 AM
Auto: 0% left [------------]
Resets Jul 4 at 11:06 AM
API: 0% left [------------]
Resets Jul 4 at 11:06 AM
Account: yuxin.qiao@gatech.edu
Plan: Cursor Pro_Student

No pace / deficit / run-out lines are emitted for depleted lanes (matches CLI remainingPercent > 0 guard).

Menu model regression (swift test --filter CursorMenuCardModelTests)

✔ Test "cursor billing cycle metrics hide pace when quota is depleted" passed
✔ Test "cursor billing cycle metrics show deficit and run out details" passed
✔ Test "legacy request plan shows single requests bar with count" passed
✔ Test "team pool shows personal spend and changes height fingerprint" passed
✔ Test run with 4 tests in 1 suite passed

Depleted fixture asserts Total/Auto/API keep 0% left while detailLeftText, detailRightText, and pacePercent are all nil.

Test plan

  • swift test --filter CursorMenuCardModelTests (4/4)
  • make check
  • Live CLI proof above (0% remaining, no pace lines)
  • Menu model regression proof above
  • Optional reviewer UI spot-check in app menu (bars remain; pace detail hidden at 0%)

@clawsweeper

clawsweeper Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge. Reviewed July 2, 2026, 12:42 AM ET / 04:42 UTC.

Summary
Adds a Cursor-only guard that suppresses billing-cycle pace detail when remainingPercent is zero and adds a menu-card regression test for depleted Total/Auto/API lanes.

Reproducibility: yes. from source inspection: current main computes Cursor billing-cycle pace for depleted windows, while the CLI and store paths already suppress pace when remaining percent is zero. I did not run live provider checks because repository policy warns against unrequested real account/keychain validation.

Review metrics: 1 noteworthy metric.

  • Diff surface: 2 files changed, +49/-1. The force-pushed head is limited to Cursor display logic and one regression test, so the earlier unrelated automation concern no longer applies.

Merge readiness
Overall: 🦞 diamond lobster
Proof: 🦞 diamond lobster
Patch quality: 🦞 diamond lobster
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Next step before merge

  • No ClawSweeper repair job is needed; this implementation PR is awaiting ordinary maintainer merge review and required checks.

Security
Cleared: The diff only changes Swift menu-model logic and a focused test, with no CI, dependency, credential, or supply-chain surface.

Review details

Best possible solution:

Land the focused guard and regression test once normal required checks and maintainer merge review complete.

Do we have a high-confidence way to reproduce the issue?

Yes from source inspection: current main computes Cursor billing-cycle pace for depleted windows, while the CLI and store paths already suppress pace when remaining percent is zero. I did not run live provider checks because repository policy warns against unrequested real account/keychain validation.

Is this the best way to solve the issue?

Yes, this is the narrow maintainable fix because it mirrors existing depleted-window suppression while preserving non-depleted Cursor pace details and adding a focused regression test.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 6ab1cbb7daee.

Label changes

Label changes:

  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.

Label justifications:

  • P2: This fixes a contained user-visible Cursor display bug with limited blast radius.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body provides copied live Cursor CLI output from a depleted account plus menu-model regression output showing the after-fix behavior.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides copied live Cursor CLI output from a depleted account plus menu-model regression output showing the after-fix behavior.
Evidence reviewed

What I checked:

Likely related people:

  • steipete: Git blame ties the helper to commit 4d1055f, and history shows the Cursor billing-cycle pace feature was introduced in commit 9182428. (role: introduced current helper and Cursor billing-cycle pace behavior; confidence: high; commits: 91824283af5f, 4d1055f9e546; files: Sources/CodexBar/MenuCardView+ModelHelpers.swift, Sources/CodexBar/MenuCardView.swift, Tests/CodexBarTests/CursorMenuCardModelTests.swift)
  • Yuxin-Qiao: Current-main history includes prior merged work touching the same menu-card model helper and menu-card behavior, separate from this PR. (role: recent adjacent contributor; confidence: medium; commits: 421bf576abc0; files: Sources/CodexBar/MenuCardView+ModelHelpers.swift, Sources/CodexBar/MenuCardView.swift)
  • Kentoku Matsunami: The CLI pace rendering path used as alignment evidence was recently updated in commit 5bfd1d1. (role: adjacent CLI pace contributor; confidence: medium; commits: 5bfd1d1474bb; files: Sources/CodexBarCLI/CLIRenderer.swift)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

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

Copy link
Copy Markdown

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: 04f5f1ff01

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

@@ -1,188 +0,0 @@
name: Monitor Upstream Changes

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Restore the upstream monitor workflow

Deleting this file removes the only scheduled/manual GitHub Actions entry point for upstream checks, while the repo still documents using .github/workflows/upstream-monitor.yml and Actions → Monitor Upstream Changes in docs/FORK_SETUP.md and docs/UPSTREAM_STRATEGY.md. With this commit, maintainers no longer get the advertised upstream-sync issue updates unless the workflow is restored or the docs/scripts are updated to a replacement process.

Useful? React with 👍 / 👎.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. labels Jul 1, 2026
@Yuxin-Qiao Yuxin-Qiao force-pushed the fix/cursor-depleted-pace branch from 7795ceb to b0643a6 Compare July 2, 2026 04:24
@clawsweeper clawsweeper Bot removed the merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. label Jul 2, 2026
@Yuxin-Qiao

Copy link
Copy Markdown
Contributor Author

Addressed ClawSweeper feedback:

  • Restored cursor-only scope on b0643a6e (no upstream-monitor.yml deletion).
  • Added redacted live CLI output and menu-model test proof to the PR body.
  • Local validation: CursorMenuCardModelTests 4/4 pass, make check pass.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 2, 2026

Copy link
Copy Markdown

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal priority bug or improvement with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant