Summary
Persist app-level settings on the gateway/Pi so every client connected to the daemon shares the same settings, and they survive a browser-data clear or switching devices.
Motivation
Today only the artwork session is persisted, and only in browser localStorage (src/ui/sessionStore.ts), scoped to a single browser. There is no defined home for global app settings, and nothing survives clearing the browser or moving to another device. Settings should live on the machine running the daemon (like gateway/.plotter-state.json) so all clients see one consistent configuration.
Scope — app settings, NOT artwork
This is distinct from the existing per-session artwork store and from project save/load (#8). Settings here are global preferences such as:
Per-session artwork stays where it is; projects are #8.
Behavior
- Gateway stores settings on disk (mirror the
.plotter-state.json / PLOTTER_STATE pattern).
- New gateway endpoint(s) to read/write settings (
gateway/server.ts).
- Clients load settings from the gateway on connect and write back on change.
- Sensible defaults when no settings file exists yet.
Acceptance criteria
Notes
Summary
Persist app-level settings on the gateway/Pi so every client connected to the daemon shares the same settings, and they survive a browser-data clear or switching devices.
Motivation
Today only the artwork session is persisted, and only in browser
localStorage(src/ui/sessionStore.ts), scoped to a single browser. There is no defined home for global app settings, and nothing survives clearing the browser or moving to another device. Settings should live on the machine running the daemon (likegateway/.plotter-state.json) so all clients see one consistent configuration.Scope — app settings, NOT artwork
This is distinct from the existing per-session artwork store and from project save/load (#8). Settings here are global preferences such as:
Per-session artwork stays where it is; projects are #8.
Behavior
.plotter-state.json/PLOTTER_STATEpattern).gateway/server.ts).Acceptance criteria
Notes
PLOTTER_STATE, atomic write ingateway/server.ts).