codeburn/windows/src-tauri/capabilities
iamtoruk 22eb785b63 feat(windows): a settings window, with General, About and provider panes
Settings were a panel inside the popover, which put them behind the same
blur-to-dismiss the numbers live under and gave the tray's Settings and
Capacity Dock Settings items nowhere better to land. They now open a real
window (label `settings`, 880x620, resizable, created on demand and
destroyed on close) with the mac's sidebar: General, About, then one row
per provider the CLI has a live quota adapter for, dimmed until it is
connected. The popover keeps only the link.

Three stores, split by who else reads the value. Anything the CLI shares
stays in ~/.config/codeburn/config.json behind the lock the currency write
already took; everything else goes to a new windows-settings.json beside
windows-dock.json. Every write emits codeburn://settings-changed with the
whole object, so the popover retints and the tray refigures without a
reload: the theme, the accent, the tray badge, the display metric, the
menubar period and the scope all move live.

The tray figure follows Display now rather than always quoting today's
cost. Period and Scope give it its own payload key, as the mac keeps a
separate menubar key, and the suffix ("/wk", "/mo", "/6mo") says which span
it is. The mac's fifth metric, Credits (Codex), is not offered: it reads a
payload field the CLI does not emit. Its token metrics both show the total
in the badge, because the 16 px bitmap has room for about four glyphs and
not for the up/down pair.

Two currencies were missing against the mac's nineteen (CNY, RON), and the
stored currency was never read back at startup, so the popover opened in
dollars however it had been set; a `currency` command answers that now for
both windows.
2026-09-01 19:49:37 -07:00
..
default.json feat(windows): a settings window, with General, About and provider panes 2026-09-01 19:49:37 -07:00