Align MCP Cursor remaining_percent with strip ranking (SBS-1076) - #408
Conversation
MCP get_status used generic exhausted-first ranking and dropped cursor-api / on-demand from the widget snapshot, so Plan could hide Auto and docs claiming strip parity were wrong. Rank Cursor with cursorStripWindow and persist the same extras the strip uses. Co-authored-by: Tyler <tyler@southboundsoftware.com>
|
Warning Review limit reachedNext included review available in 41 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (9)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe change adds shared constraining-window ranking for Claude, Codex, and Cursor. Cursor extra windows are persisted and exposed through MCP. Desktop seat selection and MCP status now use the same ranking rules. ChangesCursor quota-window ranking
Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: ⚪ Minimal · up to Cursor usage windows are persisted and consistently selected for desktop and MCP status output, with no remaining actionable merge risk identified. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 56.45% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 62 functions across 7 files. (2 skipped: 2 unsupported.) ✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
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 |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
ceiling | 3c84609 | Commit Preview URL Branch Preview URL |
Sep 07 2026, 05:54 PM |
On-demand spend binds the strip even when Auto still has room. Assert that, and keep unused on-demand as the Plan-must-not-win case. Co-authored-by: Tyler <tyler@southboundsoftware.com>
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_48aef84c-3ec9-4666-8347-72942785fc68) |
Summary
MCP
get_status.remaining_percentafter SBS-1055 / #383 used genericwindow_outranksover primary/secondary/tertiary. That is correct for Claude/Codex, but Cursor’s strip usescursorStripWindow: Auto and API are parallel pools, so a hotter Plan must not hide Auto, and a maxed API must not hide Auto that still has room. The widget snapshot also still omittedcursor-api/cursor-on-demandwhile CLI.md claimed strip parity.This change:
extra_rate_windowsonwidget-snapshot.json(including Cursor API and on-demand amounts).remaining_percentwith the samecursorStripWindowrules as the desktop strip.get_usage/get_status.usage.Related issue
Fixes SBS-1076 (follow-up to SBS-1055 / #383).
Affected areas
codexbar mcpget_status/get_usage)Validation
powershell.exe -ExecutionPolicy Bypass -NoProfile -File scripts\local-check.ps1(Windows host script; not run here)remaining_percent5 instead of 45; Auto 100% / API 40% bound 0 instead of 60.cargo test --manifest-path rust/Cargo.toml— 1202 lib + 32 bin passedcargo fmt --all --checkon both manifests — cleanc160c56— 10/10 checks passed (Frontend, Rust/shared, Rust/desktop, Rust required, CodeQL)c160c56.UI / tray proof
Notes for reviewers
Do not merge until review.
Note
Align Cursor
remaining_percentwith strip ranking via shared constraining window selectorconstraining_rate_windowselector in constraining.rs that dispatches Cursor entries tocursor_strip_windowand all other providers togeneric_constraining_window. Cursor ranking treats Auto, API, and on-demand as parallel actionable pools, surfacing on-demand after included lanes are exhausted or once it has spend, and falling back to Plan.get_statusand the desktop taskbar strip now use the same provider-aware selector instead of the old local primary/secondary/tertiary ranking. The MCP-localconstraining_rate_window,window_outranks, andreset_at_rankhelpers are removed.WidgetProviderEntryand MCP usage JSON now persist and serializeextra_rate_windows(Cursor API, on-demand, etc.) with id, title, rate fields, and optional amount data. Older snapshots deserialize with an empty extras list.WidgetProviderEntrygains a serdeextra_rate_windowsfield that is omitted when empty but must be tolerated by out-of-tree readers parsing the snapshot JSON.Macroscope summarized 3c84609.
Summary by CodeRabbit
New Features
Bug Fixes
Documentation