5.0 KiB
5.0 KiB
Client Implementation Plan
Date: 2026-04-01
Chosen scope for this iteration
This iteration focuses on the smallest slice that materially improves founder testing:
- Generalize intake from WhatsApp-only text import to a broader shared payload
pipeline that supports:
- plain text
- URL
- text + URL
- Add an explicit clarification flow for ambiguous shares:
- assign to existing person
- create person quickly
- save to inbox for later
- Improve the local person knowledge model with:
- aliases
- structured captured facts
- important dates
- timestamps
- source/provenance metadata
- Upgrade inbox triage so unresolved shares can be converted into:
- note
- like
- dislike
- important date
- gift idea
- place idea
- activity idea
- misc fact
- Add trust-facing settings copy and targeted tests.
Why this scope
- It directly improves the most important product workflow: fast capture from outside the app.
- It stays client-side and local-first.
- It does not require a storage rewrite or backend coupling.
- It produces data structures that future LLM/recommendation work can consume.
- It keeps risk contained by extending the existing repository and views rather than replacing them.
Affected files / modules
Expected to change
lib/main.dartlib/features/local/local_models.dartlib/features/local/local_repository.dartlib/features/people/people_view.dartlib/features/settings/settings_view.dartlib/features/share_intake/share_inbox_view.dartlib/features/share_intake/whatsapp_share_listener.dartor replacementandroid/app/src/main/AndroidManifest.xmltest/features/local/local_repository_test.darttest/features/share_intake/share_inbox_view_test.dart
Expected to add
- generic share payload parser / models
- share review sheet / dialog component
- parser unit tests
- iteration summary doc
Architecture decisions
1. Keep LocalRepository as the orchestration layer
Reason:
- It already owns local persistence, entity updates, and ingestion logic.
- Extending it is safer than introducing a second persistence coordinator.
Tradeoff:
- The file remains large.
Mitigation:
- Add focused helpers/models for share parsing and captured-fact typing rather than pushing more UI logic into the repository.
2. Add structured fact/date entities instead of overloading notes
Reason:
- Future recommendation features need provenance, timestamps, and type-safe context.
- Users need auditability and correction, not just a bigger notes blob.
Tradeoff:
- More model surface area now.
Mitigation:
- Keep entity types intentionally small and local-only for this iteration.
3. Prefer inbox-first safety over aggressive auto-assignment
Reason:
- Wrong person attachment is worse than extra triage work in this domain.
Decision:
- Only auto-assign when confidence is genuinely high.
- Otherwise open clarification UI or save to inbox.
4. Fix Android share entry now, defer iOS native extension
Reason:
- Android manifest support is low-cost and unblocks real testing.
- Proper iOS share extension work is native-project-heavy and should be treated as a separate scoped task.
UX flows
Flow A: direct share received with high-confidence target
- Normalize incoming share into
SharedPayload. - If a stable source link or clear unique alias/name match exists, allow direct save to the person.
- Persist the payload history plus a structured fact defaulting to
noteunless a better classification is explicitly chosen. - Show confirmation snackbar and navigate to the relevant destination on cold start.
Flow B: share received without safe target
- Normalize into
SharedPayload. - Open a lightweight review sheet when possible.
- Offer:
- recent people / candidate people
- quick create person
- save to inbox
- If the user saves to inbox, persist payload + draft classification and leave the item unresolved.
Flow C: inbox triage later
- Open
Share Inbox. - Review the preview text/URL and suggested candidates.
- Choose person or create one.
- Choose classification and edit the extracted content.
- Save as structured fact/date.
Risks
Risk: model expansion causes migration issues
Fallback:
- Keep new JSON fields backward-compatible with defaults in
fromJson.
Risk: generic share parsing creates false confidence
Fallback:
- Default to inbox / manual clarification for unclear payloads.
Risk: too much UI churn in PeopleView
Fallback:
- Add new review sections for facts/dates without reworking the whole people editor architecture.
Risk: native plugin behavior differs across platforms
Fallback:
- Keep settings-based share simulation path for deterministic local testing.
Intentionally deferred
- iOS share extension target creation and App Group setup
- image/file share support
- sync mapping for new fact/date entities
- AI-driven classification/recommendations
- full-text search across inbox/facts/dates
- notification engine hooks for new entities