Bastien Chanot and Claude Opus 4.7
188e79e76d
fix(review): address code-review yellows — onExport catch, vertebra picker fresh-read, draft validation
...
Three impactful fixes from the post-impl code review:
1. EditorRoute.onExport now catches PDF generation failures, logs to
console, and alerts the praticien in French — previously errors were
swallowed by try/finally with only `setExporting(false)`.
2. VertebraPicker onConfirm reads the active observation from the store
at confirm time instead of closing over the render-scope `activeObs`.
Prevents mutating a stale observation if the praticien switches active
observation while the picker is open.
3. readPersistedDraft validates the parsed JSON with ReportSchema instead
of a raw `as Report` cast. Corrupted drafts now return null cleanly
rather than poisoning the store.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-18 22:16:12 +02:00
Bastien Chanot and Claude Opus 4.7
dabab59656
chore: drop dead svgToPngDataUrl stub (replaced by pdf/render/svgToPng.rasterizeSvg)
...
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-18 22:06:26 +02:00
Bastien Chanot and Claude Opus 4.7
a33693580f
fix(lint): escape JSX entities and narrow useEffect dep
...
Escape French apostrophes/quotes in JSX text per react/no-unescaped-entities
and replace the report?.observations.length dependency with a derived
observationsCount value so react-hooks/exhaustive-deps is satisfied without
re-firing on every report change.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-18 22:00:15 +02:00
Bastien Chanot
97ab4f67d1
feat(pdf): importReportFromPdf with ImportError on non-osteo PDFs
2026-05-18 21:55:03 +02:00
Bastien Chanot
cf57297d2d
feat(pdf): exportReportToPdf orchestrator with finalized page numbering
2026-05-18 21:53:55 +02:00
Bastien Chanot
fb9a8fc3bd
feat(pdf): attach + extract report JSON via pdf-lib (with fallback traversal)
2026-05-18 21:53:26 +02:00
Bastien Chanot
1c0b507458
feat(pdf): addConclusionPage with wrapped conclusion + recommendations + next RDV
2026-05-18 21:46:23 +02:00
Bastien Chanot
384d2918d4
feat(pdf): addObservationPage with rasterized colorized SVG + summary
2026-05-18 21:45:58 +02:00
Bastien Chanot
6cbc6ce328
feat(pdf): drawFooter with brand from runtime config
2026-05-18 21:45:26 +02:00
Bastien Chanot
099ebf326b
feat(pdf): drawHeader with practitioner + animal/owner/date
2026-05-18 21:45:05 +02:00
Bastien Chanot
ba30e0dbaf
feat(pdf): embed Helvetica + Times-Roman standard fonts (MVP)
2026-05-18 21:44:25 +02:00
Bastien Chanot
55d9c32076
feat(pdf): rasterize SVG via canvg → PNG bytes
2026-05-18 21:43:58 +02:00
Bastien Chanot
a3a4d4e1f6
feat(app): NotFoundRoute
2026-05-18 21:38:55 +02:00
Bastien Chanot
337f8c3aea
feat(editor): wire canvas + observation panel + conclusion + export
2026-05-18 21:38:38 +02:00
Bastien Chanot
2b2a7db63c
feat(new): NewReportRoute wires forms + practitioner cache
2026-05-18 21:37:24 +02:00
Bastien Chanot
9271a79067
feat(home): HomeRoute with new + import PDF flows
2026-05-18 21:37:00 +02:00
Bastien Chanot
c1483ff265
feat(report): ReportHeader with brand + animal/owner/date
2026-05-18 21:30:59 +02:00
Bastien Chanot
6b115a558e
feat(report): ConclusionPanel + NextAppointmentPicker (date | period | none)
2026-05-18 21:30:43 +02:00
Bastien Chanot
71ecebfa72
feat(report): AnimalForm + owner name with species select
2026-05-18 21:30:08 +02:00
Bastien Chanot
2970e7fcf5
feat(report): PractitionerForm with required name + optional fields
2026-05-18 21:29:43 +02:00
Bastien Chanot
3ef1c60682
feat(observation): ObservationEditor wires zones + pathologies + severity + comment
2026-05-18 21:29:22 +02:00
Bastien Chanot
10fa676f1e
feat(observation): ObservationList with add + per-card actions
2026-05-18 21:28:53 +02:00
Bastien Chanot
1e4e56d2e2
feat(observation): ObservationCard with reorder + delete affordances
2026-05-18 21:28:33 +02:00
Bastien Chanot
c78fe004dd
feat(observation): SeveritySelector radio chips
2026-05-18 21:28:06 +02:00
Bastien Chanot
241bb42c7d
feat(observation): FreeTextPathologyInput with chip removal
2026-05-18 21:27:45 +02:00
Bastien Chanot
4c67c900b9
feat(observation): PathologyPicker filtered by species + zones
2026-05-18 21:27:11 +02:00
Bastien Chanot
b3e1a87690
feat(observation): VertebraPicker dialog with region tabs + chip grid
2026-05-18 21:23:55 +02:00
Bastien Chanot
19baf0281f
feat(canvas): DetailModal renders detail SVG in Dialog
2026-05-18 21:23:00 +02:00
Bastien Chanot
bea3712851
feat(canvas): inline SVG load + delegated click + state classes
2026-05-18 21:22:39 +02:00
Bastien Chanot
90d398656c
feat(brand): render brandName from runtime config
2026-05-18 21:19:20 +02:00
Bastien Chanot
cc5f4d077a
feat(styles): design tokens + svg-canvas state rules
2026-05-18 21:18:47 +02:00
Bastien Chanot
afd58b386b
feat(ui): Dialog with backdrop + escape + motion fade
2026-05-18 21:18:18 +02:00
Bastien Chanot
a1453ec32e
feat(ui): Chip toggle
2026-05-18 21:17:32 +02:00
Bastien Chanot
03332246d3
feat(ui): Badge with tones
2026-05-18 21:17:12 +02:00
Bastien Chanot
b806bedc4f
feat(ui): Select
2026-05-18 21:16:56 +02:00
Bastien Chanot
2ac996605a
feat(ui): Textarea
2026-05-18 21:16:40 +02:00
Bastien Chanot
2cb1640384
feat(ui): Label
2026-05-18 21:16:23 +02:00
Bastien Chanot
92052a31c1
feat(ui): Input
2026-05-18 21:16:09 +02:00
Bastien Chanot
226678017f
feat(ui): Card
2026-05-18 21:15:53 +02:00
Bastien Chanot
fe5adcd249
feat(ui): Button with variants + sizes + disabled state
2026-05-18 21:15:33 +02:00
Bastien Chanot
86f65767de
feat(state): implement practitioner localStorage cache
2026-05-18 21:06:18 +02:00
Bastien Chanot
1c51c672e8
feat(store): mirror current report to sessionStorage
2026-05-18 21:05:42 +02:00
Bastien Chanot
38606a11e4
feat(store): implement initReport / reset / hydrateReport
2026-05-18 21:04:37 +02:00
Bastien Chanot
f65f3e7b8c
feat(anatomy): implement loadSvg via fetch + DOMParser
2026-05-18 21:03:52 +02:00
Bastien Chanot
ac50ac5c2c
feat(anatomy): parse SVG convention into Bone map with validation
2026-05-18 21:01:23 +02:00
Bastien Chanot
8b9eb61a69
feat(lib): implement formatDateFr (fr-FR locale)
2026-05-18 20:59:05 +02:00
Bastien Chanot and Claude Opus 4.7
8ca36b5ccd
chore: initial scaffold + design spec + implementation plan
...
Skeleton for Osteo Report MVP. Build passes, 7 smoke tests green, real
Horse.svg + Horse_head.svg in public/species/equine/. Zod schemas are
the contract; store/anatomy/pdf modules are typed stubs throwing
"not implemented" awaiting implementation.
Spec: docs/superpowers/specs/2026-05-18-osteo-report-mvp-design.md
Plan: docs/superpowers/plans/2026-05-18-osteo-report-mvp.md (23 phases, ~70 TDD tasks)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-18 20:55:10 +02:00
Bastien Chanot
27afb719f5
clean all
2026-05-18 19:40:08 +02:00
ZenQuality
f57d6ec3d3
feat: UI — home, new report form, editor with anatomy canvas + findings + PDF export
...
UI primitives (Tailwind, no shadcn CLI dependency):
- Button, Card, Input, Textarea, Label, Badge, Select, Dialog
- Brand, Header, Footer, Shell layout wrapper
Routes:
- HomeRoute: new bilan card + import PDF card with drag-drop, error toast
- NewReportRoute: 9-species selector (8 disabled badges 'à venir'),
practitioner block (fullName required + title/phone/email/SIRET/address optional),
animal+owner, sessionDate. Zod-validated form via react-hook-form
- EditorRoute: split view — anatomy canvas (3 tabs latéral L/R + dorsal) on the
left, findings panel + conclusion + export button on the right
- NotFoundRoute
Editor:
- AnatomyView: fetch SVG, DOMParser-based (no innerHTML), click delegation on
[data-zone], CSS-variable styling per state (default/selected/linked)
- AnatomyCanvas: animated tab switcher with motion shared layout
- ZoneSelection: chip bar of current selection, validate+reset buttons
- FindingEditor: modal dialog with severity radios, pathology multi-select
filtered by zones, free-text pathology input, linked-zones picker, comment
- FindingPanel: list of findings with hover-preview wired to canvas highlight
- ConclusionPanel: conclusion + recommendations + next appointment
- ExportButton: triggers PDF download
- rasterize.ts: SVG → PNG bytes via canvas (used by editor before PDF export)
ESLint: relax strict-type-checked to React-idiomatic level (no-confusing-void-expression
off, no-misused-promises allows void-return attributes, no-floating-promises is warn).
2 remaining errors fixed (label a11y + optional chain in HomeRoute).
PDF export Blob: copy bytes into fresh ArrayBuffer before Blob ctor — TS strict
rejects ArrayBufferLike|SharedArrayBuffer as BlobPart in lib.dom 2026.
Tests: 34/34 still green. Build 5.6s (motion 96KB, pdf-lib 523KB chunks).
2026-05-17 07:18:13 +02:00
ZenQuality
b5b2e163c9
feat: domain core — schemas, store, equine data, PDF roundtrip
...
Phase A — Domain & schemas (15 tests):
- Zod schemas: ReportSchema, FindingSchema, PractitionerSchema, SeveritySchema
- Types derived via z.infer (single source of truth)
- newId() helper with optional prefix
Phase B — Equine anatomy + pathology DB (7 tests):
- 26 macro zones, axial subzones C1-7/T1-18/L1-6/S1-5
- 31 pathologies, each citing Merck Vet Manual, PubMed, IMAIOS or LCAO
- Placeholder SVGs (lateral L/R + dorsal) with data-zone convention
- Species registry: equine registered, 8 others remain stubs
Phase C — Zustand store (8 tests):
- Single source of truth with persist middleware (localStorage key osteo-report-draft)
- Actions: hydrate, reset, toggleZone, addFinding, updateFinding, removeFinding, setConclusion/Recommendations/NextAppointment
Phase H/I — PDF export + import roundtrip (2 tests):
- A4 portrait, pdf-lib StandardFonts
- Header (practitioner + animal), anatomy pages (per used view), findings
table, conclusion/recommendations/RDV page, page footer with date+page#
- Attachment: base64 data URI workaround (pdf-lib treats raw string as
base64 input, and rejects cross-realm Uint8Array in jsdom tests)
- Import: walks Catalog→Names→EmbeddedFiles→Names array→F stream; inflates
via pako directly (bypasses pdf-lib's reference-equality FlateDecode check
which fails across module realms in vitest); validates with ReportSchema
Tooling:
- Add pako 2.x + @types/pako (already transitive of pdf-lib)
- Switch vitest 2 → 3 (already done in prior commit)
- Add 8 test files (34 tests total green)
2026-05-17 07:06:59 +02:00