pediatric-ai-scribe-v3/public/js
Daniel db83255c58 feat: display-only sources toggle, signed-out preview, and a composer that carries the toolbar
Sources (correcting what I built earlier)
The previous toggle branched the SYSTEM PROMPT, so the same question could get a
different answer depending on a display setting — the bias this was meant to
avoid. The prompt is now unconditional: buildSystemPrompt takes no display
argument and is byte-identical either way. Hiding sources happens on the way out
— the server omits them and strips the now-orphaned [n] markers from the copy it
sends. The answer is generated, stored and exported with citations intact, so
turning the setting back on restores them without re-asking anything. Renamed to
clinical_assistant.show_sources; the old key is still honoured.

Signed-out preview (admin opt-in, default off)
A visitor may try the assistant; reaching for the workspace asks them to sign in.
Deliberately narrow:
- Reachable paths are an exact allow-list, not a pattern, so a new endpoint is
  private unless someone adds it on purpose.
- A preview visitor gets no identity at all (id: null), so nothing can be owned,
  saved, billed or addressed to them.
- The image tool is withheld rather than left to fail on a null owner, and no
  audit rows are written.
- A caller presenting a token is authenticated normally, so preview can never
  downgrade a real session; if the setting cannot be read, authentication is
  required.
- Actions needing an account are hidden rather than offered and refused.

Composer
The bar above the transcript is gone. Patient take home, Export PDF, Download
transcript and Attach images moved into a + menu in the composer, and the model
selector moved beside send — shown only when there is more than one model, as
before. Both views now start at the same top edge, so switching modes cannot
nudge the page up or down. On an empty transcript the tiled ground runs behind
and below the composer, which floats on it above centre.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GmpYHPSLGmXGZMyLpn2Lbe
2026-09-10 04:12:36 +02:00
..
admin feat: display-only sources toggle, signed-out preview, and a composer that carries the toolbar 2026-09-10 04:12:36 +02:00
assistant refactor: retrieval is text-only; admins can add model ids discovery never returns 2026-09-09 23:35:06 +02:00
bedside allow bedside respiratory without weight 2026-05-08 09:10:33 +02:00
calculators consolidate calculator growth helpers 2026-05-08 04:36:39 +02:00
learningHub feat: integrate durable image jobs/private assets into current core 2026-09-07 16:53:42 +02:00
notes feat: ship reviewed prompt history, conversation limits and account protections 2026-09-07 04:01:01 +02:00
wellVisit extract well visit schedule data 2026-05-08 05:11:29 +02:00
accountBoundary.js feat: ship reviewed prompt history, conversation limits and account protections 2026-09-07 04:01:01 +02:00
admin-docs.js docs refresh current workflows 2026-05-09 00:40:45 +02:00
admin.js fix: simple prompt editing (save + restore original only), live users search, straight responsive admin rows 2026-09-07 19:30:40 +02:00
app.js feat: display-only sources toggle, signed-out preview, and a composer that carries the toolbar 2026-09-10 04:12:36 +02:00
audioBackup.js feat: ship reviewed prompt history, conversation limits and account protections 2026-09-07 04:01:01 +02:00
auth.js feat: display-only sources toggle, signed-out preview, and a composer that carries the toolbar 2026-09-10 04:12:36 +02:00
authFetch.js feat: ship reviewed prompt history, conversation limits and account protections 2026-09-07 04:01:01 +02:00
calc-math.js feat: Bedside clinical reference module + age→weight estimator + dose-math unit tests 2026-04-20 02:49:42 +02:00
calculators.js remove redundant module wrappers 2026-05-08 05:30:32 +02:00
chartReview.js feat: add patient education handouts 2026-05-08 22:26:53 +02:00
clinicalAssistant.js feat: display-only sources toggle, signed-out preview, and a composer that carries the toolbar 2026-09-10 04:12:36 +02:00
diagrams.js fix diagram delete confirmation 2026-05-08 06:28:12 +02:00
documents.js feat: ship reviewed prompt history, conversation limits and account protections 2026-09-07 04:01:01 +02:00
drugs-loader.js convert admin docs and drug loader to modules 2026-05-08 07:50:26 +02:00
e2e-bootstrap.js fix docs toc fallback and remove redundant iifes 2026-05-08 23:08:47 +02:00
ed-encounters.js feat: ship reviewed prompt history, conversation limits and account protections 2026-09-07 04:01:01 +02:00
encounters.js feat: ship reviewed prompt history, conversation limits and account protections 2026-09-07 04:01:01 +02:00
extensions.js feat: add extension import preview 2026-05-08 22:26:53 +02:00
generatedImages.js fix: usable mobile chat menu — left drawer with close X and backdrop, main-menu style rows, internal message scroll to the question, taller sources scroll; context metadata line removed from image cards 2026-09-09 04:39:20 +02:00
hospitalCourse.js feat: add patient education handouts 2026-05-08 22:26:53 +02:00
learningHub.js feat: integrate durable image jobs/private assets into current core 2026-09-07 16:53:42 +02:00
liveEncounter.js fix docs toc fallback and remove redundant iifes 2026-05-08 23:08:47 +02:00
memories.js clarify template-only AI memory context 2026-05-08 07:38:27 +02:00
milestones.js test clinical note entrypoints 2026-05-08 06:33:34 +02:00
milestonesData.js v4: Fix milestones display + add OpenID auth + 100MB PDF support 2026-04-01 17:59:51 +00:00
nextcloud.js convert settings loaders to modules 2026-05-08 07:17:29 +02:00
notes.js feat: ship reviewed prompt history, conversation limits and account protections 2026-09-07 04:01:01 +02:00
peGuide.js move pe guide data to json 2026-05-08 08:56:21 +02:00
secureStorage.js feat: ship reviewed prompt history, conversation limits and account protections 2026-09-07 04:01:01 +02:00
shadess.js harden clinical assistant source handling 2026-05-09 19:59:04 +02:00
sickVisit.js feat: add patient education handouts 2026-05-08 22:26:53 +02:00
soap.js feat: add patient education handouts 2026-05-08 22:26:53 +02:00
speechRecognition.js convert speech helpers to modules 2026-05-08 08:09:38 +02:00
transcriptionSettings.js convert settings helpers to modules 2026-05-08 07:54:08 +02:00
ui-state.js convert settings helpers to modules 2026-05-08 07:54:08 +02:00
voiceDictation.js fix docs toc fallback and remove redundant iifes 2026-05-08 23:08:47 +02:00
voicePreferences.js convert settings helpers to modules 2026-05-08 07:54:08 +02:00
wellVisit.js feat: ship reviewed prompt history, conversation limits and account protections 2026-09-07 04:01:01 +02:00