Skip to content

fix(menubar): show every active agent as a tab, ordered by usage for the selected range#549

Merged
iamtoruk merged 1 commit into
mainfrom
fix-menubar-agent-tabs
Jun 22, 2026
Merged

fix(menubar): show every active agent as a tab, ordered by usage for the selected range#549
iamtoruk merged 1 commit into
mainfrom
fix-menubar-agent-tabs

Conversation

@iamtoruk

Copy link
Copy Markdown
Member

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:

  1. ProviderFilter had no cases for grok, hermes, or zcode, so they could never become tabs.
  2. visibleFilters derived the tab set from todayPayload's providers, so an agent with usage in the selected range but none today never appeared.

Fix

  • Add grok, hermes, and zcode to ProviderFilter (filter keys, CLI arg, accent color). zcode resolves through the existing default key.
  • Rewrite visibleFilters to source from the selected period via cost(for:), which reads periodAllPayload. Every agent with usage in the range appears, ordered by spend descending; agents with no usage in the range are omitted, and .all always leads.

Verification

  • swift build clean, swift test 40/40 pass.
  • Live 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.

…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.
@iamtoruk iamtoruk merged commit f26f4ad into main Jun 22, 2026
3 checks passed
@iamtoruk iamtoruk deleted the fix-menubar-agent-tabs branch June 22, 2026 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant