Skip to content

Menu bar items drops CodexBar's usage cards and garbles its first row #346

Closed

Description

@lgollut

What happens

In the Menu bar items row, clicking CodexBar's icon opens StableBar's redrawn menu, which loses what CodexBar's menu is for:

  • The provider switcher at the top (Overview, Codex, Claude…) is missing.
  • The usage card, with the selected provider's session and weekly limits, is missing. In its place, the first row takes its title from the card's submenu, a cost chart, such as Oct 27: $… · …M tokens claude-opus-5-5 $… · …M Est. tota…, with a submenu chevron.
  • The plain items come through: Plan Usage, Cost, Switch Account…, Usage Dashboard, Status Page, Refresh, Settings…, About and Quit.

Steps to reproduce

  1. Install CodexBar (brew install --cask codexbar) and turn on one or more providers in it.
  2. Add a Menu bar items widget and allow StableBar in System Settings → Privacy & Security → Accessibility.
  3. Open the row and click CodexBar's icon.

Expected

The menu shows what CodexBar's menu shows, as #286 set out for redrawn menus ("It shows what the native menu shows"). A row StableBar can't draw isn't silently dropped, and no row takes its title from its submenu.

Environment

  • StableBar 0.9.0-beta.20261027091605.443, main at a83e50d
  • macOS 26.6.2 (25G83)
  • CodexBar 0.82.0 (Homebrew cask), with merged menu bar icons and five providers in its menu

Evidence

CodexBar's status item (Accessibility identifier CodexBar.StatusItem) has an AXMenu child while closed, so the row redraws it instead of pressing it. CodexBar builds its menu rows from SwiftUI views. Read through Accessibility with the same rules as entries(of:):

CodexBar's row Through Accessibility In StableBar's menu
Provider switcher No AXTitle; five AXButton children without static text Dropped
Usage card No AXTitle; only an AXMenu child, its history submenu Titled with the submenu's chart text, with ▸
Plan Usage, Cost, Status Page AXTitle and an AXMenu child Shown with ▸
Switch Account…, Usage Dashboard, Refresh, Settings…, About, Quit AXTitle Shown

I read this with a script rather than on screen; a screenshot will follow.

Diagnosis

  • entries(of:) (Sources/StableBar/AppMenu.swift:112) titles a row with its AXTitle, else with text(in:), and skips a row that has neither.
  • text(in:) (Sources/StableBar/AppMenu.swift:131) collects the static text of every child, including the row's own submenu, so a row that exposes only a submenu gets its submenu's items as its title.
  • menuBarItemsPopup (Sources/StableBar/AppMenu.swift:193) marks an item as having a menu when it has any Accessibility children. Clicking such an item redraws its menu (popup(forMenuBarItem:), from Sources/StableBar/PopupView.swift:1056). An item without one is pressed through pressInMenuBar, which opens the app's own panel, as for Control Center.

A fix has two parts:

  1. text(in:) skips AXMenu children, whatever else changes.
  2. For a menu with rows StableBar can't draw (rows with no title and no text of their own), open the app's own menu through pressInMenuBar, as for items that draw their own panel. To keep the theme instead, the redrawn menu could end with a row that opens the app's own menu.

Related

Triaged by Claude Code via T3 Code (Claude Opus 5.5).

Activity

  1. added
    P2
    on Nov 8, 2026
  2. stablebar-releases commented on Nov 11, 2026

    @stablebar-releases

    🎉 This issue has been resolved in version 0.13.0 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2released

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions