cmux NEXT composer: the usage ring can show your plan's 5-hour and weekly limits, picked from its right-click
Leo, 2026-11-04: "are we able to disable the context thing on the bottom right? i want to be able to right click disable it. what's its name?" and "likewise, i guess we can turn that into a 5h/weekly usage type thing instead as well for some people. i suppose it'd be relevant sometimes for SOME people to have that surfaced e.g in their session info thing. see codex: [img] see claude: [img]"
References (Leo's screenshots):
- Codex's ring popover: "Usage source: Your Pro plan / Weekly limit 10% left / Credits 56,766 credits / Manage usage".
- Claude desktop's popover, opened from the ring next to the model chip: "Plan usage limits · Ultra See all → / 5-hour limit Resets at 10:00 PM 22% [bar] / Weekly · all models Resets Mon 3:00 PM 41% [bar]".
The ring's name is the usage ring (in code ContextRing). It is the circle at the end of the composer's quiet row.
What changed
- Right-click the ring: it now shows Context Usage and Plan Usage as a checked choice, plus Hide Usage Ring. A right-click on the composer's button row shows a hidden ring again. Before this PR the ring had no right-click of its own.
- Plan Usage mode (
agentPane.composerRing = "planUsage"; the default stays"context"):- The ring draws the plan window closest to its cap.
- Hovering or clicking the ring opens the plan usage popover. It shows each window's name, reset time ("Resets at 10:00 PM", "Resets Mon 3:00 PM") and percent used with a bar, plus Codex's credits.
- See all → opens the account's usage page. It appears only for Claude and Codex chats, where the URL is known.
- Only real numbers: the popover reads only what the harness already reports, through acpmux's
usageLimits(Claude Code'srate_limit_event; Codex'saccount/rateLimits/updatedarrives with #34714). Until a limit has been reported the ring stays on the context, and the popover says "No plan usage reported yet". It never shows a made-up 0%. - Session Info: the Usage section lists Plan limits rows (window, percent and reset time, then credits) in both the web panel and the native panel.
- Settings: the page reads
composerRingfrom the host'scomposervalue and writes it withpane.setComposerRing {ring}. The Swift side (schema descriptor, palette, CLI and MCP through the settings schema, and the request decoding) is #34732. - iOS parity: one row in
cmux-next-ios/verify/parity-mac.md, state "missing", with the reason.
Variants (gallery agent-pane.plan-usage-card, experiment plan-usage-look)
claude-bars(shipped): Claude desktop's card. Each window's name, reset time and percent sit on one line with an accent bar under it, and See all → is at the top. A share reads at a glance, and the layout holds two or three windows plus credits without growing wide.codex-rows: Codex's popover. It shows "Usage source: Your Pro plan" and the share left for each window, with no bars. It has no title when the harness names no plan (Claude never does).compact: one line per window with a short inline bar and the reset time underneath. It is denser, but the bar is too short to read.
Other states in the gallery: claude-bars-near-cap (three windows, one at 96%), none-reported, ring-plan-hover and ring-menu (the right-click).
Tests
webviews/test/plan-usage-ring.test.tsx covers:
- the normalizer: Codex's plan, credits and window length, and nothing reported coming back as nothing;
- window names and reset labels;
- the ring in plan mode (its label, and the popover's contents);
- the ring staying on the context when nothing is reported;
- all three looks;
- the right-click menu writing
pane.setComposerRingandpane.showContextUsage; - the host value parsing;
- Session Info's Plan limits rows.
Red: 82cd522 (the test alone; the modules it imports don't exist). Green: the head, bun test test/plan-usage-ring.test.tsx 8 pass.
Observed / Not run
- Observed:
bun test test/plan-usage-ring.test.tsx(8 pass). Also run, with 58 pass and 0 fail:ContextCard.test.tsx,hideable-chrome.test.tsx,session-info-usage.test.tsx,HarnessStatusCard.dom.test.tsxandnative/overlays.test.tsx. - Not run yet:
bun run check(type check and lint) and the gallery run. Both go to the fleet on this PR, and the results will be posted as a comment. - Not run: a DEV build with a real Claude and a real Codex session. That needs #34714 and #34732 landed.
Changelog
- Added: Right-click the composer's usage ring to show your plan's 5-hour and weekly usage limits instead of context, or to hide it; Session Info's Usage lists the plan limits too.
Agent session: agent session
🤖 Generated with Claude Code
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
The composer's usage ring at the end of the quiet row can now show your plan's 5-hour and weekly usage limits instead of the chat's context, switchable from its new right-click menu, which also hides the ring.
- The right-click offers Context Usage, Plan Usage, and Hide Usage Ring; the button row's right-click restores a hidden ring.
- The right-click opens even before any usage is reported — the ring is drawn
aria-disabledwith an inert click, since WebKit gives a disabled button nocontextmenu. - Plan usage opens a popover with each window's reset time and percent used, plus Codex's credits, drawing only what the harness reported; with nothing reported, the ring stays on the context.
- Session Info's Usage adds Plan limits rows in both the web and native panels.
- The
agentPane.composerRingsetting (default "context") is written throughpane.setComposerRing; the popover layout is theplan-usage-lookexperiment withclaude-barsshipped, pluscodex-rowsandcompactalternatives. - The phone's parity doc lists plan usage as missing.