Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RNaYKPEkjH1jbgoX1TwKMX
9.5 KiB
9.5 KiB
TODO — Osteo Report MVP
Status (2026-05-21): catalog v2.0 + full 26-zone horse coverage in place — B4 polish + ship gate next
Domain pivot bundle (B0 schema, B1 report v2, B2 UI/PDF, B3 i18n) shipped on
feat/findings-tree-v2. Catalog upgraded v1.2→v2.0 by domain expert: 26 zones
(was 3), 792 nodes, 612 leaves, 41 vet-referral leaves. Zero code change needed
— schema was forward-compat since B0 (BDR-016, LRN-020).
154/154 tests green, lint 0, typecheck clean, vite build OK.
DONE since 2026-05-21 (main +41 commits — the frozen Status block above is the 2026-05-21 snapshot)
Current main @ 4991c10: 174/174 tests green (30 files), lint 0, typecheck clean, vite build OK.
feat/findings-tree-v2 merged (FindingsTreePicker tracked in HEAD); all work below landed on main. No git tags yet (see CHANGELOG version note).
Laterality + bilaterality
- LateralSideSchema (left/right) + Bone.lateral; data-anno-lateral parsed from SVG (
e0abb1e,db50c67) - LateralityPicker modal + zone-click integration; side in zone badges + PDF labels (
20d60b9,5a19ae1,3323d4e,773b002) - Bilateral zones: separate findings picker per side (
c853c68,0c170bd)
Editors
- SVG anatomy editor at /svg-editor — vanilla JS tool wrapped in React (
ea81d8c, BDR-017) - Standalone public/pathology-editor.html JSON tree editor (
9cca51c, BDR-020/021/022) - Tabbed welcome screen with project SVG picker (
2273602) - /editors listing page + footer links + locale-aware zone hover tooltip (
5e24c2f,569e571)
Branding + UI
- Global footer: copyright + "Powered by ZenQuality" + "Paws in Harmony" logo, site + PDF (
caac149,3a67da7,d9cf2fa,33a7f47) - Unified AppHeader (logo brand + tagline) across routes (
1f30280) - Responsive mobile — full phone/tablet adaptation (
a73d8da) - Project renamed Zoosteo → Faunosteo across the codebase (
2d6ed80)
Infra
- Docker: no-cache header for species assets (
53f62f7) - pathology-editor.html prod 404 fixed — served from public/ so it ships to dist (
2803cf7, LRN-029) - gitflow socle + pre-commit hook adopted (
4991c10)
Phase A — DONE (kept for reference)
- Scaffold (deps, configs, Docker, schemas, stubs)
- Lib: id, dates, assert
- Anatomy: parseSvgBones, loadSvg, svgToPng raster
- Zustand store: full action set (initReport, hydrateReport, observation CRUD, conclusion/recommendations/nextAppointment setters, identity setters)
- sessionStorage draft mirror + localStorage practitioner cache
- UI primitives: Button, Card, Dialog, Input, Label, Select, Textarea, Badge, Chip
- Canvas: AnatomyCanvas (data-state highlighting, async-mount safe), DetailModal
- Observation chain: ObservationList, ObservationCard, PathologyPicker (flat — REMOVED, replaced by FindingsTreePicker B2), VertebraPicker, SeveritySelector, FreeTextPathologyInput
- Report forms + edit-infos dialog + home nav
- Routes: Home, NewReport, Editor (split layout + dialog), NotFound
- PDF pipeline: fonts, header, observationPage (2-col SVG grid), conclusionPage, attachment.ts, export, import
- Docker: Dockerfile, compose, entrypoint.sh runtime env, nginx SPA fallback
- Brand identity via env (ConfigProvider)
- Tests: 100/100 pass
- Pathology JSON sample dropped at
src/domain/species/equine/pathologies.json(schema v1.1, 3 zones: sphenoid/ssb/atm — placeholder before full-body)
Phase B — V1 REFACTOR (hierarchical findings + i18n)
B0. Domain model — Findings tree (DONE 2026-05-20)
- Schema:
src/domain/schema/findings.ts—FindingNodeSchema(recursive viaz.lazy),ZoneFindingsSchema,SpeciesFindingsSchema,SourceRefSchema - Loader:
src/domain/species/equine/pathologies.tsparses the JSON viaSpeciesFindingsSchema.parse(data)at boot (fail-fast) - Species manifest:
findings: FindingsLoaderreplacespathologiesinSpeciesManifest - JSON fix:
species.idset to"equine"to match registry - Tests:
tests/unit/species.equineFindings.test.ts(5 cases) replaces deletedspecies.equinePathologies.test.ts
B1. Report schema v2 — observation findings (DONE 2026-05-20)
ObservationSchemacarriesfindings: Finding[]+freeTextFindings: string[]; oldpathologyIds/freeTextPathologiesremovedReportSchema.versionliteral bumped1→2- Store
emptyObservation+initReportupdated to the v2 shape - PDF import surfaces a distinct French-language
IncompatibleReportVersionErrormessage on v1 attachments (detected before Zod parse) - Schema + store + PDF tests updated;
pathology.tsschema + test deleted
B2. UI — Findings tree picker (DONE 2026-05-20)
src/components/observation/FindingsTreePicker.tsx(breadcrumb, drill-down, leaf toggle, retour button, vet-referral ⚠ badge, description_fr surfacing)scope_disclaimermodal shown once per session viaosteo:disclaimer-shownsessionStorage flagObservationCardmigrated — one picker per zone with a catalog entry, singleFreeTextFindingInputbelowPathologyPicker+FreeTextPathologyInput+ their tests deleted;FreeTextFindingInputrenamed equivalent kepttests/unit/components.FindingsTreePicker.test.tsxcovers navigation, leaf select, vet-referral flag, retour, deselect
B3. i18n FR/EN — site + PDF (DONE 2026-05-20)
- Locale state:
src/state/localeStore.tsZustand'fr' | 'en', persistedosteo:locale - i18n dicts:
src/i18n/{fr,en}.ts(~90 keys each, parity-tested),index.ts,useT.tshook - Language switcher:
src/components/brand/LanguageSwitcher.tsxsegmented FR | EN toggle, integrated in ReportHeader + HomeRoute + NewReportRoute headers - Findings rendering: FindingsTreePicker + ObservationCard read
name_fr/name_enper locale; finding snapshots already dual (BDR-010) - PDF render:
exportReportToPdf(report, { locale })explicit option; static labels via dict snapshot;formatDate(iso, locale)replacesformatDateFr; finding leaf labels vialabelFr/EnSnapshot - PDF import error i18n: typed ImportError(kind + foundVersion); UI resolves message via dict (BDR-015) — caught by review (EVAL-002)
- Out of scope (per design):
description_fr+scope_disclaimerstay FR-only — vet-expert authoring needed for EN copy - Tests: localeStore (3), useT (3), dict parity (2), LanguageSwitcher (2), formatDate FR+EN (7), PDF roundtrip per locale (3). 154/154 green.
B4. PDF observationPage updates
- Render
findingsinstead ofpathologyIds(per-zone sections "CONSTATS — " + "CONSTATS LIBRES", joined·segmented) - Show vet-referral icon (⚠) next to flagged findings (observationPage.ts:407)
scope_disclaimerfooter on each obs page or first page only — decide- Update
LRN-009-style layout still applies (text-area reservation kept)
B5. Stub cleanup (DONE 2026-05-20)
ZoneTooltip.tsxdeleted (unused stub)Toast.tsxdeleted (unused stub — re-introduce later if notifications needed)- CLAUDE.md folder map updated —
ObservationEditor/Toast/ZoneTooltipremoved,FindingsTreePicker/FreeTextFindingInput/findings.tsadded
Phase C — V1 SHIP gate
- Author full
horse.json(placeholder → v2.0, 26 zones, 792 nodes, 612 leaves — done 2026-05-21) - Fix SVG case
data-anno-name-fr="hyoïde"→"Hyoïde"inpublic/species/equine/Horse_head.svg(done by user 2026-05-21; 26 JSON names ≡ 26 SVG names strict) - PDF QA manual pass: full flow → export → re-import roundtrip
- Fonts embed, JSON attached, multi-SVG grid OK, locale FR + EN exports
- Docker build + compose up smoke test (VPS cold build validated — BLK-005, 990c8e7; local smoke not separately logged)
- env-var brand identity verified
- README finalize (install, dev, Docker, env vars, locale, MIT)
- CHANGELOG 0.1.0 entry
- docs/PATHOLOGIES-FORMAT.md — schema doc + authoring guide (initial shipped
70f21cc2026-05-20; refreshed for v2.0 boolean-only contract 2026-05-21 — scope section, 5 taxonomy patterns, structural rules, breaking-change notice, horse stats, changelog v1.0→v2.0) - Scaleway VPS deploy (TLS + live faunosteo.com —
2803cf7fixed prod 404). CI build/push/deploy UNVERIFIED — no .github/workflows or Gitea CI in repo.
Phase D — POST-V1 (not in MVP scope)
- Capacitor wrap (iOS + Android)
- Accounts + cloud sync (Supabase or self-host)
- Multi-praticien (move localStorage cache to server profile)
- RDV booking + push reminders
- Other species (dog, cat, cow, goat, pig, chicken JSONs)
- Pathology DB community contributions
Memory cross-refs
- BDR-001..BDR-008 — decisions registry
- LRN-001..LRN-010 — learnings registry
- BLK-001..BLK-004 — blockers (all resolved)
Apply when implementing B-phase:
- LRN-004 (data-anno-special opaque to parser) — zone IDs in JSON must match SVG
data-anno-id - LRN-009 (pre-rasterize → reserve → grid) — keep applied in PDF observationPage
- LRN-010 (gate DOM-mutate on async-mount) — relevant for any new SVG-mutating effect
Estimated effort
| Phase | Hours |
|---|---|
| B0. Findings schema + loader + tests | 3 |
| B1. ReportSchema v2 + store + PDF import | 3 |
| B2. FindingsTreePicker + disclaimer + integration | 6 |
| B3. i18n FR/EN site + PDF | 5 |
| B4. PDF observationPage update | 2 |
| B5. Stub cleanup | 0.5 |
| C. Full horse.json authoring (user) | external |
| C. QA + docs + deploy | 4 |
| Total dev | ~23h |