Repository navigation
CodexBar 0.23 Mobile 1.3.1
Mac-side rollup of upstream v0.21 / 0.22 / 0.23 (109 commits, 2 new providers, multiple provider enhancements) plus three fork-only architectural pieces: generic model-fallback pricing (closes the Mac-0.20.3 "Daily Spend drops to $0 when a new model arrives" failure), multi-device account-identity union-find merge (closes the "two cards for one account when Macs run different versions" failure), and the previously-shipped L1 ghost-records self-heal. Mobile companion stays at 1.3.1.
Highlights — upstream 0.21–0.23 (Mac)
- Mistral provider (#607) — monthly spend tracking, browser-cookie import, manual cookies, CLI / token-account support. Thanks @welcoMattic!
- Abacus AI provider — ChatLLM and RouteLLM monthly compute-credit tracking with browser-cookie import, manual-cookie support, and monthly pace rendering. Thanks @ChrisGVE!
- Claude Designs / Daily Routines / Web Sonnet bars (#740) — live OAuth/Web quota data shown as additional usage bars on the Claude provider. Thanks @AISupplyGuy!
- Cursor Extra usage menu metric for on-demand budgets (#789). Thanks @huiye98!
- Synthetic — parses live 5-hour / weekly / search quota payloads with continuous reset/regeneration details (#732). Thanks @baanish!
- Codex Pro $100 plan support across OAuth / OpenAI web / menu / CLI; GPT-5.5 / GPT-5.5 Pro pricing for the local cost scanner.
- Codex — opt-in OpenAI web extras for fresh installs with battery-saver toggle; restored OpenAI web dashboard fetching on the new analytics route; Edge browser-cookie import.
- Antigravity — restored localhost endpoint/token probing across newer builds with async TLS challenge handling, retry on API-level errors.
- z.ai — preserve weekly + 5-hour token quotas together, surface 5-hour lane correctly across menu/menu bar.
- OpenCode — weekly pace visualization (reserve / expected / "Lasts until reset" details like Codex/Claude).
- Menu shortcuts ⌘R / ⌘, / ⌘Q while status menu is open (#737); fix macOS 26 RenderBox icon regression (#677); merged-menu width/alignment fixes.
- Battery / refresh — cut menu redraw churn, skip background work for unavailable providers, reuse cached OpenAI web views (#708).
- Confetti — opt-in celebration when weekly limits reset after active use (#785).
NEW · Daily Spend $0 root-cause fix · generic model-fallback pricing
Mac 0.20.3 shipped before claude-opus-4-7 was added to the Claude pricing table. Result: every cost row using that model name silently became $0 in Daily Spend. This release adds an architectural fallback so the same failure mode cannot recur for any future Anthropic / OpenAI release.
ModelFamilyResolverprotocol — parses model strings into(family, major, minor, date?)tuples; opaque to iOS.- 5-step fallback ladder — same family / same major / closest minor ≤ requested → ≥ requested → older major (highest minor) → family default → provider default. Always returns something parseable + flags
isEstimated=trueso iOS can render an estimated-cost badge. - Tier-A coverage —
Codex,Claude,VertexAI. The 23 non-Tier-A providers either pull cost from upstream APIs or have no cost concept; Research/018 §2 documents the survey. - Diagnostics — new
LogCategories.pricingchannel writes the first 5 unique unknown-model substitutions per session. Settings → Debug pane shows a live "Unknown models seen" list with raw → fallback mapping + occurrence count, session-scoped. - Wire format —
SyncCostBreakdown/SyncDailyPoint/SyncCostSummaryeach gainisEstimated: Bool?(additive, decodes viadecodeIfPresent). iOS 1.5.0 (Build 98) renders a*suffix on estimated values + footnote on Provider Detail cards. - Tests — 68 cases: resolver algorithm, parser edge cases, JSONL end-to-end, wire-format round-trip, SyncCoordinator OR-aggregation.
Full design: Research/018-model-fallback-pricing.md.
NEW · Multi-device account-identity union-find merge
Two Macs running different CodexBar versions could surface as two duplicate cards on iOS for the same logical account (the user's exact repro on Build 57 / iOS 96 with one Mac on 0.23 + one on 0.20.3). Old grouping keyed on (providerID, accountEmail) — any drift in how Macs populate accountEmail produced a split.
- Wire format —
ProviderUsageSnapshot.accountIdentities: [String]?(additive,decodeIfPresent). Mac writes a stable identifier set; iOS unions across the set. - Mac ·
AccountIdentityComputer— per-provider stable identifier computation. Codex / Claude / VertexAI use provider account UUID as primary, email as secondary. Normalization: lowercase + Unicode NFC + trim + URL-encode + 256-char cap. Time-bounded values (JWT exp, session tokens) are forbidden. - iOS · union-find merge —
CloudSyncReader.mergeSnapshotsrewritten. Two snapshots that share any identifier merge into one card. Old Mac payloads (noaccountIdentities) get a synthesized{providerID}:email:<lowered>identifier fromaccountEmailso legacy + modern Macs auto-bridge. - Cross-provider isolation — every identifier carries its
providerID:prefix so Codex and Claude can never accidentally merge even if they share an email. - Deprecation policy — identifier writes are additive only. Removing a scheme requires ≥3 minor releases of double-writing. Documented institutional discipline; Mac 0.23 starts the clock.
- Tests — 29 new cases: 14 Mac (per-provider identifier shape, normalization, non-Tier-A nil), 15 iOS (the 11-case 3-Mac-3-version matrix from Research/019 §8, plus 4 synthesis helpers).
Full design: Research/019-account-identity-multi-version-merge.md.
L1 ghost-records cleanup (root-cause fix)
(Carried over from earlier in the v0.23 cycle.) Closes the "duplicate Codex cards from upgrade-induced identity drift, plus stale Perplexity card after disable" bug class user reported on iOS 1.3.0 right after 0.20.3. iOS 1.3.1 Build 94 shipped a display-time filter; this Mac release fixes the root cause in SyncCoordinator:
- Provider-disable hook — when an enabled provider transitions to disabled, delete its CKRecord from
DeviceProvidersZoneinstead of leaving a stale ghost. - Account-identity-drift cleanup — when a provider's composite key changes (e.g., Codex OAuth refactor between Mac versions), find and delete the stale recordName for that provider before writing the new one.
The 6 known orphan-producing state transitions now self-heal.
Mobile 1.3.1 — Mac-side data channel pre-loaded for iOS 1.5.0
Mac 0.23 writes 6 new optional Shared/ Codable types to CloudKit so iOS 1.5.0 can render Abacus / Mistral structured detail, Synthetic 3-lane, Claude extras, Cursor Extra without ever needing a Mac patch later. iOS 1.3.x silently drops these unknown fields via existing decodeIfPresent (Build 79 forward-compat regression test pins this behavior) — bit-for-bit safe.
Notes
- CFBundleVersion =
58.1.3.1.BUILD_NUMBER56 → 58 (57 was a local-only QA install of the upstream-aligned slot before fallback + identity work landed). - Sparkle
MOBILE_VERSIONtracks the current iOS train (1.3.1 — App Store hotfix). The fallback + identity work pairs with iOS 1.5.0 Build 98 on TestFlight. - Multi-device / multi-version compat verified against iOS 1.5.0 Build 96+98 and Macs running 0.20.3 + 0.23 simultaneously.
- iOS 1.3.0 / 1.2.0 users on this Mac release see the existing 25 providers unchanged plus 2 new providers (Abacus AI, Mistral) as fallback cards.
中文
CodexBar 0.23 是 fork 端整合上游 v0.21 / 0.22 / 0.23(109 个 commit、2 个新 provider、多个增强)+ 三件 fork-only 架构修复:通用 model 回退定价(修复 Mac 0.20.3 起出现新模型时 Daily Spend 静默归 0 的问题)、多设备账号身份 union-find 合并(修复双 Mac 不同版本下同账号显示两张卡的问题),以及之前已落地的 L1 ghost-records 自愈。Mobile companion 仍为 1.3.1。
上游 0.21–0.23 亮点(Mac)
- Mistral provider(#607)—— 月度消费跟踪、浏览器 cookie 导入、手动 cookie、CLI / token 账号支持。感谢 @welcoMattic!
- Abacus AI provider —— ChatLLM 与 RouteLLM 月度算力额度跟踪、浏览器 cookie 导入、手动 cookie、月度配速渲染。感谢 @ChrisGVE!
- Claude Designs / Daily Routines / Web Sonnet bars(#740)—— 实时 OAuth/Web 配额作为 Claude 卡的额外用量条。感谢 @AISupplyGuy!
- Cursor Extra usage 菜单指标(按需预算用量,#789)。感谢 @huiye98!
- Synthetic —— 解析实时 5 小时 / 周 / 搜索 三个 quota 通道,附连续 reset / regeneration 细节(#732)。感谢 @baanish!
- Codex Pro $100 plan 在 OAuth / OpenAI web / menu / CLI 全链路识别;GPT-5.5 / GPT-5.5 Pro 定价 加入本地 cost scanner。
- Codex —— 新装机首次启动可选启用 OpenAI web 额外指标;分析新路由的 dashboard 抓取已恢复;支持 Edge cookie 导入。
- Antigravity —— 恢复在新版本上的 localhost 端点 / token 探测,异步 TLS 挑战 + API 错误重试。
- z.ai —— 同时保留 weekly + 5h token quota,菜单 / 菜单栏正确显示 5 小时通道。
- OpenCode —— 周配速可视化(reserve / expected / "Lasts until reset",与 Codex/Claude 一致)。
- 菜单快捷键 状态菜单打开时支持 ⌘R / ⌘, / ⌘Q(#737);修复 macOS 26 RenderBox 图标回退(#677);合并菜单宽度 / 对齐修复。
- 省电 / 刷新 —— 削减菜单重绘、跳过不可用 provider 的后台工作、复用 OpenAI web 缓存视图(#708)。
- Confetti —— 周限额在活跃使用后重置时可选祝贺动画(#785)。
新增 · Daily Spend $0 根因修复 · 通用 model 回退定价
Mac 0.20.3 发布在 Claude pricing 表加入 claude-opus-4-7 之前。结果:任何用了这个模型的 cost 行在 Daily Spend 里都被静默归零。这个版本加了架构性回退,未来任意 Anthropic / OpenAI 新模型都不会再触发同样的失败模式。
ModelFamilyResolver协议 —— 把模型字符串解析为(family, major, minor, date?),对 iOS 完全不透明。- 5 步回退阶梯 —— 同 family 同 major 最近 minor ≤ 请求值 → ≥ 请求值 → 老 major(最高 minor)→ family 默认 → provider 默认。永远返回可解析的结果 + 标
isEstimated=true,以便 iOS 显示估算徽章。 - Tier-A 覆盖 ——
Codex/Claude/VertexAI。其余 23 个非 Tier-A provider 要么从上游 API 取 cost、要么没有 cost 概念;Research/018 §2 有调研矩阵。 - 诊断 —— 新增
LogCategories.pricing日志通道,每会话前 5 个未知 model 替换发 warning。Settings → Debug 面板显示 "Unknown models seen" 实时列表,带原始 → 回退映射与出现次数(会话内存,重启清空)。 - Wire 格式 ——
SyncCostBreakdown/SyncDailyPoint/SyncCostSummary各加isEstimated: Bool?(追加式,decodeIfPresent)。iOS 1.5.0(Build 98)会在 Provider Detail 卡的估算值后渲染*与脚注。 - 测试 —— 68 个用例:resolver 算法、parser 边界、JSONL 端到端、wire 格式 round-trip、SyncCoordinator OR 集合上浮。
完整设计:Research/018-model-fallback-pricing.md。
新增 · 多设备账号身份 union-find 合并
两台 Mac 跑不同 CodexBar 版本时,iOS 端可能把同一个逻辑账号显示成两张卡(用户在 Build 57 / iOS 96 上一台 0.23 + 一台 0.20.3 的实际复现)。旧的合并 key 是 (providerID, accountEmail) —— 任何 Mac 写 accountEmail 时的差异都会导致拆分。
- Wire 格式 ——
ProviderUsageSnapshot.accountIdentities: [String]?(追加式,decodeIfPresent)。Mac 写稳定 identifier 集合;iOS 跨集合做 union-find。 - Mac ·
AccountIdentityComputer—— 每个 provider 的稳定 identifier 计算。Codex / Claude / VertexAI 用 provider 账号 UUID 作主键、email 作副键。规范化:小写 + Unicode NFC + 去空白 + URL-encode + 256 字符上限。时效性值(JWT exp、session token)禁止。 - iOS · union-find 合并 ——
CloudSyncReader.mergeSnapshots重写。两个 snapshot 共享任意一个 identifier 即合并为一张卡。老 Mac payload(没有accountIdentities)从accountEmail合成{providerID}:email:<小写>作为兜底 identifier,老 + 新 Mac 自动桥接。 - 跨 provider 隔离 —— 每个 identifier 都带
providerID:前缀,Codex 和 Claude 即使共享 email 也不会被错误合并。 - deprecation 制度 —— identifier 写入只能加,不能减。换主键必须 ≥3 minor 版本双写过渡。文档化的制度纪律;Mac 0.23 起算。
- 测试 —— 29 个新用例:14 Mac(每 provider identifier 形态、规范化、非 Tier-A nil)+ 15 iOS(Research/019 §8 的 11 case 3-Mac-3-version 矩阵 + 4 个 synthesis 助手)。
完整设计:Research/019-account-identity-multi-version-merge.md。
L1 ghost-records 自愈(根因修复)
(v0.23 周期早期已落地,此处保留说明。)修复用户在 iOS 1.3.0 紧随 0.20.3 后报告的"升级导致 identity 漂移产生 Codex 重复卡 + disable 后 Perplexity 残卡"问题类。iOS 1.3.1 Build 94 加了显示层过滤;本 Mac release 在 SyncCoordinator 里做根因修复:
- Provider-disable 钩子 —— 已启用的 provider 切换为禁用时,从
DeviceProvidersZone删除其 CKRecord,而不是留下残卡。 - 账号身份漂移清理 —— provider 的 composite key 变化时(如 Codex OAuth 跨版本重构),先找到旧的 recordName 删除再写新的。
6 个已知的产生孤儿记录的状态转换现在都能自愈。
Mobile 1.3.1 —— Mac 端数据通道为 iOS 1.5.0 预备
Mac 0.23 现在向 CloudKit 写 6 个新的 Shared/ Codable optional 类型,让 iOS 1.5.0 能渲染 Abacus / Mistral 结构化详情、Synthetic 3 通道、Claude 额外条、Cursor Extra,未来不需要再发 Mac patch。iOS 1.3.x 通过现有的 decodeIfPresent 静默丢弃这些未知字段(Build 79 forward-compat 回归测试 pin 死该行为)—— 字节级安全。
备注
- CFBundleVersion =
58.1.3.1。BUILD_NUMBER56 → 58(57 是 fallback + identity 工作落地前的本地 QA 中转 build)。 - Sparkle
MOBILE_VERSION跟随当前 iOS 列车(1.3.1 —— App Store hotfix)。fallback + identity 工作与 iOS 1.5.0 Build 98(TestFlight)配套。 - 多设备 / 多版本兼容性已在 iOS 1.5.0 Build 96+98 + Mac 0.20.3 + 0.23 同时在线场景下验证。
- iOS 1.3.0 / 1.2.0 用户:本 Mac release 不变现有 25 个 provider,新增 Abacus AI / Mistral 两张兜底卡。