Commit Graph
13 Commits
Author SHA1 Message Date
Bastien Chanot e699c8a76a test(anatomy): cover real Horse.svg + Horse_head.svg parsing 2026-05-18 21:03:15 +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 3dc7153361 test(species): cover registry lookup + equine manifest 2026-05-18 21:00:36 +02:00
Bastien Chanot 0556059ff6 test(schema): enforce >=1 source + url validation on Pathology 2026-05-18 21:00:19 +02:00
Bastien Chanot 839ddd05ff test(schema): cover ReportSchema discriminated union + version 2026-05-18 21:00:01 +02:00
Bastien Chanot 25a262e241 test(schema): cover ObservationSchema + Vertebra + Severity 2026-05-18 20:59:43 +02:00
Bastien Chanot fd6b1819fb test(lib): cover generateId uniqueness 2026-05-18 20:59:23 +02:00
Bastien Chanot 8b9eb61a69 feat(lib): implement formatDateFr (fr-FR locale) 2026-05-18 20:59:05 +02:00
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 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
ZenQuality 3fb77c3530 chore: scaffold fixes — React 19 JSX, vitest v3, @types/node, lint scoping
- React 19 dropped global JSX namespace; stub return types removed (TS infer)
- vitest 2 pulled vite 5 alongside project vite 6 → upgrade vitest to 3 (dedupes)
- Add @types/node to devDeps so vite/vitest configs compile
- ESLint flat config: scope strictTypeChecked to src/ + tests/, ignore config files
- tsconfig.app.json: include tests/, add vitest/globals to types
- vite.config.ts + vitest.config.ts: use import.meta.dirname instead of __dirname
- pdf/export + pdf/import: stub returns Promise.reject so require-await rule clears
- tests/unit/smoke.test.ts: keep vitest run from exiting 1 with no tests
2026-05-17 06:47:52 +02:00
ZenQuality a115e785a7 chore: initial scaffold
Generated by /init-project. React 19 + TS strict + Vite 6 + Tailwind 4 +
shadcn/ui + motion + pdf-lib + Zod + Zustand + react-router 7. Empty
skeleton, no business logic. Docker multi-stage + nginx + Traefik labels
commented. AGPL-3.0-or-later.
2026-05-17 06:43:11 +02:00