codeburn/mac/Sources/CodeBurnMenubar/Views
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
..
ActivitySection.swift Fix per-provider data loss, history regression, and decode fragility (#362) 2026-05-20 04:16:48 -07:00
AgentTabStrip.swift fix(menubar): the selection fallback showed another provider's totals under the selected tab 2026-09-02 07:55:43 -07:00
CapacityDockView.swift feat(menubar): switch the Capacity Dock gauge between usage windows 2026-09-12 06:38:34 -07:00
FindingsSection.swift Fix timezone handling: menubar UTC bugs, --timezone flag, DST-safe dates 2026-04-30 17:33:02 -07:00
FlameWordmark.swift fix(menubar): keep the wordmark filled under the shimmer and slow the sweep 2026-09-02 10:34:11 -07:00
HeatmapSection.swift Merge pull request #1278 from avs-io/codex/copilot-disconnect-1273-20260909 2026-09-10 08:52:49 +03:00
HeroSection.swift fix(usage): preserve project identity and qualify incomplete session counts 2026-09-07 22:02:54 +05:30
MenuBarContent.swift fix(menubar): the selection fallback showed another provider's totals under the selected tab 2026-09-02 07:55:43 -07:00
ModelsSection.swift Only show the Saved column when local-model savings exist 2026-06-06 22:26:29 +02:00
PeriodSegmentedControl.swift Add multi-day calendar selection with custom popover UI (#393) 2026-05-24 09:49:59 -07:00
PullRequestsSection.swift feat(app,menubar): surface parity — Spend punchcard in the app, Pull requests strip in the menubar 2026-08-10 14:29:26 -07:00
SectionCaption.swift feat(mac): native Swift menubar app + one-command install 2026-04-17 16:55:56 -07:00
SettingsView.swift fix(menubar): give the pasted Copilot token a GitHub host of its own 2026-09-12 12:02:13 -07:00
SparklineView.swift feat(mac): native Swift menubar app + one-command install 2026-04-17 16:55:56 -07:00
ToolingSection.swift Add tooling breakdowns to CLI and menubar (#373) 2026-05-21 14:38:14 -07:00