codeburn/mac/Tests/CodeBurnMenubarTests
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
..
AgentTabProviderVisibilityTests.swift fix(menubar,app): absent hasUsage hid every provider with no period spend 2026-09-02 07:32:02 -07:00
AntigravityQuotaPresentationTests.swift feat(menubar): live Antigravity quota — local language-server probe, Settings pane, Plan tab 2026-08-24 09:40:04 -07:00
AntigravityQuotaTests.swift feat(menubar): add native Capacity Dock (#1167) 2026-08-29 00:37:30 -07:00
AppStoreCopilotDisconnectTests.swift fix(mac): preserve explicit Copilot disconnect across refreshes 2026-09-09 16:17:15 +05:30
AppStoreRefreshConcurrencyTests.swift fix(menubar): a twice-contradicting scoped payload threw instead of being served 2026-09-02 07:54:55 -07:00
AppStoreRefreshRecoveryTests.swift fix(menubar): the selection fallback showed another provider's totals under the selected tab 2026-09-02 07:55:43 -07:00
AppVersionTests.swift
CapacityDockConnectionActionTests.swift feat(menubar): add native Capacity Dock (#1167) 2026-08-29 00:37:30 -07:00
CapacityDockGlanceTests.swift fix(mac): give the glance's staleness line a section of its own 2026-09-03 07:19:35 -07:00
CapacityDockGlanceWindowTests.swift feat(menubar): switch the Capacity Dock gauge between usage windows 2026-09-12 06:38:34 -07:00
CapacityDockInteractionStateTests.swift feat(menubar): add native Capacity Dock (#1167) 2026-08-29 00:37:30 -07:00
CapacityDockMotionTests.swift feat(menubar): add native Capacity Dock (#1167) 2026-08-29 00:37:30 -07:00
CapacityDockPlacementTests.swift fix(menubar): keep Capacity Dock hover alive after app deactivation (#1170) 2026-08-29 18:42:27 +02:00
CapacityDockPointerUpdateCoalescerTests.swift Fix Capacity Dock pointer coalescing and dismissal 2026-09-01 16:51:00 +05:30
CapacityDockPreferencesTests.swift feat(menubar): switch the Capacity Dock gauge between usage windows 2026-09-12 06:38:34 -07:00
CapacityDockPresentationTests.swift Merge main into fix/dock-detail-integral-height 2026-09-03 06:36:15 -07:00
CapacityDockProviderQuotaServiceTests.swift feat(mac): add native Grok Build provider 2026-09-01 18:46:02 +05:30
CapacityDockTodayTests.swift fix(dock): a tile can stand for more than one provider row 2026-09-03 09:21:23 -07:00
CapacityEstimatorTests.swift
ClaudeRateLimitTests.swift
ClaudeSubscriptionParsingTests.swift
CLIDevinConfigTests.swift
ClinePassQuotaTests.swift feat(menubar): add native Capacity Dock (#1167) 2026-08-29 00:37:30 -07:00
CLIWatchdogTests.swift fix(menubar): no-output watchdog, lock signal cleanup, dead-pid takeover, serve orphan reaping 2026-08-23 05:35:17 -07:00
CodeBurnCacheDirectoryTests.swift perf(desktop): share cache state and eliminate duplicate cold hydration 2026-08-12 17:16:41 +03:00
CodeburnCLIPathTests.swift fix(mac): prefer the node beside the CLI over a version manager's default 2026-09-07 10:16:48 +08:00
CodexPlanParsingTests.swift
CodexQuotaSummaryTests.swift
CodexResetCreditsTests.swift
CodexTerminalFailureTests.swift
ContributionHeatmapTests.swift
CopilotHostEndpointTests.swift fix(menubar): give the pasted Copilot token a GitHub host of its own 2026-09-12 12:02:13 -07:00
CopilotQuotaPresentationTests.swift fix(menubar): follow the credential's GitHub host for Copilot quota 2026-09-12 05:56:05 -07:00
CopilotQuotaTests.swift fix(menubar): give the pasted Copilot token a GitHub host of its own 2026-09-12 12:02:13 -07:00
CredentialKeychainCacheRedTests.swift fix(menubar): migrate Claude/Codex caches to namespaced Keychain 2026-08-19 15:21:28 +05:30
CredentialKeychainContinuityTests.swift feat(menubar): add native Capacity Dock (#1167) 2026-08-29 00:37:30 -07:00
CursorQuotaTests.swift fix(menubar): harden the Cursor quota adapter 2026-08-29 14:17:15 -07:00
DataClientProcessTests.swift fix(menubar): no-output watchdog, lock signal cleanup, dead-pid takeover, serve orphan reaping 2026-08-23 05:35:17 -07:00
GeminiQuotaTests.swift test(menubar): align Gemini retired-tier expectation with the em-dash-free message 2026-08-24 10:08:33 -07:00
GrokBuildSubscriptionServiceTests.swift fix(mac): treat omitted Grok credit percent as 0% in an active window 2026-09-02 15:06:17 -07:00
KimiQuotaPresentationTests.swift
KimiUsageParsingTests.swift
LiveKeychainCredentialCacheTests.swift fix(menubar): never let a Keychain read raise UI on the refresh timer 2026-08-19 11:43:22 -07:00
MenubarPayloadCombinedTests.swift fix(usage): preserve project identity and qualify incomplete session counts 2026-09-07 22:02:54 +05:30
MenubarPeriodSettingsTests.swift
MenubarSecondRowTests.swift fix(menubar): pick the second row's provider by its worst quota window 2026-09-12 20:29:35 +03:00
MenubarStatusCacheTests.swift
ProviderConnectionCatalogTests.swift feat(mac): add native Grok Build provider 2026-09-01 18:46:02 +05:30
ProviderIconTests.swift feat(menubar): add native Capacity Dock (#1167) 2026-08-29 00:37:30 -07:00
ProviderReconnectPresentationTests.swift fix menubar provider usage contracts 2026-09-02 16:17:28 +05:30
ProviderSettingsEditorStateTests.swift fix(mac): document the main-queue serialization and harden the deadlock test cleanup 2026-09-01 04:58:16 -07:00
ProviderStripPagingStateTests.swift harden provider period and cache contracts 2026-09-02 16:18:05 +05:30
QuotaPaceTests.swift
QuotaRefreshDecisionTests.swift fix(mac): keep dock quota fresh when the payload tick is skipped 2026-09-12 03:47:46 -07:00
QuotaSummaryHeadlineTests.swift feat(menubar): add native Capacity Dock (#1167) 2026-08-29 00:37:30 -07:00
RefreshCadenceTests.swift
ServeConnectionTests.swift prevent provider-scoped false zeros 2026-09-02 19:16:08 +05:30
SessionCountLabelTests.swift fix(usage): fold Windows case in spend identity, qualify --json counts, drop scratch tests 2026-09-07 14:56:32 -07:00
StatusItemContextMenuPolicyTests.swift
StatusItemPlacementPolicyTests.swift fix(menubar): recover parked status item (#1161) 2026-08-28 13:20:48 -07:00
TerminalLauncherTests.swift
UpdateCheckerTests.swift
UpdateNotificationTests.swift feat(mac): notify when an update is available 2026-09-10 12:39:38 -07:00
UsageDataChangeGuardTests.swift
ZaiQuotaTests.swift fix(mac): map Z.ai body auth errors 2026-08-31 13:51:46 -03:00