From 690ac60a4fe22a6b101f295afda255914621e15e Mon Sep 17 00:00:00 2001 From: AgentSeal Date: Thu, 18 Jun 2026 13:22:42 +0200 Subject: [PATCH] fix(menubar): track isOverDailyBudget so the flame re-tints on budget crossings 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. --- mac/Sources/CodeBurnMenubar/CodeBurnApp.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mac/Sources/CodeBurnMenubar/CodeBurnApp.swift b/mac/Sources/CodeBurnMenubar/CodeBurnApp.swift index e3fbab43..85ad75a4 100644 --- a/mac/Sources/CodeBurnMenubar/CodeBurnApp.swift +++ b/mac/Sources/CodeBurnMenubar/CodeBurnApp.swift @@ -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