Add local preference signal scaffolding
This commit is contained in:
@@ -7,6 +7,51 @@ Updated: 2026-02-22
|
||||
- After every sensible code/documentation change set, create a git commit as
|
||||
the last step so the next agent session can pick up from clean checkpoints.
|
||||
|
||||
## Latest Milestone (2026-02-22): Local Preference Signal Scaffolding (Inferred/Confirmed)
|
||||
|
||||
Added a local-first data model and repository APIs for chat-derived preference
|
||||
signals so the app can gradually build profile context from shared messages.
|
||||
|
||||
- `lib/features/local/local_models.dart`
|
||||
- new enums:
|
||||
- `PreferenceSignalPolarity` (`like`, `dislike`, `neutral`)
|
||||
- `PreferenceSignalStatus` (`inferred`, `confirmed`, `dismissed`)
|
||||
- new model:
|
||||
- `PersonPreferenceSignal`
|
||||
- key/category/label
|
||||
- confidence
|
||||
- status
|
||||
- first/last seen timestamps
|
||||
- occurrence count
|
||||
- evidence message ids/snippets
|
||||
- source apps
|
||||
- `LocalDataState` now stores `preferenceSignals`
|
||||
- added `copyWith`, `toJson`, `fromJson` support (backward-compatible with
|
||||
existing stored state)
|
||||
|
||||
- `lib/features/local/local_repository.dart`
|
||||
- added local-only repository APIs:
|
||||
- `upsertInferredPreferenceSignalObservation(...)`
|
||||
- aggregates repeated observations
|
||||
- merges evidence and source apps
|
||||
- updates confidence and occurrence count
|
||||
- `upsertPreferenceSignal(...)`
|
||||
- `setPreferenceSignalStatus(...)`
|
||||
- `confirmPreferenceSignal(...)`
|
||||
- `dismissPreferenceSignal(...)`
|
||||
- updated person lifecycle consistency:
|
||||
- deleting a person removes linked preference signals
|
||||
- merging profiles rebinds source preference signals to target
|
||||
- remote person delete application also removes preference signals
|
||||
- intentionally local-only for now (not yet mapped to backend sync envelopes)
|
||||
|
||||
- `test/features/local/local_repository_test.dart`
|
||||
- added coverage for inferred signal upsert aggregation + status transitions
|
||||
|
||||
- Validation
|
||||
- `flutter analyze` -> pass
|
||||
- `flutter test` -> pass
|
||||
|
||||
## Latest Milestone (2026-02-22): Person Editor Inline Validation + Duplicate Warning
|
||||
|
||||
Improved the People add/edit profile experience to make validation explicit and
|
||||
|
||||
Reference in New Issue
Block a user