Staff and handover tools: Staff needed, Contact, shift digest, quiet hours, pins, since-last-here
Merged
BI
3d ago+4794+4794+0123456789012345678901234567890123456789-897-897-012345678901234567890123456789
Requested by Josh (BigSimmo), 9 Nov 2026, in the Ward Flow staff tools project thread. One combined PR (fewest-PRs rule). Merge order: slot 10 of 12 (/mnt/project-files/maintenance/merge-order-9-nov.md). Do not arm until slot 9 has merged and main is merged in.
What this adds
- Staff needed (item 10): a ward button that logs that staff ordering is needed to meet current patient demand. Coordinator or bed manager marks it Arranged; a ward can withdraw only its own; executive sees it but can't act. New events
REQUEST_WARD_STAFF/CLOSE_WARD_STAFF_REQUEST, with role, history, persistence and storage-validation wiring. - Ward contact card (item 32): synthetic contact details for each ward, opened from the ward top.
- Shift digest (item 15): "Digest" on Handover and "Read digest" in the rail; lists changes since the last handover and promises due by handover time.
- Smart alerts + quiet hours (item 20): per-desk choices on Settings (Due soon too, Staff requests, Quiet hours with three windows), shown only to desks that get optional alerts. Optional alerts are held, not dropped, during quiet hours. Act now always comes through.
- Pins (item 31): Pin on the patient page; Pinned card on Home (up to 8, ids only, this device).
- Since you were last here (item 40): a one-line Home banner.
- What's new entry added.
- The act-now notifier (renders nothing) now loads when the browser is idle, saving about 1.6 KB per route.
Defaults Josh approved
- Quiet hours never mute act-now alerts.
- Digest lists only promises due by the handover time.
- Coordinator or bed manager marks Arranged; a ward withdraws only its own; executive is view-only.
Checks
- Local (Node 24 container): type check, knip (no new unused items), journey verify
--check, and focused tests for staff requests, settings, alerts, phone push, pins/banner, handover and rail (19 files) pass on787718bd. - Earlier local run of related tests (360 files) passed except two
test-runner-safetycases needing Node 24 (environmental). - Storage verdicts fixture re-recorded: existing verdicts unchanged; 162 new staff cases only.
- Hosted CI on
9d2f7c6c: build, static checks, release gates, browser journeys and unit shards passed. Re-running on787718bd. - Phone size limits: only movement rises, 592.7 to 593.0 KB (measured 592.8). See
docs/script-budget-history/2026-11-09-pr1562-staff-and-handover-tools.md.
Follow-ups
- After the page-tops PR (slot 6) merges, move Digest / Staff needed / Contact / Pin onto the new hero chips and pill.
Review page: https://claude.ai/artifact/SbVP2zgFCp8Q9AA5syV7e9
🤖 Generated with Claude Code