Skip to content

Show extra-usage spend text in menu bar for Claude/Cursor#1107

Merged
steipete merged 2 commits into
steipete:mainfrom
Yuxin-Qiao:codex/1084-menu-bar-extra-usage-spend-text
May 22, 2026
Merged

Show extra-usage spend text in menu bar for Claude/Cursor#1107
steipete merged 2 commits into
steipete:mainfrom
Yuxin-Qiao:codex/1084-menu-bar-extra-usage-spend-text

Conversation

@Yuxin-Qiao

@Yuxin-Qiao Yuxin-Qiao commented May 22, 2026

Copy link
Copy Markdown
Contributor

Fixes

Fixes #1084 — show money spend in the macOS menu bar.

Summary

  • Reuse existing MenuBarMetricPreference.extraUsage for a display-only menu-bar enhancement
  • When .extraUsage is selected and snapshot.providerCost is usable (limit > 0), render formatted spend text, for example $12.34
  • When provider cost is missing or unusable, fall back to the existing percent display
  • Scope is intentionally limited to Claude/Cursor through the existing preference support
  • No provider fetcher, network, or UsageStore refresh changes

Scope

  • Display/menu-bar text only
  • No provider fetcher changes
  • No UsageStore refresh changes
  • No OpenCode/OpenCodeGo changes
  • No Kimi changes
  • No MiniMax changes

Validation

  • swift test --filter StatusItemExtraUsageMetricTests
  • swift test --filter MenuBarMetricWindowResolverTests
  • make check
  • git diff --check

Runtime proof

Visual runtime proof

Added a redacted macOS screenshot showing the actual menu bar rendering $12.34 for Cursor Extra usage.
The CodexBar menu is open in the same screenshot and shows Cursor → Extra usage → Monthly: $12.34 / $100.00, confirming the menu-bar text corresponds to Cursor Extra usage spend.

The visual proof was captured from:

git branch --show-current
# codex/1084-menu-bar-extra-usage-spend-text

git log --oneline -1
# 43c8a2f Display extra-usage spend in menu bar

Temporary local-only debug overrides were used only to provide deterministic proof data for the visual capture and were reverted before final git status. No tracked source changes remain.

@clawsweeper

clawsweeper Bot commented May 22, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge.

Latest ClawSweeper review: 2026-05-22 17:48 UTC / May 22, 2026, 1:48 PM ET.

Workflow note: Future ClawSweeper reviews update this same comment in place.

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-review comments, 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-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to 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 explain to ask for more context, or @clawsweeper stop to stop active automation.

Summary
The branch renders Claude/Cursor extra-usage provider cost as formatted currency in the menu bar when .extraUsage is selected, adds focused tests, and updates the changelog.

Reproducibility: not applicable. as a bug reproduction; this is a feature PR. Source inspection shows current main already supports Cursor/Claude Extra usage as a percent metric, and this branch adds the requested currency text path.

PR rating
Overall: 🐚 platinum hermit
Proof: 🦞 diamond lobster ✨ media proof bonus
Patch quality: 🐚 platinum hermit
Summary: The PR has direct visual proof and a focused implementation with tests, with only normal CI and maintainer validation remaining.

Rank-up moves:

  • none
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Real behavior proof
Sufficient (screenshot): The attached macOS screenshot directly shows the after-fix menu-bar currency text and matching Cursor Extra usage value in the app menu.

Risk before merge

  • I did not run Swift tests or make check in this read-only review, so merge should still rely on CI or maintainer-run validation for the claimed checks.

Maintainer options:

  1. Decide the mitigation before merge
    Land the display-layer change after CI or maintainer validation, preserving the existing percent fallback when cost data is absent and resolving Feature idea: show money spend on MacOS Menu Bar #1084.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge
No repair lane is needed; the branch has sufficient proof and no concrete blocking finding, so it awaits normal maintainer review and CI.

Security
Cleared: The diff only changes Swift display logic, focused tests, and the changelog, with no dependency, script, secret, or supply-chain surface change.

Review details

Best possible solution:

Land the display-layer change after CI or maintainer validation, preserving the existing percent fallback when cost data is absent and resolving #1084.

Do we have a high-confidence way to reproduce the issue?

Not applicable as a bug reproduction; this is a feature PR. Source inspection shows current main already supports Cursor/Claude Extra usage as a percent metric, and this branch adds the requested currency text path.

Is this the best way to solve the issue?

Yes. The branch keeps the change in menu-bar display logic, reuses existing providerCost and .extraUsage support, and avoids fetcher, refresh, or settings migrations.

Label justifications:

  • P3: This is a low-risk menu-bar display enhancement with limited display-layer scope and focused tests.
  • rating: 🐚 platinum hermit: Current PR rating is 🐚 platinum hermit because proof is 🦞 diamond lobster, patch quality is 🐚 platinum hermit, and The PR has direct visual proof and a focused implementation with tests, with only normal CI and maintainer validation remaining.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): The attached macOS screenshot directly shows the after-fix menu-bar currency text and matching Cursor Extra usage value in the app menu.
  • proof: sufficient: Contributor real behavior proof is sufficient. The attached macOS screenshot directly shows the after-fix menu-bar currency text and matching Cursor Extra usage value in the app menu.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The attached macOS screenshot directly shows the after-fix menu-bar currency text and matching Cursor Extra usage value in the app menu.

What I checked:

  • Current main lacks currency text for extra usage: On current main, menuBarDisplayText falls through to percent/pace display after provider-specific balance overrides; there is no extra-usage spend text branch before the percent window rendering. (Sources/CodexBar/StatusItemController+Animation.swift:637, 17b065100a44)
  • Existing preference scope matches PR scope: Current main already restricts .extraUsage menu-bar metric support to Cursor and Claude when a provider cost limit is available, so the PR reuses an existing preference surface rather than adding a new setting. (Sources/CodexBar/SettingsStore+MenuPreferences.swift:73, 17b065100a44)
  • PR implementation is display-only: The implementation commit adds an .extraUsage branch before percent rendering and formats snapshot.providerCost.used with UsageFormatter.currencyString when limit > 0 and used >= 0. (Sources/CodexBar/StatusItemController+Animation.swift:670, c935dfdfaa39)
  • PR tests cover the new behavior and fallback: The PR adds tests for Cursor currency text, Claude currency text, and the existing percent fallback when provider cost is unavailable. (Tests/CodexBarTests/StatusItemExtraUsageMetricTests.swift:59, c935dfdfaa39)
  • Changelog updated: The PR head includes an unreleased changelog entry for showing extra-usage spend as currency text for Claude and Cursor. (CHANGELOG.md:8, 965ff9b26b93)
  • Runtime proof inspected: The posted macOS screenshot shows the menu bar displaying $12.34 and the open Cursor menu showing Extra usage Monthly: $12.34 / $100.00, matching the requested behavior.

