CODEX TASK 3
You are Cedric (Codex), worker #1, pass 3. These are polish fixes that Clahadore found by RUNNING the snapshot build (served with vite preview at http://10.0.0.10:4173) and clicking through it. Keep the changes small and surgical. Commit each item, using per-command identity: git -c user.name="Andrew Jones" -c user.email="andrewjonesdev1@gmail.com" commit, plus the Co-Authored-By trailers for Cedric (Codex) and Claude Opus 5.5.
- BUG (blocks the demo): "Add allergy" fails in snapshot mode over plain-http LAN.
- Error shown:
crypto.randomUUID is not a function.randomUUIDonly exists in secure contexts (HTTPS/localhost). - Fix: a
uuidv4()helper that usescrypto.randomUUIDwhen available, otherwise builds an RFC 4122 v4 fromcrypto.getRandomValues. - Add a Vitest test that deletes
randomUUIDand asserts a valid v4. - Search the whole web/src for other secure-context-only APIs (clipboard, etc.) and guard them the same way.
- Number formatting:
- Lab/vital values show raw floats (
0.8307405777897082 mg/dL, BP167.68/89.38). Display at most 2 decimals; BP systolic/diastolic as integers. - Apply this in the Vue tables, the CDS card detail text (server side: format in RiskEngine card text) and the pre-visit summary bullets.
- Never change stored values.
- Update or add tests for the formatted text.
- Duplicated disclaimer: each CDS card detail repeats "Educational demo, not clinical use." twice. Keep it once per card (or rely on the page banner and drop it from the detail). Update the tests.
- Remove internal requirement-trace codes from the UI (e.g. "A1 · A8 · J11", "SIMULATED WRITE-BACK / A7 · J4 · J9"). The interviewer must not see trace IDs. Keep the descriptive eyebrow text only. Change the drawer note "INNOVARE INTERVIEW DEMO" to "Prepared for Innovare".
- global.json:
{"sdk":{"version":"10.0.300","rollForward":"latestFeature"}}. Andrew's other PCs have 10.0.300; the strict 10.0.301 pin broke the build there. - Firely obsolete API: replace
FhirJsonParserwithFhirJsonDeserializer(CS0618 warnings). - Mobile proof: add Playwright (
@playwright/test, pinned) as a dev dependency with ONE spec that runs againstvite previewof the snapshot build. At a 390x844 viewport it visits Overview → opens the first patient → asserts the CDS cards render → fills the Add-allergy form → asserts the outbox<pre>contains"resourceType": "AllergyIntolerance"→ visits Reports and Compare. Save the screenshots todocs/screenshots/mobile-*.png(commit them). Addnpm run e2e. - Regenerate the snapshot if formatting changed the server-side card text. If regeneration is BLOCKED by Windows Application Control, say so, and patch the snapshot generation via the path that works.
DONE: dotnet build, dotnet test, npm test, npm run build:snapshot, npm run e2e with the REAL outputs in docs/VERIFY.md "Pass 3". Then git push origin HEAD.