Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
210 commits
Select commit Hold shift + click to select a range
8b0d488
fix: skip elapsed reset times when picking LLMProxy next reset
OfficialAbhinavSingh Jul 19, 2026
39d86da
fix: clamp z.ai raw-percentage usedPercent fallback to 0...100
OfficialAbhinavSingh Jul 19, 2026
0bc2468
fix: show day form at exactly 24h in reset countdowns
OfficialAbhinavSingh Jul 19, 2026
264ba39
Add ZoomMate usage provider
weddle Jul 19, 2026
979fd6c
Continue past rejected ZoomMate cookie profiles
weddle Jul 19, 2026
4f11751
fix(widget): remove unintended dark overlay
Jul 20, 2026
8f63218
Keep session estimates visible while idle
Zihao-Qi Jul 20, 2026
1f3c657
Add Claude Daily Routines usage toggle
Zihao-Qi Jul 20, 2026
fa2b1bd
Show fractional session quota estimates
Zihao-Qi Jul 20, 2026
2ae878a
Remove release-owned changelog entry
Zihao-Qi Jul 20, 2026
5f9cfff
Refresh custom account labels
kiranmagic7 Jul 21, 2026
df23669
feat(providers): add Qwen Cloud individual token-plan provider
umutkeltek Jul 20, 2026
27e2096
fix(qwen-cloud): require login ticket for session validation and norm…
umutkeltek Jul 21, 2026
d6a1184
test(qwen-cloud): add regression fixture for authenticated no-subscri…
umutkeltek Jul 21, 2026
9df28f7
ci(release): isolate write permissions
Yuxin-Qiao Jul 22, 2026
70b434d
test(spend): serialize dashboard controller cases
Yuxin-Qiao Jul 22, 2026
6b177bd
test(spend): isolate dashboard date range
Yuxin-Qiao Jul 22, 2026
9085e05
Fix Qwen token plan usage windows
umutkeltek Jul 22, 2026
008dc97
Fix Qwen Cloud usage request context
umutkeltek Jul 22, 2026
a3b8c9c
Allow browser cookie retry from provider settings
umutkeltek Jul 22, 2026
6026fd0
Fix Qwen Cloud browser session requests
umutkeltek Jul 22, 2026
2b0103b
Fix Chutes quota detail rendering
kiranmagic7 Jul 23, 2026
5d474c4
fix: keep cookie caches in memory when Keychain is disabled
Jul 23, 2026
7eeb05c
ci: retrigger after unrelated SpendDashboard flake
Jul 23, 2026
e828102
Redact credentials in config dump (#2400)
Yuxin-Qiao Jul 23, 2026
16e148a
test: isolate SpendDashboard day selection defaults
Jul 23, 2026
d3140dd
Fix duplicate menu bar items during refresh
uclort Jul 23, 2026
a0e7b24
Fix flaky timing assertion in KimiProviderTests
Yuxin-Qiao Jul 23, 2026
44db35e
fix: combine keychain-disabled caches with Claude overview weekly
Jul 23, 2026
7d289a2
fix: allow Claude Auto CLI on boot when Keychain is disabled
Jul 23, 2026
78c9126
Fix timezone-sensitive fixture timestamps in SpendDashboardTokenProve…
Yuxin-Qiao Jul 23, 2026
5ea1e30
Revert "Fix timezone-sensitive fixture timestamps in SpendDashboardTo…
Yuxin-Qiao Jul 23, 2026
a0196e2
Fix plural stringsdict formatting and date-sensitive test assertions
Yuxin-Qiao Jul 23, 2026
0cbf261
fix: scope Claude CLI Keychain-disabled boot gate to explicit disable
Jul 24, 2026
3c91f5c
test: isolate Claude credential tests
ss251 Jul 24, 2026
37584aa
no-mistakes(review): Auto-isolate pending cache clear under tests
ss251 Jul 24, 2026
c5b618b
no-mistakes(document): Disable type_body_length for store tests
ss251 Jul 24, 2026
d78f5a5
no-mistakes: apply CI fixes
ss251 Jul 24, 2026
b73a0cb
no-mistakes: apply CI fixes
ss251 Jul 24, 2026
9f7d30d
Revert "no-mistakes: apply CI fixes"
ss251 Jul 24, 2026
9e44daa
Revert "no-mistakes: apply CI fixes"
ss251 Jul 24, 2026
eafd9e6
test: require live keychain opt-in
ss251 Jul 24, 2026
b6f157c
no-mistakes(review): Isolate pending cache-clear state per test scope
ss251 Jul 24, 2026
ea9d6b4
Show Claude prepaid balance
Zihao-Qi Jul 24, 2026
216d997
Refine Claude credits display
Zihao-Qi Jul 24, 2026
e2ffbf5
fix: bound Codex cost scans on giant session corpora
Jul 25, 2026
49d0966
fix: close cost-scan budget bypasses on forced rescans and fork parents
Jul 25, 2026
aebe9fd
Show Claude balance with extra usage
Zihao-Qi Jul 25, 2026
e44ed30
Stabilize spend dashboard fixtures
AmrMohamad Jul 25, 2026
e541cab
Persist Codex session metadata
AmrMohamad Jun 16, 2026
3944319
Add Codex Workspaces index
AmrMohamad Jun 16, 2026
ff58c48
Add workspace models analytics
AmrMohamad Jul 25, 2026
5c571d7
Test and document workspace indexing
AmrMohamad Jul 25, 2026
4e1c246
Fix duplicate menu items from Codex hooks
uclort Jul 26, 2026
7bf6a49
Fix workspace catalog freshness
AmrMohamad Jul 26, 2026
0d7d313
Fix Grok browser cookie refresh
olddonkey Jul 26, 2026
9e3ada7
Remove release-owned changelog entry
olddonkey Jul 26, 2026
372ae3d
Fix Grok stale team cookie fallback
olddonkey Jul 26, 2026
87cffde
Keep Grok team classification for cached non-auth failures
olddonkey Jul 26, 2026
b24f2c2
refactor(providers): extract AlibabaCodingPlan cookie importer behind…
umutkeltek Jul 27, 2026
ec900eb
refactor(providers): extract OneConsole cookie-header pair from Aliba…
umutkeltek Jul 27, 2026
467fb95
refactor(providers): consolidate OneConsole JSON traversal helpers
umutkeltek Jul 27, 2026
ec83b73
refactor(providers): consolidate OneConsole SEC token resolver
umutkeltek Jul 27, 2026
434ac77
refactor(alibaba-coding-plan): consume shared OneConsole JSON helpers
umutkeltek Jul 27, 2026
14d6f7c
refactor(alibaba-token-plan): consume shared OneConsole JSON helpers
umutkeltek Jul 27, 2026
bbe04c2
feat(providers): support per-host cookie routing on HTTP transport
umutkeltek Jul 27, 2026
93f90c7
refactor(qwen-cloud): split fetcher into API client + parser + orches…
umutkeltek Jul 27, 2026
8fa0752
test(qwen-cloud): switch to bundle-loaded fixture tests
umutkeltek Jul 27, 2026
8bd28c1
docs(providers): document shared OneConsole infrastructure
umutkeltek Jul 27, 2026
4ad0a25
Harden OneConsole shared refactor
umutkeltek Jul 28, 2026
b5f9b6c
Address Qwen review feedback
umutkeltek Jul 28, 2026
529cc6c
Keep Qwen imports Chrome-only
umutkeltek Jul 28, 2026
099ca0a
Merge branch 'main' into kiran/chutes-quota-detail-20260723
steipete Jul 28, 2026
c7d85f4
Merge branch 'main' into agent/fix-grok-cookie-refresh
steipete Jul 28, 2026
46cabf9
Merge remote-tracking branch 'origin/main' into codex/pr-2426-lane
steipete Jul 28, 2026
aa70509
fix: constrain disabled keychain fallbacks
steipete Jul 28, 2026
e95fea4
Fix Claude enterprise widget usage
ChenZiHong-Gavin Jul 23, 2026
5b33620
Isolate spend dashboard test preferences
ChenZiHong-Gavin Jul 27, 2026
cabcf74
Merge branch 'main' into fix-reset-countdown-day-rollover
steipete Jul 28, 2026
a0a5f74
test: Keep current spend dashboard isolation
steipete Jul 28, 2026
0017c77
test: mirror reset-countdown day-rollover coverage in the standard te…
OfficialAbhinavSingh Jul 28, 2026
9fd8bd2
Merge branch 'main' into fix-reset-countdown-day-rollover
steipete Jul 28, 2026
7d1d43d
Merge remote-tracking branch 'origin/main' into codex/pr-2361-repair
steipete Jul 28, 2026
2b44b6b
Preserve SEC token network failures
umutkeltek Jul 28, 2026
322cfa7
fix: support amp subscription usage
tylergibbs1 Jul 24, 2026
0816bfe
Handle linked Amp subscription rows
tylergibbs1 Jul 24, 2026
2697c22
test: preserve existing Amp usage behavior
tylergibbs1 Jul 24, 2026
3050ef3
fix: label Amp subscription CLI windows
tylergibbs1 Jul 24, 2026
a0dda69
Fix Amp quota warning labels
tylergibbs1 Jul 28, 2026
7e5ee43
Merge pull request #2402 from kiranmagic7/kiran/chutes-quota-detail-2…
steipete Jul 28, 2026
9ed0dcc
Merge pull request #2458 from olddonkey/agent/fix-grok-cookie-refresh
steipete Jul 28, 2026
78c6aa6
chore: isolate credential redaction changes
steipete Jul 28, 2026
34bd128
Merge pull request #2343 from OfficialAbhinavSingh/fix-reset-countdow…
steipete Jul 28, 2026
4ae8ab3
Merge remote-tracking branch 'origin/main' into codex/pr-2410-redaction
steipete Jul 28, 2026
5b53021
Merge remote-tracking branch 'origin/main' into codex/pr-2426-lane
steipete Jul 28, 2026
bfce740
Merge pull request #2478 from steipete/codex/claude-enterprise-widget…
steipete Jul 28, 2026
fb32b84
Merge pull request #2342 from OfficialAbhinavSingh/fix-zai-percent-fa…
steipete Jul 28, 2026
42d5891
Merge pull request #2335 from OfficialAbhinavSingh/fix-llmproxy-reset…
steipete Jul 28, 2026
f74cf1b
fix(one-console): restore legacy date parsing
steipete Jul 28, 2026
9e8b2a1
fix: gate background Claude CLI availability
steipete Jul 28, 2026
224ad10
Merge remote-tracking branch 'origin/main' into codex/pr-2426-lane
steipete Jul 28, 2026
498aef6
Merge commit '2b44b6b1cef09d0eaec12ca9c524f0427cb64065' into codex/pr…
steipete Jul 28, 2026
af9e859
Merge main into codex/show-fractional-weekly-windows
steipete Jul 28, 2026
224f4b0
test: verify config dump redaction output
steipete Jul 28, 2026
5bbbd3c
Merge remote-tracking branch 'origin/main' into codex/pr-2410-redaction
steipete Jul 28, 2026
d7e4797
Fix closure parameter position lint in baseline test
steipete Jul 28, 2026
ec8db86
Merge pull request #2410 from Yuxin-Qiao/fix/config-dump-redact-crede…
steipete Jul 28, 2026
cc9e15e
Merge remote-tracking branch 'origin/main' into codex/claude-extra-cr…
steipete Jul 28, 2026
b8ca815
Merge branch 'main' into codex/claude-daily-routines-toggle
steipete Jul 28, 2026
b9b14b3
Merge remote-tracking branch 'origin/main' into codex/claude-keychain…
steipete Jul 28, 2026
9b4e4d8
fix: gate Claude balance enrichment to existing sessions
steipete Jul 28, 2026
a6d360f
test: isolate Claude defaults fixtures
steipete Jul 28, 2026
b188a0a
style: wrap Claude enrichment test fixtures
steipete Jul 28, 2026
87bdb80
fix: validate LiteLLM and LLM Proxy base URLs before sending the API key
OfficialAbhinavSingh Jul 28, 2026
e1f91ba
Merge pull request #2438 from tylergibbs1/agent/amp-subscription-parser
steipete Jul 28, 2026
14bc80c
Merge pull request #2357 from Zihao-Qi/codex/show-fractional-weekly-w…
steipete Jul 28, 2026
23b2a1c
Merge pull request #2362 from kiranmagic7/kiran/refresh-custom-accoun…
steipete Jul 28, 2026
650b998
Merge branch 'main' into fix/widget-vibrant-background
steipete Jul 28, 2026
3a79c44
Merge branch 'main' into codex/keep-session-estimate-idle
steipete Jul 28, 2026
7a2a8f7
test: establish Claude background CLI availability
steipete Jul 28, 2026
66dee16
test: split idle forecast coverage
steipete Jul 28, 2026
f745fc3
fix: scope ZoomMate cookies by host
steipete Jul 28, 2026
8c4a346
Merge remote-tracking branch 'origin/main' into codex/zoommate-2344
steipete Jul 28, 2026
9622058
Merge pull request #2441 from ss251/fix/claude-keychain-test-isolation
steipete Jul 28, 2026
7867be3
docs: clarify ZoomMate cookie routing
steipete Jul 28, 2026
8a767d8
style: align file length lint suppressions
steipete Jul 28, 2026
cf16f25
feat: scope Claude OAuth cache by profile
steipete Jul 28, 2026
f4b3978
Merge pull request #2443 from Zihao-Qi/codex/claude-extra-credit
steipete Jul 28, 2026
cf09db5
fix: simplify Claude profile prompt helper
steipete Jul 28, 2026
83a7fd3
Merge pull request #2361 from umutkeltek/feat/qwen-cloud-provider
steipete Jul 28, 2026
20d54c0
feat: add Alibaba Token Plan Personal variants
steipete Jul 28, 2026
2fd53db
Merge pull request #2358 from Zihao-Qi/codex/claude-daily-routines-to…
steipete Jul 29, 2026
bc8f33e
Merge pull request #2354 from jarvisluk/fix/widget-vibrant-background
steipete Jul 29, 2026
19a1be9
test: widen Kiro detached-child promptness margin for loaded CI runners
steipete Jul 29, 2026
0f1b394
Merge origin/main into codex/workspaces-foundation
steipete Jul 29, 2026
84cdd59
fix: resume bounded Codex cost scans
steipete Jul 29, 2026
556e3c6
fix: validate resumable scan targets
steipete Jul 29, 2026
daba8ab
Merge pull request #2488 from steipete/claude/agitated-faraday-9938d1
steipete Jul 29, 2026
da343ce
fix: prioritize exhausted automatic quota windows
steipete Jul 29, 2026
4f85628
Merge latest origin/main into codex/workspaces-foundation
steipete Jul 29, 2026
a0ceafb
Merge pull request #2352 from Yuxin-Qiao/fix/exhausted-quota-display-…
steipete Jul 29, 2026
dc6fe72
Merge current origin/main into codex/workspaces-foundation
steipete Jul 29, 2026
ce0e1cb
Merge pull request #2456 from AmrMohamad/codex/workspaces-foundation
steipete Jul 29, 2026
5ce21f6
Merge pull request #2426 from gmkbenjamin/fix/keychain-disabled-claud…
steipete Jul 29, 2026
aa91c20
Drop changelog edit (maintainer adds on merge)
steipete Jul 29, 2026
4fe1653
Merge remote-tracking branch 'origin/main' into HEAD
steipete Jul 29, 2026
dd9e08b
Merge pull request #2416 from uclort/codex/fix-status-item-visibility…
steipete Jul 29, 2026
6b681b5
Thread Claude profile environment through recovery
ProspectOre Jul 28, 2026
aacfbd6
Migrate Claude ownership tests to profile cache keys
ProspectOre Jul 28, 2026
44858e1
fix: budget subagent reclassification rescans
steipete Jul 29, 2026
d04c74a
Merge pull request #2487 from steipete/codex/alibaba-personal-variants
steipete Jul 29, 2026
84d6b6f
Merge main; union provider list, regenerate parser hash
steipete Jul 29, 2026
68d44b4
Merge pull request #2344 from weddle/zoommate-provider
steipete Jul 29, 2026
15cafd5
Merge pull request #2336 from Zihao-Qi/codex/keep-session-estimate-idle
steipete Jul 29, 2026
8581bff
Fix ClaudeCLIBackgroundAvailabilityTests build after prepaid-balance …
steipete Jul 29, 2026
94bc395
Bump advertised provider count to 65
steipete Jul 29, 2026
dc24935
Fix main after provider landings: 65-provider count surfaces, drop su…
steipete Jul 29, 2026
323ac6d
chore: merge origin/main into PR 2452
steipete Jul 29, 2026
4147921
Merge branch 'main' into codex/claude-profile-cache-foundation
steipete Jul 29, 2026
e92a6fa
Pin wall-clock in ZoomMate daily-breakdown tests
steipete Jul 29, 2026
6068a0a
Merge remote-tracking branch 'origin/main' into fix/cost-scan-giant-s…
steipete Jul 29, 2026
5337636
Merge pull request #2452 from D4ilyHub/fix/cost-scan-giant-session-bu…
steipete Jul 29, 2026
587df02
Merge branch 'main' into codex/claude-profile-cache-foundation
steipete Jul 29, 2026
bd88087
Deflake shell-runner timeout test: pre-warm python3, poll for PID files
steipete Jul 29, 2026
ca3f5e9
Merge branch 'main' into codex/claude-profile-cache-foundation
steipete Jul 29, 2026
ac82d5d
Merge pull request #2484 from steipete/codex/claude-profile-cache-fou…
steipete Jul 29, 2026
fcf75fb
Update changelog for triage-batch landings
steipete Jul 29, 2026
7760f34
chore: release 0.46.0
steipete Jul 29, 2026
be15ba0
Merge remote-tracking branch 'upstream/main' into fix-litellm-llmprox…
OfficialAbhinavSingh Jul 29, 2026
b1170d8
docs: update appcast for 0.46.0
steipete Jul 29, 2026
3350506
docs: start 0.46.1 changelog
steipete Jul 29, 2026
6727ecd
fix: surface rejected LiteLLM and LLM Proxy endpoint overrides
OfficialAbhinavSingh Jul 29, 2026
2c40464
fix(menu): simplify overview separators
BobbyWang0120 Jul 23, 2026
64fd710
Fix cost history dates for non-Gregorian calendars
mijatovicmilan Jul 23, 2026
505bd82
Fix non-Gregorian cost usage regressions
mijatovicmilan Jul 23, 2026
cdab5d3
Fix cost usage time zone invalidation
mijatovicmilan Jul 23, 2026
b7553b1
Link About website to codex.bar
steipete Jul 29, 2026
244ab5f
Fix Claude sign-in menu state
Zihao-Qi Jul 24, 2026
64ffcfd
Handle email-less Claude OAuth accounts
Zihao-Qi Jul 25, 2026
f6c4693
Fix Ollama session token accounts
harjothkhara Jul 22, 2026
402f9c5
fix: narrow Ollama token normalization
steipete Jul 29, 2026
d62f2e6
fix: preserve calendar in workspace usage
steipete Jul 29, 2026
7191cac
fix: allow MiniMax usage on Linux with a configured API key
OfficialAbhinavSingh Jul 28, 2026
777107a
fix: preserve Ollama account cookie values
steipete Jul 29, 2026
9e8a2a8
Group CLI web-support exemptions into helpers to stay under complexit…
steipete Jul 29, 2026
4783daf
Scope MiniMax Linux exemption to keys that resolve a Linux-capable st…
steipete Jul 29, 2026
c1dcd66
fix: allow private-network proxy endpoints
steipete Jul 29, 2026
1697142
test: avoid password-shaped endpoint fixtures
steipete Jul 29, 2026
df5199a
Merge pull request #2445 from Zihao-Qi/codex/fix-claude-sign-in-label
steipete Jul 29, 2026
d00d63b
Merge pull request #2385 from harjothkhara/codex/fix-2359-ollama-sess…
steipete Jul 29, 2026
c52b0ef
Merge pull request #2483 from OfficialAbhinavSingh/fix-litellm-llmpro…
steipete Jul 29, 2026
40acc31
Fix CLI version path resolution
geofffranks Jul 25, 2026
cf79447
test: cover CLI version invocation paths
steipete Jul 29, 2026
fd92b4a
Doubao: read Agent Plan (AFP) usage on the AK/SK API source
Jul 29, 2026
cf7b749
fix: overlay authoritative OpenCode Go web windows onto local usage
Jul 23, 2026
64c86ff
fix: propagate Doubao agent plan failures
steipete Jul 29, 2026
fa05d65
fix: evict invalid OpenCode Go cookie cache
steipete Jul 29, 2026
d57817a
Merge pull request #2417 from mijatovicmilan/agent/fix-gregorian-cost…
steipete Jul 29, 2026
fa9343a
Merge pull request #2406 from BobbyWang0120/codex/simplify-overview-s…
steipete Jul 29, 2026
92f91b2
Use failable UTF-8 conversion in CLI entry test helper
steipete Jul 29, 2026
77f2ea0
Merge pull request #2475 from OfficialAbhinavSingh/fix-minimax-linux-…
steipete Jul 29, 2026
256c05e
Merge pull request #2454 from geofffranks/fix/cli-version-resolution
steipete Jul 29, 2026
6a4a182
Merge pull request #2496 from LeoLin990405/fix/doubao-agent-plan
steipete Jul 29, 2026
b036579
Merge pull request #2430 from aseelye/fix/opencodego-web-usage-overlay
steipete Jul 29, 2026
4e4c8d4
Record upstream history through fcf75fb80
ColumbusLabs Jul 29, 2026
3946796
Sync upstream through b036579b4
ColumbusLabs Jul 29, 2026
8ccc9ac
Make Claude cache bump visible to lint
ColumbusLabs Jul 29, 2026
e028e67
Regenerate parser hash after cache version split
ColumbusLabs Jul 29, 2026
617c5e2
Match Claude cache audit syntax
ColumbusLabs Jul 29, 2026
693f9f6
Expose combined Claude cache bump to audit
ColumbusLabs Jul 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ on Columbus Labs QuotaKit releases and product-facing changes.
- CLI: redact stored credentials from `quotakit config dump` by default; use `--show-secrets` to reveal raw values.
- Menu bar: remove status-item hover tooltips while retaining VoiceOver titles.
- Cost displays: use consistent labels while preserving reported-versus-estimated provenance in settings and per-value hints.
- Synced upstream CodexBar changes through `b036579b4`, including safer provider endpoint overrides, Doubao Agent Plan usage, OpenCode Go authoritative web-window overlays, Ollama session recovery, MiniMax Linux API-key support, calendar-correct cost history, and CLI version-path fixes while preserving QuotaKit release ownership, public URLs, config paths, CloudKit setup, and iOS build numbers.
- Synced upstream CodexBar changes through `02b4ba278`, including Claude weekly-window ordering and fallback accuracy, Kimi weekly duration accuracy, Ollama session reuse, safer automatic Safari-cookie handling, LongCat Firefox imports, localized session equivalents, stacked menu-title alignment, WidgetKit refresh-loop prevention, and Linux Alibaba Token Plan support while preserving QuotaKit release ownership, CloudKit setup, config paths, and iOS build numbers.

### Fixed
Expand Down
11 changes: 8 additions & 3 deletions Sources/CodexBar/MenuCardView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,7 @@ struct UsageMenuCardHeaderSectionView: View {
private struct UsageMenuCardUsageContentView: View {
let model: UsageMenuCardView.Model
let showBottomDivider: Bool
var showsSectionDividers = true
@Environment(\.menuItemHighlighted) private var isHighlighted

/// Doubao ships Coding Plan and Agent Plan subscriptions, each with personal
Expand Down Expand Up @@ -644,7 +645,7 @@ private struct UsageMenuCardUsageContentView: View {
self.groupHeader("Coding Plan")
self.metricRows(split.coding)
}
if !split.coding.isEmpty {
if !split.coding.isEmpty, self.showsSectionDividers {
Divider()
}
self.groupHeader("Agent Plan")
Expand All @@ -653,7 +654,7 @@ private struct UsageMenuCardUsageContentView: View {
self.metricRows(self.model.metrics)
}
if let resetCredits = self.model.codexResetCredits {
if !self.model.metrics.isEmpty {
if !self.model.metrics.isEmpty, self.showsSectionDividers {
Divider()
}
CodexResetCreditsContent(presentation: resetCredits)
Expand Down Expand Up @@ -681,11 +682,15 @@ struct UsageMenuCardUsageSectionView: View {
let showBottomDivider: Bool
let bottomPadding: CGFloat
let width: CGFloat
var showsSectionDividers = true
@Environment(\.menuCardRefreshMonitor) private var refreshMonitor

var body: some View {
let liveModel = self.liveModel
UsageMenuCardUsageContentView(model: liveModel, showBottomDivider: self.showBottomDivider)
UsageMenuCardUsageContentView(
model: liveModel,
showBottomDivider: self.showBottomDivider,
showsSectionDividers: self.showsSectionDividers)
.padding(.horizontal, UsageMenuCardLayout.horizontalPadding)
.padding(.top, UsageMenuCardLayout.usageSectionTopPadding)
.padding(.bottom, self.bottomPadding)
Expand Down
14 changes: 11 additions & 3 deletions Sources/CodexBar/MenuDescriptor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -552,12 +552,14 @@ struct MenuDescriptor {
let targetProvider = provider ?? store.enabledProviders().first
let metadata = targetProvider.map { store.metadata(for: $0) }
let fallbackAccount = targetProvider.map { store.accountInfo(for: $0) } ?? account
let hasAccount = self.hasAccount(for: targetProvider, store: store, account: fallbackAccount)
let loginContext = targetProvider.map {
ProviderMenuLoginContext(
provider: $0,
store: store,
settings: store.settings,
account: fallbackAccount)
account: fallbackAccount,
hasAccount: hasAccount)
}

// Show "Add Account" if no account, "Switch Account" if logged in
Expand All @@ -571,7 +573,6 @@ struct MenuDescriptor {
entries.append(.action(override.label, override.action))
} else {
let loginAction = self.switchAccountTarget(for: provider, store: store)
let hasAccount = self.hasAccount(for: provider, store: store, account: fallbackAccount)
let accountLabel = hasAccount ? L("Switch Account...") : L("Add Account...")
entries.append(.action(accountLabel, loginAction))
}
Expand Down Expand Up @@ -647,11 +648,18 @@ struct MenuDescriptor {

private static func hasAccount(for provider: UsageProvider?, store: UsageStore, account: AccountInfo) -> Bool {
let target = provider ?? store.enabledProviders().first ?? .codex
if let email = store.snapshot(for: target)?.accountEmail(for: target),
let snapshot = store.snapshot(for: target)
if let email = snapshot?.accountEmail(for: target),
!email.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty
{
return true
}
if target == .claude,
snapshot?.identity(for: .claude) != nil,
snapshot?.hasRateLimitWindows == true
{
return true
}
let metadata = store.metadata(for: target)
if metadata.usesAccountFallback,
let fallback = account.email?.trimmingCharacters(in: .whitespacesAndNewlines),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ struct ClaudeProviderImplementation: ProviderImplementation {
if self.shouldOpenTerminalForOAuthError(store: context.store) {
return ("Open Terminal", .openTerminal(command: "claude"))
}
guard !context.hasAccount else { return nil }
return (L("Sign in with Claude Code..."), .switchAccount(.claude))
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ struct LLMProxyProviderImplementation: ProviderImplementation {
@MainActor
func isAvailable(context: ProviderAvailabilityContext) -> Bool {
ProviderTokenResolver.llmProxyToken(environment: context.environment) != nil &&
LLMProxySettingsReader.baseURL(environment: context.environment) != nil
LLMProxySettingsReader.hasBaseURLOverride(environment: context.environment)
}

@MainActor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ struct LiteLLMProviderImplementation: ProviderImplementation {
@MainActor
func isAvailable(context: ProviderAvailabilityContext) -> Bool {
ProviderTokenResolver.liteLLMToken(environment: context.environment) != nil &&
LiteLLMSettingsReader.baseURL(environment: context.environment) != nil
LiteLLMSettingsReader.hasBaseURLOverride(environment: context.environment)
}

@MainActor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ struct ProviderMenuLoginContext {
let store: UsageStore
let settings: SettingsStore
let account: AccountInfo
let hasAccount: Bool
}
7 changes: 5 additions & 2 deletions Sources/CodexBar/StatusItemController+MenuTypes.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ extension ProviderSwitcherSelection {
}

struct OverviewMenuCardRowView: View {
static let showsSectionDividers = false

let model: UsageMenuCardView.Model
let storageText: String?
let width: CGFloat
Expand All @@ -31,14 +33,15 @@ struct OverviewMenuCardRowView: View {
VStack(alignment: .leading, spacing: 0) {
UsageMenuCardHeaderSectionView(
model: self.model,
showDivider: self.hasUsageBlock,
showDivider: Self.showsSectionDividers && self.hasUsageBlock,
width: self.width)
if self.hasUsageBlock {
UsageMenuCardUsageSectionView(
model: self.model,
showBottomDivider: false,
bottomPadding: 6,
width: self.width)
width: self.width,
showsSectionDividers: Self.showsSectionDividers)
}
if let storageText {
HStack(alignment: .firstTextBaseline, spacing: 4) {
Expand Down
27 changes: 25 additions & 2 deletions Sources/CodexBarCLI/CLIIO.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ extension CodexBarCLI {

static func currentVersion(
bundle: Bundle = .main,
executablePath: String? = CommandLine.arguments.first) -> String?
executablePath: String? = nil) -> String?
{
let executablePath = executablePath ?? Self.runningExecutablePath(bundle: bundle)
if let version = self.currentVersion(bundleVersion: nil, executablePath: executablePath) {
return version
}
Expand All @@ -65,6 +66,28 @@ extension CodexBarCLI {
executablePath: nil)
}

static func runningExecutablePath(bundle: Bundle = .main) -> String? {
// Bundle.executableURL keeps this seam deterministic for app bundles and tests; the
// platform-specific fallbacks cover direct standalone launches without a usable bundle.
if let path = bundle.executableURL?.path, !path.isEmpty {
return path
}

#if canImport(Darwin)
var size: UInt32 = 0
guard _NSGetExecutablePath(nil, &size) != 0 else { return nil }
var buffer = [Int8](repeating: 0, count: Int(size))
guard _NSGetExecutablePath(&buffer, &size) == 0 else { return nil }
return String(cString: buffer)
#elseif os(Linux)
let path = "/proc/self/exe"
guard FileManager.default.fileExists(atPath: path) else { return nil }
return URL(fileURLWithPath: path).resolvingSymlinksInPath().path
#else
return nil
#endif
}

static func currentVersion(bundleVersion: String?, executablePath: String?) -> String? {
if let executablePath, !executablePath.isEmpty {
let executableURL = URL(fileURLWithPath: executablePath).resolvingSymlinksInPath()
Expand All @@ -90,7 +113,7 @@ extension CodexBarCLI {
guard let data = fileManager.contents(atPath: infoURL.path),
let plist = try? PropertyListSerialization.propertyList(from: data, format: nil) as? [String: Any]
else { return nil }
return plist["CFBundleShortVersionString"] as? String
return Self.normalizedBundleVersion(plist["CFBundleShortVersionString"] as? String)
}
currentURL.deleteLastPathComponent()
}
Expand Down
Loading