Likely related people:

  • steipete: Current-main blame for the menu-bar display and extra-usage preference files points to the release commit, and history shows 91cf1a3 added Claude spend-limit metric behavior in the same preference/resolver area. (role: recent area contributor and merger; confidence: high; commits: f61469c3cde6, 91cf1a3f67ca, 965ff9b26b93; files: Sources/CodexBar/StatusItemController+Animation.swift, Sources/CodexBar/MenuBarMetricWindowResolver.swift, Sources/CodexBar/SettingsStore+MenuPreferences.swift)
  • ratulsarna: Commit a6b0342 added the Cursor extra-usage menu-bar metric, touching the resolver, menu preference support, and dedicated tests that this PR extends. (role: introduced Cursor extra-usage metric; confidence: high; commits: a6b034284bbd; files: Sources/CodexBar/MenuBarMetricWindowResolver.swift, Sources/CodexBar/SettingsStore+MenuPreferences.swift, Tests/CodexBarTests/StatusItemExtraUsageMetricTests.swift)
  • William: Commit c7f3866 added balance-style menu-bar text for providers, the closest existing pattern to rendering spend text instead of a percent in StatusItemController+Animation.swift. (role: adjacent display contributor; confidence: medium; commits: c7f38669a655; files: Sources/CodexBar/StatusItemController+Animation.swift, Tests/CodexBarTests/StatusItemBalanceDisplayTests.swift)

Codex review notes: model gpt-5.5, reasoning high; reviewed against 17b065100a44.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels May 22, 2026
@clawsweeper

clawsweeper Bot commented May 22, 2026

Copy link
Copy Markdown

ClawSweeper PR egg

✨ Hatched: 💎 rare Frosted Test Hopper

Hatch command

Comment @clawsweeper hatch when this PR is hatchable.

Hatchability rules:

  • Merged PRs are hatchable.
  • Open PRs are hatchable when they are status: 👀 ready for maintainer look, status: 🚀 automerge armed, or labeled clawsweeper:automerge.
  • Closed unmerged PRs are hatchable only when one of those hatchable labels is still present in the durable record.

Rarity: 💎 rare.
Trait: sleeps inside passing CI.
Image traits: location green-check meadow; accessory lint brush; palette coral, mint, and warm cream; mood patient; pose holding its accessory up for inspection; shell paper lantern shell; lighting warm desk-lamp glow; background tiny artifact crates.
Share on X: post this hatch
Copy: My PR egg hatched a 💎 rare Frosted Test Hopper in ClawSweeper.

What is this egg doing here?
  • Eggs appear after the PR passes real-behavior proof. It is here for vibes, not verdicts: it does not change labels, ratings, merge decisions, or automation.
  • The shell reacts to review momentum: open follow-up work warms it up, re-review makes it wobble, and a clean final review lets it hatch.
  • Hatchability usually comes from sufficient real-behavior proof, no blocking P0/P1/P2 findings, no security attention needed, and clean correctness. A merged PR is already final, so merge makes the egg hatchable independently.
  • The hatch is seeded from this repository and PR number, so the same PR keeps the same creature; the reviewed head SHA can only change safe visual details.
  • Rarity is just collectible sparkle: 🥚 common, 🌱 uncommon, 💎 rare, ✨ glimmer, and 🌈 legendary.

@clawsweeper clawsweeper Bot added the P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. label May 22, 2026
@Yuxin-Qiao

Copy link
Copy Markdown
Contributor Author

Added runtime proof to the PR body.

The focused test exercises the actual menu-bar display path:

and asserts:

This verifies the PR returns currency spend text for Cursor , plus Claude currency text and percent fallback coverage.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented May 22, 2026

Copy link
Copy Markdown

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@Yuxin-Qiao

Copy link
Copy Markdown
Contributor Author

Added runtime proof to the PR body.

The focused test exercises the actual menu-bar display path:

controller.menuBarDisplayText(for: .cursor, snapshot: snapshot)

and asserts:

#expect(displayText == "$12.34")

This verifies the PR returns currency spend text for Cursor .extraUsage, plus Claude currency text and percent fallback coverage.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented May 22, 2026

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

Re-review progress:

@Yuxin-Qiao

Copy link
Copy Markdown
Contributor Author

Added real macOS menu-bar visual proof for PR #1107.

The attached screenshot shows:

  • the actual macOS menu bar displaying $12.34
  • CodexBar opened on Cursor
  • the Extra usage section showing Monthly: $12.34 / $100.00
  • the same value rendered in the menu bar

This supplements the existing focused tests for:

  • Cursor currency spend text
  • Claude currency spend text
  • percent fallback when provider cost is unavailable

Temporary local-only debug overrides were used only to provide deterministic proof data and were reverted. No tracked source changes remain.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented May 22, 2026

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

Re-review progress:

@Yuxin-Qiao

Copy link
Copy Markdown
Contributor Author
K。 Added the actual screenshot proof here because the CLI comment could not upload image assets.

This screenshot shows:

  • the actual macOS menu bar displaying $12.34
  • CodexBar opened on Cursor
  • Cursor Extra usage showing Monthly: $12.34 / $100.00
  • the same value rendered in the menu bar

Captured from PR branch codex/1084-menu-bar-extra-usage-spend-text at commit 43c8a2f.

Temporary local-only debug overrides were used only to provide deterministic proof data and were reverted. No tracked proof-override source changes remain.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented May 22, 2026

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

@clawsweeper clawsweeper Bot added status: 🔁 re-review loop A fresh ClawSweeper review was explicitly requested after the latest review. proof: sufficient Contributor real behavior proof is sufficient. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 🔁 re-review loop A fresh ClawSweeper review was explicitly requested after the latest review. labels May 22, 2026
@steipete
steipete force-pushed the codex/1084-menu-bar-extra-usage-spend-text branch from 43c8a2f to 965ff9b Compare May 22, 2026 17:44
@steipete
steipete merged commit de7c25b into steipete:main May 22, 2026
6 of 7 checks passed
johnlarkin1 added a commit to johnlarkin1/CodexBar that referenced this pull request May 29, 2026
* build: allow slow widget metadata builds

* docs: update appcast for 0.26.1

* Start 0.26.2 development

* Harden CodexBar CLI release assets

* test: isolate switcher refresh test from background refresh

* test: make switcher refresh test deterministic

* fix: preserve usage after transient timeouts

* feat: reuse inline usage dashboards

* fix: show Claude spend limit metric

* test: cover Claude Team dashboard URL

* fix: fall back for Ollama browser sessions

* fix: wait for Claude usage values

* fix: clarify Claude session pace text

* test: keep Claude dashboard regression compact

* fix: preserve Claude data across transient refresh failures

* feat: add ElevenLabs usage provider

* fix: avoid widget metadata timeout during dev restarts

* fix: shorten OpenAI provider label

