Add duplicate profile merge and share deep-link routing

This commit is contained in:
Rijad Zuzo
2026-02-19 00:33:30 +01:00
parent d70edb4c4c
commit d8d96e53e8
7 changed files with 677 additions and 16 deletions
+6
View File
@@ -101,10 +101,16 @@ Behavior notes:
- moment history (`type=whatsapp`)
- ambiguous or missing-identity shares are queued in `Share Inbox` for manual
resolution
- app launch from initial share intent auto-opens the relevant destination:
- resolved import -> `People` with imported profile selected
- unresolved import -> `Share Inbox`
- Settings includes:
- `Simulate WhatsApp Share` for local/dev testing
- `Open Share Inbox` to resolve queued items
People view includes `Merge duplicates` action for resolving duplicate profile
records after import.
## Local Persistence Backend
Default local store:
+34
View File
@@ -7,6 +7,40 @@ Updated: 2026-02-18
- 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-18): Duplicate Profile Merge + Share Deep-Link Polish
Improved identity continuity from WhatsApp intake with merge tooling and direct
navigation:
- Added duplicate-profile merge operation in local repository:
- `lib/features/local/local_repository.dart`
- new `mergePersonProfiles(sourcePersonId, targetPersonId)`:
- merges target profile metadata (tags/notes/location/affinity/next moment)
- rebinds related records from source -> target:
- moments
- ideas
- reminders
- source links
- shared message history
- unresolved inbox candidate IDs
- enqueues sync envelopes for merged target + source delete + rebounded
related entities
- Added merge action in People UX:
- `lib/features/people/people_view.dart`
- new `Merge` / `Merge duplicates` action in People header
- duplicate-name detection and merge dialog for selecting source/target
- Share destination deep-link polish:
- `lib/features/share_intake/whatsapp_share_listener.dart`
- initial app launch from share intent now auto-opens destination context:
- `Share Inbox` for unresolved imports
- `People` with selected imported profile for resolved imports
- snackbar action updated to `Open Profile` / `Open Inbox`
- `lib/features/settings/settings_view.dart`
- simulated share snackbar now offers direct navigation to profile/inbox
- Added merge test coverage:
- `test/features/local/local_repository_test.dart`
- verifies merge rebinding across related records
## Latest Milestone (2026-02-18): Share Inbox Resolution Flow
Added manual resolution UX and data paths for ambiguous/unidentifiable WhatsApp