Commit Graph
3 Commits
Author SHA1 Message Date
Bastien ChanotandClaude 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