Add stable share fingerprints and near-match conflict routing

This commit is contained in:
Rijad Zuzo
2026-02-19 00:52:20 +01:00
parent d8d96e53e8
commit 0347ee1c0a
6 changed files with 303 additions and 1 deletions
+4
View File
@@ -101,6 +101,10 @@ Behavior notes:
- moment history (`type=whatsapp`)
- ambiguous or missing-identity shares are queued in `Share Inbox` for manual
resolution
- near-name conflicts now also route to `Share Inbox` to avoid accidental
profile mismatches
- follow-up routing prefers stable source fingerprint matching (when source
user/thread IDs are available)
- app launch from initial share intent auto-opens the relevant destination:
- resolved import -> `People` with imported profile selected
- unresolved import -> `Share Inbox`
+28
View File
@@ -41,6 +41,34 @@ navigation:
- `test/features/local/local_repository_test.dart`
- verifies merge rebinding across related records
## Latest Milestone (2026-02-18): Stable Share Fingerprints + Near-Match Conflict Detection
Strengthened WhatsApp identity mapping to reduce accidental mis-links:
- Added stable source fingerprint strategy:
- `lib/features/local/local_models.dart`
- `SourceProfileLink` now stores optional `sourceFingerprint`
- `SharedInboxEntry` also keeps the same fingerprint when unresolved
- fingerprint is derived from stable source identifiers (`sourceApp` +
source user/thread ids)
- Updated ingest matching order:
- `lib/features/local/local_repository.dart`
- fingerprint match is now the primary lookup path
- backward-compatible fallback to existing user/thread/display matching
- legacy links without stored fingerprint still match by derived fingerprint
- Added near-match conflict handling:
- new inbox reason: `nearProfileConflict`
- fuzzy name similarity heuristic (edit-distance + containment) now detects
likely profile conflicts and routes to Share Inbox for explicit user choice
- Updated Share Inbox UI reason labels:
- `lib/features/share_intake/share_inbox_view.dart`
- Added test coverage:
- `test/features/local/local_repository_test.dart`
- verifies:
- fingerprint persistence on source links
- near-match conflict queueing
- follow-up routing succeeds via fingerprint after manual resolution
## Latest Milestone (2026-02-18): Share Inbox Resolution Flow
Added manual resolution UX and data paths for ambiguous/unidentifiable WhatsApp