cmux NEXT settings: agentPane.composerRing chooses context or plan usage for the composer ring

Merged
TE
2d ago
+655-8

Leo: "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."

This is the native and settings side. A separate web PR reads the value and draws the plan usage ring.

What changed

  • New setting agentPane.composerRing, a choice: context (the default, so the ring behaves as it does today) or planUsage (the account's 5-hour and weekly usage limits, when the harness reports them). It sits in Settings > Agents > Message Box right after Show Context Usage. Title "Composer Ring", choices "Context" / "Plan Usage", localized like the neighbouring Attachment View strings. agentPane.showContextUsage is unchanged and still hides or shows the ring.
  • The composer host event (AgentPaneComposerSetting.pageValue) now carries "composerRing": "context" | "planUsage".
  • New page request pane.setComposerRing {ring} writes agentPane.composerRing the same way pane.setAttachmentView {view} writes agentPane.attachmentView, and is added to the page method allowlist. Any other value comes back unsupported and writes nothing.
  • The key is in AgentPaneComposerSettingsSchema.agentSettableKeys (it only changes a look) and is palette-exposed. Because it is a plain string choice, the CLI and MCP get it from the schema without new code.
  • I did not edit the generated exports (schemas/settings/settings-schema.json, schemas/defaults/cmux-next.json, docs/mdm/*, web/data/next-docs/settings-reference.generated.json). Base autofix regenerates them, as it does for other settings PRs.

Red / green

  • Red: 61c3557b2be adds AgentPaneComposerRingSettingTests (default, page value, round-trip, bad value gives a diagnostic, layout placement, agent-settable) and AgentPaneComposerRingRequestTests (decoding, refusal, allowlist). They don't compile without the new types.
  • Green: the next commit adds the setting, the decoding and the allowlist entry.

Observed / Not run

  • Observed: the CmuxNext compile check on the head (result in a comment below).
  • Not run: the Swift test suites, and checking the palette row, cmux settings get|set agentPane.composerRing and MCP settings_set on a tagged build. The web side that draws plan usage is in the separate web PR.

Changelog

  • cmux NEXT: Settings > Agents > Message Box > Composer Ring picks what the composer's ring shows: context usage (the default) or your plan's 5-hour and weekly usage limits.

Agent session: agent session

🤖 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Adds a Composer Ring setting so the ring at the end of the composer can show either context usage or plan usage.

  • New agentPane.composerRing setting in Settings > Agents > Message Box, right after Show Context Usage, with context (default) and planUsage choices.
  • The composer host event now carries composerRing, and a new pane.setComposerRing {ring} page request writes it the same way pane.setAttachmentView writes agentPane.attachmentView; invalid values are refused with no write.
  • Agents can set the ring since it only changes a look, the key is palette-exposed, and all strings are localized. agentPane.showContextUsage is unchanged and still hides or shows the ring either way.

Tests

  • Covers defaults, round-trips, bad-value diagnostics, layout placement, request decoding, and the allowlist.