Skip to content

Commit 9468e3c

Browse files
henrylove0claude
andcommitted
fix: widen popover to 375px and fix empty flash on provider switch
- Popover width 370 → 375px so OpenCode tab is fully visible - Fixed empty state flashing when switching provider tabs — now waits for the first fetch to complete before deciding if empty - Checks payload.generated to distinguish "no data" from "not yet fetched" Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 3402500 commit 9468e3c

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

mac/Sources/ExeWatcherMenubar/ExeWatcherApp.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import ServiceManagement
66
private let refreshIntervalSeconds: UInt64 = 60
77
private let idleRefreshIntervalSeconds: UInt64 = 300
88
private let statusItemWidth: CGFloat = NSStatusItem.variableLength
9-
private let popoverWidth: CGFloat = 360
9+
private let popoverWidth: CGFloat = 375
1010
private let popoverHeight: CGFloat = 660
1111
private let menubarTitleFontSize: CGFloat = 13
1212

mac/Sources/ExeWatcherMenubar/Views/MenuBarContent.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,14 @@ struct MenuBarContent: View {
133133

134134
/// True when a specific provider tab is selected and that provider has no spend in the
135135
/// currently selected period. The .all tab is exempt -- it always shows aggregated data.
136+
/// Also returns false if data hasn't been fetched yet (payload is empty default),
137+
/// so we don't flash an empty state while the first fetch is in flight.
136138
private var isFilteredEmpty: Bool {
137139
guard store.selectedProvider != .all else { return false }
138-
return store.payload.current.cost <= 0 && store.payload.current.calls == 0
140+
let p = store.payload
141+
// If generated is empty, we haven't fetched yet — don't show empty state
142+
guard !p.generated.isEmpty else { return false }
143+
return p.current.cost <= 0 && p.current.calls == 0
139144
}
140145

141146
/// Show the tab row whenever the CLI detected at least one AI coding tool installed

0 commit comments

Comments
 (0)