codeburn/mac/Sources/CodeBurnMenubar/Data
iamtoruk 0fd8419bfd fix(menubar): keep the newer credential copy and drop the sticky retry flag
Three fixes in the store read path.

A locked keychain no longer reads as a disconnect. currentRecord() treated
any failure from readOurCache() as fatal, and a nil as "the item vanished",
which cleared isBootstrapCompleted. .unavailable now falls back to the last
known record and leaves the flag set.

Recency. A Keychain hit always won and the legacy file was then unlinked,
even when the file was newer. This service name has been in use since May
2026, so an upgrading install can hold a months-old item beside a file the
pre-migration build wrote today; the older token won and the newer copy was
deleted. Both stores now compare first (expiresAt for Claude, lastRefresh for
Codex) and adopt the later one before anything is removed. Codex matters most
here: serving a spent rotating refresh token ends in a terminal invalid_grant.

lastLegacyCleanupFailed is gone. It was set on every cleanup path and read
only by tests, never surfaced. The retry it was meant to signal already
happens, because the unlink is attempted on every successful read.

Also serializes migrate + unlink under the existing SafeFile.withExclusiveLock
so two menubar instances cannot race on the same legacy file, and drops a
leftover no-op local.
2026-08-19 11:43:32 -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): keep the newer credential copy and drop the sticky retry flag 2026-08-19 11:43:32 -07:00
ClaudeSubscriptionService.swift fix(menubar): migrate Claude/Codex caches to namespaced Keychain 2026-08-19 15:21:28 +05:30
CLIClaudeConfig.swift feat(menubar): configure CLAUDE_CONFIG_DIRS via Settings (#434) (#436) 2026-06-06 02:30:46 +02:00
CodeBurnCacheDirectory.swift perf(desktop): share cache state and eliminate duplicate cold hydration 2026-08-12 17:16:41 +03:00
CodexCredentialStore.swift fix(menubar): keep the newer credential copy and drop the sticky retry flag 2026-08-19 11:43:32 -07:00
CodexSubscriptionService.swift fix(menubar): migrate Claude/Codex caches to namespaced Keychain 2026-08-19 15:21:28 +05:30
CodexUsage.swift feat(codex): show the credit limit on credit-metered ChatGPT workspaces 2026-07-27 08:19:59 -04:00
DataClient.swift fix(desktop): close cache and lifecycle review gaps 2026-08-12 20:31:17 +03:00
KimiQuotaPresentation.swift fix(menubar): keep showing Kimi quota when the login is idle, stamp stale data 2026-07-26 06:35:13 -07:00
KimiSubscriptionService.swift menubar: add Kimi Code subscription quota tracking 2026-07-23 21:31:55 +02:00
MenubarPayload.swift feat(app,menubar): surface parity — Spend punchcard in the app, Pull requests strip in the menubar 2026-08-10 14:29:26 -07:00
MenubarStatusCache.swift perf(desktop): share cache state and eliminate duplicate cold hydration 2026-08-12 17:16:41 +03:00
QuotaPace.swift menubar: linear pace on Codex quota windows — deficit/reserve, projection, run-out ETA (#726) (#728) 2026-07-20 05:21:43 -07:00
QuotaSummary.swift Live quota bar inside AgentTab + Claude OAuth refresh gate (#255) 2026-05-06 19:57:17 -07:00
ServeConnection.swift fix(desktop): close cache and lifecycle review gaps 2026-08-12 20:31:17 +03:00
SubscriptionRefreshCadence.swift Live quota bar inside AgentTab + Claude OAuth refresh gate (#255) 2026-05-06 19:57:17 -07:00
SubscriptionSnapshotStore.swift perf(desktop): share cache state and eliminate duplicate cold hydration 2026-08-12 17:16:41 +03:00
SubscriptionUsage.swift fix(menubar): provider-correct plan tab copy; surface model-scoped weekly limits 2026-07-02 19:37:51 +02:00
UpdateChecker.swift fix(menubar): clarify update failure status 2026-07-26 15:20:13 +08:00
UsageDataChangeGuard.swift docs(dsh): finish the provider registration checklist 2026-08-17 10:59:58 -07:00
UsageRefreshCadence.swift menubar: skip unchanged background refreshes, 120s AC idle cadence, utility QoS for tick spawns (#703) (#704) 2026-07-16 15:11:25 -07:00