pediatric-ai-scribe-v3/src/utils
Daniel 5f738fbe30 feat: a theme is shown by a sample deck you download, not a picture
A picture of one slide answers a narrower question than the one a theme
picker is asked. What a person wants to know is what a deck will look
like in this theme — all of it, at the size it will be shown, with the
fonts substituted the way they will be. One rendered slide showed one
layout, in content someone then read instead of looking at.

So: a sample deck per theme. Every layout the renderer can draw — title,
bullets with a sub-point, both two-column forms, table, callout, figure,
full-slide figure, section divider, a custom slide with shapes, an arrow
and a chart, and a references slide — with filler text throughout.
Download it, open it, see the theme.

The text is deliberately meaningless. Clinical content in a specimen
invites you to read it, and then you are judging the teaching rather
than the type; that is what the old croup slide got wrong.

No engine. The previous preview needed a Gotenberg round trip and a
pdftoppm to produce a PNG, cached on disk because of what it cost, and
could fail in ways a missing picture cannot explain. python-pptx builds
the file in ~330ms and PowerPoint draws it. The link is a plain anchor,
so it is there whether or not anything on the server is well.

The figure placeholder rides the same path a generated figure does —
attachFigures downgrades a figure slide with no picture to bullets and
an image slide to a section, so without it the sample would silently
stop showing those two layouts.

Verified: all five themes build, 11 slides, the chart is a real chart
and the placeholder embeds as real media.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Dv6sqaY6Vq3ChZHMem3cnU
2026-09-12 22:24:05 +02:00
..
adminLockdown.js refactor: remove the embedding settings, whose only consumer is gone 2026-09-12 21:47:09 +02:00
ai.js refactor: Google models go through LiteLLM; the Vertex SDK is gone 2026-09-11 13:51:22 +02:00
audioBackupStore.js refactor: one place decides which bucket, on which S3, with which credentials 2026-09-10 17:09:13 +02:00
auditQueue.js
buildId.js
citationAudit.js fix: recordings that produced nothing, and the boxes that zoomed on iOS 2026-09-11 00:16:19 +02:00
clinicalAnswer.js fix: a second deck reused the first deck's pictures 2026-09-12 08:26:09 +02:00
clinicalConversation.js fix: an assistant attachment must be the image type it claims to be 2026-09-12 19:00:10 +02:00
clinicalMcpClient.js refactor: ped-ai calls clinical_semantic_search only 2026-09-10 17:22:40 +02:00
clinicalPromptPool.js
clinicalPrompts.js fix: mobile layout regression, workspace menu in the assistant rail, prompt as principles 2026-09-09 22:24:10 +02:00
clinicalRetrieval.js refactor: retrieval is text-only; admins can add model ids discovery never returns 2026-09-09 23:35:06 +02:00
clinicalTranslation.js fix: translated answers keep their source chips; the patient take home can be translated 2026-09-09 18:40:23 +02:00
config.js
crypto.js feat: a ciphertext now only decrypts in the row it was written for 2026-09-12 21:25:24 +02:00
deckBuild.js fix: a second deck reused the first deck's pictures 2026-09-12 08:26:09 +02:00
deckReview.js feat: modifying a deck can see it 2026-09-12 06:55:16 +02:00
deckSample.js feat: a theme is shown by a sample deck you download, not a picture 2026-09-12 22:24:05 +02:00
deckSchema.js fix: an assistant attachment must be the image type it claims to be 2026-09-12 19:00:10 +02:00
docSpec.js feat: a slide can be drawn from primitives when the named layouts have no word for it 2026-09-11 22:12:26 +02:00
documentExport.js feat: retire Learning Hub 2026-09-12 20:14:20 +02:00
errors.js
extensionTransfer.js
fileLog.js fix: a second deck reused the first deck's pictures 2026-09-12 08:26:09 +02:00
fileType.js
generatedImageLinks.js feat: retire Learning Hub 2026-09-12 20:14:20 +02:00
generatedImages.js feat: retire Learning Hub 2026-09-12 20:14:20 +02:00
generatedImageStorage.js feat: an image library — every picture this account has made 2026-09-12 14:36:30 +02:00
generationOptions.js
imageTool.js fix: a second deck reused the first deck's pictures 2026-09-12 08:26:09 +02:00
learningRetrieval.js feat: Learning resources can be grounded in the clinical corpus 2026-09-11 14:03:05 +02:00
litellm.js feat: a text-only model can ask a model that can see; and the image regex is gone 2026-09-12 15:43:36 +02:00
logger.js fix: a second deck reused the first deck's pictures 2026-09-12 08:26:09 +02:00
loginCodes.js feat: sign in with a code emailed to you, offered beside the password 2026-09-11 20:12:03 +02:00
metrics.js fix: generation stopped working whenever the slide reviewer was switched off 2026-09-12 00:57:30 +02:00
models.js refactor: Google models go through LiteLLM; the Vertex SDK is gone 2026-09-11 13:51:22 +02:00
modelVision.js feat: a text-only model can ask a model that can see; and the image regex is gone 2026-09-12 15:43:36 +02:00
nextcloudFiles.js feat: a ciphertext now only decrypts in the row it was written for 2026-09-12 21:25:24 +02:00
notify.js
objectStorage.js refactor: one place decides which bucket, on which S3, with which credentials 2026-09-10 17:09:13 +02:00
passwords.js
patientTakehome.js
platform.js
policy.js
promptCatalog.js
promptRevisions.js
prompts.js
promptSafe.js
pubmedSearch.js feat: My Resources says what it is, offers its sources in one place, and Modify gets them too 2026-09-11 18:54:17 +02:00
redact.js
redis.js
registrationInvites.js feat: a ciphertext now only decrypts in the row it was written for 2026-09-12 21:25:24 +02:00
resourceImages.js feat: retire Learning Hub 2026-09-12 20:14:20 +02:00
sessions.js
slideShapes.js feat: record what a deck wanted and could not have 2026-09-11 22:51:15 +02:00
slideSpec.js fix: decks were falling back to markdown, so no figure could ever be requested 2026-09-12 04:21:20 +02:00
sttProvider.js fix: patch nodemailer; Settings offers STT models the gateway really has 2026-09-10 15:54:57 +02:00
ttsProvider.js chore: Kitten and Supertonic retired; Kokoro is the local voice 2026-09-12 16:45:05 +02:00
urlSafety.js
visionTool.js fix: the active library view is unmistakable, and a leading question cannot mislead the vision model 2026-09-12 16:27:21 +02:00
webSearch.js feat: PubMed search for My Resources, and an image tool that actually fires 2026-09-11 16:47:08 +02:00