codeburn/app/electron
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
..
quota fix(quota): skip zero-entitlement and unlimited Copilot windows instead of showing 100% used 2026-08-31 03:26:19 -07:00
cli-win32-reap.test.ts fix: bound the serve drain, reap orphans on Windows, and de-flake the grace test 2026-08-22 10:36:58 -07:00
cli.test.ts test(app): give the orphan-reaping tests room too 2026-09-02 06:27:46 -07:00
cli.ts fix(app): the desktop app can spawn a CLI on Windows at all 2026-09-02 05:28:00 -07:00
main.test.ts feat(app): read and write the tray app's own settings 2026-09-02 06:28:05 -07:00
main.ts feat(app): read and write the tray app's own settings 2026-09-02 06:28:05 -07:00
menubar.test.ts feat(app): read and write the tray app's own settings 2026-09-02 06:28:05 -07:00
menubar.ts feat(app): read and write the tray app's own settings 2026-09-02 06:28:05 -07:00
preload.ts feat(app): read and write the tray app's own settings 2026-09-02 06:28:05 -07:00
telemetry.test.ts fix(telemetry): cap cli_error per kind per day, flush app_close on quit 2026-07-18 23:06:30 +03:00
telemetry.ts fix(telemetry): cap cli_error per kind per day, flush app_close on quit 2026-07-18 23:06:30 +03:00
tray-settings.test.ts feat(app): read and write the tray app's own settings 2026-09-02 06:28:05 -07:00
tray-settings.ts feat(app): read and write the tray app's own settings 2026-09-02 06:28:05 -07:00
updates.test.ts feat(app): update-available notifications 2026-07-17 04:58:13 -07:00
updates.ts feat(app): update-available notifications 2026-07-17 04:58:13 -07:00