MDA-11 — Delegate app — messages, settings & sync centre
Announcements and notifications, settings (language, notifications, location transparency), sync centre with pending/error items and retry.
| Field | Details |
|---|---|
| Task code | MDA-11 |
| Phase | P1 — V1 build & integration |
| Product scope | V1 |
| Status | Planned |
| Start | Mon 14 Dec 2026 |
| Due | Mon 14 Dec 2026 |
| Responsible | Imad — Mobile developer (Flutter) |
| Co-responsible | — |
| Effort | 0.75 person-day(s) planned · 3 from scratch · size S |
| Area · app | Delegate app · mobile |
| Depends on | DES-14, MOB-09 |
| Unblocks | DQA-03 |
| Milestones | — |
Summary
Announcements and notifications, settings (language, notifications, location transparency), sync centre with pending/error items and retry.
Description
Delegates need the office's messages, control over their settings and location transparency, and — because the app is offline-first — a sync centre that shows exactly what is pending or failed and lets them fix it (NOT-01, NOT-07, SYN-06, FLD-15). Scope: messages and notifications DA-23 (announcements targeted to delegates plus the notification inbox), settings DA-26 (language, notification preferences, location transparency and consent) and the sync centre DA-27 over the MOB-09 outbox and MOB-11 upload queue, with per-error resolution actions. It needs announcements.*, notifications.* and notifications.preferences.* (SRV-24, SRV-08) plus the SRV-23 error codes, and Akram's DES-11/DES-14 frames. DQA-03 (design QA of the delegate build) starts after this task.
Subtasks
| # | Subtask | Owner |
|---|---|---|
| 1 | MessagesScreen DA-23: tabs « Annonces » (GET /announcements, acknowledge with POST /announcements/{id}/read) and « Notifications » (inbox, mark read, deep links to tours, visits, tasks, orders) | Imad |
| 2 | SettingsScreen DA-26: language, notification preferences (transactional and field categories locked on), sign-out guarded by unsynced data | Imad |
| 3 | Location transparency section: current policy (sampling only while a tour is « En cours », every 5 min or 200 m, retention 90 days, tolerance 150 m), consent date, withdrawal explaining that tours cannot be started without it (FLD-15) | Imad |
| 4 | SyncCentreScreen DA-27: SyncStatusPill header, « Synchroniser maintenant », last sync time, items grouped by entity with SyncItemResult labels (« En attente », « À réessayer », « Conflit », « Rejeté ») | Imad |
| 5 | Per-code resolution actions: PHONE_ALREADY_EXISTS → open existing / correct phone; VISIT_LOCKED → discard local edit; OCCURRED_AT_OUT_OF_RANGE → contact supervisor; GPS_OUT_OF_TOLERANCE → view visit | Imad |
| 6 | Retry one item, retry all, discard a rejected item (confirmation dialog, logged to Sentry breadcrumbs) | Imad |
| 7 | Upload queue section (photos pending, progress, failed) from MOB-11 | Imad |
| 8 | « Envoyer un diagnostic »: anonymised outbox and log summary shared to support via share_plus | Imad |
Deliverables
- apps/delegate/lib/src/features/messages/ (DA-23)
- apps/delegate/lib/src/features/settings/ (DA-26)
- apps/delegate/lib/src/features/sync_centre/ (DA-27)
- Firebase App Distribution build 0.8.0 (staging) of the delegate app for DQA-03
Acceptance criteria
- Pending, error and synced counts in the sync centre match the outbox and upload queue exactly (SYN-06)
- Every rejected or conflicting item shows its error code, a French explanation and at least one resolution action (SYN-05)
- « Synchroniser maintenant » triggers an immediate batch and updates the list live
- Announcements targeted to delegates are listed and their acknowledgment reaches the back-office (NOT-07)
- The location policy shown in settings matches the server's current settings (FLD-15)
Requirements covered
| Requirement | Title | Release |
|---|---|---|
| NOT-01 | In-app notification inbox with read/unread in every app | V1 |
| NOT-07 | Announcements from the back-office to delegates or resellers by target ('Messages') | V1 |
| SYN-06 | Visible sync state: synced, pending, error | V1 |
| FLD-15 | Location policy: consent, frequency, tolerance and retention configurable and transparent | V1 |
Screens
API surface
| Endpoint group | Operations |
|---|---|
| Notifications & announcements | 10 |
| Offline sync & location | 3 |
Test measures
- Widget tests of the sync centre with seeded outbox states for each SyncItemResult and error code
- Integration test: force a VISIT_LOCKED rejection on staging → item appears → discard → counts update
- Widget tests of the announcements acknowledgment
Risks
- Delegates discard items they should not — discard only for REJECTED items, with explicit confirmation and a record in the diagnostic log
KPI
- Delivered by Mon 14 Dec 2026 within 0.75 person-day(s).
- Every acceptance criterion above demonstrated before hand-off; linked requirements' acceptance criteria pass.
- Zero open critical defects, permission gaps or data-integrity regressions at sign-off.
Generated from content/plan/tasks.json by scripts/generate-team-tasks.mjs. Dates are computed by the scheduler (Sunday–Thursday weeks, holidays excluded) — change the plan, not this page.
MDA-10 — Delegate app — tour closing, reports & performance
Closing preview with blocking items, end-of-day comment, final report, performance widgets, reports history.
MDA-12 — Delegate app — location sampling during tours
Policy-driven sampling only while a tour is in progress, batching, battery-friendly settings, foreground-service notice on Android.