fix(mac): restore agent tab strip to show all detected providers

Tabs were filtering on `value > 0` (today's spend), which hid the row
whenever only one provider had activity today. The CLI's providers map
already contains only providers detected on the system, so showing the
map as-is matches user intent: a tab for each installed tool,
regardless of today's spend. Tab strip only hides when nothing is
detected.

This also makes the Plan pill reachable again: it gates on
`selectedProvider == .claude`, which required clicking the Claude tab
to select.
This commit is contained in:
AgentSeal 2026-04-18 06:54:06 -07:00
parent 29e175c735
commit 9483d66e65
2 changed files with 11 additions and 15 deletions

View file

@ -33,19 +33,16 @@ struct AgentTabStrip: View {
}
private var visibleFilters: [ProviderFilter] {
// Only surface providers that actually spent money in the all-provider view.
// The CLI includes zero-cost providers in the payload for completeness, so
// filtering on value > 0 keeps the tab row honest and avoids showing tabs
// for tools the user hasn't run yet.
let activeKeys = Set(
allProvidersToday.current.providers
.filter { $0.value > 0 }
.keys
.map { $0.lowercased() }
// Show a tab for every provider detected on this machine. The CLI decides what
// to include in the providers map based on session dirs / credential files it
// finds, so zero-cost-today is still "installed" and the user expects to see
// it. Only providers that aren't installed at all are absent from the map.
let detectedKeys = Set(
allProvidersToday.current.providers.keys.map { $0.lowercased() }
)
return ProviderFilter.allCases.filter { filter in
if filter == .all { return true }
return activeKeys.contains(filter.rawValue.lowercased())
return detectedKeys.contains(filter.rawValue.lowercased())
}
}