Repository navigation
Surface the weekly Opus limit in the status bar (opt-in showOpusWeekly) - #38
Merged
Carl723000 merged 1 commit intoJun 17, 2026
Conversation
The OAuth usage response already includes seven_day_opus and the quota tooltip shows it, but the status-bar quota item only displays the 5h and weekly figures - so heavy Opus users have no at-a-glance signal for their weekly Opus cap. Add a showOpusWeekly setting (default off) that appends opus:NN% after the weekly figure, mirroring the existing showCost/showContext display toggles. Off by default, so current users see no change.
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds an opt-in setting to display the weekly Opus quota utilization alongside existing 5-hour and weekly quota indicators in the VS Code status bar.
Changes:
- Introduced
claudeCodeUsage.showOpusWeeklyconfiguration flag (types + package.json). - Extended status bar quota rendering to include
opus:NN%when available and enabled. - Updated README(s) and changelog to document the new setting.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/types.ts | Adds showOpusWeekly to extension configuration typing. |
| src/statusBar.ts | Adds a flag and rendering logic for weekly Opus utilization in the quota item. |
| src/extension.ts | Plumbs showOpusWeekly from VS Code config into the status bar manager. |
| package.json | Declares the new claudeCodeUsage.showOpusWeekly setting and its description. |
| README.md | Documents the new setting in the config table. |
| README-en.md | Documents the new setting in the English README. |
| CHANGELOG.md | Notes the newly added setting under “Added”. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
175
to
+179
| const live = this.liveWindows(usageLimits); | ||
| const fiveHour = live?.five_hour; | ||
| const weekly = live?.seven_day; | ||
| if (!fiveHour && !weekly) { | ||
| const opus = live?.seven_day_opus; | ||
| if (!fiveHour && !weekly && !(this.showOpusWeekly && opus)) { |
| * immediately; re-showing happens on the next data update (the caller | ||
| * triggers a refresh right after a config change). */ | ||
| setVisibility(showCost: boolean, showContext: boolean): void { | ||
| setVisibility(showCost: boolean, showContext: boolean, showOpusWeekly: boolean = false): void { |
| I18n.setCompactNumbers(config.compactNumbers); | ||
| I18n.setTimezone(config.timezone); | ||
| this.statusBar.setVisibility(config.showCost, config.showContext); | ||
| this.statusBar.setVisibility(config.showCost, config.showContext, config.showOpusWeekly); |
Carl723000
approved these changes
Jun 17, 2026
Carl723000
added a commit
to Carl723000/ClaudeCodeUsage
that referenced
this pull request
Jun 26, 2026
…mented on the new dashboard-settings architecture, original PR ClaudeCodeUsage#38 by @wheelbarrel00 retained as a merged ancestor)
Carl723000
added a commit
that referenced
this pull request
Jun 26, 2026
Integrate the leftover upstream PR #38 (@wheelbarrel00) that never shipped with the unreleased v2.0.3. It adds `showOpusWeekly` (opt-in, default off): when on, the quota item appends `opus:NN%` after the 5h / weekly figures, so heavy Opus users get an at-a-glance weekly Opus signal. This branch diverged from upstream at PR #31, so #38 wasn't present; cherry-pick would conflict with the status-bar changes made here (setVisibility signature, cost/tokens metric, all-off entry icon). Re-applied faithfully instead, adapted to the dashboard-managed settings: - settings.ts: showOpusWeekly in the Status-bar group (state-stored, default off). - statusBar.ts: 5th setVisibility param; updateQuota appends opus:NN% and keeps the item visible when only the Opus window is present. - extension.ts / types.ts: thread the setting through. - README / README-zh-CN / CHANGELOG: documented and credited @wheelbarrel00 (#38). Compile clean; 11/11 node:test green. Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: wheelbarrel00 <103789673+wheelbarrel00@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The OAuth usage response already includes the weekly Opus window (
seven_day_opus) and the quota hover tooltip shows it, but the status-bar quota item only ever renders the 5-hour and weekly figures. Anyone running Opus-heavy workloads has no at-a-glance read on their weekly Opus cap. This adds an opt-inclaudeCodeUsage.showOpusWeeklysetting that appendsopus:NN%after the weekly figure, mirroring the existingshowCost/showContextdisplay toggles.Linked issues
None.
Type of change
feature(minor)How was this tested?
npm run compileis clean. Loaded in the Extension Development Host: withshowOpusWeeklyon, the quota item renders5h:.. wk:.. opus:..; with it off the bar is unchanged from current behaviour. My account had no live weekly-Opus window during testing, so I verified theopus:NN%segment specifically by feeding a syntheticseven_day_opuswindow through the usage path -- it renders afterwk:as intended and is absent when no Opus window exists.Checklist
npm run compileis cleanopus:label is hardcoded to match the existing5h:/wk:sibling labels instatusBar.ts(those aren't routed throughI18neither) -- happy to migrate all three if you'd preferCHANGELOG.mdupdatedREADME.md/README-en.mdupdated (localized READMEs left for translators rather than pasting untranslated English -- glad to add if you point me at conventions)false)