Sync upstream CodexBar main through 0.33.1 development#7
Open
ColumbusLabs wants to merge 54 commits into
Open
Conversation
- Link T3 Chat in the provider list - Describe the Base and Overage usage buckets
* fix: default remainingPercent to 100 for untracked Antigravity models to prevent them from dominating summary bar max quota * fix: ignore untracked Antigravity summary quotas --------- Co-authored-by: vibecode-vm <vcvm@servas.ai> Co-authored-by: Peter Steinberger <steipete@gmail.com>
Defer parent-menu recomposition caused by provider data refreshes until menu tracking ends. Keep explicit provider switching and hosted submenu updates immediate. Co-authored-by: Peter Steinberger <steipete@gmail.com>
Add bounded automatic cookie discovery for Safari, Chrome variants, Firefox, and Edge. Surface browser permission failures and defer cookie I/O to fetch time. Co-authored-by: Peter Steinberger <steipete@gmail.com> Co-authored-by: Yuxin Qiao <Yuxin-Qiao@users.noreply.github.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
…386) * Schedule idle prune so cached dashboard WebViews are actually evicted The webview cache evicts entries idle longer than 60s, but prune() only ran on the next acquire/release. With an hourly refresh cadence the hidden ChatGPT WebView - and its WebContent (~500MB), GPU and Networking helper processes - stayed resident for the whole hour, effectively permanently. Schedule a prune after each release so eviction happens at the idle timeout the comment already promises. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix: harden dashboard webview idle pruning --------- Co-authored-by: Naoteru Nakamura <naoterumaker@ai-agent-driven.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: Peter Steinberger <steipete@gmail.com>
* fix(doubao): treat 200 + limit>0 + remaining=0 as unreliable headers, not 100% Volcano Ark returns HTTP 200 with `x-ratelimit-limit-requests > 0` and `x-ratelimit-remaining-requests = 0` on some account tiers (notably unverified personal keys) without actually rate-limiting the request — a genuine throttle would return 429. The previous math computed `used = limit` and clamped to 100%, so the Doubao card always showed 100% used for affected users. Tighten the normal-math guard to `limitRequests > 0 && remainingRequests > 0` so the unreliable-headers state falls through to the existing "Active - check dashboard for details" fallback (which was already used when both headers are missing). Also emit a `log.warning` when the pattern is observed so users hitting this can attach evidence from `~/Library/Logs/CodexBar/CodexBar.log` to bug reports. Adds `Tests/CodexBarTests/DoubaoUsageFetcherTests.swift` covering the normal path, the boundary near-full path, the unreliable-headers path, the both-headers-missing path, the invalid-key path, and provider identity tagging. Fixes #1382. Reported by @foobra on PR #498. * fix: preserve Doubao throttle state * fix: confirm ambiguous Doubao request limits * fix: preserve Doubao confirmation semantics * fix: require complete Doubao request limits * fix: classify Doubao request throttles * fix: preserve confirmed Doubao exhaustion --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
…acOS 26 beachball) (#1389)
* fix(menu): defer copy-icon click work off the NSMenu tracking loop
On macOS 26.4.1, clicking the doc.on.doc "Copy error" icon inside a hosted
menu card freezes the cursor for several seconds. Two SwiftUI / NSView
handlers run work synchronously inside the live NSMenu tracking event
loop:
- `CopyIconButton.body` (MenuCardView.swift:316) calls
`withAnimation { didCopy = true }` immediately on click and queues a
second `withAnimation { didCopy = false }` 0.9s later. Each
withAnimation inside a tracking-mode hosted view forces a synchronous
SwiftUI hosting layout pass on the main thread that the menu engine
cannot service mid-tracking.
- `ClickToCopyView.mouseDown` (ClickToCopyOverlay.swift) writes to
`NSPasteboard.general` synchronously. Pasteboard writes emit
distributed notifications whose synchronous watchers can re-enter the
menu engine; the tighter main-thread budget on macOS 26 makes this
user-visible.
Both handlers now `DispatchQueue.main.async` their work off the current
tracking tick (so it runs after AppKit unwinds back to a normal mode),
drop `withAnimation` in favour of plain state mutation, and guard
`updateNSView` against no-op writes so a stable parent card re-render
does not invalidate the NSView. The checkmark feedback still works (it
flips on the next tick and reverts after 0.9s) and the UX — clicking
the icon next to the error to copy — is preserved.
Adds `Tests/CodexBarTests/ClickToCopyOverlayTests.swift` covering the
pasteboard sentinel write, `acceptsFirstMouse` behaviour, and
`copyText` storage.
Fixes #1388.
* fix: defer all in-menu copy work
---------
Co-authored-by: Peter Steinberger <steipete@gmail.com>
* Add configurable terminal app for Open Terminal * Use configured terminal for Vertex AI login flow * test: harden terminal launcher behavior --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
* Fix Copilot unlimited chat quota display * fix: harden Copilot unlimited quota handling --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
* Document ad-hoc dev build keychain prompt diagnostics * Avoid dev-build keychain prompt loops * Fix dev-build keychain warning lint * Refine dev-build keychain guard * fix: narrow unbundled keychain guard --------- Co-authored-by: Yuxin Qiao <Yuxin-Qiao@users.noreply.github.com> Co-authored-by: Peter Steinberger <steipete@gmail.com>
* Make Augment keepalive stop idempotent * Cover idempotent Augment runtime stop * Assert Augment stop logging is idempotent * test: stabilize Augment keepalive stop coverage --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
* Add Japanese (ja) localization - Add ja.lproj/Localizable.strings with full translation of all 1033 keys - Add AppLanguage.japanese case and language picker label - Add language_japanese key to all existing language catalogs - Extend LocalizationLanguageCatalogTests language key list Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * test: verify Japanese language switching * fix: preserve Japanese accessibility arguments --------- Co-authored-by: Naoteru Nakamura <naoterumaker@ai-agent-driven.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: Peter Steinberger <steipete@gmail.com>
* Harden provider redirects carrying credentials * Cover provider secret headers in redirect guard * fix: guard OpenAI cookie importer redirects * Strip provider redirect credential headers * fix: harden provider redirect boundary --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…#1394) * perf: recycle menu content in place Co-authored-by: bcssewl <samirbassel@gmail.com> * docs: note menu content recycling --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
* Fix menu open refresh delay * docs: note instant cached menu opening --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
* perf: gate switcher event queue peeks Co-authored-by: bcssewl <samirbassel@gmail.com> * docs: note switcher event gating --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
* perf: defer merged icon redraws during menu tracking * docs: credit merged icon redraw fix --------- Co-authored-by: kiranmagic7 <209323973+kiranmagic7@users.noreply.github.com> Co-authored-by: Peter Steinberger <steipete@gmail.com>
Keep merged-provider tabs at one stable width, account for AppKit's retained tracked menu window width, and normalize every hosted card row including Subscription Utilization. Fixes #1410
* Decode provider status feeds off the main actor UsageStore's status fetch/parse helpers are statics on a MainActor type, so the Google Workspace incidents feed (hundreds of kilobytes live) decoded on the main thread, stalling the UI 150-340ms per Google-status provider per refresh - refreshes that also fire during menu interaction (#1399). The status helpers touch no store state, so they are now nonisolated and run on the concurrent executor, and the per-date-field ISO8601DateFormatter allocations are replaced with shared lock-guarded formatters (same pattern as CostUsageISO8601FormatterBox). * perf: guarantee status decoding stays off main --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
populateMenu -> codexAccountMenuDisplay loaded the codex account reconciliation snapshot synchronously whenever the 2s freshness cache had lapsed, paying auth.json reads, JWT parsing, and SHA256 fingerprinting on the main thread inside menu open and tracking. Menu display now tolerates a stale cached snapshot and revalidates the cache off the menu-build path; account changes land on the next rebuild.
…stale Keep codex account file reads off the menu-build path
CostUsageScanner and PiSessionCostScanner scans execute synchronously for minutes on large session archives. Running them inline on cooperative-pool task threads starves every other async task in the process: menus freeze while the main thread sits idle, and overlapping provider scans multiply the pressure. Field samples on a 2.5GB corpus showed both provider scans saturating pool threads for 7+ minutes after a cache schema bump while menu opens stalled. All corpus scans and persisted-cache decoding now run on one dedicated serial utility queue (CostUsageScanExecutor), with task cancellation bridged into the scanner-level cancellation checks. Serialization also removes concurrent provider scans racing the same disk.
…ive-pool Run cost-usage corpus scans off the Swift cooperative thread pool
Fix Cost row widening merged menu
Adds browser-backed Devin quota usage with authenticated Chrome session import, organization discovery, settings integration, and regression coverage. Co-authored-by: Coy Geek <65363919+coygeek@users.noreply.github.com>
Show Cursor's Safari Full Disk Access recovery guidance before the long browser login hint, with ordering regression coverage. Co-authored-by: Larry Hao(郝卓远) <hzy2210@gmail.com>
Present usable legacy Cursor request plans as one Requests quota with the raw used/limit count, while preserving Total/Auto/API fallback for incomplete or zero-limit payloads. Adds projection and menu-model regression coverage plus the 0.33.1 changelog entry. Co-authored-by: hhh2210 <hzy2210@gmail.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: pickaxe <54486432+ProspectOre@users.noreply.github.com>
Syncs the 45-commit range d7b58a0..dd8cf8b from steipete/CodexBar, covering the credentialed-redirect security guard, the new Devin provider, Claude pricing corrections, Cursor legacy request quotas and Full Disk Access hint ordering, Copilot unlimited chat display, cost scanner threading/cancellation work, broad menu performance and width stability changes, configurable terminal app, expanded MiMo browser support, and Japanese localization. Conflict resolutions preserve the QuotaKit product boundary: - appcast.xml, CHANGELOG.md, README.md, AGENTS.md stay QuotaKit-owned; version.env advances UPSTREAM_MONITOR_BASE to dd8cf8b. - Claude cost pricing keeps the fork's family-fallback ladder and adds upstream's dated historical long-context pricing and ClaudeCostTokens. - Cost usage caches keep the fork's pricing-fingerprint invalidation alongside upstream's compatible-producer-keys, adopting upstream's claude/vertex artifact version 4 and pi-session version 3. - Localizable.strings keep fork formatting/branding with upstream's new keys applied; the new ja.lproj is rebranded to QuotaKit customer copy. - Widget pbxproj keeps the QuotaKit package reference. - CodexParserHash regenerated from the merged scanner sources. https://claude.ai/code/session_01Mji1HrQ5wkVndbmF3TF6b1
- Handle the new .devin provider in the fork's exhaustive switches: AccountIdentityComputer stays non-Tier-A (per-device legacy bucket) and SyncCoordinator never marks Devin costs as estimated, matching every other quota-only provider. - Move the APIKeyDebugContext struct and its four provider builders out of UsageStore.swift into UsageStore+APIKeyDebug.swift; the merge had pushed the file past the SwiftLint file_length limit (1509 > 1500). Verified on Linux with Swift 6.2.1: CodexBarCLI release build and swift test pass; SwiftFormat 0.59.1 lint clean on changed files. https://claude.ai/code/session_01Mji1HrQ5wkVndbmF3TF6b1
- Add the Devin provider to the iOS raw color palette, mirroring the Mac descriptor color (70, 180, 130). - Bump parserLogicVersion 5 → 6: the merged upstream scanner changes Claude token attribution (native 1-hour cache-write split, dated historical long-context pricing) and moves Codex scans to the dedicated executor, so the pricingFingerprint must roll to invalidate caches written by the v0.32.4 parser. https://claude.ai/code/session_01Mji1HrQ5wkVndbmF3TF6b1
Upstream's language-preference smoke test asserts the upstream-branded Japanese quit label; the fork rebrands displayed localization values to QuotaKit, so the expectation follows the ja.lproj value. https://claude.ai/code/session_01Mji1HrQ5wkVndbmF3TF6b1
Upstream's deferral test ends by asserting the deferred render produced an empty quota icon (primary=nil). The fork renders the QuotaKit app-icon fallback when no snapshot data is available, so the deferred render's signature is mode=appIcon with no primary field. Assert that instead; the deferral mechanics the test exists for are unchanged. https://claude.ai/code/session_01Mji1HrQ5wkVndbmF3TF6b1
The fork enables iCloud sync by default, which fans out one fetch per token account on a global refresh (Phase G CloudKit fix), so upstream's new assertion that exactly one fetch is in flight before the blocker drains saw two. Disable iCloud sync in this test so it exercises the single-selected-account path whose refresh coalescing upstream's assertion verifies; the fork's fan-out behavior keeps its own coverage in ShouldFetchAllTokenAccountsTests. https://claude.ai/code/session_01Mji1HrQ5wkVndbmF3TF6b1
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.
Summary
Manual upstream sync for #5: merges the 45-commit range
d7b58a05..dd8cf8b0fromsteipete/CodexBar(through upstream 0.33.1 development) as a single merge commit.Key upstream changes brought in:
Conflict resolutions (QuotaKit product boundary preserved)
appcast.xml,CHANGELOG.md,README.md,AGENTS.mdstay QuotaKit-owned;version.envkeepsUPSTREAM_VERSION=v0.32.4(bump-when-shipped rule) and advances onlyUPSTREAM_MONITOR_BASEtodd8cf8b0ClaudeCostTokenswith the fork's family-fallback ladder (Research/018)CodexParserHashregeneratedLocalizable.stringskeep fork formatting/branding with upstream's key-level changes applied; newja.lprojrebranded to QuotaKit customer copy (values only, upstream lookup keys kept)Validation
Scripts/audit_customer_branding.pypasses (no visible CodexBar leaks).stringsfiles parse; no conflict markers remainswift testgateCloses #5
https://claude.ai/code/session_01Mji1HrQ5wkVndbmF3TF6b1