docs(memory): capitalize LRN-029 (Vite public/ for standalone HTML)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Bastien ChanotandClaude Opus 4.8 committed 2026-06-13 23:46:22 +02:00
1 parent 2803cf7c7d
commit 97f8a92906
2 files changed
+14

No files matched your search

+6
View File
@@ -152,3 +152,9 @@ feat(editor) 9544924 — cross-region vertebra picks spawn their spine zone.
## 2026-06-01
feat(ui+pdf): footer partnership credit "Paws iin Harmony" text -> Paws_in_harmony.svg logo (moved to public/, wide 2068x454 wordmark). Site Footer.tsx <img> h-6 mirrors ZenQuality treatment. PDF footer drawFooter gains pawsLogoPng asset; export.ts rasterizes svg via rasterizeSvg (canvg) -> embedPng, text handle "@paws.iin.harmony" kept as fallback when fetch/raster fails. 2 commits (3a67da7 ui, d9cf2fa pdf). 174/174 green, lint 0, tc clean, build OK.
---
## 2026-06-13
fix(editor) 2803cf7 — pathology-editor.html 404 in prod (faunosteo.com/pathology-editor.html). Root cause: file at repo root, Vite bundles only index.html -> never in dist/ -> nginx SPA-fallback -> React "Page introuvable". Worked in `pnpm dev` (serves root files), hid prod gap. Fix: git mv -> public/ (copied verbatim to dist/), href unchanged (public/=web root). Verified via vite preview: /pathology-editor.html=200 text/html. CLAUDE.md + README folder maps synced. LRN-029 captured.
+8
View File
@@ -224,3 +224,11 @@ When standalone .html tools (no build step) need logic from TS modules (zoneMatc
SVG highlight (boneStates) AND findings picker both derive from observation.zones. So making a cross-region vertebra pick "highlight + add zone + add findings" = ONE lever: spawn the spine zone in observation.zones. No separate highlight call, no separate findings wiring — both consumers already react to zones. Keep distribution logic pure (`distributeVertebraeToZones(zones, targetIndex, verts, bones)` → new zones[]) so it unit-tests without React; component handler stays a one-liner.
Inverse-map region→zone via reusing the same label heuristic (`regionFromLabel`) that maps zone→region — store the function once, scan bones for `special==='vertebral-precision'` whose label matches.
Apply: any feature where "select X in modal → reflect in N places". Find the single derived-from state; mutate that; let existing selectors fan out. Avoids drift between the highlight path and the data path.
---
## LRN-029 | 2026-06-13 | Vite bundles only index.html — standalone HTML must live in public/
Extra .html at repo root never reaches dist/ — Vite build entry = index.html only. Prod 404: nginx try_files falls through to SPA index.html, React shows "Page introuvable". Fix: put standalone HTML in public/ (copied verbatim to dist/). Links resolve from web root, so href stays /file.html.
**Why:** pathology-editor.html shipped at root (BDR-020 standalone-HTML pattern), worked in `pnpm dev` (Vite serves root files in dev) but 404'd in prod (only public/ + bundled entries land in dist/). Dev-vs-prod gap hid it.
**How to apply:** standalone HTML tool / extra entry → public/, OR add to vite build.rollupOptions.input for hashed-asset processing. Verify via `vite preview` (serves real dist/), not just `pnpm dev`. Ties to [[BDR-020]].