Skip to content

feat(usage): switch the compute/models panes with a button toggle - #974

Open
juandavidr7 wants to merge 2 commits into
mainfrom
feat/usage-pane-button-toggle
Open

feat(usage): switch the compute/models panes with a button toggle#974
juandavidr7 wants to merge 2 commits into
mainfrom
feat/usage-pane-button-toggle

Conversation

@juandavidr7

Copy link
Copy Markdown
Collaborator

What

Replaces the Tabs control at the top of the Usage page with a segmented ButtonGroup toggle (Compute usage / Model usage).

Details

  • Same pane state (pane / setPane) and same gating (showCompute) as before — only the visual control changed from tabs to a button toggle.
  • The active pane's button uses variant=default; the inactive one variant=outline, with aria-pressed for accessibility.
  • Reuses the existing usage.panes.compute / usage.panes.models translation keys — no en/es/pt changes needed.

Notes

The toggle only renders where capabilities.computeUsage === true (hosted cloud / gateway). On desktop/self-host the Usage page shows the account sections directly, with no selector — unchanged behavior. Covered by the existing packages/web/e2e/usage-compute.spec.ts gating.

🤖 Generated with Claude Code

Replace the Tabs control at the top of the Usage page with a segmented
ButtonGroup toggle (Compute usage / Model usage). Same pane state and
gating (showCompute), just a button toggle instead of tabs.
The pane switch's ARIA role changed from tab to button with the
ButtonGroup toggle; update the usage-compute spec's locators to match.
The compute range switch (7/30 days) is still Tabs and stays as role
tab.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant