codeburn/windows/src-tauri
iamtoruk aacc42b13b feat(windows): usage refresh, terminal and daily budget settings
The last three sections of the mac's General pane, and the pieces of the
app that read them.

Usage Refresh replaces the two hard-coded intervals. Manual never spawns
on a timer, so usage refreshes only when the popover opens or Refresh is
pressed; a chosen cadence applies open or closed, since the reader asked
for that number specifically; Auto keeps what the app already did. The
label says "1m open, 2m closed" rather than the mac's "less on battery",
which is the adaptive refresh that comes with the data-layer work and
would be a promise this build does not keep.

Terminal picks which console Full Report and Optimize open in. It exists
for the same reason as the mac's PreferredTerminal: a user preference must
never become a free-form string in a command line. The stored value parses
back through a closed set, every executable is a compile-time literal
resolved from %SystemRoot% or %LOCALAPPDATA%, and the one case that is
re-parsed by a shell rather than passed as argv, the PowerShell line,
is only built when every token has already passed the argument allowlist.
Anything not installed falls back to the Command Prompt, which always is.

Alerts arm the daily budget the tray flame is judged against. It follows
the display metric: dollars for Cost, millions of tokens for the two token
metrics, with the mac's presets plus Custom. Both thresholds live beside
the currency in the CLI config, because the tray reads them before any
webview exists, and a change reaches the popover and the flame at once
rather than at the next refresh.

The hero follows the metric too, so the popover and the tray can never
disagree about what the day cost: the token metrics put the total in the
headline, and Tokens replaces calls and sessions with the up and down
split, as the mac's hero does.

Also here because the dark theme made it obvious: a native select popup is
painted by the OS in its own colours, so options that only inherited the
select's colour were white on white. Both are stated now.
2026-09-01 20:39:05 -07:00
..
capabilities feat(windows): a settings window, with General, About and provider panes 2026-09-01 19:49:37 -07:00
icons windows: import the Tauri tray app as the Windows menubar 2026-08-18 04:00:59 -07:00
src feat(windows): usage refresh, terminal and daily budget settings 2026-09-01 20:39:05 -07:00
build.rs windows: import the Tauri tray app as the Windows menubar 2026-08-18 04:00:59 -07:00
Cargo.lock fix(windows): let Quit actually exit and enforce a single tray instance 2026-09-01 12:42:30 -07:00
Cargo.toml feat(windows): provider panes gain config directories, cadence and API keys 2026-09-01 20:00:42 -07:00
tauri.conf.json fix(windows): one clean 12 px radius on the popover, with nothing square behind it 2026-09-01 18:15:59 -07:00