• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

lsm / neokai / 25473520211

07 May 2026 02:57AM UTC coverage: 82.517% (+0.03%) from 82.484%
25473520211

push

github

web-flow
fix(daemon,web): refresh model cache on Gemini OAuth account changes (#1813)

* fix(daemon,web): refresh model cache on Gemini OAuth account changes

Daemon:
- Clear models cache after Gemini OAuth account add/remove/reauth in
  auth-handlers.ts so provider availability is re-evaluated on the next
  models.list call.
- Add empty-cache fallback in session-handlers.ts models.list: if the
  cached model list is empty and useCache is true, force a refresh
  before returning so newly-available providers are discovered.

Web:
- Dispatch gemini-accounts-changed window event from
  GeminiAccountsPanel after successful account add/remove.
- Listen for the event in useModelSwitcher to reload the model list
  without requiring a page refresh or session switch.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix(daemon): restore FALLBACK_MODELS on refreshModels when cache is empty

After clearModelsCache(), refreshModels() previously left the cache
permanently empty when no providers returned models. Now it restores
FALLBACK_MODELS so the UI and model resolution paths always have a
baseline catalog.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix(daemon): correct cached flag and add unit tests for models.list fallback

- Track whether the empty-cache fallback refresh was triggered so the
  `cached` response flag is `false` when data comes from a fallback
  refresh rather than the actual cache.
- Add dedicated unit tests for the `models.list` handler verifying:
  1. Fallback refresh fires when cache is empty and useCache=true
  2. cached=false when fallback fires
  3. Fallback does NOT fire when forceRefresh is already true
  4. Fallback does NOT fire when useCache=false
  5. Empty response when cache stays empty after refresh

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix(daemon): invalidate in-flight background refreshes on cache clear

Add a monotonic `cacheGeneration` counter to prevent stale background
refreshes fr... (continued)

8198 of 11342 branches covered (72.28%)

Branch coverage included in aggregate %.

61 of 70 new or added lines in 5 files covered. (87.14%)

1 existing line in 1 file now uncovered.

63230 of 75220 relevant lines covered (84.06%)

287.52 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

78.74
/packages/web/src/components/MessageInput.tsx


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc