Skip to content

fix(status-bar): show claude usage reset time#128

Merged
astyfx merged 1 commit into
mainfrom
fix/claude-usage-reset-time
Jul 9, 2026
Merged

fix(status-bar): show claude usage reset time#128
astyfx merged 1 commit into
mainfrom
fix/claude-usage-reset-time

Conversation

@astyfx

@astyfx astyfx commented Jul 9, 2026

Copy link
Copy Markdown
Member

Summary

  • Parse Claude usage resets_at values when they arrive as ISO-8601 strings or numeric strings, not only numbers.
  • Keep the status bar reset fallback from treating falsy numeric values as missing.
  • Add focused Bun tests for Claude usage reset normalization.

Root Cause

Claude usage reset timestamps were being dropped unless resets_at was already a JavaScript number. When the OAuth endpoint returned a string timestamp, the UI received null and showed unknown despite the server sending a real reset time.

Validation

  • bun run typecheck
  • bun test tests/claude-usage-fetcher.test.ts tests/claude-usage-cli-fallback.test.ts

@astyfx astyfx marked this pull request as ready for review July 9, 2026 14:04
@astyfx astyfx requested a review from JongSikLim July 9, 2026 14:04
@astyfx astyfx merged commit dabc115 into main Jul 9, 2026
3 checks passed
@astyfx astyfx deleted the fix/claude-usage-reset-time branch July 9, 2026 14:20
@astyfx astyfx mentioned this pull request Jul 10, 2026
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