Skip to content

Fix menubar per-provider perf and session cache safety#344

Merged
iamtoruk merged 1 commit into
mainfrom
fix/menubar-perf-and-cache-safety
May 17, 2026
Merged

Fix menubar per-provider perf and session cache safety#344
iamtoruk merged 1 commit into
mainfrom
fix/menubar-perf-and-cache-safety

Conversation

@iamtoruk
Copy link
Copy Markdown
Member

Summary

  • Per-provider menubar calls use loadDailyCache() instead of hydrateCache(), dropping response time from 24s to ~2s
  • Session cache wipe guard: scanProjectDirs and parseProviderSources no longer delete all cached entries when called with empty dirs/sources
  • _dirty flag stripped before JSON.stringify to prevent unnecessary 132MB session cache rewrites on every invocation
  • Dead keychain code removed from both ClaudeCredentialStore and CodexCredentialStore (file-based cache only now)

Test plan

  • 860/860 tests pass, tsc clean
  • Tab-switching sequence (all→codex→all→claude→all) verified for week and 30days — provider sums match "all" exactly
  • Cold start (both caches deleted): regenerates correctly, data matches warm values
  • Session cache preserved (132MB) after rapid provider switching
  • 3 independent bug-hunting agents run: no correctness bugs in documented paths

Per-provider menubar calls now use loadDailyCache() instead of hydrateCache(),
splitting history into cache-based and fallback paths. Fixes session cache wipe
when scanProjectDirs/parseProviderSources receive empty dirs. Strips _dirty flag
before session cache serialization to prevent unnecessary 132MB rewrites. Removes
dead keychain code from both credential stores.
@iamtoruk iamtoruk merged commit 58ccf84 into main May 17, 2026
3 checks passed
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.

1 participant