codeburn/app/renderer
iamtoruk 4c4699952b feat(app): read and write the tray app's own settings
The tray app keeps its preferences in two files it reads from Rust before any of
its windows exist, so those files are the interface rather than any running
process: windows-settings.json for what only it cares about, windows-dock.json
for the Capacity Dock. The desktop app can now read and write both, which is
what lets its Settings carry the tray app's own panes.

Every write is a merge. Both files hold keys this side has no business touching,
the rail's placement above all, and a whole-file write would take them with it.
And every value is checked against the same closed set the tray app parses it
with: a value it cannot read collapses to a default there, so sending one would
silently lose the setting rather than store it. The check is also what keeps a
renderer from reaching a key it was not offered.

Two rules come with the dock file. Writing the provider set latches
manualSelection, because editing the set by hand is what stops the tray app
seeding it from whatever is connected. And a set that no longer holds the
resting provider moves it, since the rail can only rest on a row it is showing.

Showing the rail is the Sidebar switch under another name, so it goes through
that path rather than straight to the file, and keeps the rule that the rail
cannot outlive the tray app. Launch at login is the one setting that is not in
either file: it is the Run value, which this app already owns.

After every write the running tray app is nudged with --reload-settings, which
makes it re-read both files and broadcast to its own windows. With the tray app
off there is nothing to tell and the files are enough.
2026-09-02 06:28:05 -07:00
..
assets brand: restore binary 0101 flame across all surfaces 2026-07-17 14:14:40 -07:00
components feat(app): the two switches cannot disagree 2026-09-02 06:07:24 -07:00
hooks perf(desktop): keep every destination useful across restarts (#1163) 2026-08-28 14:51:18 -07:00
lib feat(app): read and write the tray app's own settings 2026-09-02 06:28:05 -07:00
public Merge remote-tracking branch 'origin/main' into fix/ft002-harness-launcher 2026-08-24 07:15:08 -07:00
sections fix(app): let the Providers pane read hasUsage so token-only providers stay listed 2026-09-01 05:07:05 -07:00
styles feat(app): the two switches cannot disagree 2026-09-02 06:07:24 -07:00
test feat(app): refresh cadence, instant switching, cache coherence, telemetry v1 2026-07-16 11:47:05 -07:00
App.test.tsx perf(desktop): keep every destination useful across restarts (#1163) 2026-08-28 14:51:18 -07:00
App.tsx perf(desktop): keep every destination useful across restarts (#1163) 2026-08-28 14:51:18 -07:00
index.html harden(app): Electron security + spawn efficiency batch 2026-07-16 01:57:44 -07:00
main.tsx fix(app): zero background work when hidden; currency applies instantly 2026-07-16 18:41:28 -07:00
vite-env.d.ts feat(app): scaffold Electron+Vite package and codeburn CLI spawn 2026-07-10 15:16:55 -07:00