18 Commits
Author SHA1 Message Date
Bastien ChanotandClaude Opus 4.8 2803cf7c7d fix(editor): serve pathology-editor.html from public/ so it ships to dist
The file lived at the repo root, where Vite never bundles it (only index.html is the build entry). In production nginx fell through to the SPA index.html and React showed 'Page introuvable' at /pathology-editor.html. Moving it under public/ makes Vite copy it verbatim into dist/, so nginx serves it as a real static file. The /editors link (href=/pathology-editor.html) is unchanged — public/ is the web root.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-13 23:41:53 +02:00
Bastien ChanotandClaude Opus 4.8 3a67da73e7 feat(ui): show Paws in Harmony logo in site footer
Replace the 'Paws iin Harmony' text credit in the partnership row with the Paws_in_harmony.svg logo served from public/, mirroring the ZenQuality logo treatment.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 02:46:33 +02:00
Bastien ChanotandClaude Opus 4.6 f1c639d93e feat(pdf): generate PNG assets from SVG logos, use -com variant in footer
- Generated 24 PNGs (128/256/512/1024) from 6 SVG logos into public/assets/
- PDF footer now uses faunosteo-horizontal-com (with .com branding)
- Simplified logo.ts: both logos are pre-rasterized PNGs, removed SVG
  rasterization code

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-27 07:02:40 +02:00
Bastien ChanotandClaude Opus 4.6 710171afda fix(pdf): use French ZenQuality logo in PDF footer
Swapped logo-horizontal-1024.png (dark) for logo-horizontal-fr-1024.png.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-27 06:30:30 +02:00
Bastien ChanotandClaude Opus 4.6 cae585b564 fix(pdf): simplify footer to single line, use dark ZQ PNG logo
- Removed "faunosteo.com" text (logo alone is clickable)
- Replaced "In partnership with Paws iin Harmony" + separate handle
  with single "@paws.iin.harmony" link
- Swapped ZenQuality SVG for dark PNG (logo-horizontal-1024.png)
  which renders better on white pages
- Footer now: [Faunosteo logo] | [Powered by ZQ logo] | [@paws.iin.harmony]
  with page numbers below center

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-27 05:19:54 +02:00
Bastien ChanotandClaude Opus 4.6 33a7f47fdf feat(pdf): add branding to PDF exports (header logo + footer links)
Header: centered Faunosteo logo on first page.
Footer: Faunosteo logo + faunosteo.com, ZenQuality logo + "Powered by",
Paws iin Harmony + @instagram handle, page numbers. Removed export date
and plain-text site name from footer.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-27 05:03:15 +02:00
Bastien Chanot 0c170bd349 added bilaterality 2026-05-27 02:49:42 +02:00
Bastien ChanotandClaude Opus 4.6 1f30280762 feat(ui): unified AppHeader, logo brand, tagline update, and header simplification
- Brand component now renders horizontal SVG logo instead of text
- New AppHeader shared component replaces per-route header boilerplate
- Tagline updated to "Outils pour ostéopathes animaliers"
- All routes use AppHeader (HomeRoute, EditorsRoute, NewReportRoute, SvgEditorRoute)
- ReportHeader and Footer simplified
- DEPLOY.md URLs updated zoosteo.fr → faunosteo.com
- Logo assets added (favicon.svg, logo-horizontal.svg, apple-touch-icon.png)
- Removed unused eslint-disable directive in SvgEditorRoute

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-23 20:01:33 +02:00
Bastien ChanotandClaude Opus 4.6 9cca51c504 feat(editor): add standalone pathology editor tool
Standalone HTML page for editing species pathology JSON via SVG-based
zone selection. Supports pre-wired species list and manual SVG+JSON
upload. Features fuzzy zone matching (ported from zoneMatch.ts),
recursive tree editor with full CRUD, auto ID generation, and safe
JSON export preserving all zones and root fields.

Includes SVG sanitization (script/foreignObject/on* stripping),
unsaved changes protection, and French error messages.

Also copies pathologies.json to public/ for HTTP access from the editor.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-22 04:42:07 +02:00
Bastien Chanot 6eda7ebc39 feat(species): adopt horse catalog v2.0 — full 26-zone coverage
Catalog bumped v1.2 → v2.0 by domain expert.

- schema_version "2.0"; 26 zones (9 head + 17 body), 792 nodes,
  612 leaves, 41 requires_vet_referral leaves.
- requires_vet_referral becomes the sole source of truth for the
  vet-orientation flag. Generic "orienter vers vétérinaire" wording
  purged from description_fr on 25 leaves; the 16 leaves carrying a
  clinical differential keep their description_fr.
- Existing Zod schema (findings.ts) and consumers (FindingsTreePicker,
  PDF observationPage) already key off the boolean — zero code change
  required.
- Aligns SVG Horse_head.svg "hyoïde" → "Hyoïde" so all 26
  data-anno-name-fr / -en values match zone.name_fr / name_en
  strictly (v2.0 authoring rule prescribes exact equality;
  src/lib/zoneMatch.ts fuzzy fallback retained as safety net).

