fix(menubar): show every active agent as a tab, ordered by usage for the selected range#549
Merged
Merged
Conversation
…the selected range The agent tab strip never showed Grok, Hermes, or ZCode: ProviderFilter had no cases for them, so they could not become tabs. It also derived the visible tabs from today's providers rather than the range the user actually has selected, so an agent used in the selected window but not today never appeared. Add the three missing cases (filter keys, CLI arg, accent color) and rebuild visibleFilters to source from the selected period via cost(for:). Every agent with usage in the range now appears, ordered by spend descending, and agents with no usage in the range are omitted.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The agent tab strip in the menubar popover never showed Grok, Hermes, or ZCode, and the tabs it did show were based on today's usage rather than the date range the user has selected.
Two causes:
ProviderFilterhad no cases for grok, hermes, or zcode, so they could never become tabs.visibleFiltersderived the tab set fromtodayPayload's providers, so an agent with usage in the selected range but none today never appeared.Fix
ProviderFilter(filter keys, CLI arg, accent color). zcode resolves through the existing default key.visibleFiltersto source from the selected period viacost(for:), which readsperiodAllPayload. Every agent with usage in the range appears, ordered by spend descending; agents with no usage in the range are omitted, and.allalways leads.Verification
swift buildclean,swift test40/40 pass.codeburn status --format menubar-json --provider all --period today: Claude ($99.36) and Grok ($9.86) show as tabs; codex/hermes/zcode/pi/cursor sit at $0.00 and are correctly hidden until a range includes their usage.