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

Description

The Note Editor feature allows peer mentors and coordinators to create, edit, and delete individual notes. Each note can optionally be linked to a contact and may include one or more file attachments such as photos or documents. The editor provides a simple freeform text interface optimised for quick entry, with speech-to-text available as an alternative input method where the device supports it. The editor saves drafts locally using the offline-first Drift database so that in-progress notes are never lost due to connectivity issues or accidental navigation. Attachments are stored in the note_attachments table and synced separately from note text. The feature must meet WCAG 2.2 AA standards throughout, including keyboard navigation and screen-reader-compatible form fields.

Analysis

Business Value

The note editor is the core productivity surface of the notes module. Peer mentors conducting home visits or phone calls need to capture observations quickly and without friction; a fast, reliable editor directly reduces underreporting and knowledge loss. The optional attachment capability is especially valuable for coordinators who need to retain supporting documents (e.g. referral letters) alongside their notes without switching to external storage. Linking notes to contacts creates a longitudinal record of interactions that supplements the formal activity log, giving coordinators richer context when reviewing a peer mentor's caseload. This directly supports the formalized post-visit report structure requested by Blindeforbundet and the general follow-up quality improvements sought by HLF, making the editor a cross-organization value driver despite notes being flagged as organization-specific in some workshops.

Implementation Notes

The editor is a Flutter screen with a multi-line AppTextField for body text, an optional contact picker (reusing the existing contacts search widget), and an attachment manager backed by the note_attachments table. Draft auto-save is implemented via a debounced Riverpod notifier that writes to the local Drift database every few seconds, preventing data loss on unexpected exit. Attachments are handled by the device file/camera picker and uploaded to backend storage via the REST API when online, with local file paths stored in note_attachments for offline access. Speech-to-text input is surfaced as an icon button on the keyboard toolbar, delegating to the shared Speech-to-Text Service. Deletion requires a confirmation dialog and cascades to note_attachments both locally and on the server. All form fields carry semantic labels for screen reader compatibility and the editor supports font scaling up to 200 percent per WCAG 2.2 AA requirements.

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.