View Comprehensive Contact Detail with Assignment History
The contact detail screen must present a complete profile view including personal information, multi-chapter affiliation chips showing all chapters the contact belongs to, encrypted sensitive fields displayed securely with appropriate warnings, assignment status indicator, and a scrollable activity history list. The screen must use the read receipt service to mark the contact record as viewed. Sensitive fields such as personal identification numbers or health notes must display a warning before revealing content to comply with accessibility and privacy guidelines.
User Story
Audience Summaries
This critical user story delivers a complete contact intelligence hub that directly enables NHF coordinators to make high-quality, informed assignment decisions for peer mentor relationships. By surfacing assignment status, full activity history, and multi-chapter affiliations in a single view, coordinators eliminate the manual cross-referencing that currently introduces errors and slows the matching process. The privacy-first design — with encrypted field warnings before sensitive data is revealed — ensures NHF meets Norwegian privacy regulations (GDPR and sector-specific health data rules), reducing legal and reputational risk. Audit trails via the read receipt service provide accountability evidence required by Bufdir for grant reporting.
Coordinators who can quickly assess a mentor's full history and relationship load will make better matches, directly improving beneficiary outcomes and NHF's reported program effectiveness.
This critical-priority story has significant surface area spanning UI, privacy middleware, and audit infrastructure. Delivery requires coordination across the mobile frontend team (contact detail screen layout with multi-chapter chips, sensitive field warning dialog, activity history list), the backend team (read receipt service endpoint, encrypted field decryption with access logging), and the privacy/compliance function (review of sensitive field warning copy and trigger conditions). Acceptance criteria are well-defined and testable, but the sensitive field handling requires privacy team sign-off before UAT can begin. The read receipt service integration must be verified to handle offline scenarios gracefully.
Key delivery risks: encrypted field decryption UX may require multiple design iterations; activity history pagination performance must be load-tested. Estimated dependencies on story-contact-list-management-coordinator-001 mean this story cannot begin integration testing until the contact list story is complete.
Implementation requires building or extending a ContactDetailScreen composable that fetches and renders a full contact DTO including name, phone, email, role, assignment status, chapter affiliation array, encrypted field metadata, and paginated activity history. Multi-chapter affiliation chips are read from the affiliations[] array and rendered as styled badges. Encrypted fields must integrate with the existing sensitive field middleware: the UI checks a field's `encrypted: true` flag, renders a masked placeholder, and on tap triggers a SensitiveFieldWarningDialog; only on user confirmation does it call the decryption endpoint and display plain text. The read receipt service must be called on `onScreenLoad` with the current userId and a server-side timestamp, and must be retry-safe for offline cases (queue locally, flush on reconnect).
The activity history section requires a paginated scroll list consuming the activity history API, sorted chronologically, displaying type, date, and duration. Edge cases: contacts with zero activities (empty state), very large activity histories (virtualized list), and contacts with no affiliations.
Acceptance Criteria
- Given I tap a contact card, when the detail screen opens, then I see the contact's full name, phone, email, organization role, and assignment status
- Given a contact has affiliations in multiple chapters, when I view their detail screen, then I see multi-chapter affiliation chips for each chapter they belong to
- Given the contact has encrypted sensitive fields, when I attempt to view those fields, then I am first shown a sensitive field warning dialog before the decrypted content is displayed
- Given I open a contact's detail screen, when the screen fully loads, then the read receipt service records my view with timestamp and user ID
- Given the contact has a history of activities, when I scroll to the activity history section, then I see a chronological list of all past activities with dates, types, and durations
Business Value
A complete contact detail view is essential for coordinators to make informed assignment decisions and track the quality of peer mentor relationships over time. Displaying multi-chapter affiliations prevents double-assignment errors that are a known pain point for NHF coordinators. Encrypted field protection with visible warnings ensures compliance with Norwegian privacy regulations and builds trust with sensitive user populations.
Components
- Contact Detail Screen ui
- Multi-Chapter Affiliation Chip Widget ui
- Encrypted Field Display Widget ui
- Assignment Status Indicator ui
- Activity History List ui
- Contact Detail Service service
- Read Receipt Service service
- Contact Detail Repository data
- Assignment Repository data
- Field Encryption Utilities infrastructure
- Sensitive Field Warning Dialog ui
- Sensitive Field Privacy Guard service