MEDIUM story-contact-detail-management-peer-mentor-010 3 pts
3
Story Points
Medium
Priority
Contact Detail & Management
Feature

User Story

As a user
I want to be able to read previously loaded contact notes and add new notes even when I have no internet connection, with the new notes automatically synchronised when connectivity returns
So that So that I can complete my post-visit notes immediately after a home visit even in areas with poor connectivity, without being blocked by a network requirement

Acceptance Criteria

  • Given a user has previously viewed a contact's notes while online, when they open the same contact while offline, then cached notes are displayed with an offline status banner
  • Given a user writes a note while offline, when they submit it, then the note is stored locally with a pending indicator and appears immediately in the timeline
  • Given connectivity is restored after offline note creation, when the sync runs, then pending notes are submitted to Supabase and the pending indicator is removed
  • Given a sync conflict occurs for a pending note, when the sync resolves it using last-write-wins, then the user sees the final resolved state without any error or data loss
  • Given the user navigates away and returns to the contact while still offline, when the notes timeline loads, then both cached server notes and locally pending notes are shown in chronological order

Business Value

Peer mentors frequently conduct home visits in residential areas or rural settings where mobile connectivity is unreliable. If note-taking is blocked by a connectivity requirement, mentors are forced to use paper notes or their phone's memo app and transfer the notes later — a process that leads to data loss and delays. Offline-first note capture ensures that post-visit documentation is completed immediately while the interaction is fresh, improving both the quality and completeness of the contact record.