38 Commits
Author SHA1 Message Date
Bastien ChanotandClaude Opus 4.8 60119c6dcb chore(memory): reconcile TODO with main +41 commits (174 tests, version 0.1.0)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RNaYKPEkjH1jbgoX1TwKMX
2026-07-01 00:20:23 +02:00
Bastien ChanotandClaude Opus 4.8 3f239d18d5 docs(memory): capitalize BDR-022 (keep pathology-editor standalone)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-13 23:55:05 +02:00
Bastien ChanotandClaude Opus 4.8 97f8a92906 docs(memory): capitalize LRN-029 (Vite public/ for standalone HTML)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-13 23:46:22 +02:00
Bastien ChanotandClaude Opus 4.8 b7fd2fbbc0 docs(memory): log footer Paws logo feat in journal
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 03:07:30 +02:00
Bastien ChanotandClaude Opus 4.7 4c196bbd08 docs: supersede BDR-018 with BDR-019 (unified spine picker)
Record the pivot from additive distribution to an authoritative full-spine
editor, the click-opens-own-tab precedence change, and the accepted
orphan-findings wart on prune.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-27 19:23:12 +02:00
Bastien ChanotandClaude Opus 4.7 fc7069c2cb docs: capitalize BDR-018 + LRN-028, sync lib folder map
Record vertebra picker distribution decision (target replaces, others union)
and the "drive derived UI by spawning the source-of-truth row" learning.
Add spineZones.ts to the CLAUDE.md src/lib folder map.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-27 18:58:31 +02:00
Bastien ChanotandClaude 93b079feb7 chore(memory): update journal for schema laterality task
Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-23 22:16:02 +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 2d6ed809e2 chore: rename Zoosteo → Faunosteo across entire project
Brand strings, config defaults, i18n dicts, PDF attachment metadata,
HTML titles, Docker container name, package name, repo URLs, deploy
paths, and all documentation updated. Git remote switched to
faunosteo.git. Domain URLs (zoosteo.fr) preserved — DNS update is
separate. 155/155 tests green.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-22 21:44:21 +02:00
Bastien ChanotandClaude dee98e3eac chore(memory): capitalize session decisions and learnings
BDR-020 (pathology editor standalone), BDR-021 (zoneMatch inline port),
LRN-025 (importNode XSS), LRN-026 (inline port pattern). Journal
updated for 2026-05-22 sessions.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-22 06:17:32 +02:00
Bastien ChanotandClaude Opus 4.6 ce29457d8b chore(memory): capitalize SVG editor integration
BDR-017 (vanilla JS wrap decision), LRN-023 (DOMParser SVG loading),
journal entry for 2026-05-22 session.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-22 02:14:10 +02:00
Bastien Chanot 5093418950 chore(memory): journal line for findings-tree level transition 2026-05-21 07:23:08 +02:00
Bastien Chanot ef0ef62f2d chore(memory): journal lines for footer + header refactor + editor scroll fix 2026-05-21 07:09:24 +02:00
Bastien ChanotandClaude Opus 4.7 dbd2bf30e9 chore(memory): correct BLK-005 + LRN-022 — pnpm 11.x line needs Node 22
Initial hypothesis ("pnpm@latest pulled a newer 11.4+ with new Node
floor") was wrong. Investigation after the second VPS crash showed
the whole pnpm 11.0+ line imports node:sqlite from its store-index
module. Local dev was misleading because pnpm install never re-ran
on the Node 20 host (lockfile already resolved, child scripts don't
load the store module).

Updates:
- BLK-005: replace single-fix line with iteration log
  (@latest → @11.1.3 → @10.13.1, last one resolved).
- LRN-022: rewrite headline + body to reflect pnpm 11 ↔ Node 22.13
  coupling, not just pnpm 11.4. Add pnpm/Node compat matrix.
- journal 2026-05-21: append v2 fix entry referencing commit 990c8e7.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 06:16:08 +02:00
Bastien ChanotandClaude Opus 4.7 202110ddd2 chore(memory): capitalize zoosteo rename + Docker pnpm pin — BLK-005, LRN-022, journal
- BLK-005: VPS Docker build crash on pnpm@latest pulling pnpm >=11.4
  needing Node 22.13 (node:sqlite import) against node:20-alpine image.
  Resolved by pinning pnpm@11.1.3.
- LRN-022: never use floating pnpm@latest (or any unpinned upstream
  tag) in Dockerfiles — pnpm minor bumps can silently raise Node floor.
  Fix paths: pin exact + mirror in packageManager field; audit CI too.
- journal 2026-05-21: two lines for the rename commit and the Docker
  pin commit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 06:07:28 +02:00
Bastien Chanot f4bb7cf9e0 chore(memory): capitalize ⚠ WinAnsi hotfix — LRN-021 + EVAL-003 + journal
- LRN-021: pdf-lib StandardFonts use WinAnsi (cp1252) — any non-Latin-1
  codepoint throws on measure or draw. Fix paths: ASCII surrogate
  (quick) or embed TTF via pdfDoc.embedFont (right). CLAUDE.md spec
  prescribed TTF; current StandardFonts is a documented drift.
- EVAL-003: bug slipped past 154/154 CI because roundtrip tests had no
  observation with a requires_vet_referral leaf. Regression test now
  measures a prefixed label via widthOfTextAtSize to canary any future
  non-WinAnsi marker reintroduction.
- journal 2026-05-21 appended with the hotfix note and the
  TTF-migration follow-up.
2026-05-21 03:34:56 +02:00
Bastien Chanot f5307ce61c chore(memory): /close — BDR-016 + LRN-020 + BLK-002 resolve + journal 2026-05-21
- BDR-016: pathologies.json v2.0 — boolean source of truth, generic
  vet description_fr purged, full 26-zone horse coverage.
- LRN-020: forward-compat Zod schema absorbs catalog version bump
  zero-code (optional fields + boolean-driven logic since B0).
- BLK-002 resolved — catalog no longer empty (612 leaves > 40-60 target).
- journal entry 2026-05-21 logs the in-place v2.0 swap, the hyoïde
  case alignment fix, and the doc refresh.
- TODO refreshed: Phase C item 1 (full horse.json) done,
  PATHOLOGIES-FORMAT.md v2.0 refresh done, B4 PDF observationPage
  marked partially done (scope_disclaimer footer still TBD).
2026-05-21 03:23:38 +02:00
Bastien ChanotandClaude Opus 4.7 31bd82de58 chore(memory+docs): /ship-feature B3 capitalize — BDR-014/015 + LRN-017..019 + EVAL-002 + journal + TODO
Memory registry capitalization after B3 i18n FR/EN ship.

- decisions.md  +BDR-014 (PDF locale = render preference, store-driven, not Report schema field — dual label snapshot already carried).
- decisions.md  +BDR-015 (typed ImportError discriminant kind + foundVersion; UI resolves message via dict; review caught hardcoded FR in domain layer).
- learnings.md  +LRN-017 (i18n dict parity test: Object.keys().sort() equality + non-empty value assertion — cheapest drift guard).
- learnings.md  +LRN-018 (useT hook pattern: selector subscribe + dict closure-per-render, no prop drilling, missing-key dev-warn + key-literal fallback).
- learnings.md  +LRN-019 (exhaustive-deps trap when closures over store values appear inside useMemo deps — inline or useCallback).
- evals.md      +EVAL-002 (B3 review caught critical FR leak in pdf/import.ts + attachment.ts that grep+analyzer both missed — i18n migrations must enumerate ALL string-emitting files including error paths).
- journal.md    session 3 entry under 2026-05-20.
- TODO.md       B3 subsection rewritten as DONE with checked checkboxes + cross-refs.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 07:43:11 +02:00
Bastien ChanotandClaude bffa6fba26 chore(memory): /close — BDR-012/013 + LRN-013..016 + journal 2026-05-20 (session 2)
Capture the second-session findings-tree iteration learnings before
they fade:

Decisions
- BDR-012 species auto-discovery via Vite import.meta.glob default-export
  contract (alternatives: hardcoded registry, runtime registerSpecies()).
- BDR-013 SVG↔JSON zone bridge via fuzzy FR/EN label match (alternatives:
  rename SVG ids, add new data-anno-finding-zone attribute).

Learnings
- LRN-013 import.meta.glob + default-export as a plugin-discovery pattern.
- LRN-014 normalize + Levenshtein recipe for human-string cross-walk.
- LRN-015 per-source try/catch beats wrapping a loop with one outer catch.
- LRN-016 pdf-lib subset-font output: latin1/utf-8 bytes-grep won't find
  user-visible text — extract the JSON attachment or test through a
  refactored helper instead.

Journal
- Logs the 11 commits between b7b0945 and 70f21cc with one-line summaries
  + cross-refs to the new registry entries.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-20 06:21:39 +02:00
Bastien ChanotandClaude Opus 4.7 b7b094535e chore(memory): TODO + journal + BDR-009..011 + LRN-011..012
Mark B0/B1/B2/B5 done on TODO. Journal 2026-05-20 entry with the three
commit SHAs and a per-phase recap. Three new design decisions captured:
JSON snake_case kept in TS (BDR-009), snapshot labels at selection time
(BDR-010), hard-fail v1 PDF with FR-language message (BDR-011). Two new
learnings: Zod recursive schemas via z.lazy + explicit ZodType<T>
(LRN-011), once-per-session UX modal via sessionStorage flag (LRN-012).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 03:51:36 +02:00
Bastien ChanotandClaude 31be3155ef chore(memory): journal — domain pivot + B0+B1+B2 reminder for next session
Records the schema-v1.1 findings pivot decision, the inert JSON
drop, and the species.id reconciliation ("equin" vs "equine") to
resolve before the next loader migration runs.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-19 07:53:03 +02:00
Bastien ChanotandClaude a3afdcb763 chore(domain): drop equine findings JSON v1.1 + refactor plan
Adds the schema-v1.1 hierarchical findings JSON authored by the
domain expert at src/domain/species/equine/pathologies.json
(3-zone sample: sphenoid/ssb/atm — placeholder before full-body
authoring).

JSON is inert: not yet imported by the loader (still exports the
empty Pathology[]), so build and tests stay green.

TODO rewritten to sequence the V1 refactor:
- B0 findings schema + JSON loader with Zod parse at boot
- B1 ReportSchema v2 (observation.findings = path + snapshot)
- B2 FindingsTreePicker replacing flat PathologyPicker
- B3 i18n FR/EN site + PDF (locale store, dict, switcher)
- B4 PDF observationPage rendering findings
- B5 stub cleanup
- C  full horse.json authoring + QA + docs + deploy

Known fixup: JSON species.id is "horse" but registry uses
"equine"; align JSON to "equine" at integration time.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-19 07:44:10 +02:00
Bastien ChanotandClaude 50ad18f4ed chore(tasks): refresh TODO to reflect actual V1 state
Scaffold-era checklist was stale: most Phase 2-5 items already
shipped (full editor flow, PDF roundtrip, Docker, identity edit
dialog, etc.). Rewrite to capture what's actually done vs what
remains for V1/MVP ship.

Remaining for V1: equine pathology DB (40-60 source-cited entries,
currently empty array), stub cleanup (Toast/ZoneTooltip unused,
ObservationEditor never created), PDF QA pass, Docker deploy
validation, doc finalization, Scaleway production deploy.

Post-V1 ideas (Capacitor mobile, accounts/cloud, RDV) captured
in Phase C so they don't get pulled into MVP by mistake.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-19 07:02:27 +02:00
Bastien ChanotandClaude 8a2f9cc7ff chore(memory): LRN-010 — gate DOM-mutate effect on async-mount loaded state
Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-19 06:56:28 +02:00
Bastien ChanotandClaude 19c9c15979 chore(memory): LRN-009 — pre-rasterize then reserve text in pdf layout
Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-19 06:44:09 +02:00
Bastien ChanotandClaude 66e040d0e4 chore(memory): journal — editor nav + edit-infos feat
Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-19 06:29:37 +02:00
Bastien ChanotandClaude 15a3ef2890 chore(memory): close session — BDR-008, LRN-008, journal
Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-19 06:22:20 +02:00
Bastien ChanotandClaude 3bb229331e chore(memory): capitalize PDF bugfix — BLK-004, LRN-006, LRN-007
Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-19 05:32:38 +02:00
Bastien ChanotandClaude 57c9925578 chore(memory): journal hotfix + picker preselect
Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-19 05:18:37 +02:00
Bastien ChanotandClaude 6a0ab22f76 chore(memory): capitalize bugfix b9da4fa — BLK-003, LRN-004, LRN-005
Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-19 04:59:00 +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 abd4f78a46 chore(memory): log MVP delivery in journal
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 22:02:45 +02:00
Bastien ChanotandClaude Opus 4.7 0aa8f46f5c test(qa): document MVP manual QA checklist outcome
Capture the plan §23.2 walkthrough as an unticked checklist with
deliberate TODO markers. Automated browser QA was out of scope for the
/init-project session; this file is the handoff for a manual pnpm dev
verification before delivery. Includes the matching automated coverage
table so reviewers know what is already enforced by CI.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 22:01:02 +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 12a3e48fdf clean repo 2026-05-18 19:40:44 +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