Fall back to Extra usage spent in Claude tray title#511
Conversation
Claude Enterprise accounts only enforce the monthly extra_usage $ budget and return no Session/Weekly limits, so the tray title showed --% even though the popup listed the spend correctly. Make Weekly and Extra usage spent primary candidates (priority 2 and 3) so the selector falls through to the $-budget bar when Session is absent. https://claude.ai/code/session_01UFtJ66Wztv3ngheTvJYJ1d
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds regression coverage to ensure the tray’s primary progress selection can fall back to Claude’s “Extra usage spent” bar (notably for enterprise / budget-only accounts) and updates Claude plugin metadata ordering to support that selection.
Changes:
- Added a
getTrayPrimaryBarstest covering fallback selection when only “Extra usage spent” is present. - Added a Claude plugin test ensuring “Extra usage spent” emits a valid progress line (finite
used/limit,limit > 0) whenmonthly_limitis provided. - Updated
plugins/claude/plugin.jsonto assignprimaryOrderto “Weekly” and “Extra usage spent”.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/lib/tray-primary-progress.test.ts | Adds regression test for primary bar fallback to “Extra usage spent”. |
| plugins/claude/plugin.test.js | Adds regression test validating “Extra usage spent” progress line shape for tray fraction computation. |
| plugins/claude/plugin.json | Adjusts primary ordering so Claude primary candidates can include “Weekly” and “Extra usage spent”. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
That is a very good addition, and I appreciate it. I never really think about enterprise customers. It is one of these things that gets put on the back burner due to the plugin system, which we are looking to change. In the meantime, I'll take a look at this for the next version. Thank you! |
|
Thanks for the feedback Robin! This is actually my first ever contribution
to an open source project :) I really like the product!
I’m using at work and a few of my peers are too!
…On Wed, 27 May 2026 at 6:42 pm, Robin Ebers ***@***.***> wrote:
*robinebers* left a comment (robinebers/openusage#511)
<#511 (comment)>
That is a very good addition, and I appreciate it. I never really think
about enterprise customers. It is one of these things that gets put on the
back burner due to the plugin system, which we are looking to change.
In the meantime, I'll take a look at this for the next version. Thank you!
—
Reply to this email directly, view it on GitHub
<#511?email_source=notifications&email_token=B6YNWNJZFICLQ4O2PEYN6S3442S77A5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINJVGI4TCMRUGI32M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#issuecomment-4552912427>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/B6YNWNOONQ3A7XJ23LAGCBT442S77AVCNFSM6AAAAACZM2YRHKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DKNJSHEYTENBSG4>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/B6YNWNJCIUTNDSB7GWH7SKT442S77A5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINJVGI4TCMRUGI32M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KUZTPN52GK4S7NFXXG>
and Android
<https://github.com/notifications/mobile/android/B6YNWNMKNFRSANPLR7YOMTL442S77A5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINJVGI4TCMRUGI32M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2K4ZTPN52GK4S7MFXGI4TPNFSA>.
Download it today!
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Summary
extra_usage$ budget — the API returns no Session/Weekly limits, so the tray title showed--%(provider style) or was blanked (donut/bars) even though the popup correctly listed the spend.primaryOrderto Weekly (2) and Extra usage spent (3) inplugins/claude/plugin.json. The tray selector already falls through to the first candidate present in live data, so a $-budget-only response now resolves to the Extra usage bar.Before / After
Tray title now reads
92%(was--%) for an Enterprise account whose only enforced limit is the monthlyextra_usage$ budget. Verified across all three icon styles (provider, donut, bars).Test plan
bun run test— added two regressions (plugin probe emitsextra_usageas a progress line with finite limit; tray selector resolves Session → Weekly → Extra usage spent chain).bun run build(tsc + vite) clean.bun tauri devon a Claude Enterprise account — tray title shows92%(was--%) across provider, donut, and bars styles.Sessionstill wins becauseprimaryOrder: 1<2<3).Summary by cubic
Fixes the Claude tray title so Enterprise accounts with only a monthly $ budget show a percentage instead of --%, across provider, donut, and bars. Falls back to “Extra usage spent” when Session/Weekly limits are missing.
primaryOrderfor “Weekly” (2) and “Extra usage spent” (3) inplugins/claude/plugin.jsonto enable Session → Weekly → Extra usage spent fallback (also covers Weekly-only cases).Written for commit 2d48fc7. Summary will update on new commits. Review in cubic