Search, export and training tools
Requested by Josh · project thread
Items 35, 44, 45, 47, 48 and 49 from Josh's list of 50 (9 Nov 2026). No clinical change. Synthetic data only. Review page with before and after pictures: https://claude.ai/artifact/1dZSebbv9AoHMjqLGCxCSi
Ruling applied: D-102 (Josh, 9 Nov 2026; recorded in #1555). Feedback screenshots are blurred, and exports never carry names. This replaces the downloads part of D-83.
Merge order: slot 11 of 12. Taken over by the merge-order thread on 9 Nov under Josh's overnight permission; merged with main c890cda (after #1563 and #1579) and auto-merge armed.
What changed
- Export (44): adds an Export button (
ward-list-export-button.tsx) to the ED handover table, Waiting, Patients, Discharges (Now and Recorded) and the Referrals queue. Each list's row builder is lazy-loaded. Files carry the record id, UMRN, ward, bed, times and labels only. They never include names, initials, dates of birth or typed notes (D-102). Census legal text is mapped to fixed known labels or a digit-letter form code (for example "Form 3B"); anything else exports as "Recorded (see Ward Flow)". Every button sits in its list's own toolbar, not in the page top (page-tops v6). - My views (45): Quick commands in search can now save the current main screen with its filters. Saved screens appear under "My views" in search. They are kept in this browser only, typed words are dropped, and patient pages cannot be saved (
shell/ward-saved-views.ts,ward-global-search-my-views.ts). - Training (47): adds a per-tab training sandbox. Synthetic practice patients live in a fresh local world, and nothing reaches the shared connection or the audit trail. A banner shows on every screen, and Stop discards the training world (
demo-reset/ward-training-mode.ts,ward-training-connection.tsx). Only a tiny gate goes in the layout; the banner's code loads only while training is on, to protect the phone size limits. - Report picture (48): Report a problem gets an optional picture of the screen, off by default. The whole page is pixelated except the side menu. The user sees a preview, then copies or saves it, and nothing is sent or stored (D-102). A refused save says so. Adds
html-to-image1.11.13 (MIT), loaded by dynamic import only. - Shortcuts (49): G followed by a letter opens a main page (H, E, W, B, D, R, C or S). It uses the existing typing, Settings and access guards (
shell/ward-goto-shortcuts.ts). A pending G clears when Escape, a typing field or a drawer shortcut uses the next key. - Quick search (35): already existed, so nothing changed.
- The provider minute-tick moved unchanged into
use-ward-minute-tick.ts, and START_ACTIONS moved toward-global-search-groups.ts, both to stay under the max-lines limit. The journey review digests are refreshed.
Phone size limits (script-budget.json)
Raised against main c890cda. Each grew because these screens now load the shared go-to keys, saved-view search code, the training gate and a lazy Export button; the export builders themselves load only on click. Measured sizes are from hosted CI on a67d87a. Detail: docs/script-budget-history/2026-11-09-pr1559-search-export-training.md.
| Screen | Main limit | New limit | Measured |
|---|---|---|---|
| Referrals | 568.0 | 569.1 | 568.9 |
| ED | 521.0 | 522.7 | 522.5 |
| Secure ward | 601.3 | 603.2 | 603.0 |
| Movement WF-001 | 594.8 | 596.5 | 596.3 |
| ARM ED | 657.0 | 659.3 | 659.1 |
| Bed meeting | 573.5 | 575.2 | 575.1 |
| Statistics | 613.8 | 615.5 | 615.4 |
Every raise is under the 5 KB per-screen allowance.
Checks (local)
- Passed: full
tsc, ESLint on changed files, Prettier, knip, the journey--check, and the raw-colour, text-size, explanatory-button, legal-language and diff-integrity checks. - Tests: the related set passes, including new tests for exports (with the name-safe legal mapping), My views, the go-to keys, the report picture and training isolation.
- Browser: checked in local Chrome at 1280 px and 400 px (before the main merges).
- Not run locally: the full unit suite, the phone size limit build, dark mode, Safari and Firefox. Hosted CI decides.
🤖 Generated with Claude Code