codeburn/mac/Sources/CodeBurnMenubar/Data
iamtoruk ca41021a51 fix(menubar): treat the CLI credential store as the source of truth
The menubar kept its own copy of each provider's OAuth grant and refreshed
it on a timer, racing the CLI. Both Claude and Codex use single-use refresh
tokens that rotate on every refresh, so the menubar's self-rotation could
invalidate the user's own CLI login and surfaced as "disconnected" after a
long idle period.

Codex: read ~/.codex/auth.json fresh each cycle; only self-refresh when
last_refresh is older than 8 days; on 401 re-read the source before spending
our token; write rotated tokens back to auth.json (atomic, preserving other
keys); recover from reuse/invalid_grant by re-reading instead of going
terminal.

Claude: never HTTP-refresh the CLI-owned token. On expiry/401 re-read the
keychain with a no-UI query (LAContext.interactionNotAllowed) to adopt a
token the CLI already rotated; when none is available yet, report a transient
sourceTokenStale rather than a terminal disconnect.
2026-05-31 05:01:19 -07:00
..
CapacityEstimator.swift feat(mac): native Swift menubar app + one-command install 2026-04-17 16:55:56 -07:00
ClaudeCredentialStore.swift fix(menubar): treat the CLI credential store as the source of truth 2026-05-31 05:01:19 -07:00
ClaudeSubscriptionService.swift Menubar and CLI hardening from multi-agent audit (#257) 2026-05-06 22:15:11 -07:00
CodexCredentialStore.swift fix(menubar): treat the CLI credential store as the source of truth 2026-05-31 05:01:19 -07:00
CodexSubscriptionService.swift fix(menubar): treat the CLI credential store as the source of truth 2026-05-31 05:01:19 -07:00
CodexUsage.swift Live quota bar inside AgentTab + Claude OAuth refresh gate (#255) 2026-05-06 19:57:17 -07:00
DataClient.swift Add multi-day calendar selection with custom popover UI (#393) 2026-05-24 09:49:59 -07:00
MenubarPayload.swift Add tooling breakdowns to CLI and menubar (#373) 2026-05-21 14:38:14 -07:00
MenubarStatusCache.swift feat(menubar): drop launchd fetcher; GUI writes its own badge backstop 2026-05-30 13:35:07 -07:00
QuotaSummary.swift Live quota bar inside AgentTab + Claude OAuth refresh gate (#255) 2026-05-06 19:57:17 -07:00
SubscriptionRefreshCadence.swift Live quota bar inside AgentTab + Claude OAuth refresh gate (#255) 2026-05-06 19:57:17 -07:00
SubscriptionSnapshotStore.swift Live quota bar inside AgentTab + Claude OAuth refresh gate (#255) 2026-05-06 19:57:17 -07:00
SubscriptionUsage.swift feat(mac): native Swift menubar app + one-command install 2026-04-17 16:55:56 -07:00
UpdateChecker.swift fix(menubar): re-check CLI version on every update cycle 2026-05-27 06:35:00 -07:00