pediatric-ai-scribe-v3/migrations
Daniel 73ce4049d4
Some checks failed
Forgejo Android APK / Root app tests (push) Successful in 48s
Forgejo Docker Build / Root app tests (push) Successful in 59s
Forgejo Android APK / Build signed APK (push) Successful in 2m6s
Forgejo Docker Build / Build Docker image (push) Successful in 25s
Forgejo Docker Build / Deploy to the host (push) Failing after 0s
feat: decks are built with python-pptx instead of pandoc, and carry their figures
Pandoc's pptx writer was the ceiling on how good a generated deck could be, and
the model on top made no difference to it. It maps markdown onto a handful of
reference layouts with no per-slide layout, no positioning and no control over
how large an image is drawn, which is why every deck came out as bullets on a
template — and why autofit had to be injected into its emitted OOXML by hand
afterwards, because LibreOffice ignores the autofit pandoc leaves off.

scripts/render_pptx.py draws the deck and src/utils/slideSpec.js decides what
each slide is. Markdown stays the stored artifact, so "change slide 4" is still
a text edit and Word export is untouched — pandoc still writes docx, where its
output is good.

What that buys, all of it visible in a rendered deck rather than argued for:

- 16:9, not pandoc's 4:3.
- A pipe table becomes a real table with a header band and banded rows, not
  eight lines of text with pipes in them.
- A list longer than seven items becomes two columns instead of a wall of text.
- Text is measured and sized to fit before the file is written, so nothing
  depends on a renderer honouring autofit.
- Wrapped lines hang under the text instead of running back to the margin,
  which is the clearest single tell that a deck was generated.
- An image is drawn at its own aspect ratio, centred, with a caption.

Figures now reach the deck at all, which they never did. They were queued and
shown on the page, but nothing recorded that they belonged to the resource, so
an export could not include them: user_resources.image_ids holds them, a
modification adds to that list rather than replacing it, and export fetches the
finished ones to a scratch directory. They are spread through the deck rather
than appended, because ending on three unexplained pictures is worse than
showing each near its material, and a References slide stays last.

If the renderer fails for any reason, pandoc still produces a deck — a plainer
deck beats a failed download.

Verified end to end: a seven-slide request with three figures exported as a
13-page deck; the slides were rendered to PDF, rasterised and looked at. All
three formats still download.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Dv6sqaY6Vq3ChZHMem3cnU
2026-09-11 19:34:26 +02:00
..
1744600000000_example-no-op.js Add node-pg-migrate for versioned schema changes + better mobile UA labels 2026-04-14 05:06:19 +02:00
1744650000000_add-encounter-version.js Batch of security + scale fixes 2026-04-14 05:24:40 +02:00
1777003849000_add-personal-notes.js feat(notes): personal notes with rich-text editor + voice dictation 2026-04-24 06:18:41 +02:00
1777090000000_notes-trash.js improve learning hub generation flow 2026-05-08 09:32:58 +02:00
1777507197626_add-mermaid-diagrams.js stabilize assistant and add diagrams 2026-05-08 00:23:00 +02:00
1777600000000_add-clinical-assistant-chats.js feat: improve clinical assistant visual sources 2026-05-07 02:45:17 +02:00
1777700000000_add-prompt-revisions.js feat: ship reviewed prompt history, conversation limits and account protections 2026-09-07 04:01:01 +02:00
1777800000000_generated-images.js feat: integrate durable image jobs/private assets into current core 2026-09-07 16:53:42 +02:00
1777900000000_image-context.js feat: integrate durable image jobs/private assets into current core 2026-09-07 16:53:42 +02:00
1780000000000_drop-model-classification.js fix: separate Scribe/Clinical/Learning prompt sections; drop model classification entirely with scrub migration 2026-09-07 18:22:51 +02:00
1780100000000_registration-invites.js feat: invite-only registration 2026-09-10 23:12:07 +02:00
1780200000000_citation-audit.js feat: citation quality tracking, and the SSO settings fit a phone 2026-09-10 23:44:43 +02:00
1780300000000_user-resources.js feat: My Resources — anyone can generate teaching material, privately 2026-09-11 14:50:54 +02:00
1780400000000_my-resources-images.js feat: PubMed search for My Resources, and an image tool that actually fires 2026-09-11 16:47:08 +02:00
1780500000000_resource-images.js feat: decks are built with python-pptx instead of pandoc, and carry their figures 2026-09-11 19:34:26 +02:00