medium complexity extracted Contacts Confidence: 100%
5
Components
39
Shared
0
User Stories
Yes
Analyzed

Description

This feature presents a full detail view for an individual contact, displaying all stored information including personal details, contact history, associated activities, and any linked caregiver or next-of-kin records. From the detail view, users can navigate to edit mode to update contact information, with changes persisted locally and synced to the backend when online. Edit mode uses the same form layout as the detail view, with inline field editing and validation feedback. Optimistic updates are applied immediately to the local store so the UI remains responsive, with automatic rollback if the sync fails. All sensitive fields display a readout warning before being announced by screen readers, in compliance with the platform's accessibility and privacy requirements.

Analysis

Business Value

Accurate and up-to-date contact records are essential for the quality of peer mentor work. Peer mentors need to quickly review a contact's background before a visit and update records immediately afterward while details are fresh. Without an efficient detail and edit flow, data quality degrades over time, undermining the organization's ability to report accurately to Bufdir and monitor follow-up quality. The optimistic update pattern ensures a smooth experience even on poor mobile connections, which is critical for field workers. The sensitive field readout warning directly addresses NHF's stated requirement around protecting contact privacy when using screen readers in public or semi-public settings, making this feature necessary for WCAG compliance and organizational trust.

Implementation Notes

The detail screen is driven by a Riverpod provider that watches the contact record in the local Drift database, rebuilding reactively when the record changes. Edit mode is toggled within the same screen using a local state flag rather than a separate route, reducing navigation complexity. Form fields use the shared AppTextField widget with per-field validation logic defined in the domain layer. Optimistic updates follow the platform's established mutation outbox pattern: the local Drift record is updated immediately, the mutation is enqueued for sync, and on failure the original record is restored with a user-facing error. Sensitive fields (e.g. personal identification numbers, health-related notes) must be annotated using the SensitiveFieldAnnotationService so the ReadoutWarningWidget fires before VoiceOver or TalkBack reads them aloud. All form inputs must be accessible with descriptive semantic labels.

Components (44)

User Interface (2)

Service Layer (2)

Data Layer (1)

Shared Components

These components are reused across multiple features

User Stories

No user stories have been generated for this feature yet.