fix(menubar): track isOverDailyBudget so the flame re-tints on budget crossings (#507)

The menubar refresh observation block read displayMetric and the two budget
values, but not the derived isOverDailyBudget (which also depends on
todayPayload). It worked only because payload/menubarPayload happened to touch
the same cache storage. Read isOverDailyBudget explicitly so the flame re-tints
when today's usage crosses the budget, and so the dependency survives any future
cache refactor.
This commit is contained in:
Resham Joshi 2026-06-18 13:23:57 +02:00 • committed by GitHub
parent 8467b104cc
commit 8794ddeb83
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -590,6 +590,11 @@ final class AppDelegate: NSObject, NSApplicationDelegate, NSPopoverDelegate {
_ = self.store.displayMetric
_ = self.store.dailyBudget
_ = self.store.dailyTokenBudget
// Read the derived flag so the flame re-tints when today's usage
// crosses the budget, not only when the budget value itself changes.
// This also makes the dependency on todayPayload explicit instead of
// relying on payload/menubarPayload happening to touch the same cache.
_ = self.store.isOverDailyBudget
// Track the live-quota state too so the flame icon re-tints on
// every subscription / codex usage update, not just every 30s.
_ = self.store.subscription