Contributing
App State Architecture
How the front-end app state stores and derived values fit together.
Source of truth stores
app-ui-store: UI view state (activeView,showAbout)app-plugin-store: plugin metadata + persisted plugin settingsapp-preferences-store: persisted user preferences (display/theme/tray/system)
Derived values
displayPlugins+navPluginsare computed byuseAppPluginViews.settingsPluginsis computed byuseSettingsPluginList.autoUpdateNextAtis runtime scheduling state fromuseProbe.selectedPluginis computed byuseAppPluginViews.
Main data flow
App.tsxcomposes hooks and owns cross-domain orchestration.- Source stores are updated from bootstrap/settings/probe actions.
- Derived hooks recompute view models from source state.
App.tsxpasses derived values directly toAppShellandAppContent.AppShellandAppContentrender from those direct props and source stores.
Guardrails
- Keep source-of-truth state in dedicated stores (
app-ui-store,app-plugin-store,app-preferences-store). - Keep derived values computed in domain hooks and passed directly to composition components.
- Avoid effect-based mirroring of derived values into a separate store.
- Keep derivations pure and colocated with domain hooks.