29 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)
Tour + fixes 2026-07-12 (branch chore/tour-2026-07-12 — UNMERGED, review pending)
- /tour sweep: CVE deps patched (pnpm audit 0), SVG import sanitized, container non-root (BREAKING: PORT >=1024), nginx:1.31-alpine pin, dead code −93 lines (canvg dropped), docs synced. Report: .claude/audits/TOUR.md
- Post-tour fixes: aria-labels i18n (B-1/B-2), EN PDF title prefix (B-4), SvgEditor placeholders (B-5), species labelEn (B-6), draft restore (B-3, TDD), entrypoint escaping (SEC-9), PDF decompression cap (SEC-8, TDD), dead BoneState + 22 unused PNGs (CLN-6/7). 180/180 tests.
SaaS migration (plan: docs/development/IMPLEMENTATION_PLAN.md)
-
Step 0 — preparation docs in docs/development/ (2026-10-08, validated)
-
Step 1 — characterisation tests: 7 files / 91 cases, 2 golden fixtures, docs/development/CHARACTERIZATION_REPORT.md; 271/271, typecheck, lint, build green (2026-10-08, branch feature/step-01-characterisation-tests, awaiting validation)
-
Step 2 — monorepo workspace: apps/app via git mv (144 files), root scripts, Node 24 + pnpm 10.13.1 pins, Dockerfile node:24 + filtered build, CI .gitea/workflows/ci.yml, WORKSPACE.md; 271/271, typecheck, lint, build green from root (2026-10-08, branch feature/step-02-monorepo-workspace, uncommitted, awaiting validation)
-
Step 3 — Supabase foundation (2026-10-08, feature/step-03-supabase-foundation merged into develop
7ea0b1f, USER VALIDATED 2026-10-08; real stack verified: start/reset, pgTAP 81/81, gen types diff, REST script — BLK-006 resolved)- 3.0 context: plan Step 3, BACKEND_ARCHITECTURE §2-§9, business §4.1/§17/§29; Docker socket denied to user → PGlite harness as executable proof, pgTAP kept for
supabase test db - 3.1 supabase/config.toml (CLI pinned as root devDependency) +
supabase/seed.sql(local users only) - 3.2 migration 0001 foundation: schemas private/audit, set_updated_at, audit.audit_logs append-only, private.log_event
- 3.3 migration 0002 profiles: table, auth.users trigger, protected columns trigger, RLS own row (+ staff read), grants
- 3.4 migration 0003 platform roles: enum platform_role (owner/admin/moderator/support), profile_roles, private.is_platform_* helpers, grant/revoke RPC with audit, RLS
- 3.5 pgTAP tests supabase/tests/*.sql (schema, profiles RLS allow+deny, roles allow+deny, audit append-only)
- 3.6 packages/supabase: PGlite harness (auth shim + migrations) + vitest RLS suite (allow+deny), database.types.ts (generator format) + schema↔types consistency test, browser client factory
- 3.7 app integration: env.ts supabaseUrl/anonKey, lib/supabase.ts lazy client (null when unconfigured), entrypoint.sh + .env.example + compose; no UI change; tests
- 3.8 CI: supabase job (start, db reset, test db, gen types diff); check job runs PGlite suite via pnpm -r
- 3.9 docs: docs/development/SUPABASE.md (start/reset/test/types/bootstrap owner), CLAUDE.md folder map + scopes, README pointer
- 3.10 verify: typecheck, test:run 278 app + 13 supabase (81 pgTAP), lint 0, build OK; BDR-026..029, LRN-035/036, BLK-006, EVAL-006
- 3.0 context: plan Step 3, BACKEND_ARCHITECTURE §2-§9, business §4.1/§17/§29; Docker socket denied to user → PGlite harness as executable proof, pgTAP kept for
-
Step 4 — canonical anatomical sheet model (2026-10-08, feature/step-04-anatomical-sheet-model merged into develop, USER VALIDATED 2026-10-09; 7 business decisions → BDR-033, spec §5). Scope re-split: model + validation + persistence + tests here; legacy importer → official equine DRAFT + import report = next step (user: no full import yet, draft verified before publication). Spec: docs/development/ANATOMICAL_SHEET_MODEL.md
- 4.0 context + spec: business §2.6–2.9/§7/§16/§17.3/§23, OPEN_QUESTIONS C1/C2/C8/C9/Q3/Q5/Q9, audit 07; ANATOMICAL_SHEET_MODEL.md written
- 4.1 packages/domain: AnatomicalSheetDocumentSchema (strict, localized {fr,en}, views tree, annotations union, finding tree with category kind), validateSheetDocument (integrity issues), assertPublishable, createEmptySheetDocument; fixture horse-slice; tests per rule + id-stability
- 4.2 migration 20261008110000_anatomical_sheets: species (seed equine), enums, sheets/versions/assets, triggers (one draft, published immutable, delete preconditions, species match), helpers can_edit/can_use_sheet, sheet_document_issues, lifecycle RPCs (create/draft/publish/deprecate/delete/fork/archive/restore/delete sheet/register asset), privileges + RLS
- 4.3 pgTAP 005_anatomical_sheets.sql: schema/privileges, lifecycle allowed path, immutability, fork provenance, deletion preconditions, denied paths (other user, anon, direct writes, official), invalid document refused at publish
- 4.4 packages/supabase: database.types.ts regenerated (real stack), schema-types test extended (tables, enums list, functions); index.ts row aliases; publishSheetVersion service (domain validation before RPC) + test
- 4.5 docs: SUPABASE.md layout/tests, CLAUDE.md folder map + conventions + scopes, packages/README, IMPLEMENTATION_PLAN Step 4 adjustment note, CHANGELOG
- 4.6 verify: pnpm check green (61+17+278), db:reset + db:test 210/210 real stack, types in sync; verifier ECARTS(5) + security BLOCK(1) → all fixed (BLK-007 hardening migration, visibility RPC, +32 pgTAP, doc sync); BDR-030..032, LRN-038..040, EVAL-008
-
Step 4b — equine import (2026-10-09, branch feature/step-04b-equine-import): legacy SVGs + catalog → official equine sheet as DRAFT, import report for business review, no publication
- 4b.0 kind rename observation→consultation_reason (BDR-033 #5); decisions in spec §5 + memory
- 4b.1 packages/anatomy: legacy importer (SVG walker via @xmldom/xmldom, catalog mapper, deterministic ids, legacy-id-map, import report with anomalies incl. ssb-dysfunctions), CLI
pnpm import:equinewriting supabase/seed/anatomical-sheets/equine/v1/{document.json,legacy-id-map.json,IMPORT-REPORT.md,assets/,equine_v1.sql}; tests: counts preserved (27 ann / 26 mapped / 792 nodes / 612 leaves / 41 vet), determinism, Zod + 0 integrity errors, golden artifacts - 4b.2 migration 20261009100000 sheet asset storage: bucket anatomical-sheet-assets (private), object read policy through the sheet (published refs or editor), no API writes; shim storage tables; pgTAP
- 4b.3 seed: equine_v1.sql idempotent (platform-owned official sheet, private, draft v1, 2 asset rows, fixed ids) in config sql_paths + PGlite harness applies supabase/seed/**; pgTAP 006: draft present, not publishable by non-admin, sheet_document_issues empty, assets match; upload script for the SVG bytes (service key from env, user/operator runs)
- 4b.4 real stack: db reset + db test + types check + assets upload + REST read check; docs (SUPABASE.md, ANATOMICAL_SHEET_MODEL.md §6 import, CLAUDE.md, plan note, CHANGELOG)
- 4b.5 verify: pnpm check green (61+30+20+278), real stack 256/256, types in sync, docker build OK, Storage API 400→200 after confirmation (alice/anon 400); verifier ECARTS(4) + security MEDIUM (hash claim) → fixed (uploaded_at + confirm RPC, authored labels, seeds-listed test, Dockerfile manifests); EVAL-009
-
Step 4b VALIDATED by user 2026-10-09 → finished into develop. Draft stays private, never auto-published.
-
Step 4c VALIDATED by user 2026-10-10 → finished into develop; draft stays private, never auto-published — equine sheet audit, correction, enrichment (2026-10-09, branch feature/step-04c-equine-curation). User brief: research-backed audit of SVG annotations + findings catalog, corrections by confidence level (A demonstrated / B supported, flagged / C uncertain, question for the osteopath), traceable changeset (id, before, after, nature, rationale, references, level, needs confirmation), reproducible baseline of the 4b import, no publication, no design redesign (propose first).
- 4c.0 Docker naming convention
faunosteo_(compose container/project names; Supabase CLI names fixedsupabase_<svc>_<project_id>→ documented limit). Docs + memory (BDR). - 4c.1 domain schema v2: document
referencesregistry + nodereference_ids,review_statuson nodes and annotations,count_rangeon vertebral regions; rulesfinding.reference.missing,region.count_range.invalid; tests; migration extending the schema CHECK + SQL issues; types regen; pgTAP. - 4c.2 packages/anatomy curation layer: changeset schema (Zod, JSON data), applier (set / rename / add / remove / move / cite / annotation ops), before-values captured by the applier, CHANGELOG + REVIEW-REPORT generators, diff v1 → draft; seed dir restructure:
legacy-import/(baseline, generated) +draft/(curated working revision, seeded); cleaned SVG asset (legacy markers stripped), head view = view_box crop of the single asset. - 4c.3 research (parallel agents, WebSearch): axial skeleton + vertebral variation; skull/sutures/SBS/TMJ/hyoid; appendicular nomenclature NAV/Barone; osteopathic terminology + French legal scope + vet red flags; catalog analyzer pass. Output: findings with verifiable references, classified A/B/C.
- 4c.4 content changes: sphenoid zone restructured (SSB tree duplicated under sphenoid), terminology (lésion → dysfonction, NAV names, FR grammar), 62 EN descriptions + EN disclaimer, vet flags audit, references registry + citations, additions (carpus…), SVG point moves (B, before/after renders), Cd range 15–21.
- 4c.5 reports: REVIEW-REPORT.md for the osteopath (10 sections, questions ranked), CHANGELOG table, before/after review SVGs (draft/review/, PNG renders by operator), quantitative before/after.
- 4c follow-up (open, not blocking Step 5): 11 questions for the osteopath (draft/REVIEW-REPORT.md §10) → next changeset; legal scope text to re-read on consolidated Légifrance articles before publication; BLK-008 data migration v1→v2 before real data; user action
.env.exampleCOMPOSE_PROJECT_NAME=faunosteo (DEPLOY.md) - 4c.6 verify (root check 68+21+100+278, PGlite + real stack 267/267, types, docker build, Storage e2e; verifier ×3 → fixes, security PASS; EVAL-010): pnpm check, PGlite + real stack pgTAP, types, docker build, golden tests; gates verifier + security; docs (spec §6/§7, SUPABASE.md, CLAUDE.md, plan Step 4c, CHANGELOG); memory (BDR/LRN/EVAL/journal). Stop for user validation.
- 4c.0 Docker naming convention
-
Step 5 — application on the canonical sheet (analysis validated 2026-10-10; implemented on feature/step-05-app-on-canonical-sheet; USER VALIDATED 2026-10-10, all paths OK; finished into develop 2026-10-10; D5 orphan findings documented as UX follow-up)
- 5.0 freeze: golden v2 PDFs + expected v3 docs; CHARACTERIZATION_REPORT refreshed
- 5.1 pipeline: report-migration-map.json (annotations, views, findingPaths 442/136/≤34), app-main.svg + app-head.svg review renders, category colours changeset (D1)
- 5.2 packages/domain: Report v3 (annotationId+viewId, free region codes, severity codes D8, sheet ref, unresolved findings, localAnnotations []), migrateReportV2ToV3, tests on fixtures + 612 leaves
- 5.3 app foundation: bundledSheetProvider (Vite alias @sheets), sheetIndex, sanitiser, renderAnnotationLayer (legacy look), AnatomyCanvas/DetailModal on views (head = crop)
- 5.4 zoneInteraction service + reducers, store split + sessionStoragePersistence (v2 migration on load), pickers/cards on sheetIndex (D6 ranges, D7 title), EditorRoute < 300 lines
- 5.5 PDF shim + attachment v3 + v2 import (gate D3)
- 5.6 delete legacy (registry, species/*, zoneMatch, spineZones, svgConvention, D4 tools), SVG convention doc replaced, CLAUDE.md map, CHANGELOG, plan note, memory
- 5.7 visual before/after (cmp renders), root check + docker + real stack green; verifier ×3 (gaps closed), security PASS (LOW fixed); EVAL-011. Manual FR/EN flow = user validation
- 5.8 per-leaf migration (user ask 2026-10-10, during manual validation): every legacy leaf (612 = 442 identical, 141 moved, 29 removed) as a v2 finding → migrated → resolved to a draft leaf (anatomy, map file) and through sheetIndex.nodeAt + PDF roundtrip (app); the 27 legacy annotations as zones on their views
- 5.9 archive check tool
pnpm report:compare <pdf|dir>...: v2 attachment vs migrated v3 side by side, unresolved flagged (removed vs unknown),--fullopt-in for names/free text, control chars escaped, --diff of two PDFs, --summary; attachment.ts split read/parse (additive, D3); docs PDF-FORMAT/CLAUDE/README - 5.10 final controls on the last lot: stale root script scaffold:species removed; verifier ×3 (2→1→CONFORME) + security ×2 PASS on criteria 16-18; EVAL-012
- 5.11 user validation defect: findings picker text blurry on screen → permanent
will-changeon the list dropped (hotfix1f0b710, regression test); PDF never affected - 5.12 follow-up (not Step 5): equine sheet anatomical enrichment with the osteopath + future sheet editor (Step 17); the 28 draft annotations (carpus added, points moved) are NOT a final catalog
-
Step 6 — autonomous PDF archives (analysis validated by user 2026-10-11 with D7 branding archived, D8 snapshot kept + explicit rebase, D13 messages → Part II contract + BDR-039; implementation on feature/step-06-pdf-archives, one executor per phase)
- 6.0 analysis: 3 analyzers (pipeline, model, app/tests) + size measurements (envelope 172 KB raw / 51 KB stored for 3 obs, 228 / 54 worst case) + 3 plan-challengers → plan rewritten
- 6.1 Phase 0 freeze (
8b86b92: 39 goldens, demo fixture, bare v3 PDF, T12/T13; 206 app tests) with current code: demo report fixture, migrated-v2-with-unresolved builder, G3 bare v3 PDF, G1 text goldens (logos absent + present), G2 structural facts/placements/links, T12 HomeRoute + T13 EditorRoute characterisation - 6.2 Phase 1 domain (
cdc0943: 154 domain tests, snapshot 171 KB raw on the fixture): sheet-index moved, archive/snapshot (buildSheetSnapshot, assertSnapshot, caps), archive/envelope (schema v1, layered readArchiveDocument, SnapshotRejection), report/rebase (rebaseReportOnSheet), bundle carries asset sha + status/name, tests - 6.3 Phase 2 anatomy (
6940926: composeViewSvg + highlightLayer, 130 anatomy tests): render/compose.ts promoted from curation/app-review.ts, highlight on the layer tree, review drawing golden unchanged - 6.4 Phase 3 packages/pdf (
c179560: 53 engine tests, 36 goldens exact, resvg raster, demo envelope 55 KB / 136 KB stored): scaffold (no DOM lib, restricted globals, vitest node, Dockerfile, CI, README), svg/sanitize allowlist + horse.svg zero-removal, render moved, Branding/Rasterizer/exportedAt/safeText/dict, exportReportArchive (T3 both logo modes), readReportArchive (filename-first, layered, attachment_stripped; T4-T6, T8), T1/T7/T9/T10 resvg/T11, xmldom bundle size ≤ 50 KB gz - 6.5 Phase 4 app (
9bd5173: 222 app tests, archive kept in session, rebase + alerts, legacy PDF modules removed, xmldom ≈ 31 KB gz in the main chunk): browserRasterizer, branding.ts, export/import on the engine, rebase on import + draft restore, 2 new messages, old render/attachment/highlight code + pdf.* keys removed, report:compare on engine API, T2/T14/T15, suite migrated 1:1 - 6.6 Phase 5 docs + gates (docs synced; verifier ECARTS(31 oracle/scope) → CONFORME 13/13; security BLOCK(1) → 4 fix loops → PASS; 656 tests, build, docker ×4 green)
- 6.8 user manual tests round 1 (2026-10-11): logos and picker text confirmed OK by the user after branding bundled (
293a6e0) and the investigation; restore-rebase alert (e8f1734); STEP 6 VALIDATED BY USER 2026-10-11 - 6.9 closure decisions (BDR-040): re-export-archive button REFUSED for good; import headlines full/partial (
62b8a43); BLK-009 byte-scan reader + no object streams (60ee712), fresh security audit + verifier; gate before external users kept in PDF_IMPORT_HARDENING.md §5 - 6.10 finish into develop, release/0.2.0 prepped (Milestone A) — tag/merge to main on the user's go; Step 7 NOT started (UX/design discussion first)
- 6.7 follow-ups recorded for Step 13: catalog asset cap aligned with the archive cap (2 MiB), allowlist sanitiser at upload, app canvas sanitiser (EVAL-011)
- 5 follow-up: allowlist SVG sanitiser before Storage-served assets (Step 13); orphan findings UX (D5) at the report UX step; report:compare residuals (ZodError reason genericised, v3 lines computed once, long template lines); 16 MiB attachment cap without direct test
-
Step 7 — identity: auth, profile, roles, /app shell (started 2026-10-11, branch feature/step-07-identity-app-shell; direction graphique validée par l'utilisateur: identité actuelle conservée, maquettes = référence externe non versionnée). Scope decisions: professional fields = additive migration on profiles (practice_name, professional_title, siret free text, verification = later domain); MFA = documented gap (TOTP disabled in config, no has_mfa helper, no admin table); no TanStack Query (zustand store suffices); legacy routes untouched and unauthenticated; /app visible from Home only when Supabase is configured
- 7.0 plan + branch + ctx7 cache (supabase-js auth, config.toml providers)
- 7.1 config: appConfig.authProviders (APP_AUTH_PROVIDERS / VITE_AUTH_PROVIDERS, google|apple), entrypoint + env.example + DEPLOY table; config.toml: TOTP enroll/verify on, [auth.external.google|apple] via env(), redirect URLs; packages/supabase: auth service wrappers (typed errors), profile read/update service
- 7.2 migration 20261011100000_profiles_professional: practice_name, professional_title, siret (+ CHECKs, column grants); pgTAP 009; database.types regenerated (real stack) + schema-types map
- 7.3 app state: authStore (status loading|signed_out|signed_in, session, user, profile, roles), bootstrap on getSession + onAuthStateChange, profile fetch, roles fetch; locale sync (profile.locale → localeStore on sign-in, localeStore → profiles.locale while signed in); AuthProvider in App
- 7.4 auth screens: /login (email+password, OAuth buttons per authProviders, links), /signup (display name, email, password ×2, policy hints, "check your inbox" state), /forgot-password, /reset-password (PASSWORD_RECOVERY → new password), /auth/callback (code exchange → /app); AuthLayout (brand, cream card); not-configured state
- 7.5 /app shell: RequireAuth guard (redirect /login?next=), AppLayout (desktop sidebar: dashboard, account, local tool link, logout; mobile top bar + drawer), /app dashboard (welcome, profile completeness card, local tool card, no fake stats)
- 7.6 /app/account: personal (display, first, last, phone), professional (title, practice, siret), preferences (locale, timezone), security (change password, logout, MFA gap note), roles badge read-only
- 7.7 Home coexistence: "Mon espace / Se connecter" entry on the header when configured; characterisation tests T12 unchanged with default config
- 7.8 tests: config, authStore (fake client), locale sync, forms, guards, shell, dashboard, account; i18n parity; pgTAP 009 (PGlite + real stack 280/280); root check + docker build green; headless e2e vs local stack 20/20 (signup via Mailpit, recovery, logout, mobile)
- 7.9 docs: IDENTITY.md (routes, session, providers, MFA gap, manual validation), SUPABASE.md, CLAUDE.md, CHANGELOG, plan note DONE; memory BDR-041, LRN-047, journal DONE; verifier + security gates dispatched; EVAL after gates; STOP for user validation (user action:
.env.example+=APP_AUTH_PROVIDERS=, file edit denied)
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 (restore path was missing until
f58a49f2026-07-12 — refresh now keeps the session) - 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 (tour 2026-07-12: docker run APP_BRAND_NAME=TourCheck → env.js correct, non-root; hostile-quotes case covered by
0214ae1) - 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-022 — decisions registry
- LRN-001..LRN-031 — learnings registry
- BLK-001..BLK-005 — 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 |