Skip to content

feat: add monthly cost option to status-bar metric - #41

Merged
Carl723000 merged 1 commit into
ClaudeCodeUsage:mainfrom
PhisicsLollo0:main
Jun 30, 2026
Merged

Carl723000 merged 1 commit into
ClaudeCodeUsage:mainfrom
PhisicsLollo0:main

Conversation

@PhisicsLollo0

@PhisicsLollo0 PhisicsLollo0 commented Jun 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Extends the statusBarMetric setting with a new monthly-cost option
  • When selected, the status bar shows the current calendar month's total cost with a $(calendar) icon instead of today's cost
  • Hover tooltip shows month-to-date cost + full token breakdown (mirrors the today tooltip structure)

Test plan

  • Open Extension Development Host (F5)
  • Open dashboard → ⚙ Settings tab → set "Status-bar metric" to "Monthly cost"
  • Verify status bar shows calendar icon + month total
  • Hover the item and verify tooltip shows monthly breakdown
  • Switch back to "Today's cost" and verify it reverts correctly

🤖 Generated with Claude Code

Extends the statusBarMetric enum with a 'monthly-cost' value so users
can toggle the first status-bar item to show the current calendar
month's total cost instead of today's cost.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@PhisicsLollo0

Copy link
Copy Markdown
Contributor Author

This feature is particularly useful for developers using an enterprise Claude instance that is billed with monthly costs — rather than tracking day-by-day spend, they can see their running monthly total at a glance directly in the status bar.

@Carl723000

Copy link
Copy Markdown
Collaborator

Hi @PhisicsLollo0, I‘ve review the code and it looks fine.

Just one thing before I merge: I don't have an enterprise subscription to see the monthly figure render, so could you run the test plan yourself? Press F5 into the Extension Development Host, set Status-bar metric → Monthly cost in the ⚙ Settings tab, and drop a quick screenshot of the status bar (and the tooltip) here?

Once that looks right I'll merge it. Thanks.

@PhisicsLollo0

Copy link
Copy Markdown
Contributor Author

Hi @Carl723000,

I've run through the full test plan:

  • Set Status-bar metric → Monthly cost in the ⚙ Settings tab — the status bar immediately switches to the calendar icon with the month-to-date total
  • Hovering the item shows the tooltip with the full monthly breakdown (cost, input tokens, output tokens, cache creation, cache read, message count)
  • Switching back to Today's cost reverts correctly

Screenshots below 👇

image

@Carl723000
Carl723000 merged commit 73ac95d into ClaudeCodeUsage:main Jun 30, 2026
1 check passed
@Carl723000

Copy link
Copy Markdown
Collaborator

Thanks @PhisicsLollo0 — merging this for 2.1.1.

Carl723000 added a commit to oxsean/ClaudeCodeUsage that referenced this pull request Jun 30, 2026
… clean format

Resolves the conflicts from ClaudeCodeUsage#41 (monthly-cost metric) and brings in ClaudeCodeUsage#46
(third-party pricing). Replaces this PR's dense quota text
(`5h:50%:2.3h | wk:1%`) with the shared, unit-tested formatter in
quotaFormat.ts so the status bar default stays the airy `5h 6% · wk 1%`;
`quotaFiveHourOnly` / `showResetInStatusBar` still work, reset detail stays
in the tooltip. Keeps oxsean's robust liveWindows()/roll() stale-window
handling and the modal-confirm + move-to-trash session delete unchanged.

Co-Authored-By: Claude <noreply@anthropic.com>
Carl723000 added a commit that referenced this pull request Jun 30, 2026
- Bump version to 2.1.1.
- CHANGELOG: date [2.1.0] as 2026-06-26 (released) and gather the post-2.1.0
  work under a new [2.1.1] section — monthly cost (#41), session actions +
  clean quota + resilience + wider dashboard (#43), pt-BR (#48), account-switch
  fix (#45), third-party pricing accuracy (#46).
- gitignore the whole docs/ tree (local-only planning context pack; synced to a
  personal repo, never shipped here).
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