File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments