Skip to content

Agent: show actual models in usage charts - #1625

Merged
AnthonyRonning merged 4 commits into
masterfrom
fix/usage-actual-models
Nov 17, 2026
Merged

AnthonyRonning merged 4 commits into
masterfrom
fix/usage-actual-models

Conversation

@matthewrball

@matthewrball matthewrball commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

What this PR does

Usage history can hide most of an account's activity in “More models,” making it difficult to see where credits, requests, and tokens are going.

  • Name the five most-used models for the selected date range and metric.
  • Show the remaining models individually in daily hover details and the existing “By model” table, without changing totals.
  • Keep model colors consistent across the chart, table, and recent requests in native and web.

Native, dark and light:

Native usage breakdown, dark Native usage breakdown, light

Web breakdown, dark and light

Web usage breakdown with overflow details, dark Web usage breakdown, light

Notes

  • Replaces Agent: correct usage model highlights #1567. Reuses usage responses and existing localized labels; no additional data fetches.
  • Ranking and palette tests cover date/metric changes, tied or duplicate names, zero usage, overflow totals, and shared colors.
  • Web: 1,201 tests passed; format, typecheck and lint passed with 13 existing warnings. Full native just ci passed before the allocation-only cleanup; the cleanup passed formatting and all 18 usage tests.
  • Local macOS verification used an explicit Swift runtime linker search path. Root Nix checks and live-account billing integration were not run.
  • Screenshots use synthetic data in actual components; the temporary native fixture is not in the PR.

Select named model series from usage in the displayed range and metric. Keep overflow models inspectable and share the active palette across usage views.

Scope-risk: Usage aggregation and presentation in native and web clients; no billing API or catalog changes.

Not-tested: Full native workspace test suite and live-account billing integration. Focused native usage tests, native CI lint, and the full web test suite passed.
@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Maple development preview: https://69238bff.maple-ca8.pages.dev

Commit: e8a4f345a0e0783cf9f4593e1cf630c4e0aeb4f4

Uses development API, billing, flags and PCR configuration. Cloudflare Access applies.

Reuse the existing tuple-ID pattern for model and pricing labels while preserving their accessible names.

Not-tested: Full local CI is partial: 65 runtime/store tests fail on this macOS host. App tests and ci-extra pass.
@matthewrball
matthewrball marked this pull request as ready for review November 17, 2026 06:50
Sort borrowed model IDs before building tooltip labels, avoiding a stored ID copy and the extra overflow structure. Preserve aggregation and deterministic ordering.

Checked cargo fmt and all 18 usage tests.
A model slot past the palette, or a model series without a label, now falls back to the More models color and name. Neither can happen today; this removes the two panics from the render path.

Checked cargo fmt, clippy for maple-agent-app and the 24 usage tests.

Co-Authored-By: Claude <[email protected]>
@AnthonyRonning
AnthonyRonning merged commit 3b8ffaf into master Nov 17, 2026
25 checks passed
@AnthonyRonning
AnthonyRonning deleted the fix/usage-actual-models branch November 17, 2026 22:32
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.

2 participants