Skip to content

Enterprise plan display: show spend vs limit as primary metric#11

Draft
jamie--stewart wants to merge 1 commit into
richhickson:mainfrom
jamie--stewart:main
Draft

Enterprise plan display: show spend vs limit as primary metric#11
jamie--stewart wants to merge 1 commit into
richhickson:mainfrom
jamie--stewart:main

Conversation

@jamie--stewart

Copy link
Copy Markdown

Summary

On enterprise plans, session and weekly utilisation limits don't apply — the API returns 0% for both, making those rows actively misleading. The overage row (dollar spend vs monthly limit) is the only meaningful signal. This PR makes that the default experience for enterprise accounts, while leaving non-enterprise behaviour unchanged.

What changed

  • UsageView: when extraUsageEnabled is true, renders only the spend row; non-enterprise accounts continue to see the existing session/weekly/sonnet rows
  • statusEmoji (UsageManager): routes through overage percentage for threshold colouring on enterprise, rather than the always-zero session/weekly utilisation
  • Menubar label (AppDelegate): shows 🟢 $14 for enterprise accounts instead of 🟢 0%

Adds ClaudeUsageTests/EnterpriseDisplayTests.swift with 14 unit tests covering extraUsagePercentage calculation, statusEmoji routing for both plan types, and menubar label formatting.

Note: the v1.8 upstream commit (which added the extra_usage API parsing and OverageRow view) was merged from upstream before this change was made.

🤖 Generated with Claude Code

On enterprise plans, session/weekly utilisation rows are always 0% and
the overage (dollar spend) row is the only meaningful signal. This
change makes that the default view for enterprise accounts:

- UsageView: show only the spend row when extraUsageEnabled; non-enterprise
  accounts continue to see the existing session/weekly/sonnet rows
- statusEmoji: uses overage percentage for threshold colouring when on
  enterprise, rather than the always-zero session/weekly utilisation
- Menubar: shows "🟢 $14" instead of "🟢 0%" for enterprise accounts

Adds ClaudeUsageTests with 14 unit tests covering extraUsagePercentage,
statusEmoji routing, and menubar label formatting for both plan types.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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