* Prefer Codex last token usage for cost scanning (steipete#968)

* fix: prefer Codex last token usage

* docs: add Codex cost spike changelog

* fix: avoid stale divergent Codex token gaps

---------

Co-authored-by: Peter Steinberger <[email protected]>

* Clarify unofficial Kimi K2 provider (steipete#967)

* Clarify unofficial Kimi K2 provider

* docs: add Kimi K2 changelog

---------

Co-authored-by: Peter Steinberger <[email protected]>

* fix: separate Claude plan utilization history

* feat: add Claude Admin API usage source

* feat: add Grok provider support

Adds xAI Grok provider support via the Grok CLI integration, including local identity detection, billing response decoding, provider registration, docs, tests, and changelog credit.\n\nCo-authored-by: taibaran <[email protected]>

* feat: add config API key CLI (steipete#978)

* test: include Grok in provider order expectation

* fix(grok): treat expired credentials as missing in fetch (steipete#976)

* fix(grok): treat expired credentials as missing in fetch

Follow-up to the Codex P1 review on steipete#965 (`cbd30a4e`).

Grok session tokens expire after ~7 days. The auth-error suppression in
`GrokStatusProbe.fetch` previously only checked `credentials == nil`, so
an `auth.json` whose `expires_at` was already in the past still counted
as "renderable" and masked the RPC auth failure. The probe would return
a successful snapshot carrying stale identity and no `grok login` hint
while billing silently 401s — users had to inspect logs to figure out
they were logged out.

Treat expired records the same as missing credentials when deciding
whether to swallow the RPC error, and drop them from the rendered
snapshot so the UI doesn't surface a stale email/team for an inactive
session. Adds a unit test covering past/future/missing `expires_at`.

* test(grok): include grok in SettingsStoreTests provider-order fixture

CI on steipete#976 surfaced a hardcoded provider-order list in
SettingsStoreTests.swift:1161 that wasn't updated when grok was added
in steipete#965. The Grok-only test filter I ran locally before steipete#965 skipped
this file, so the breakage only became visible on the next post-merge
CI run.

Append .grok to the expected ordering so the suite passes. All 2565
tests pass under Xcode 26.5 (51 in CodexBarTests + plenty more).

* fix: preserve Grok identity after refreshed billing

* style: format Grok auth regression

---------

Co-authored-by: taibaran <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>

* fix: label Claude extra usage monthly cap (steipete#980)

* test: stabilize status menu switcher refresh (steipete#983)

* test: stabilize status menu switcher refresh

* test: prevent switcher refresh detection race

* Block OpenCode Go redirect cookie leakage (steipete#979)

* Block cross-host redirects for OpenCode Go

* fix: compile OpenCode Go redirect session

* test: cover OpenCode Go redirect guard

* docs: add OpenCode Go redirect guard changelog

---------

Co-authored-by: Pavlo Barzdun <[email protected]>
Co-authored-by: pavbar <[email protected]>

* ci: run push CI on slash branches (steipete#981)

Co-authored-by: pavbar <[email protected]>

* fix: improve managed Codex login recovery (steipete#982)

* feat(grok): add web billing fallback (steipete#987)

Co-authored-by: Brandon Charleson <[email protected]>

* feat(cli): add provider config toggles

* fix: recover missing menu bar status item

* MiniMax: fix remains-to-used mapping and add quota-style usage cards with weekly text window (steipete#970)

* MiniMax: fix remains-to-used quota mapping and add quota-style usage cards

* MiniMax: address quota window badge and weekly range review

* fix: polish MiniMax quota cards

---------

Co-authored-by: Peter Steinberger <[email protected]>

* Localize provider storage setting

* docs: credit provider storage localization

* Document ElevenLabs provider

* docs: polish ElevenLabs setup docs

* fix(cli): validate serve host headers

* fix: recover status item after display changes

Co-authored-by: lengmiao <[email protected]>

* docs: refresh landing page provider logos

Refs steipete#989.

Co-authored-by: pasan <[email protected]>
Co-authored-by: Claude Opus 4.6 <[email protected]>

* fix: harden provider timeout handling

* chore: start 0.27.0 development

* fix: accept OpenAI cost string values

Co-authored-by: Sergey Lavrentev <[email protected]>

* fix: stabilize refresh menu row

* docs: point Linux users at codexbar-waybar

Adds a README pointer to the codexbar-waybar companion project for Linux desktop integration.\n\nVerified target repo exists and is active.

* feat: add Kiro overage menu bar modes

Add Kiro overage credit/cost parsing and exhausted-plan menu bar display modes.\n\nThanks @raflyazf for the contribution.\n\nVerification:\n- swift test --filter KiroStatusProbeTests --filter StatusItemBalanceDisplayTests --filter MenuCardModelTests\n- swift test --filter StatusItemBalanceDisplayTests\n- make check\n- codex-review --mode branch --base origin/main

* feat: show quota warning account

Include the triggering account in quota-warning notification copy when personal info is visible.

Thanks @raflyazf for the contribution.

Verification:
- swift test --filter QuotaWarningNotificationLogicTests --filter UsageStoreSessionQuotaTransitionTests
- swift test
- make check
- codex-review --mode branch --base origin/main

* feat: add shared provider HTTP transport

Route app-owned provider HTTP calls through a shared transport seam and replace process-global URLProtocol tests with injected transport coverage.

Thanks @serezha93 for the contribution.

Verification:
- swift build
- swift test --filter CopilotUsageFetcherTests
- swift test --filter GoogleWorkspaceStatusNetworkTests
- swift test --filter ProviderHTTPClientTests
- make check
- swift test
- codex-review --mode branch --base origin/main

Co-authored-by: Sergey Fomintsev <[email protected]>

* refactor: centralize provider HTTP responses

* fix: dedupe copied Claude transcript history

* feat: add Deepgram usage tracking

Co-authored-by: Christopher Pellicci <[email protected]>

* fix: bound provider HTTP timeouts

Co-authored-by: Michael Smolkin <[email protected]>

* fix: fall back from blank localized strings

Co-authored-by: Yubo Wang <[email protected]>

* feat: show OpenCode Zen balance

* fix: reduce idle menu CPU

* fix: improve overview menu responsiveness

* feat: add MiniMax billing summaries

* fix: harden subprocess timeouts

* fix: keep provider HTTP stubs testable

* test: future-proof provider order expectation

* fix: keep CI Linux builds portable

* fix: expose URLSession response helper on Linux

* fix: improve Codex account switcher state

* perf: skip unchanged provider icon redraws

* build: keep release builds warning-free

* docs: reorder 0.27 changelog

* docs: refresh provider and CLI docs

* docs: finalize 0.27.0 changelog

* Fix Codex cost attribution for long turn contexts

Fixes steipete#1013.

Co-authored-by: hhh2210 <[email protected]>

* fix: rebuild menu after switching with submenu open

* Add Codex JSONL shape benchmark (steipete#1017)

* [codex] Show weekly pace detail in Codex menu (steipete#1009)

* Show Codex weekly pace from visible window

* docs: add Codex weekly pace changelog

---------

Co-authored-by: dandan <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>

* fix: export all Codex accounts from CLI

* feat: expand provider usage tracking

* fix(ui): collapse duplicate utilization tabs (steipete#1027)

* fix(ui): collapse duplicate utilization tabs

* docs(changelog): note duplicate utilization tab fix

* perf: speed up Codex cost scanner

* docs: prepare 0.27.0 changelog

* docs: finalize 0.27.0 changelog

* docs: update appcast for 0.27.0

* style: apply release formatting

* fix: build Codex cost scanner on Linux

* chore: start 0.27.1 development

* ci: update Homebrew cask during releases

* fix: auto-invalidate Codex cost cache

Use a generated source hash as the Codex cost cache producer key so parser changes rebuild stale cached rows automatically. Wire the hash check into lint and cover matching, stale, and non-Codex cache behavior.

Co-authored-by: hhh2210 <[email protected]>

* fix: prevent Claude URL handler registration

* Reduce OpenAI dashboard scrape payload

* docs: add OpenAI scrape changelog

* Fix Claude usage loading stalls

* Fix auto Claude CLI timeout retry

* fix: harden Claude CLI loading retry

* fix: avoid blocked Codex CLI auto launch

Co-authored-by: m-rokai <[email protected]>

* fix: wait for manual Codex token refresh

Co-authored-by: dandan <[email protected]>

* fix: detect Antigravity 2 language server

* feat: add Azure OpenAI provider

Co-authored-by: Zeno Ren <[email protected]>

* feat: add Spanish and Catalan localizations

Adds Spanish and Catalan language packs, fills missing localization keys, and refreshes the generated parser hash.\n\nCo-authored-by: Marc R. <[email protected]>

* docs: add merge vision

* Fix fork roadmap upstream strategy link (steipete#1029)

Co-authored-by: ankitdwivedi <[email protected]>

* docs: surface Disable Keychain Access toggle as escape hatch for repeating prompts (steipete#1057)

When macOS resets the keychain ACL (e.g. after a Chromium update or a
partition_id reset by the Claude CLI), 'Always Allow' on the 'Chrome
Safe Storage' prompt does not stick and users see the password sheet
on every launch.

The Settings -> Advanced -> Keychain access -> Disable Keychain access
toggle (debugDisableKeychainAccess) already short-circuits the keychain
path entirely, leaving Claude/Codex OAuth via the CLI working. It is
just not discoverable: the README does not mention it and the toggle's
caption does not describe when to reach for it.

This patch:

- README: add a 'Last resort' bullet under the existing
  'How do I prevent those keychain alerts?' section pointing users at
  the toggle and naming the trade-off (browser cookie import off).
- Localizable.strings (en): rewrite keychain_access_caption to name
  the repeating-prompt symptom and the trade-off, so users hitting
  issues steipete#84 / steipete#186 / steipete#243 / steipete#340 / 1056 find it.

No code or behavior changes.

Co-authored-by: joymadhu49 <[email protected]>

* Fix ElevenLabs progress contrast (steipete#1055)

* Fix LLM Proxy fractional reset times (steipete#1022)

Co-authored-by: rohitjavvadi <[email protected]>

* fix: clarify missing CLI guidance (steipete#1030)

* fix: clarify missing Codex CLI guidance

* fix: preserve cached codex cli guidance

---------

Co-authored-by: rohitjavvadi <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>

* fix: support antigravity 2 oauth discovery (steipete#1053)

Co-authored-by: Peter Steinberger <[email protected]>

* Add GNOME Shell extension link on README (steipete#1064)

* Add GNOME Shell integration section to README

Added information for GNOME Shell users regarding Codexbar integration.

* docs: polish GNOME integration link

---------

Co-authored-by: Peter Steinberger <[email protected]>

* fix: honor Codex OAuth source for credits refresh (steipete#1054)

* Fix Codex credits source routing

* Preserve CLI credits-only refresh

* fix: preserve codex auto credits fallback

* test: split codex credit refresh coverage

---------

Co-authored-by: Peter Steinberger <[email protected]>

* docs: update changelog

* fix: avoid recounting repeated Codex token snapshots

* fix: verify stale Antigravity cloud quotas

* Remove obsolete peak-hours indicator (steipete#1025)

* Retire Claude peak-hours indicator

* chore: finish peak-hours removal

---------

Co-authored-by: rohitjavvadi <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>

* fix: avoid linux libxml2 runtime link

* docs: start 0.28.0 changelog

* Fix stable menu action rows (steipete#1072)

- keep Refresh, Settings, About, Quit, and update rows on the stable view-backed implementation
- restore native action targets for non-refresh rows so Return-key activation still works
- add the 0.28.0 changelog entry

Co-authored-by: MadanChaollaPark <[email protected]>

* fix: recover menu bar icon after display unplug

* Add Ollama API key support (steipete#1087)

* feat(ollama): add API key support

* fix(ollama): preserve web auto fallback

* Fix Antigravity OAuth client discovery (steipete#1090)

* fix(antigravity): discover extension OAuth client

* fix(antigravity): prefer extension OAuth artifact

* fix: localize provider detail strings (steipete#1092)

* Fix OpenAI dashboard reset-line parser for Wednesday and Saturday

Fix OpenAI dashboard reset-line parser for Wednesday and Saturday.

Co-authored-by: miqaeli <[email protected]>
Co-authored-by: Claude Opus 4.7 <[email protected]>

* fix: clean up PTY child process trees (steipete#1093)

* MiniMax: add tests for coding plan title propagation (steipete#1083)

* fix: accept first click in Codex account switcher (steipete#1079)

* fix: accept first click in Codex account switcher

Override acceptsFirstMouse, swallow child hit testing, and implement mouseDown/mouseUp with correct coordinate space conversion for multi-row account layouts.

Root cause: the runtime-click tests synthesized hit points before NSStackView laid out the switcher rows, so every button still sat at {0,0} and the simulated click always resolved to the first account.

Split from steipete#1073.

* fix: preserve Codex switcher tooltip hit testing

---------

Co-authored-by: Peter Steinberger <[email protected]>

* MiniMax: filter failed billing records from history aggregation (steipete#1089)

* MiniMax: filter failed billing records from history aggregation

* MiniMax: decode billing status fields defensively

* docs: credit MiniMax billing history fix

---------

Co-authored-by: Peter Steinberger <[email protected]>

* build: use shared mac release tooling

* build: add mac release manifest

* Restore full-width provider switcher quota bars (steipete#1094)

* Restore full-width provider switcher quota bars

Revert the v0.27.0 corner-badge quota indicators back to the pre-0.27
full-width bottom bar, reserve space in switcher buttons so stacked tabs
do not overlap labels, and refresh indicator fill when the open menu
preserves the switcher during usage updates.

Co-authored-by: Cursor <[email protected]>

* fix: restore switcher quota bar layout

---------

Co-authored-by: Cursor <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>

* perf: suppress redundant icon observer callbacks (steipete#1081)

* perf: suppress redundant icon observer callbacks

Remove isRefreshing from iconObservationToken and add observer-side
signature guard to skip updateIcons() when icon-relevant state is
unchanged.

The existing render signature inside applyIcon() avoided redundant
icon rendering, but not redundant observer work. This change reduces
observer callback churn before render-signature checking is reached.

Before: updateIcons() called 10 times per refresh cycle (1 rendered)
After: updateIcons() called 6 times per refresh cycle (1 rendered)

Split from steipete#1073. Related: steipete#678.

* docs: update changelog for icon observer perf

---------

Co-authored-by: Peter Steinberger <[email protected]>

* provider: t3.chat (steipete#1091)

* Add T3 Chat provider support

- Wire T3 Chat into provider registries and UI
- Add fetcher, settings, icon, and tests
- Document the new provider and update parser hash

* Fix T3 Chat cookie capture and fetch checks

- Normalize T3 Chat cookie source copy and fields
- Parse broader cURL header formats in usage fetcher
- Tighten web fetch availability and update tests

* Add Referer header test

- Assert the T3 Chat usage request sets the customization referer

* Replace T3 chat provider icon

- Swap the SVG for a full-size provider mark
- Preserve currentColor styling for theme matching

* Update changelog

* Handle curl cookie header capture

- Parse cookie headers from full curl captures
- Add coverage for long-form header extraction

* Ignore billing reset for T3Chat overage

- Use subscription period end for overage reset\n- Cover billing reset being ignored in parser tests

* Fix overage reset display

- Use subscription period end for overage reset timing
- Stop falling back to billing reset when subscription data is missing
- Add tests for billing reset and subscription-based overage reset

* fix: preserve T3 Chat cURL captures

---------

Co-authored-by: Peter Steinberger <[email protected]>

* chore: prepare 0.28.0 release

* ci: match release precheck test mode

* fix: stabilize OpenAI webview idle teardown

* test: stabilize codex account refresh tests

* fix: stabilize OpenAI webview expiry scheduling

* fix: stabilize OpenAI webview navigation timers

* docs: update appcast for 0.28.0

* chore: start 0.28.1 development

* test: cover Kimi primary-only icon progress

Adds regression coverage for Kimi icon progress rendering when only the primary quota window is present.\n\nCo-authored-by: Yuxin Qiao <[email protected]>

* feat: show OpenCode renewal dates

Surfaces OpenCode and OpenCode Go workspace renewal timestamps as a provider-local Renews rate window.\n\nCo-authored-by: Yuxin Qiao <[email protected]>

* docs: note OpenCode renewal dates

* fix: retry menu bar display recovery

* fix: preserve Codex account snapshots on network failure

* UsageStore: preserve snapshots for more network failures (steipete#1101)

* UsageStore: preserve snapshots for more network failures

* refactor: scope network snapshot preservation helper

---------

Co-authored-by: Peter Steinberger <[email protected]>

* docs: thank snapshot preservation contributor

* Add Alibaba Token Plan provider (steipete#1098)

* Add Alibaba Token Plan provider

* Clean up Alibaba token plan support

* Fix Alibaba token plan review feedback

* test: scope Alibaba token plan URL protocol stub

* fix: classify Alibaba token plan login pages

* fix: keep Alibaba token plan redirect cookies scoped

---------

Co-authored-by: Peter Steinberger <[email protected]>

* docs: note Alibaba token plan provider

* fix: derive signing team id from certificate ou

* i18n: improve Simplified Chinese localization (steipete#1059)

* i18n: improve Simplified Chinese localization

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <[email protected]>

* fix: drop stale Chinese peak-hour strings

---------

Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>

* docs: thank Chinese localization contributor

* feat: add aur package for arch linux (steipete#1036)

* docs: note Tahoe widget VM verification

* fix: harden Alibaba token plan endpoint overrides

Harden Alibaba Token Plan endpoint overrides to reject non-HTTPS schemes, keep bare host overrides resolving through HTTPS, and import FoundationNetworking so the provider builds on Linux.

CI: lint-build-test, Linux x64, Linux arm64, GitGuardian.

Co-authored-by: YanxinXue <[email protected]>

* fix: avoid quote cleanup crash in settings readers

Fix a crash in copied settings-reader quote cleanup helpers where a lone single or double quote could satisfy the wrapper check, empty the string with removeFirst(), then trap on removeLast(). The replacement keeps normal quoted values working and lets malformed lone-quote config/env input fail as an absent value instead of killing the app or CLI.

Proof:
- swift test --filter SettingsReaderQuoteUnwrapTrapTests
- real CLI proof: CodexBarCLI config set-api-key with a lone quote returns a normal missing-key argument error instead of trapping
- CI: lint-build-test, Linux x64, Linux arm64, GitGuardian

Co-authored-by: miqaeli <[email protected]>
Co-authored-by: Claude Opus 4.7 <[email protected]>

* docs: update changelog for settings quote fix

* feat: show Codex standard and fast cost splits

Show Codex standard and fast spend/token splits in local cost-history model breakdowns.

Co-authored-by: Bryan Font <[email protected]>

* chore: prepare 0.29.0 release

* style: format Alibaba token plan cookie headers

* test: stabilize Codex RPC stub startup

* test: relax JSONL benchmark ratio guard

* test: stabilize subprocess timeout bound

* test: isolate flaky release tests

* test: wait longer for historical pace writes

* test: relax subprocess timeout stress bound

* docs: update appcast for 0.29.0

* chore: start 0.29.1 development

* Show extra-usage spend text in menu bar for Claude/Cursor (steipete#1107)

* Display extra-usage spend in menu bar

* docs: update changelog for menu bar extra usage spend

---------

Co-authored-by: Peter Steinberger <[email protected]>

* perf: background credits and dashboard fetch for regular refreshes (steipete#1078)

* perf: background credits and dashboard fetch for regular refreshes

Move refreshCreditsIfNeeded() and refreshOpenAIDashboardIfNeeded() into background tasks for non-forced refreshes. Add Task?-based coalescing guard for credits refresh to prevent unbounded stacking.

Forced refreshes (manual) still await inline.

Split from steipete#1073.

* fix: persist widget snapshots after background refreshes

* fix: scope background codex refresh coalescing

* fix: cancel scheduled codex credits before force refresh

* test: split codex background refresh coalescing coverage

* fix: stop cancelled dashboard refresh side effects

* test: await background codex credits refresh

---------

Co-authored-by: Peter Steinberger <[email protected]>

* Display: add workday segmentation for weekly progress bars (steipete#1102)

* Display: add workday segmentation for weekly progress bars

Fixes steipete#1096 — Weekly Progress Bar configurable to segment in number of work days.

- Add a Display preference for weekly progress work-day segmentation:
  Off / 4 days / 5 days / 7 days
- Draw display-only day-boundary tick marks on weekly usage bars
- Keep the default Off / nil so existing users see no UI change
- Merge work-day markers with existing quota warning markers
- No warning/alert behavior added; future warnings remain out of scope for this PR

Validation:
- swift test --filter MenuCardQuotaWarningMarkerTests
- swift test --filter SettingsStoreCoverageTests
- swift test --filter MenuCardModelTests
- make check

* Fix weekly workday marker observation and codex lanes

* Linux: import FoundationNetworking for HTTPCookie

* docs: update changelog for workday markers

---------

Co-authored-by: Peter Steinberger <[email protected]>

* fix: read OpenCode Go usage from local data (steipete#1021)

* Fix OpenCode Go local usage

* Fix OpenCode Go monthly anchor

* fix: keep OpenCode Go web usage authoritative

---------

Co-authored-by: Peter Steinberger <[email protected]>

* Claude: normalize OAuth extra usage spend limit from minor units (steipete#1114)

* Fix Claude OAuth extra usage spend normalization

* docs: update changelog for Claude spend normalization

---------

Co-authored-by: Peter Steinberger <[email protected]>

* Add Noctalia integration (steipete#1115)

* Provider switcher: compact multi-row layout (steipete#1113)

* Provider switcher: compact multi-row layout

Fixes/follows up steipete#1082.

Summary:
- Reduces vertical crowding in the merged provider switcher when many providers are enabled.
- Adds compact row heights only for stacked multi-row layouts:
  - 3 rows: 40pt → 36pt
  - 4+ rows: 40pt → 34pt
- Keeps single-row and two-row behavior unchanged.
- Does not add NSScrollView.
- Does not change hitTest, acceptsFirstMouse, mouseDown, or mouseUp.
- Preserves provider ordering and click behavior.
- UI-only: no provider fetching, billing, quota, parsing, ProviderCostSnapshot, or usage snapshot changes.

Validation:
- swift test --filter StatusMenuSwitcher
- swift test --filter MenuCard
- make check
- git diff --check

* Provider switcher: use safer compact row height

* fix: cover compact provider switcher rows

---------

Co-authored-by: Peter Steinberger <[email protected]>

* fix: use Groq logo for Groq provider icon (steipete#1112)

* fix: use Groq logo for Groq provider icon

The Groq provider icon was a duplicate of the Grok (xAI) logo. Replace
with the actual Groq 'Q' wordmark so the Settings page shows the
correct brand.

* test: cover distinct Groq provider icon

---------

Co-authored-by: Peter Steinberger <[email protected]>

* Retry transient OpenAI usage failures (steipete#1117)

* fix: retry transient OpenAI usage failures

* docs: add OpenAI retry PR reference

* fix: preserve menu bar item identity

Preserve status item identity during display-change recovery and refresh displaced live items in place, including same-count display remaps.

Co-authored-by: Magicien <[email protected]>

* fix: handle Claude CLI subscription usage output

Fix Claude CLI subscription-only /usage handling.

Claude CLI 2.1 can return only the subscription notice without quota data. Classify that as a precise no-quota parse failure, stop PTY collection on the notice, and fall back to direct CLI usage when the PTY panel times out or fails to load.

Proof:
- claude --version => 2.1.148 (Claude Code)
- direct claude /usage returns the subscription-only notice
- CodexBarCLI usage --provider claude --source cli reports the subscription-specific error
- swift test --filter 'StatusProbeTests.*subscription|TTYIntegrationTests.*subscription|ClaudeDirectUsageFallbackTests|SubprocessRunnerTests'
- make check
- autoreview --mode local clean

Co-authored-by: Yuxin Qiao <[email protected]>

* feat: add Traditional Chinese localization

Add zh-Hant localization resources, wire Traditional Chinese into the language picker, and credit the contributor in the changelog.

Co-authored-by: IlyaL <[email protected]>
Co-authored-by: Claude Opus 4.7 <[email protected]>

* fix(codex): handle non-app spctl assessment

Allow the valid Codex CLI Gatekeeper diagnostic where spctl reports a signed command-line binary as "rejected (the code is valid but does not seem to be an app)" while keeping higher-risk blocked signals denied.

Validated with focused PathBuilderTests, make check, local spctl reproduction against Codex CLI, and green GitHub checks.

Co-authored-by: hhh2210 <[email protected]>
Co-authored-by: ngutman <[email protected]>

* chore(skills): add repo release skill

* docs(skills): defer private release locators

* Fix Codex fork overcount when parent logs are missing

Avoid overcounting forked Codex sessions when parent logs are unavailable. Includes maintainer changelog credit for @jskoiz.

* Keep legacy credentials when config save fails

Preserve legacy credentials when migrated config changes fail to persist, so a later retry can recover and clean up safely. Includes maintainer changelog credit for @RajvardhanPatil07.

* Make Grok usage labels follow reset windows

Label Grok usage bars from the actual billing/reset window, including the maintainer fix for late-cycle windows. Includes maintainer changelog credit for @kiankyars.

* docs: finalize 0.29.1 changelog

* test: stabilize background refresh coalescing tests

* test: harden OpenAI web refresh scheduling test

* docs: update appcast for 0.29.1

* chore: start 0.29.2 development

* Improve Simplified Chinese (zh-Hans) localization for visible UI (steipete#1145)

* Improve Simplified Chinese localization for visible UI

* Fix cost labels and localization lookup

* Fix dynamic cost window labels and missing localization keys

* Fix UsageFormatter localization resources and locale

* Fix formatter locale fallback and pace resource keys

* Polish remaining zh-Hans visible labels

* Fix one-day and token KPI labels

* docs: update changelog for zh-Hans localization

---------

Co-authored-by: Peter Steinberger <[email protected]>

* Improve Traditional Chinese localization wording (steipete#1158)

* fix(localization): improve Traditional Chinese wording

- Refine zh-Hant strings for more natural Taiwan usage and terminology.

- Replace provider terminology with 提供者 across Traditional Chinese copy.

- Validate localized resources, placeholder parity, diff cleanliness, and high-risk term usage.

* fix(localization): localize notification copy

- Route quota warning, session depleted/restored, and login success notifications through localized strings.

- Add English and Traditional Chinese notification keys with focused notification copy tests.

- Validate with make check and focused notification/localization tests.

* test(localization): stabilize English text assertions

- Pin English-only assertions to the English localization override so local app language settings do not affect tests.

- Adjust the OpenAI web refresh test wait order to avoid a full-suite scheduling timeout.

- Verification: make check, swift test.

* docs: update changelog for zh-Hant localization

---------

Co-authored-by: Alan.Chang <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>

* Harden Release CLI manual dispatch (steipete#1154)

* Harden Release CLI manual dispatch [skip ci]

* Harden release tag handling [skip ci]

* Preserve manual artifact dispatches [skip ci]

* docs: update changelog for release CLI hardening

---------

Co-authored-by: Peter Steinberger <[email protected]>

* fix: unify provider cost cards (steipete#1163)

Deduplicate OpenAI and Mistral API spend rendering through the shared cost-history dashboard and menu path.

Co-authored-by: Zhongyue Lin <[email protected]>

* fix: handle provider switcher shortcuts in open menu (steipete#1157)

Fix provider switcher keyboard shortcuts while the merged status menu is open.

- handle Cmd-number and left/right provider switcher shortcuts without closing the menu
- clean up the shortcut monitor through the shared menu close path
- keep the monitor polling nonblocking in event-tracking mode

Local proof:
- swift test --filter 'StatusMenuSwitcherClickTests|StatusMenuSwitcherRefreshTests|StatusMenuPersistentRefreshTests|SubprocessRunnerTests'
- swift test --filter StatusMenuSwitcherClickTests
- make check
- autoreview --mode branch --base origin/main

Fixes steipete#1156.
Fixes steipete#1144.

Co-authored-by: Anirudh Venkatachalam <[email protected]>

* test: add provider label metadata characterization (steipete#1135)

Add characterization coverage for provider metadata label invariants without changing runtime behavior.

Local proof:
- swift test --filter 'ProviderLabelMetadataCharacterizationTests|ProviderRegistryTests'
- make check
- autoreview --mode branch --base origin/main

Refs steipete#804.

Co-authored-by: Yuxin Qiao <[email protected]>

* fix: update Alibaba Token Plan usage API (steipete#1142)

Switch Alibaba Token Plan usage refreshes to the Bailian subscription-summary endpoint and parse its quota fields, remaining credits, expiry date, and empty-subscription state.

Proof:
- swift test --filter AlibabaTokenPlan
- make check
- autoreview --mode branch --base origin/main

Co-authored-by: YanxinXue <[email protected]>

* feat: enable Ollama pace prediction (steipete#1136)

Propagate Ollama's documented 5-hour session and 7-day weekly usage windows into menu and CLI pace rendering.

Proof:
- swift test --filter 'OllamaUsageParserTests|UsagePaceTextTests|CLISnapshotTests'
- make check
- autoreview --mode branch --base origin/main --engine codex --no-web-search

Co-authored-by: bdamokos <[email protected]>

* fix: polish Simplified Chinese localization (steipete#1165)

Polish Simplified Chinese wording and add missing notification localization keys with matching placeholders.

Proof:
- plutil -lint Sources/CodexBar/Resources/zh-Hans.lproj/Localizable.strings
- zh-Hans/en key coverage: 785/785, no duplicate keys
- make check
- autoreview --mode branch --base origin/main --engine codex --no-web-search

Co-authored-by: zhuyifan <[email protected]>

* fix: refresh expired StepFun tokens

Refresh expired StepFun Oasis tokens, persist recovered manual sessions in app and CLI paths, and recover stale cached tokens through non-cached credentials before falling back to login.

Co-authored-by: Zhongyue Lin <[email protected]>

* fix: prevent Codex fork replay overcount

Route resolved fork children through corrected cumulative totals, treat unresolved fork totals as untrusted replay watermarks, and force a full rescan when fork metadata appears after an incremental cache boundary.

Co-authored-by: Xu Xiang <[email protected]>

* feat: scope OpenAI usage by project

Add OpenAI Admin API project scoping via OPENAI_PROJECT_ID/providers[].workspaceID, pass project_ids to costs and completions usage requests, scrub project scope from selected token accounts, and preserve legacy billing fallback for ambient OPENAI_API_KEY setups.

Co-authored-by: Matt Stallone <[email protected]>

* feat: add DeepSeek usage summaries

Co-authored-by: Yuxin Qiao <[email protected]>

* fix: repair hidden menu bar visibility defaults

* Fix Codex CLI login guidance

Fixes steipete#1170.

Shows explicit Codex CLI sign-in guidance when app-server rate-limit reads fail because the CLI is logged out, instead of collapsing that state to a temporary usage outage.

Co-authored-by: jskoiz <[email protected]>

* docs: credit Codex CLI login guidance

* Show tertiary widget usage rows

Shows tertiary usage rows in widget snapshots and the legacy widget fallback for providers that expose a third usage lane.

Co-authored-by: Zhongyue Lin <[email protected]>

* docs: credit tertiary widget rows

* Expose Antigravity per-model quota windows

Expose every Antigravity model quota as sorted named rate windows and render them in the Antigravity menu, while preserving the existing Claude/Gemini Pro/Gemini Flash summary lanes.

Maintainer fixups: sorted quota output for stable UI/JSON ordering, added snapshot and menu-model regression coverage, and routed Antigravity extra windows through the custom menu path.

Co-authored-by: guhyun9454 <[email protected]>

* docs: credit Antigravity quota windows

* fix: soften quota warning markers

* Add redacted MiniMax diagnostic export foundation (steipete#1128)

Adds a redacted MiniMax diagnostic export CLI and keeps diagnose output quiet by routing provider logs to a discard logger.

Co-authored-by: Yuxin Qiao <[email protected]>

* fix: build widget as app extension

* fix: clean up AppKit state on quit

* chore: prepare 0.30.0 release

* test: harden release gate timing

* docs: update appcast for 0.30.0

* chore: start 0.30.1 development

* feat: generalize diagnostic exports

* Update Homebrew cask install command

* fix: stop display-change recovery retry churn

Stop repeated display-change status-item recreation after the single follow-up recovery pass, while preserving the macOS allow-list guidance path when recreation still leaves the item blocked.

Also removes the now-dead retry predicate/tests and records the fix in the 0.30.1 changelog.

Local proof:
- swift test --filter MenuBarVisibilityWatcherTests
- swift test --filter StatusItemControllerSplitLifecycleTests
- make check
- autoreview --mode branch --base origin/main

Co-authored-by: rene <[email protected]>
Co-authored-by: Claude Sonnet 4.6 <[email protected]>

* Fix provider sidebar trailing control spacing (steipete#1183)

Fix provider sidebar trailing control spacing

Local proof:
- swift test --filter ProvidersPaneCoverageTests
- make check
- ./Scripts/package_app.sh
- autoreview --mode branch --base origin/main

Thanks @Yuxin-Qiao!

* Improve Claude OAuth 429 rate limit handling (steipete#1179)

Improve Claude OAuth 429 rate limit handling

Preserve cached Claude OAuth credentials on HTTP 429 responses, persist a bounded background retry cooldown, keep user-initiated refresh available, and cover numeric plus HTTP-date Retry-After parsing.

Local proof:
- swift test --filter ClaudeOAuthTests
- make check
- autoreview --mode branch --base origin/main

Co-authored-by: Zhongyue Lin <[email protected]>
Thanks @LeoLin990405!

* docs: update 0.30.0 release notes

* chore: release 0.30.1

* docs: update appcast for 0.30.1

* chore: start 0.30.2 development

* fix: coalesce visible menu rebuilds

* feat: show Codex Spark usage

Show Codex Spark usage as a named extra quota lane for Codex OAuth and OpenAI dashboard usage paths.\n\nThanks @LeoLin990405.\n\nProof:\n- swift test --filter CodexAdditionalRateLimitsTests\n- swift test --filter OpenAIDashboardSparkTests\n- swift test --filter MenuCardModelCodexProjectionTests\n- swift test --filter MenuCardAntigravityTests\n- swift test --filter OpenAIDashboardModelsTests\n- swift test --filter CLIOpenAIDashboardCacheTests\n- make check\n- autoreview clean\n- CI green for 4f9c902\n\nFixes steipete#1177\n\nCo-authored-by: Zhongyue Lin <[email protected]>

* fix: hide obsolete Claude Design quota lane

* test: guard keychain prompt safety

* feat: support Bedrock AWS profile auth (steipete#1190)

Add named AWS profile authentication for Bedrock usage and cost history.

Maintainer follow-up preserves credential precedence: explicit profile mode uses the selected profile without projecting saved static keys, AWS CLI source profiles can still read inherited environment credentials, and merged static keys continue to win when no profile mode is explicitly selected.

Co-authored-by: Oleksandr Soldatov <[email protected]>

* feat: localize popup and provider settings UI (steipete#1181)

Localize popup panels, menu labels, and provider settings across supported languages.

Maintainer follow-up preserves provider-supplied organization names and localizes dynamic cookie-source subtitles through shared templates.

Co-authored-by: Shun Min Chang <[email protected]>

* fix: surface managed Codex login output

* docs: thank Homebrew cask contributor

* fix: make cost usage scans cancellation-aware

* Complete Brazilian Portuguese (pt-BR) localization

pt-BR was missing 178 of en.lproj's 785 keys, so those strings fell back
to English (a mixed-language UI for Brazilian users). Translate all
missing keys to reach full parity with the English base, keeping the
same key order as en.lproj.

Validated with `plutil -lint`; pt-BR and en key sets and format
specifiers (%@, %1$@, %d%%) match exactly (785 keys each, no missing or
extra keys).

* docs: update changelog for pt-BR localization

* Add Swedish localization

* docs: update changelog for Swedish localization

* fix: show Spark weekly Codex quota

* chore: prepare 0.31.0 release

* test: stabilize release precheck

* test: stabilize open menu refresh test

* docs: update appcast for 0.31.0

* chore: start 0.31.1 development

* fix: normalize merged Sources to upstream baseline + macOS 26.4 compiler crash

The prior squash-style upstream syncs meant several fork-touched files were
silently auto-merged into mashups (e.g. a duplicated applicationWillTerminate).
Reset all of Sources/ to upstream/main's exact content so the baseline is pure
upstream 0.31.1, keeping only the two fork-only files (UsageColorLevel,
MenuBarSeparatorStyle) for re-wiring next.

Also work around a swift-frontend IRGen crash (SIGABRT) in
AccountSwitcherView.compactButtonTitle under the Swift 6.2.3 + macOS 26.4 SDK
toolchain: the nested makeTitle() captured the mutable emailWidth/workspaceWidth
vars. Pass them as parameters instead. Pure upstream 0.31.1 does not build on
this toolchain without this change.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* feat: re-apply color-coded icons + separator style on upstream 0.31.1

Re-applies the fork's two genuinely-unique menu-bar features on top of the
upstream baseline, plus the macOS 26 Liquid Glass color handling.

Color-coded icons (toggle in Advanced ▸ "Color-coded icons", default on):
- UsageColorLevel.tintColor(for:) interpolates green→orange→red by session
  usage; applied in both StatusItemController icon paths (merged + per-provider).
- IconRenderer.makeIcon(tintColor:) draws shapes directly in the tint color and
  marks the image non-template so macOS 26 Liquid Glass keeps the RGB pixels
  (older macOS still tints the template via the button's contentTintColor).
  Tint participates in the icon cache key and the render-skip signatures.
- StatusItemController observes effectiveAppearance on macOS 26+ to re-render
  baked colors on dark/light switches.

Separator style (Display ▸ "Separator", dot/pipe, default dot):
- MenuBarSeparatorStyle drives the character between percent and pace in the
  "both" menu-bar display mode.

Settings plumbing for colorCodedIcons + menuBarSeparatorStyle across
SettingsStoreState / SettingsStore / +Defaults / +MenuObservation.
Bump version to 0.31.1-jl.1 (build 75).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* test: add coverage for color-coded icons and separator style

UsageColorLevelTests: nil passthrough, high-usage red clamping, monotonic
redness, low-usage green dominance.
MenuBarSeparatorStyleTests: separator characters, id/rawValue, allCases, parse.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

---------

Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: Ruiqi <[email protected]>
Co-authored-by: mehmet turac <[email protected]>
Co-authored-by: taibaran <[email protected]>
Co-authored-by: taibaran <[email protected]>
Co-authored-by: Pavlo Barzdun <[email protected]>
Co-authored-by: pavbar <[email protected]>
Co-authored-by: Brandon Charleson <[email protected]>
Co-authored-by: Yuxin Qiao <[email protected]>
Co-authored-by: tanish19078 <[email protected]>
Co-authored-by: lengmiao <[email protected]>
Co-authored-by: pasan <[email protected]>
Co-authored-by: Claude Opus 4.6 <[email protected]>
Co-authored-by: Sergey Lavrentev <[email protected]>
Co-authored-by: Marouan Chakran <[email protected]>
Co-authored-by: raflyazf <[email protected]>
Co-authored-by: serezha93 <[email protected]>
Co-authored-by: Christopher Pellicci <[email protected]>
Co-authored-by: Michael Smolkin <[email protected]>
Co-authored-by: Yubo Wang <[email protected]>
Co-authored-by: Larry Hao(郝卓远) <[email protected]>
Co-authored-by: hhh2210 <[email protected]>
Co-authored-by: zhulijin1991 <[email protected]>
Co-authored-by: dandan <[email protected]>
Co-authored-by: Nimrod Gutman <[email protected]>
Co-authored-by: Jon Brown <[email protected]>
Co-authored-by: rohitjavvadi <[email protected]>
Co-authored-by: m-rokai <[email protected]>
Co-authored-by: Zeno Ren <[email protected]>
Co-authored-by: Marc R. <[email protected]>
Co-authored-by: Ankit Dwivedi <[email protected]>
Co-authored-by: ankitdwivedi <[email protected]>
Co-authored-by: Joy Madhu <[email protected]>
Co-authored-by: joymadhu49 <[email protected]>
Co-authored-by: Vyctor H. Brzezowski <[email protected]>
Co-authored-by: Rohit <[email protected]>
Co-authored-by: JaimeGH <[email protected]>
Co-authored-by: soumikbhatta <[email protected]>
Co-authored-by: MCP <[email protected]>
Co-authored-by: Mikael Goderdzishvili <[email protected]>
Co-authored-by: miqaeli <[email protected]>
Co-authored-by: Perry Story <[email protected]>
Co-authored-by: Cursor <[email protected]>
Co-authored-by: Luís Miguel <[email protected]>
Co-authored-by: Misty <[email protected]>
Co-authored-by: narallee <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Co-authored-by: Davide Carnemolla <[email protected]>
Co-authored-by: iam-brain <[email protected]>
Co-authored-by: Bryan Font <[email protected]>
Co-authored-by: Sopen <[email protected]>
Co-authored-by: Ray García <[email protected]>
Co-authored-by: kiankyars <[email protected]>
Co-authored-by: Magicien <[email protected]>
Co-authored-by: IlyaL <[email protected]>
Co-authored-by: ngutman <[email protected]>
Co-authored-by: jsk <[email protected]>
Co-authored-by: Rajvardhan Patil <[email protected]>
Co-authored-by: Shun Min Chang <[email protected]>
Co-authored-by: Alan.Chang <[email protected]>
Co-authored-by: Zhongyue Lin <[email protected]>
Co-authored-by: Anirudh Venkatachalam <[email protected]>
Co-authored-by: bdamokos <[email protected]>
Co-authored-by: Eason <[email protected]>
Co-authored-by: zhuyifan <[email protected]>
Co-authored-by: Xu Xiang <[email protected]>
Co-authored-by: Xu Xiang <[email protected]>
Co-authored-by: Matt Stallone <[email protected]>
Co-authored-by: Kwon GuHyeon <[email protected]>
Co-authored-by: guhyun9454 <[email protected]>
Co-authored-by: Sakutaro Shina <[email protected]>
Co-authored-by: René <[email protected]>
Co-authored-by: rene <[email protected]>
Co-authored-by: Oleksandr Soldatov <[email protected]>
Co-authored-by: manuzimferreira <[email protected]>
Co-authored-by: Daniel Nylander <[email protected]>
@Yuxin-Qiao
Yuxin-Qiao deleted the codex/1084-menu-bar-extra-usage-spend-text branch June 25, 2026 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature idea: show money spend on MacOS Menu Bar

2 participants