Skip to content

fix: the Claude usage calendar no longer goes blank at startup - #1059

Merged
badcuban merged 1 commit into
mainfrom
fix/claude-calendar-startup
Nov 23, 2026
Merged

badcuban merged 1 commit into
mainfrom
fix/claude-calendar-startup

Conversation

@badcuban

Copy link
Copy Markdown
Collaborator

For a few seconds after every server start, Claude's "Local token activity" calendar was empty until the first status check finished. The pending snapshot seeded from the saved status dropped the calendar on purpose (seedClaudeProviderUsage), and the registry then replaced the saved status with it, because the pending sign-in is unknown.

The pending snapshot now carries the saved calendar:

  • also when the saved reading has no meter windows (carryClaudeAccountUsageForward keeps a calendar-only reading)
  • also for API-key sign-ins, which read the calendar but have no meters

A verified check whose calendar read came back partial keeps the last calendar. An account folder that shares the main history reads no calendar, so it carries none over (keepsTokenCalendar, set by the driver).

The composer's usage popover no longer shows an empty "Claude usage" heading when the only usage is a token calendar, which it doesn't draw. API-key users already hit this before this change.

Tested with a server test of the startup sequence (saved status, then the pending snapshot through the registry merge, then a first check with no calendar), plus the API-key and shared-folder cases, and a popover browser test. Both fail on the old code. Typecheck, lint, the related server tests and the full browser suite pass.

For a few seconds after every server start the Local token activity
calendar was empty until the first Claude status check finished. The
pending snapshot seeded from the saved status dropped the calendar on
purpose, and the registry then replaced the saved status with it, since
the pending sign-in is unknown.

The pending snapshot now carries the saved calendar, also when the saved
reading has no meter windows and for API-key sign-ins (which read the
calendar but have no meters). A verified check whose calendar read came
back partial keeps the last calendar. An account folder that shares the
main history reads no calendar, so it carries none over.

The composer's usage popover no longer shows an empty "Claude usage"
heading when the only usage is a token calendar, which it doesn't draw.
@vercel

vercel Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
threadlines Skipped Skipped Nov 23, 2026 5:14pm UTC

Request Review

@badcuban
badcuban added this pull request to the merge queue Nov 23, 2026
Merged via the queue into main with commit 2c0046b Nov 23, 2026
23 checks passed
@badcuban
badcuban deleted the fix/claude-calendar-startup branch November 23, 2026 17:27

This branch was previously deployed

1 inactive deployment
Preview — aa5310b4 Deployed Nov 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant