Commit graph

3 commits

Author SHA1 Message Date
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
iamtoruk
672196bb8f feat(windows): Capacity Dock, an edge-docked quota rail
A slim always-on-top rail on the right screen edge showing one capacity ring
per signed-in provider, the Windows twin of the macOS Capacity Dock.

The window is created on demand and closed when the dock is switched off, so
a disabled dock leaves no webview resident. Hovering widens the same window
to reveal a detail panel with each quota window, its used percent, plan and
reset countdown; the panel unmounts on collapse rather than lingering hidden.

Data comes from `codeburn quota --format json` through the existing cli.rs
spawn plumbing. A CLI without that subcommand exits with `unknown command`,
which the rail reports as a quiet update-needed state instead of an error.

Metrics are the mac dock's whole-point values at its default 0.6 scale.
2026-09-01 13:50:56 -07:00
iamtoruk
b199af182e windows: import the Tauri tray app as the Windows menubar
Brings the Tauri 2.x tray popover from #1022 onto main as windows/, mirroring
mac/. Product name, bundle identifier, and version line up with the macOS
menubar (org.agentseal.codeburn-menubar, 0.9.20); the crate is renamed off
"desktop" so it no longer collides with the Electron app in app/.

Linux (ksni) stays compiled and dev-usable but is documented as experimental:
gnome/ is the shipping Linux surface.

The five src/ CLI commits on that branch are dropped - they re-implement a
daily-bucketing fix main already carries.
2026-08-18 04:00:59 -07:00