Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e2254e9

Browse files
committed
Revert AgentTabStrip to original todayPayload behavior
1 parent d7c9222 commit e2254e9

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

mac/Sources/CodeBurnMenubar/Views/AgentTabStrip.swift

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ struct AgentTabStrip: View {
2525
}
2626
}
2727

28-
/// Drive tab VISIBILITY from the all-provider today payload so tabs don't disappear
29-
/// when switching periods or to a provider with no data. Cost values come from
30-
/// store.payload (the selected period) via cost(for:).
28+
/// Drive tab visibility and per-tab cost labels from the *all-provider* payload (today),
29+
/// not the currently selected provider's payload. Without this, switching to Codex (which
30+
/// has no data) would hide every other tab including Claude.
3131
private var allProvidersToday: MenubarPayload {
3232
store.todayPayload ?? store.payload
3333
}
@@ -46,16 +46,13 @@ struct AgentTabStrip: View {
4646
}
4747
}
4848

49-
/// Cost for the selected period, not pinned to today. The hero shows payload.current.cost,
50-
/// so these tabs must match. Tab VISIBILITY is still driven by todayPayload (via
51-
/// visibleFilters) so that tabs don't disappear when switching periods.
5249
private func cost(for filter: ProviderFilter) -> Double? {
5350
switch filter {
5451
case .all:
55-
return store.payload.current.cost
52+
return allProvidersToday.current.cost
5653
default:
5754
let key = filter.rawValue.lowercased()
58-
return store.payload.current.providers[key]
55+
return allProvidersToday.current.providers[key]
5956
}
6057
}
6158
}

0 commit comments

Comments
 (0)