Review and Resolve Deduplication Queue
Coordinators need a structured interface to manage the backlog of flagged duplicate pairs. The deduplication queue screen should display each suspected pair with key metadata, allow the coordinator to expand a pair for a full side-by-side comparison, and provide clear resolution actions: merge (keep one, discard the other), mark as distinct (both are legitimate and separate), or escalate to a national admin. The queue should show a count badge on the navigation so coordinators notice pending items without having to open the screen proactively.
User Story
Audience Summaries
This story directly protects NHF's data integrity and funding compliance with Bufdir. Without a structured deduplication queue, duplicate registrations from cross-coordinator overlap across 1,400 local chapters enter export pipelines unresolved, inflating reported peer support volumes and risking regulatory consequences. By giving coordinators a clear, actionable interface to merge, dismiss, or escalate each flagged pair, NHF can guarantee that every Bufdir submission reflects accurate, audited activity data. The navigation badge ensures no pending items are silently ignored, turning a passive risk into an actively managed process.
This protects organizational credibility, sustains funding eligibility, and reduces the administrative burden of manual reconciliation.
This story is high priority and requires close coordination between the mobile frontend team, backend API team, and the data governance stakeholder who owns the Bufdir export pipeline. The UI involves a list view with count badge, an expandable side-by-side comparison panel, and three resolution actions (merge, mark distinct, escalate), each with distinct backend mutations. Acceptance criteria are well-defined and testable, but UAT with real coordinator users is essential to validate the comparison panel layout and the badge update timing. Dependencies include story-duplicate-activity-detection-coordinator-1 for the underlying flagging logic.
Rollout should be staged to pilot coordinators first to catch edge cases in the merge workflow before broad deployment.
This story requires a deduplication queue screen backed by a paginated API endpoint returning flagged duplicate pairs with participant name, activity type, date, and both registrant names. The expandable comparison panel needs full field rendering for both records side-by-side — likely a modal or expandable row component. Three resolution mutations are needed: soft-delete the older record and clear the duplicate flag (merge-keep-newest), clear the flag on both records (mark-as-distinct), and create an escalation record for admin review. The navigation badge requires a real-time or on-focus count query against unresolved pairs.
Edge cases include concurrent resolution by two coordinators and handling the empty queue state gracefully. Integration with the audit log is required for all resolution actions.
Acceptance Criteria
- Given the coordinator opens the deduplication queue screen, When there are unresolved duplicate pairs, Then each pair is listed with participant name, activity type, date, and the names of both registrants
- Given the coordinator taps a pair in the queue, When they expand it, Then a full duplicate-comparison-panel is shown with all fields of both records visible
- Given the coordinator reviews a pair, When they choose 'Mark as Distinct', Then both records remain, the duplicate flag is cleared, and the pair is removed from the queue
- Given the coordinator reviews a pair, When they choose 'Merge — Keep Newest', Then the older record is soft-deleted and the newer record's duplicate-reviewed flag is cleared
- Given there are unresolved items in the deduplication queue, When the coordinator views the navigation bar, Then a numeric badge on the relevant tab reflects the count of pending pairs
- Given the queue is empty, When the coordinator opens the deduplication queue screen, Then an empty state is displayed confirming no pending duplicates
Business Value
Without a queue-based workflow, duplicate resolution becomes an ad hoc, error-prone process where some conflicts are never resolved. A structured queue ensures every flagged pair is explicitly decided upon before it enters Bufdir export pipelines. This is especially critical for NHF, which has 1,400 local chapters where cross-coordinator registration overlap is statistically frequent during shared group events.
Components
- Deduplication Queue Screen ui
- Duplicate Comparison Panel ui
- Duplicate Detection Service service
- Duplicate Resolution Handler service
- Deduplication Queue Service service
- Duplicate Check Repository data
- Duplicate Queue Repository data
- Duplicate Detection BLoC infrastructure