1.3 KiB
1.3 KiB
008 — Settings model
Summary
Implement the single, process-wide settings model described in the README's NavMenu section: colour scheme, CSS path config, and the settings file location — settable via CLI args, persisted at a sensible default OS location.
Scope
- A
Settingsstruct: colour scheme choice, list of imported/linked CSS entries (see 010), and whatever else profiles need to hang off of. - Default settings file location using an OS-conventions crate (e.g.
directories) rather than a hardcoded path. claparg(s) to override the settings file path at runtime (extend the existingArgsinmain.rs, which today only has--port/--static-dir).- Load-on-start / save-on-change semantics; "at runtime, there is only 1 settings" — i.e. a single in-memory settings instance, not per-request state, analogous to how the engine owns the index.
- Settings "owns" the profiles per the README — this ticket only needs to define where profiles live under settings, not implement profile CRUD itself (that's 009).
Acceptance criteria
- Running with no args creates/reads a settings file at the documented default location.
--settings-path(or similar) overrides it.- Settings persist across restarts (edit, restart, re-read matches).
Depends on
None.