frontend phase 14
This commit is contained in:
@@ -12,6 +12,45 @@ for awareness.
|
||||
- **Requests filed:** frontend/requests/for-backend.md (yes/no)
|
||||
-->
|
||||
|
||||
## frontend-phase-14-b15 — Messaging (tickets) & notifications — 2026-07-10
|
||||
- **Shipped:** the social/communication layer for the customer **and** nurse apps (role decides chrome, not
|
||||
the components; admin lens DEFERRED to f15). Two new domains — **`services/tickets`** (`useMyTickets` /
|
||||
`useTicket` = the whole thread in one `detail(id)`, no message pagination / `useTicketThread` = select over
|
||||
detail / `useOpenTicket` / `usePostMessage` **optimistic, draft-preserving**, reconcile by `clientMessageId`)
|
||||
and **`services/notifications`** (`useNotifications` unread-first / `useUnreadCount` the **polled** bell —
|
||||
count-only, stale-while-revalidate / `useMarkNotificationRead` + `useMarkAllRead` optimistic `setQueryData`).
|
||||
Screens shared by both shells: **My Tickets inbox** (`/support/tickets`, `/nurse/support/tickets`) with
|
||||
prominent `referenceCode` + unread indicator + null-safe linked-entity hint + Contact-support dialog (shows the
|
||||
new `referenceCode`); **thread** (`/…/tickets/[id]`) role-aware bubbles + sticky composer; **notification
|
||||
center** (`/notifications`, `/nurse/notifications`) unread-first, mark-read-on-open + mark-all, deep-links via
|
||||
`notificationDeepLink`. **Notification bell** in the customer TopBar + the nurse shell (subscribes to the poll so
|
||||
only it re-renders). **Emergency banner** + **"Get support / Open ticket"** on the f8 booking detail
|
||||
(`BookingSupportEntry`, reuses the cached booking + nurse-gated care query — no refetch); a support icon in the
|
||||
customer TopBar + a Support item in the nurse sidebar. New shared/tested composites: `MessageBubble`,
|
||||
`TicketListCard`, `EmergencyBanner`, `NotificationRow`, `NotificationBellView`, `ContactSupportDialog` (+
|
||||
screens); `notificationDeepLink`/`parseNotificationData` unit-tested; `support`/`send` icons; `tickets` +
|
||||
`notifications` i18n namespaces + `nav.support` (both locales).
|
||||
- **Consumes:** dev/contracts/domains/messaging-notifications-admin.md (b15 tickets) + config-reference.md (b1
|
||||
notifications) + openapi/swagger.v1.json. Real & mapped 1:1 by the client APIs: `POST/GET /tickets`,
|
||||
`GET /tickets/{id}`, `POST /tickets/{id}/messages`; `GET notifications/get_notifications`,
|
||||
`get_unread_count`, `POST mark_notification_read` / `mark_all_read`.
|
||||
- **Critical rules honoured:** `is_internal` is **never** modelled in the user-app types — both API mappers DROP
|
||||
any internal message (server-strip mimic), no internal affordance anywhere; the emergency surface is a
|
||||
**post-confirmation `tel:` playbook only** (nurse-gated care contact, no VoIP seam, never a general phone);
|
||||
the unread **count** polls politely (60s interval + 45s staleTime + refetch-on-focus, auth-gated) and the list
|
||||
is never polled; `data_json` is parsed into a typed union and degrades to no-deep-link.
|
||||
- **Mocked client-side:** `services/tickets` (`USE_TICKETS_MOCK`) — b15 is live and `ticketsClientApi` maps it
|
||||
1:1, but the linked bookings are mock-primary and the summary lacks `unreadCount`/`lastMessageAt` (REQ-028);
|
||||
`services/notifications` (`USE_NOTIFICATIONS_MOCK`) — b1 is live and mapped 1:1, but nothing dispatches
|
||||
notifications client-side yet. Both default `true`; swap is one flag. See mocks-registry.
|
||||
- **Gate:** npm run check green · npm run test:ci green (66 suites / 289 tests, +32) · production build compiles
|
||||
+ type-checks clean (a **pre-existing** "Missing .env variable" prerender guard fails on `/en/addresses` +
|
||||
`/en/nurse/verification/identity` only — unrelated to this phase; sibling pages under the same modified shells
|
||||
prerender fine). 6-dimension adversarial review with per-finding verification.
|
||||
- **Requests filed:** frontend/requests/for-backend.md — yes (REQ-028: `unreadCount`+`lastMessageAt` on the
|
||||
ticket summary, a message author label / masked-name confirmation, a by-booking user ticket lookup, and an
|
||||
optimistic `clientMessageId` idempotency field).
|
||||
|
||||
## frontend-phase-13-b14 — Reviews & patient care records — 2026-07-10
|
||||
- **Shipped:** the last feature-domain phase. Two new domains — **`services/reviews`** (`useNurseReviews`
|
||||
infinite published-only aggregate+list / `useReviewEligibility` / `useMyReviewForBooking` / `useCreateReview`
|
||||
|
||||
Reference in New Issue
Block a user