Conversation
Add descriptor-owned named extra percentages and hide unavailable allowances. Refresh the strip when Grok Bot changes independently of Cursor's other lanes. Keep V3/V2/V1 projections beside V4 so downgrades preserve reset choices and older-version edits still win when upgrading again. Fixes #3309 Refs #3712 Co-authored-by: yicone <yicone@gmail.com>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: de88f94070
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| { | ||
| switch token { | ||
| case .hidden: return nil | ||
| case let .extraPercent(id): return data.extraWindow(id) == nil ? nil : token |
There was a problem hiding this comment.
Remove adjacent separators when the named extra vanishes
When a user configures a natural layout such as Cursor % · Grok Bot %, an unavailable Grok Bot window makes this branch remove only the extraPercent token, leaving the explicit .separatorDot behind; renderUncached then renders a dangling trailing dot (or a leading one when the order is reversed). Since this token is expected to disappear dynamically when its allowance is absent, the resolution step should also clean up an adjacent structural separator.
Useful? React with 👍 / 👎.
|
Codex review: needs changes before merge. Reviewed September 21, 2026, 6:35 AM ET / 10:35 UTC. ClawSweeper reviewWhat this changesAdds a selectable Cursor Grok Bot percentage to menu-bar layouts, refreshes it independently, and preserves older-readable layouts alongside new V4 storage. Merge readiness⛔ Needs changes before merge - 2 items remain Keep open: the capability is absent from current main and v0.63.0, and this owner-sponsored implementation remains useful. One previously reported rendering defect remains actionable. Priority: P2 Review scores
Verification
How this fits togetherCodexBar turns provider usage snapshots and saved layout choices into menu-bar text. This change exposes Cursor’s existing Grok Bot allowance through that shared editor and renderer. flowchart LR
A[Cursor usage snapshot] --> B[Named allowance eligibility]
B --> C[Layout editor]
C --> D[Saved layout and older projections]
D --> E[Menu-bar renderer]
B --> E
A --> F[Refresh change detection]
F --> E
E --> G[Percentage and accessibility text]
Before merge
Findings
Agent review detailsSecurityNone. Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep the shared named-allowance design and compatibility projections, with unavailable allowances collapsing their structural separators cleanly. Do we have a high-confidence way to reproduce the issue? Yes, by source inspection: render a Cursor layout containing a percentage, separator dot, and Grok Bot token with no available named window; the dot survives. No runtime reproduction was executed. Is this the best way to solve the issue? Yes, extending the existing provider-driven layout path avoids another provider or probe; the separator handling needs a narrow correction. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against d8d0f3394989. LabelsLabel changes:
Label justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
Add descriptor-owned named extra percentages and hide unavailable allowances. Refresh the strip when Grok Bot changes independently of Cursor's other lanes. Keep V3/V2/V1 projections beside V4 so downgrades preserve reset choices and older-version edits still win when upgrading again. Fixes #3309 Refs #3712 Co-authored-by: yicone <yicone@gmail.com> (cherry picked from commit de88f94)
Add descriptor-owned named extra percentages and hide unavailable allowances. Refresh the strip when Grok Bot changes independently of Cursor's other lanes. Keep V3/V2/V1 projections beside V4 so downgrades preserve reset choices and older-version edits still win when upgrading again. Fixes #3309 Refs #3712 Co-authored-by: yicone <yicone@gmail.com> (cherry picked from commit de88f94)
Cursor layouts can now pin Grok Bot % beside the standard usage lanes. The token reads Cursor's existing named allowance, follows the used/remaining preference, disappears when the allowance is unavailable, and refreshes when only Grok Bot changes. Cursor registers it through the shared descriptor capabilities.
The full layout uses V4 storage with V3/V2/V1 projections. Released 0.60.x decoders reject an unknown token and otherwise fall back to V2, losing explicit reset-window selections. The V3 projection omits only the named-extra token, preserving reset choices; unchanged downgrades retain the full layout on return, while older-version edits take precedence. A shared projection helper replaces repeated filtering logic.
Thanks @yicone for the token and persistence work in #3712.
Validation
CODEXBAR_SUPPRESS_TEST_KEYCHAIN_ACCESS=1 swift test --jobs 2 --filter MenuBarLayoutNamedExtraTests— 1 test failed because the unknown extra token rejected the saved layout.CODEXBAR_SUPPRESS_TEST_KEYCHAIN_ACCESS=1 swift test --jobs 2 --skip-build --filter MenuBarLayoutNamedExtraTests— 4 tests passed, including the original regression.CODEXBAR_SUPPRESS_TEST_KEYCHAIN_ACCESS=1 CODEXBAR_GROK_LAYOUT_SCREENSHOT_DIR=docs/screenshots swift test --jobs 2 --filter 'MenuBarLayout|MenuBarResetToken|SettingsStoreTests|SettingsStoreMergeIconStackedTests|StatusItemIconObservationSignatureTests|StatusItemLayoutPaceSignatureTests|CursorSandUsageTests|ProviderArchitectureGatekeeperTests|MenuBarPercentWindowPreferenceTests|CursorMenuCardModelTests|MistralSubscriptionBudgetTests'— 375 tests in 17 suites passed.make check— zero SwiftFormat changes needed and zero SwiftLint violations; repository checks passed.Synthetic renderer proof
These images use the production text renderer and synthetic usage values. No live account or running menu-bar app was accessed.
Fixes #3309
Closes #3712