Parent
Part of #1402. Depends on Phase 3.
Goal
Split today's settings module so that core::settings (in the root-level core crate) only holds fields that change Core behavior. UI-only fields stay in src-tauri/src/app/. Storage backend (Tauri Store / SQLite) remains shared infrastructure accessed from both crates.
Workspace Context
core::settings lives at core/src/settings.rs (or a settings/ submodule) inside the workspace core crate — no tauri dependency. App-side settings stay under src-tauri/src/app/settings/.
Scope
Core-owned fields (move to core::settings in core/src/)
hardware_archive.enabled
hardware_archive.refresh_interval_days
hardware_archive.scheduled_data_deletion
hardware_archive.interval
- (placeholder for future) sensor polling interval
App-owned fields (stay UI-side under src-tauri/src/app/settings/)
theme, language
display_targets, graph_size
line_graph_* (color, border, fill, show_legend, show_scale, show_tooltip, mix, type)
burn_in_shift*
background_img_opacity, selected_background_img
temperature_unit — presentation only; Core stores values in °C
text_selectable, decoration
db_startup_service split
- DB compatibility check (
infrastructure/database/preflight::check_db_compatibility) → core::persistence::preflight at core/src/persistence/preflight.rs.
- Dialog and recovery flow (
prompt_startup_error, reset_database_and_restart, StartupErrorAction) → app::startup at src-tauri/src/app/startup.rs.
Persistence Backend
Storage mechanism is unchanged: both buckets can read/write via the same Tauri Store / SQLite. They simply own different keys, and core::settings deserializes only its own subset.
Out of Scope
- Persistence relocation (Phase 4).
- Lifecycle changes (Phase 5).
Definition of Done
core::settings deserializes only Core-relevant fields and is unit-tested via cargo test -p <core-crate> without a Tauri runtime.
commands/settings.rs setters touching UI-only fields no longer round-trip through state structs that Core can see.
temperature_unit changes only affect formatting in App; raw temperature values in Core are always °C.
- No user-visible regression in the Settings page.
Open Question (from parent)
- Confirm
temperature_unit direction (Core stores °C, App formats) during implementation review.
Parent
Part of #1402. Depends on Phase 3.
Goal
Split today's settings module so that
core::settings(in the root-levelcorecrate) only holds fields that change Core behavior. UI-only fields stay insrc-tauri/src/app/. Storage backend (Tauri Store / SQLite) remains shared infrastructure accessed from both crates.Workspace Context
core::settingslives atcore/src/settings.rs(or asettings/submodule) inside the workspacecorecrate — notauridependency. App-side settings stay undersrc-tauri/src/app/settings/.Scope
Core-owned fields (move to
core::settingsincore/src/)hardware_archive.enabledhardware_archive.refresh_interval_dayshardware_archive.scheduled_data_deletionhardware_archive.intervalApp-owned fields (stay UI-side under
src-tauri/src/app/settings/)theme,languagedisplay_targets,graph_sizeline_graph_*(color, border, fill, show_legend, show_scale, show_tooltip, mix, type)burn_in_shift*background_img_opacity,selected_background_imgtemperature_unit— presentation only; Core stores values in °Ctext_selectable,decorationdb_startup_servicesplitinfrastructure/database/preflight::check_db_compatibility) →core::persistence::preflightatcore/src/persistence/preflight.rs.prompt_startup_error,reset_database_and_restart,StartupErrorAction) →app::startupatsrc-tauri/src/app/startup.rs.Persistence Backend
Storage mechanism is unchanged: both buckets can read/write via the same Tauri Store / SQLite. They simply own different keys, and
core::settingsdeserializes only its own subset.Out of Scope
Definition of Done
core::settingsdeserializes only Core-relevant fields and is unit-tested viacargo test -p <core-crate>without a Tauri runtime.commands/settings.rssetters touching UI-only fields no longer round-trip through state structs that Core can see.temperature_unitchanges only affect formatting in App; raw temperature values in Core are always °C.Open Question (from parent)
temperature_unitdirection (Core stores °C, App formats) during implementation review.