pediatric-ai-scribe-v3/public
Daniel ce31a1e343 refactor(client): migrate ui-state.js → client/ui-state.ts (first real
frontend module conversion)

ui-state was the smallest, most isolated module: 35 lines, zero legacy-
global dependencies, single concern (localStorage helpers under the
'ped_ui/' namespace). Ideal first migration to validate the strangler-
fig pattern end-to-end.

Changes:
- New: client/ui-state.ts — exports get/set/del + UIState bundle.
  Keeps (window as any).UIState = UIState assignment so the 10+ legacy
  consumers (sub-nav.js, peGuide.js, app.js, etc.) keep working without
  modification. As each consumer is migrated, it will replace the
  window.UIState read with an explicit import.
- client/main.ts: import './ui-state' so it gets bundled into main.js.
- scripts/build-client.mjs: explicit ENTRIES list (just 'main.ts' for
  now) — was scanning every top-level .ts as an entry, which produced
  duplicate ui-state.js bundle.
- public/index.html: <script defer src="/js/ui-state.js"> removed; the
  TS bundle (/dist/main.js) now provides window.UIState.
- public/js/ui-state.js: deleted (now lives in client/).

Verification:
- npm run typecheck:client → 0 errors
- npm run build:client → 349-byte main.js bundle (gzipped will be ~200B)
- 46/46 unit tests pass
- The 10 cross-file consumers of UIState.get/set/del still work because
  the window assignment lives in the bundle.

Pattern documented for next migrations: each new client/X.ts is
imported as a side-effect from main.ts. The window-bridge stays until
every consumer also moves to ES imports.
2026-04-28 00:42:44 +02:00
..
.well-known Add SHA256 fingerprint to assetlinks.json for TWA domain verification 2026-03-29 00:32:58 +00:00
audio fix(pe-guide): remove PVC entry from cardiac sounds library 2026-04-23 18:58:38 +02:00
components feat: don't-miss tooltip after notes + bedside suture selector 2026-04-26 20:26:11 +02:00
css feat(notes): trash + restore + DOMPurify sanitizer + 9 contract tests 2026-04-25 01:02:49 +02:00
data feat: B — extract drug data to public/data/drugs.json (schema v1.0) 2026-04-20 04:23:24 +02:00
icons Feat: add stethoscope+pencil favicon in SVG, ICO, and PNG sizes 2026-03-22 14:09:18 -04:00
images/pe-guide feat(pe-guide): real audio, innocent-murmur panel, APTM image, all-ages resp+CV 2026-04-22 21:00:42 +02:00
img feat: Bedside clinical reference module + age→weight estimator + dose-math unit tests 2026-04-20 02:49:42 +02:00
js refactor(client): migrate ui-state.js → client/ui-state.ts (first real 2026-04-28 00:42:44 +02:00
vendor Replace Quill with Tiptap rich text editor 2026-03-23 23:32:41 -04:00
404.html Add proper 404 handling and custom error page 2026-03-23 23:47:50 -04:00
e2e-harness.html fix(nav): move image lightbox to index.html so NRP + seizure pathways 2026-04-23 18:58:38 +02:00
favicon.ico Feat: add stethoscope+pencil favicon in SVG, ICO, and PNG sizes 2026-03-22 14:09:18 -04:00
index.html refactor(client): migrate ui-state.js → client/ui-state.ts (first real 2026-04-28 00:42:44 +02:00
manifest.json v9: Major feature update — audio backup, SOAP save, Dragon memory, S3 docs, CI/CD, APK 2026-03-28 21:08:32 +00:00
sw.js fix(notes): Stop button never transcribed — silent-cancel branch was always taken 2026-04-25 01:44:23 +02:00