-
Notifications
You must be signed in to change notification settings - Fork 0
04. State Stores
Nicolás Baier Quezada edited this page Jun 5, 2026
·
1 revision
Global UI state is managed with Zustand (src/stores/). Persistent stores use the persist middleware (localStorage). Clinical data does not live in stores — it lives in the encrypted SQLite database (see 05. Database).
| Store | File | Persisted | Holds |
|---|---|---|---|
| Config | config-store.ts |
✅ | App configuration: active models, processing thresholds, report settings, appearance, active clinical guideline |
| Canvas | canvas-store.ts |
— | Annotation-canvas state: active tool, active class, undo/redo stack |
| Patient | patient-store.ts |
✅ | Currently selected patient |
The former token-store (remote token economy) was removed together with the remote backend. There is no token concept anymore.
config-store.ts is the main settings store. Notable slices:
-
localModels— active detection model + per-model sensitivity. -
processing— confidence thresholds and CPU profile. -
report— which PDF sections are enabled, gallery options. -
appearance— theme, primary color. -
activeGuideline— ID of the active clinical guideline (defaulticdr_2024).
State is read in components via the useConfigStore hook and updated through typed actions (updateConfig, updateAppearance, updateProcessing, …).