codeburn/mac/Sources/CodeBurnMenubar/Data
ozymandiashh 53cd44daf2 fix(menubar): give the pasted Copilot token a GitHub host of its own
The last rung of the chain is a token the user pastes into Settings, and an
enterprise personal access token pasted there was still sent to
api.github.com. Settings now takes the host beside the token, defaulting to
github.com, and saves both in the same provider Keychain record so the host a
request is addressed to always comes from the entry that carried the token.

A host no endpoint can be derived from is refused at the field instead of
being stored and reported later as a terminal fetch failure, and the crafted
values #1286 guarded against are refused there too. Clearing the token clears
the host with it, so a stale tenant can never be paired with the next token.

The record's decoding moves into an extension and reads every key with
decodeIfPresent: Swift's synthesized init(from:) ignores a property's default
and throws on a missing key, so adding a field would otherwise make every
credential saved before it unreadable — for every provider, not just Copilot.

The dormant connection row no longer promises api.github.com before anything
has been fetched; it names a host only once one has answered.

Tests cover the three new host sources with a hostile value each, the rung
wiring for all five rungs, the gh hosts.yml key scan, and that a record
written before the host field still decodes.
2026-09-12 12:02:13 -07:00
..
AntigravityQuotaPresentation.swift feat(menubar): live Antigravity quota — local language-server probe, Settings pane, Plan tab 2026-08-24 09:40:04 -07:00
AntigravitySubscriptionService.swift feat(menubar): add native Capacity Dock (#1167) 2026-08-29 00:37:30 -07:00
CapacityDockGlanceWindow.swift feat(menubar): switch the Capacity Dock gauge between usage windows 2026-09-12 06:38:34 -07:00
CapacityDockInteractionState.swift feat(menubar): add native Capacity Dock (#1167) 2026-08-29 00:37:30 -07:00
CapacityDockPreferences.swift feat(menubar): switch the Capacity Dock gauge between usage windows 2026-09-12 06:38:34 -07:00
CapacityDockProviderCredential.swift fix(menubar): give the pasted Copilot token a GitHub host of its own 2026-09-12 12:02:13 -07:00
CapacityDockProviderQuotaService.swift feat(mac): add native Grok Build provider 2026-09-01 18:46:02 +05:30
CapacityEstimator.swift feat(mac): native Swift menubar app + one-command install 2026-04-17 16:55:56 -07:00
ClaudeCredentialStore.swift fix: isolate overridden Claude credential homes 2026-08-29 23:38:37 +05:30
ClaudeSubscriptionService.swift fix(menubar): make a failed disconnect leave a consistent state 2026-08-19 11:43:44 -07:00
CLIClaudeConfig.swift feat(menubar): configure CLAUDE_CONFIG_DIRS via Settings (#434) (#436) 2026-06-06 02:30:46 +02:00
ClinePassSubscriptionService.swift feat(menubar): add native Capacity Dock (#1167) 2026-08-29 00:37:30 -07:00
CLIWatchdog.swift fix(menubar): no-output watchdog, lock signal cleanup, dead-pid takeover, serve orphan reaping 2026-08-23 05:35:17 -07:00
CodeBurnCacheDirectory.swift perf(desktop): share cache state and eliminate duplicate cold hydration 2026-08-12 17:16:41 +03:00
CodexCredentialStore.swift feat(menubar): add native Capacity Dock (#1167) 2026-08-29 00:37:30 -07:00
CodexSubscriptionService.swift feat(menubar): add native Capacity Dock (#1167) 2026-08-29 00:37:30 -07:00
CodexUsage.swift feat(codex): show the credit limit on credit-metered ChatGPT workspaces 2026-07-27 08:19:59 -04:00
CopilotExplicitDisconnect.swift fix(mac): preserve explicit Copilot disconnect across refreshes 2026-09-09 16:17:15 +05:30
CopilotHostEndpoint.swift fix(menubar): follow GH_HOST and gh's own host for the Copilot env and gh rungs 2026-09-12 12:02:13 -07:00
CopilotQuotaPresentation.swift fix(menubar): give the pasted Copilot token a GitHub host of its own 2026-09-12 12:02:13 -07:00
CopilotSubscriptionService.swift fix(menubar): follow GH_HOST and gh's own host for the Copilot env and gh rungs 2026-09-12 12:02:13 -07:00
CursorSubscriptionService.swift fix(menubar): harden the Cursor quota adapter 2026-08-29 14:17:15 -07:00
DataClient.swift fix(menubar): refresh(key:) reported failure instead of joining an in-flight fetch 2026-09-02 07:52:18 -07:00
GeminiQuotaPresentation.swift feat(menubar): live Gemini quota — service, Settings pane, popover Plan tab 2026-08-24 08:43:47 -07:00
GeminiSubscriptionService.swift feat(menubar): add native Capacity Dock (#1167) 2026-08-29 00:37:30 -07:00
GrokBuildSubscriptionService.swift fix(mac): scope Grok's omitted-percent-is-zero rule to unified billing; finish the fixture scrub 2026-09-04 01:38:08 -07:00
KimiQuotaPresentation.swift fix(menubar): keep showing Kimi quota when the login is idle, stamp stale data 2026-07-26 06:35:13 -07:00
KimiSubscriptionService.swift feat(menubar): add native Capacity Dock (#1167) 2026-08-29 00:37:30 -07:00
MenubarPayload.swift fix(usage): preserve project identity and qualify incomplete session counts 2026-09-07 22:02:54 +05:30
MenubarStatusCache.swift perf(desktop): share cache state and eliminate duplicate cold hydration 2026-08-12 17:16:41 +03:00
ProviderConnectionCatalog.swift feat(mac): add native Grok Build provider 2026-09-01 18:46:02 +05:30
ProviderReconnectPresentation.swift fix menubar provider usage contracts 2026-09-02 16:17:28 +05:30
ProviderStripPagingState.swift harden provider period and cache contracts 2026-09-02 16:18:05 +05:30
QuotaPace.swift menubar: linear pace on Codex quota windows — deficit/reserve, projection, run-out ETA (#726) (#728) 2026-07-20 05:21:43 -07:00
QuotaSummary.swift feat(menubar): add native Capacity Dock (#1167) 2026-08-29 00:37:30 -07:00
ServeConnection.swift fix(menubar): no-output watchdog, lock signal cleanup, dead-pid takeover, serve orphan reaping 2026-08-23 05:35:17 -07:00
SubscriptionRefreshCadence.swift feat(menubar): add native Capacity Dock (#1167) 2026-08-29 00:37:30 -07:00
SubscriptionSnapshotStore.swift perf(desktop): share cache state and eliminate duplicate cold hydration 2026-08-12 17:16:41 +03:00
SubscriptionUsage.swift fix(menubar): provider-correct plan tab copy; surface model-scoped weekly limits 2026-07-02 19:37:51 +02:00
UpdateChecker.swift feat(mac): notify when an update is available 2026-09-10 12:39:38 -07:00
UpdateNotifier.swift feat(mac): notify when an update is available 2026-09-10 12:39:38 -07:00
UsageDataChangeGuard.swift docs(dsh): finish the provider registration checklist 2026-08-17 10:59:58 -07:00
UsageRefreshCadence.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
ZaiSubscriptionService.swift fix(mac): map Z.ai body auth errors 2026-08-31 13:51:46 -03:00