Provider detail cards with inline cost charts do not open cost history on hover
Summary
In the merged menu, an Overview provider card that contains an inline token/cost chart opens the matching cost-history submenu on hover. The equivalent top card in some provider detail tabs renders the same inline chart but has no submenu, so there is no chevron and hovering does nothing.
This is reproducible for at least Claude and OpenCode Go on current main (a90dfed5c264f12e37b0caf6ea9cead276873ed4). The dedicated Cost row still opens cost history, but the top card behaves differently from the Overview card even though it displays the same cost data.
Codex is not a direct comparison: its top card prioritizes the native OpenAI usage-breakdown submenu. Mistral already has a provider-specific cost-history path.
Steps to reproduce
Prerequisites:
- Merge Icons enabled, so the Overview and provider tabs are available.
- Claude or OpenCode Go enabled.
- Local token/cost tracking enabled with enough local history to render the inline 7/30-day cost chart.
- Cost Summary configured to a mode that exposes the cost-history submenu (for example, Both).
Steps:
- Open the CodexBar menu.
- Select Overview.
- Hover the Claude or OpenCode Go provider card.
- Observe that a cost-history submenu opens with daily/model token and cost details.
- Select the matching provider detail tab.
- Hover the top provider card that contains rate-limit bars plus the inline cost chart.
Actual behavior
The provider-detail top card has no cost-history submenu. It has no submenu chevron, and hovering does nothing.
The lower dedicated Cost row still opens the history, so the data and chart renderer are available; only this entry point is missing.
Expected behavior
When a provider-detail top card visibly includes the inline cost dashboard and the current Cost Summary setting permits a submenu, hovering that card should open the same cost-history submenu as the Overview card.
The dedicated Cost row should remain available in the Both display style.
Source-level cause
On current main:
StatusItemController+OverviewSubmenus.swift:24-28attaches cost history when the Overview row has token usage and the settings permit it.StatusItemController+Menu.swift:1293-1304asksmakeUsageSubmenufor the provider-detail top card, but does not tell it whetherlayoutModel.inlineUsageDashboardis present.StatusItemController+Menu.swift:1476-1497only returns:- the native web usage breakdown,
- OpenAI API usage, or
- Mistral cost history.
For Claude and OpenCode Go, that function therefore returns nil even when the card itself renders an inline cost dashboard.
Proposed minimal fix
Pass whether the provider card contains layoutModel.inlineUsageDashboard into makeUsageSubmenu. After preserving the existing native OpenAI/OpenAI API/Mistral precedence, attach makeCostHistorySubmenu when:
- the inline cost dashboard is actually visible, and
costSummaryShowsSubmenu(for:)permits it.
This keeps the behavior data-driven, avoids adding arrows to cards without cost content, and preserves the dedicated Cost row.
Local verification
A focused implementation and regression test have been validated locally:
- Regression test fails before the change because the Claude
menuCardUsagesubmenu isnil. swift test --filter StatusMenuNativeSectionSpacingTests: 5/5 passed.- Adjacent menu regression filters: 15/15 passed.
make check: SwiftFormat clean; SwiftLint 0 violations.- Full sharded
make test: 840/840 selections, 70/70 groups passed on the first attempt; 0 failures, retries, or timeouts. - A fresh ad-hoc signed release bundle passed package resource checks, 6-second launch liveness, and deep codesign verification.
- Live UI verification confirmed that the Claude detail card still renders its rate-limit and inline cost data and gains the expected submenu chevron.
No provider fetching, pricing, storage, authentication, or refresh behavior changes are required.
Environment
- CodexBar source: current
mainata90dfed5c264f12e37b0caf6ea9cead276873ed4 - macOS: 26.6.1 (25G76)
- Affected live provider verified: Claude
- Additional deterministic coverage: OpenCode Go
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed August 12, 2026, 6:28 AM ET / 10:28 UTC.
Summary Keep open for a maintainer UX decision: current source and tests intentionally keep Claude/OpenCode Go’s top usage card submenu-free when the dedicated Cost row is present, so this is an additional navigation path rather than a regression.
Reproducibility: yes. —the current source and focused menu test deterministically establish that the provider-detail usage card has no submenu while the Cost row does.
Maintainer decision needed
| Question | Recommendation |
|---|---|
| Should provider-detail cards in the Both Cost Summary style expose a second cost-history hover submenu in addition to the existing dedicated Cost row? | Keep the dedicated Cost row: Retain the current tested one-entry-point design for provider-detail cards and close this as a declined UX preference. |
Why: Current code and regression coverage deliberately avoid that duplicate affordance, so implementation is small but the intended interaction policy needs maintainer confirmation.
Next step A maintainer needs to decide whether the Both display style should intentionally duplicate the existing Cost-row history route on the top card.
Review details
Best possible solution:
Choose one consistent entry-point policy: retain the dedicated Cost row as the sole history route, or deliberately update the menu contract and focused tests to permit the duplicate top-card hover submenu.
Do we have a high-confidence way to reproduce the issue?
Yes—the current source and focused menu test deterministically establish that the provider-detail usage card has no submenu while the Cost row does.
Is this the best way to solve the issue?
No—not as an automatic bug fix: the proposed change is mechanically small but conflicts with an explicit current interaction contract, so a maintainer must first choose whether duplicate entry points are desired.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
- Adding a hover submenu in the Both display style duplicates the existing Cost-row route and contradicts an explicit current regression test unless the menu interaction policy is intentionally changed.
Codex review notes: model internal, reasoning high; reviewed against a90dfed5c264.
Label changes
Label changes:
- add
P3: This is a low-risk navigation and discoverability preference with an existing working Cost-row route. - add
impact:ux-friction: Users can reach history today, but the visible inline chart may suggest an unavailable hover action. - add
issue-rating: 🦞 diamond lobster: Current issue advisory state selects this label. - add
clawsweeper:source-repro: Current issue advisory state selects this label. - add
clawsweeper:no-new-fix-pr: Current issue advisory state selects this label. - add
clawsweeper:needs-maintainer-review: Current issue advisory state selects this label. - add
clawsweeper:needs-product-decision: Current issue advisory state selects this label.
Label justifications:
P3: This is a low-risk navigation and discoverability preference with an existing working Cost-row route.impact:ux-friction: Users can reach history today, but the visible inline chart may suggest an unavailable hover action.
Evidence reviewed
What I checked:
- Intentional submenu routing: The provider-detail submenu factory explicitly keeps rate-limit cards for Claude-like providers and OpenCode Go submenu-free, reserving the top-card cost-history route for OpenAI and Mistral. (
Sources/CodexBar/StatusItemController+Menu.swift:1485, 330ae4384b18) - Current regression test defines the opposite behavior: The OpenCode Go menu test is named for cost history hanging from the Cost row rather than the usage pane and asserts that the top usage card has no submenu while the Cost row does. (
Tests/CodexBarTests/StatusMenuNativeSectionSpacingTests.swift:216, a90dfed5c264) - Existing accessible history route: The same test verifies a non-nil Cost-row submenu, so the requested change would add a second route rather than restore unavailable history. (
Tests/CodexBarTests/StatusMenuNativeSectionSpacingTests.swift:282, a90dfed5c264) - Vision fit: The repository
VISION.mdlists small UI/UX tweaks as merge-by-default work, making this a valid proposal if maintainers choose the duplicated affordance. (VISION.md:5, a90dfed5c264) - Available provenance: Current checkout blame attributes the relevant menu function and explicit OpenCode Go expectation to Peter Steinberger; deeper follow-up history could not be read because this partial clone could not resolve its promisor remote. (
Sources/CodexBar/StatusItemController+Menu.swift:1476, 330ae4384b18)
Likely related people:
- steipete: Current blame attributes both the submenu decision and the explicit menu expectation to Peter Steinberger; the current main merge is also authored by steipete. (role: recent source attribution; confidence: medium; commits: 330ae4384b18, a90dfed5c264; files:
Sources/CodexBar/StatusItemController+Menu.swift,Tests/CodexBarTests/StatusMenuNativeSectionSpacingTests.swift)
How this review workflow works
- ClawSweeper keeps one durable marker-backed review comment per issue or PR.
- Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
- A fresh review can be triggered by eligible
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch. - PR/issue authors and users with repository write access can comment
@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only. - Maintainers can also comment
@clawsweeper reviewto request a fresh review only. - Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
- Maintainer-only repair and merge flows require explicit commands such as
@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review. - Maintainers can comment
@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.