Mark B0/B1/B2/B5 done on TODO. Journal 2026-05-20 entry with the three commit SHAs and a per-phase recap. Three new design decisions captured: JSON snake_case kept in TS (BDR-009), snapshot labels at selection time (BDR-010), hard-fail v1 PDF with FR-language message (BDR-011). Two new learnings: Zod recursive schemas via z.lazy + explicit ZodType<T> (LRN-011), once-per-session UX modal via sessionStorage flag (LRN-012). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4.7 KiB
Journal
2026-05-18
Scaffolded Osteo Report MVP skeleton from approved design spec. Created 80+ files: schemas, stubs, routes, stores, PDF modules, Docker infra. Moved Horse.svg + Horse_head.svg to public/species/equine/. pnpm install + build + typecheck + tests passing. pnpm 11 used (corepack shim broken on host Node 20.20.0).
- MVP scaffold+impl done. Editor flow works. PDF roundtrip green. Real SVG assets in repo.
2026-05-19
Fixed 3 zone-interaction bugs (b9da4fa). Detail-popup clicks now resolved via detailBones map.
Spine zones (data-anno-special="vertebral-precision") auto-open VertebraPicker on click.
ObservationCard hides "Vertèbres…" button on non-special zones.
Parser reads data-anno-special; convention doc updated.
- BLK-003 resolved. LRN-004, LRN-005 captured. 91 tests green, lint clean, build OK.
- VertebraPicker preselects region tab inferred from zone label (
b3bd75d). +5 tests. - Hotfix: detailBones now accumulate across popup opens; merged allBones passed to ObservationList so detail-popup zone labels survive after modal close.
- PDF rendering bugfix: titles cleared the header rule, zone-line wrap respects following blocks, non-selected zones hidden + data-anno-* stripped before raster, main SVG skipped when every zone lives in details. BLK-004, LRN-006, LRN-007 captured.
- PDF styling pass: eyebrow + Times 22 title + 2pt accent rule + uppercase accent section labels + color-coded severity pill (sage/amber/red). Eyebrow/title baseline gap raised to 27pt after first attempt still overlapped. BDR-008, LRN-008 captured.
- Commits this session: b9da4fa..d7ea99e (10 commits — bugfix + feat + hotfix + PDF styling).
2026-05-19 (session 2)
feat(editor): home-nav (back btn + clickable Brand link to "/") + "Modifier les infos" dialog reusing PractitionerForm/AnimalForm via draft-copy with save/cancel. 3 store setters (setPractitioner/setAnimal/setOwner), 4 setter tests. Cache re-synced on save. 100/100 tests, lint 0, typecheck clean.
- hotfix(pdf): multi-SVG observation page packed into 2-col grid; pre-rasterize → measure aspect → reserve text-area height → cell budget per row; single-SVG keeps full width; floor prevents zero-cells. Text sections now always visible. LRN-009 captured.
- hotfix(editor): zone-highlight scoped to active obs only (collapsed obs no longer leave faint 'linked'/'multi' tints). AnatomyCanvas re-paints highlights after async SVG mount so DetailModal popup zones color correctly. NewReportRoute header harmonized with editor — back btn + clickable Brand left-aligned. 3 files (hotfix cap +1, accepted). LRN-010 captured.
- domain pivot decided: flat Pathology[] → hierarchical findings tree per zone, path+snapshot serialization, FR/EN bilingual site+PDF. ReportSchema bumps v1→v2 (no retro-compat, no prod PDFs). Sample 3-zone JSON v1.1 dropped at src/domain/species/equine/pathologies.json — inert (loader not migrated). TODO rewritten as B0..B5 + C ship gate, ~23h dev.
- NEXT SESSION: run /ship-feature on B0 (findings Zod schema + JSON loader) + B1 (ReportSchema v2 + observation.findings) + B2 (FindingsTreePicker replacing flat PathologyPicker). I18N (B3) deferred to separate feature. Reconcile JSON species.id (currently "equin") vs registry species.id ("equine") before parse — pick one.
2026-05-20
Bundled B0+B1+B2 shipped on feat/findings-tree-v2. 3 atomic commits.
- B0 (
f80e161): findings.ts Zod schema (recursive z.lazy + explicit ZodType), SpeciesFindingsSchema.parse(JSON) at boot, manifest swaps pathologies→findings, JSON species.id "equin"→"equine", new species.equineFindings test (5). - B1 (
d08d773): ObservationSchema.findings + freeTextFindings, ReportSchema.version 1→2, store emptyObservation+initReport updated, PDF import detects v1 via IncompatibleReportVersionError + ImportError wraps message (FR), pathology.ts schema + test deleted. - B2 (
b67f4cd): FindingsTreePicker (breadcrumb, drill, leaf toggle, retour, vet-referral ⚠, description_fr), ObservationCard renders one picker per zone with catalog, FreeTextPathologyInput renamed FreeTextFindingInput, scope_disclaimer modal once/session via osteo:disclaimer-shown sessionStorage flag, PDF observationPage renders findings via labelFrSnapshot with ⚠ prefix on vet-referral. B5 folded in: Toast + ZoneTooltip stubs deleted, CLAUDE.md folder map refreshed. - 107/107 tests green, lint 0 warn, typecheck clean, vite build OK (882KB main + 15KB lazy pathologies chunk).
- BDR-009 (snake_case JSON fields preserved in TS), LRN-011 (Zod recursive via z.lazy + explicit ZodType), LRN-012 (sessionStorage flag pattern for once-per-session UX modals) to capitalize.
- NEXT: push branch + PR. After merge: B3 (i18n FR/EN) + B4 (PDF observationPage polish for vet-referral) + C (full horse.json + QA + deploy).