codeburn/mac/Sources/CodeBurnMenubar
ozymandiashh 53dd90a4a7 feat(codex): read the per-credit fields the reset-credits payload already carries
The reset-credits decoder kept only `available_count` and the soonest expiry,
and the inline block on the usage payload kept only `available_count`. The
response has always carried more: `id`, `reset_type` and `granted_at` per
credit, and `applicable_available_count` alongside the total. Those are exactly
the fields needed to tell a newly granted credit from one the account was
already holding, so they are decoded now instead of discarded.

Identity comes first: a credit is reduced to a grant only if it carries an `id`
or, failing that, a `granted_at` to be named by. One that carries neither still
counts toward the server's authoritative total but never becomes a grant,
because it could not be told apart from the next one and would re-announce
itself on every refresh. Only `status == "available"` credits become grants, so
a redeemed one is spent history rather than news.

`applicable_available_count` is unknown when absent, never zero. The companion
endpoint does not always send it and the usage payload sometimes does, so the
usage response we are already holding fills it in when — and only when — the
authoritative source said nothing. No extra request either way.
2026-09-12 14:37:24 -07:00
..
Data feat(codex): read the per-credit fields the reset-credits payload already carries 2026-09-12 14:37:24 -07:00
Resources/ProviderIcons feat(menubar): add native Capacity Dock (#1167) 2026-08-29 00:37:30 -07:00
Security fix(mac): prefer the node beside the CLI over a version manager's default 2026-09-07 10:16:48 +08:00
Theme Harden menubar: fix refresh loop, concurrency, data sync, and edge cases 2026-05-01 08:01:25 -07:00
Views Merge pull request #1314 from getagentseal/fix/dock-pace-followups 2026-09-12 22:40:46 +03:00
AppStore.swift Merge pull request #1314 from getagentseal/fix/dock-pace-followups 2026-09-12 22:40:46 +03:00
AppVersion.swift Normalize menubar version display 2026-05-11 11:21:39 -07:00
CapacityDockController.swift feat(menubar): switch the Capacity Dock gauge between usage windows 2026-09-12 06:38:34 -07:00
CapacityDockMotion.swift feat(menubar): add native Capacity Dock (#1167) 2026-08-29 00:37:30 -07:00
CapacityDockPlacement.swift fix(menubar): keep Capacity Dock hover alive after app deactivation (#1170) 2026-08-29 18:42:27 +02:00
CapacityDockPointerUpdateCoalescer.swift Fix Capacity Dock pointer coalescing and dismissal 2026-09-01 16:51:00 +05:30
CodeBurnApp.swift fix(menubar): pick the second row's provider by its worst quota window 2026-09-12 20:29:35 +03:00
CurrencyState.swift perf(desktop): share cache state and eliminate duplicate cold hydration 2026-08-12 17:16:41 +03:00
MenubarScope.swift feat(menubar): add Local/Combined usage toggle (#566) (#568) 2026-06-28 22:01:01 +02:00
MenubarSecondRow.swift fix(menubar): pick the second row's provider by its worst quota window 2026-09-12 20:29:35 +03:00
ProviderIcon.swift feat(menubar): add native Capacity Dock (#1167) 2026-08-29 00:37:30 -07:00
QuotaRefreshDecision.swift fix(mac): keep dock quota fresh when the payload tick is skipped 2026-09-12 03:47:46 -07:00
RefreshCadence.swift menubar: skip unchanged background refreshes, 120s AC idle cadence, utility QoS for tick spawns (#703) (#704) 2026-07-16 15:11:25 -07:00
SessionCountLabel.swift fix(usage): fold Windows case in spend identity, qualify --json counts, drop scratch tests 2026-09-07 14:56:32 -07:00
StatusItemContextMenuPolicy.swift test(mac): lock status-item context menu policy (#802) 2026-07-24 19:27:25 +07:00
StatusItemPlacementPolicy.swift fix(menubar): recover parked status item (#1161) 2026-08-28 13:20:48 -07:00