154/154 tests green, typecheck clean.
2026-05-21 03:23:15 +02:00
Bastien ChanotandClaude b9da4fa04a fix(anatomy,editor): detail-popup clicks + spine zones open VertebraPicker via data-anno-special
Three coupled bugs in zone interaction:
1. Clicks inside the head detail popup were ignored — EditorRoute
   looked up the clicked id in the main-SVG bones map only, so
   detail-only ids (point-mpbykomv et al.) returned undefined.
2. Spine zones did not open VertebraPicker on click; the picker was
   only reachable via the per-zone "Vertèbres…" button.
3. The new SVG hint data-anno-special="vertebral-precision" was
   present in Horse.svg but unread by the parser/UI.

Parser now reads data-anno-special into Bone.special. EditorRoute
parses the detail SVG on open and falls back to detailBones for id
lookups. When bone.special === 'vertebral-precision', clicking adds
the zone (if absent) and opens VertebraPicker for that zone index;
toggle-off via main click is disabled for these zones (use ✕). The
"Vertèbres…" button in ObservationCard is now shown only on zones
that support it. Convention doc updated.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-19 04:58:04 +02:00
Bastien ChanotandClaude Opus 4.7 cad94a49db refactor(anatomy): adapt parser to new SVG convention (categories + single-element)
User dropped new Horse.svg / Horse_head.svg that follow a simpler
convention:

- Categories renamed to longer human strings:
    articulation       → articulations
    charniere          → charni-res-vert-brales
    spine-zone         → zone-colonne
    cadran-crane       → cadrans-du-cr-ne
    head, os-overlay   → dropped (head zone is now category="os" + data-anno-opens-detail)
    os                 → unchanged
- No more hitbox / visible class split; multiple elements may still share
  the same data-anno-id but they all carry the same role.
- Trigger-only zones (`data-anno-opens-detail="head"`) may omit
  `data-anno-name-fr/en`.

Changes:
- `Bone` now exposes a single `els: Element[]` instead of `hitboxEls +
  visibleEls`.
- `parseSvgBones` accepts annotations without fr/en labels (defaults to
  empty string) but still rejects unknown or missing categories.
- The "interactive vs decorative" filter is gone — every parsed
  annotation is interactive, since the new SVGs only annotate the
  clickable zones.
- Vertebra-picker trigger: `bone.category === 'zone-colonne'`
  (EditorRoute + ObservationCard).
- PDF colorisation in `observationPage.colorizedSvgString` writes the
  accent fill to every `els[]` entry (no more hitbox dual-pass).
- Dead `src/components/observation/ObservationEditor.tsx` removed (its
  body lives inside ObservationCard since the accordion refactor).
- Tests rewritten for the new vocabulary; synthetic fixture uses the new
  categories, real-SVG test asserts 18 + 9 unique zones.

92/92 tests pass, lint clean, build clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 04:06:26 +02:00
Bastien ChanotandClaude Opus 4.7 1109e33383 refactor(anatomy): rename SVG data attrs (bone → anno) per new convention
User updated the clickable-zone convention in the source SVGs:

  data-bone-id        → data-anno-id
  data-bone-fr        → data-anno-name-fr
  data-bone-en        → data-anno-name-en
  data-category       → data-anno-category
  data-opens-detail   → data-anno-opens-detail

Bulk-renamed across:
- public/species/equine/Horse.svg + Horse_head.svg (86 anno-attrs each)
- src/anatomy/svgConvention.ts (parser + getBoneIdFromEvent)
- src/anatomy/types.ts (doc strings)
- src/components/canvas/AnatomyCanvas.tsx (querySelector + delegated click)
- src/styles/index.css (`[data-bone-id]` selectors → `[data-anno-id]`)
- src/domain/species/types.ts + schema/observation.ts (doc strings)
- docs/{ANATOMY-SVG-CONVENTION,ADDING-A-SPECIES,superpowers/specs,plans}.md
- CLAUDE.md + .claude/{memory/learnings,tasks/TODO}.md
- tests/unit/{anatomy.svgConvention,anatomy.svgLoader,components.AnatomyCanvas}.test.tsx

Internal TS type names and field names (Bone, boneId, parseSvgBones,
getBoneIdFromEvent) are kept intentionally — they're the application's
logical shape and the persisted JSON contract. ObservationZone.boneId is
the identifier seen in already-exported PDFs; renaming it would break
re-import of those PDFs. Only the SVG-side attribute names change.

90/90 tests pass, lint clean, build clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 03:10:06 +02:00
Bastien ChanotandClaude Opus 4.7 3c32f66eb6 fix(docker): write env.js from APP_* env vars at container start
Wire index.html to actually load /env.js before the Vite bundle so the
runtime config injected by docker/entrypoint.sh takes effect. Add a
public/env.js stub so local dev and static builds don't 404 — the Docker
container overwrites it via the entrypoint.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 21:57:36 +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 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