Align MCP Cursor remaining_percent with strip ranking (SBS-1076) - #408
Align MCP Cursor remaining_percent with strip ranking (SBS-1076)#408tsouth89 wants to merge 2 commits into
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 40 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: Pro Plus Run ID: 📒 Files selected for processing (9)
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 | c160c56 | Commit Preview URL Branch Preview URL |
Aug 23 2026, 10:34 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 MCP
get_statusremaining_percentwith desktop strip ranking for Cursorcore::constraining_rate_windowthat delegates tocursor_strip_windowfor Cursor andgeneric_constraining_windowfor other providers, so ranking logic lives in one placeWidgetProviderEntrygainsextra_rate_windows: Vec<NamedRateWindow>(e.g.cursor-api,cursor-on-demand) so snapshots and MCP usage payloads carry the lanes needed for strip-consistent rankingCeilingMcp.get_statusnow derivesremaining_percentfromWidgetProviderEntry::constraining_rate_windowinstead of local ranking helpers, which are removedmost_constrained_per_provider) andwidget_entry_from_usage_snapshotnow usesnapshot_constraint_used_percentto match the desktop stripget_statusranking for Cursor now considers Auto/API/on-demand lanes instead of Plan alone;get_usagepayloads now includeextra_rate_windows; legacy snapshots withoutextra_rate_windowsstill deserialize with an empty listMacroscope summarized c160c56.