medium complexity extracted Contacts Confidence: 100%
3
Components
18
Shared
0
User Stories
Yes
Analyzed

Description

The Contact Detail & Edit feature displays a contact's full profile including personal details, role tags, linked activities, and caregiver relationships, serving as the navigation hub for all contact-centric workflows. Edits apply optimistically - written to the local database immediately, with automatic rollback on sync failure and a clear corrective error message. Permissions are role-scoped: peer mentors update limited fields, coordinators have full access. The layout uses vertical scroll and an explicit back button rather than swipe gestures to support users with motor impairments per the WCAG 2.2 AA mandate.

Sources & reasoning

Architecture section (line 292) explicitly names contact detail and edit as MVP screens. The accessibility mandate (line 36) defines vertical scroll and back-button navigation as hard constraints for this screen. MVP scope narrative (line 320) confirms Phase 1 for contact management. All evidence places this feature at MVP; Phase 1 = MVP by ordinal mapping.

Analysis

Business Value

Every activity is linked to a contact, so coordinators routinely correct or supplement contact information received during onboarding or imported from member systems. Without reliable edit capability, data quality degrades, compromising activity statistics and Bufdir reports - both funding-critical for all four organizations. The optimistic mutation pattern with rollback is especially important for peer mentors conducting home visits in rural or low-signal areas, where waiting for server confirmation is not viable. Providing an immediate responsive experience reduces user uncertainty and prevents duplicate submissions. Explicit back navigation directly addresses the accessibility needs of NHF's stroke-affected user base.

Implementation Notes

The contact detail screen is a Flutter stateful widget backed by a Riverpod provider that hydrates from the local Drift database first and reconciles with the server in the background. Edits are written to Drift immediately and enqueued in the mutation outbox for server sync; terminal sync failure triggers rollback and a WCAG 2.2 AA-compliant error message identifying the problem and a corrective action. Role-based field visibility is resolved from JWT claims at widget build time with no extra server round-trip. The screen uses vertical scroll and an explicit back button rather than swipe-to-go-back, per the accessibility mandate. All form fields use AppTextField and AppButton from the design token system for compliant touch targets and contrast ratios.

Quality Assurance

No QA section has been generated for this feature yet.

User Stories

No user stories have been generated for this feature yet.