medium complexity extracted Contacts Confidence: 100%
10
Components
4
Shared
0
User Stories
Yes
Analyzed

Description

This feature provides a full-profile view of an individual contact and a structured edit flow for updating their information. Peer mentors and coordinators can review demographics, case notes, linked activities, and the caregiver section from a single screen. The edit flow uses validated field widgets to enforce data quality at input time, with changes persisted optimistically to the local Drift database and queued for synchronisation to the REST API when connectivity is restored, with automatic rollback on failure.

Sources & reasoning

Line 292 explicitly names contact detail and edit as core mobile screens in the MVP architecture section. Line 304 details the optimistic mutation pattern specifically required for contact edits. Both sit in the Mobile App Architecture block describing the MVP scope. The Phase 1 roadmap (line 321) lists contact list and overview as MVP deliverables, making detail and edit an implicit prerequisite.

  • docs/source/likeperson.md · line 292
    - Contact detail, edit, and peer mentor profile screens
  • docs/source/likeperson.md · line 304
    - Optimistic mutations with automatic rollback on failure (contact edits and paginated list updates)

Analysis

Business Value

Accurate and current contact records are foundational to every peer mentoring workflow; stale or incomplete data leads to missed follow-up, duplicate entries, and inaccurate Bufdir reporting. The edit capability allows peer mentors to capture first-hand field knowledge in real time, reducing the lag between reality and the system record. Coordinators rely on up-to-date contact detail to assign peer mentors correctly and resolve disputes. The optimistic mutation model with offline rollback is especially critical for rural deployments common in large-county organisations like Blindeforbundet, where network access is intermittent during home visits.

Implementation Notes

Built in Flutter with the ContactBloc managing view, edit, and saving state transitions. The edit form uses AppTextField and custom field widgets with server-side-sourced validation schemas. Optimistic mutations apply changes locally and queue an API PATCH via the mutation outbox; on conflict or failure, the outbox triggers automatic rollback and surfaces a user-facing error banner. The feature integrates with the Drift contacts table (organisation-scoped), the organisation labels system for field display names, and emits deep-link events consumed by the activity registration wizard to pre-populate the correct contact. ContactDetailScreen and EditContactScreen are separate routes managed by the ContactBloc.

User Stories

No user stories have been generated for this feature yet.