Commit Graph
10 Commits
Author SHA1 Message Date
Bastien Chanot b047d352c1 feat(species): locale-aware species labels via labelEn
B-6: SpeciesManifest only carried labelFr — EN users saw 'Cheval'.
labelEn required on the manifest, speciesLabel(s, locale) helper in
registry; AnimalForm dropdown + SvgEditor picker localized (locale
passed into initSvgEditor, re-inits on locale change). Scaffolder
template + ADDING-A-SPECIES.md + registry test updated.
2026-07-12 16:23:07 +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 Opus 4.7 7dd4f633f8 chore: rename project from osteo-report to zoosteo
Remote moved to git.bchanot.fr/bchanot/zoosteo.git; brand strings
and production URL updated to match new identity.

- package.json: name → zoosteo
- src/config/env.ts: AppConfig DEFAULTS → "Zoosteo"
- docker/entrypoint.sh: APP_*_NAME fallbacks → "Zoosteo"
- src/i18n/{fr,en}.ts: import error message + PDF title prefix
- src/pdf/attachment.ts: embedded description metadata "state v2"
- index.html: <title> fallback
- scripts/scaffold-species.mjs: console banner
- tests/unit/components.Brand.test.tsx: regex
- README.md, CLAUDE.md, CHANGELOG.md, docs/ADDING-A-SPECIES.md:
  brand headings + intro lines
- DEPLOY.md: env defaults table + osteo.example.com → zoosteo.fr
  (clone URL, paths, certbot, curl, container name references)

PDF attachment FILENAME 'osteo-report.json' and the startsWith
contract in src/pdf/attachment.ts:35,40 are preserved — changing
them would break PDF import for every PDF already exported by the
app. docs/superpowers/** and .claude/audits/** left unchanged as
historical records.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 05:53:12 +02:00
Bastien Chanot 8385b49bbe docs: sync drift after catalog v2.0 + i18n + WinAnsi hotfix
doc-syncer audit applied 10 AUTO patches and 1 HUMAN reword (#5)
across the doc set.

README.md:
- Test count "7 tests pass on skeleton" / "88 tests across 23 files"
  → "155 tests" / "155 tests across 29 files".
- Reword "Observation builder" bullet + add hierarchical findings
  tree + browser-detected locale bullets (HUMAN #5).
- Status paragraph: pathology DB "intentionally empty" → full
  26-zone v2.0 catalog (792 nodes, 612 leaves, 41 vet leaves).
- Documentation section: add PATHOLOGIES-FORMAT.md link; tidy the
  DEPLOY.md mention (DEPLOY.md itself comes in the next commit).

CLAUDE.md:
- Architecture block: "embedFonts (Inter body + Fraunces heading)"
  → reality (Helvetica + TimesRoman / WinAnsi StandardFonts; TTF
  Inter/Fraunces planned).
- PDF convention: "Fonts are TTF" → "Fonts are StandardFonts
  (Helvetica/TimesRoman, WinAnsi)" with the ASCII-surrogate caveat.
- Folder map: add src/anatomy/labels.ts, include zoneMatch.ts in
  src/lib/{...}.ts.
- i18n: locale default "fr" → "navigator-detected fr/en, or 'fr'
  if no match" to match commit 9cf8a66.

docs/PATHOLOGIES-FORMAT.md:
- "PDF surface: snapshot label is prefixed ⚠" → "(!)" in two
  places (after WinAnsi hotfix 143fdc3). Picker ⚠ statement
  kept — browser renders U+26A0 natively.

docs/ADDING-A-SPECIES.md:
- data-anno-category: "Free-form" → enum of 7 valid values per
  ANATOMY-SVG-CONVENTION.md; parser throws SvgConventionError on
  unknown values.
- Section 4 (findings catalog): cross-link to
  docs/PATHOLOGIES-FORMAT.md so authors find the v2.0 contract.
2026-05-21 04:13:13 +02:00
Bastien ChanotandClaude 70b7f20f6f feat(species): auto-discover species manifests + scaffold script
Registry
--------
src/domain/species/registry.ts previously hard-coded the species list,
which meant adding a new animal forced an edit in two places. The
registry now uses Vite's `import.meta.glob('./*/index.ts', { eager: true })`
and registers every manifest that default-exports a SpeciesManifest.
Duplicate ids log a warn and the first wins. Existing named imports
keep working — equine/index.ts adds `export default equine` next to the
named export.

The species dropdown is also now sorted alphabetically by labelFr (FR
locale) instead of insertion order, so two species don't shuffle
position based on glob ordering.

Scaffold script
---------------
`pnpm scaffold:species` (scripts/scaffold-species.mjs) is an
interactive Node ESM prompt that asks for the id, FR/EN labels, asset
folder, main SVG filename, detail SVG mappings, and the vertebral
formula, then writes:

  src/domain/species/<id>/index.ts        (with `export default`)
  src/domain/species/<id>/vertebrae.ts
  src/domain/species/<id>/pathologies.ts  (Zod-parses the JSON)
  src/domain/species/<id>/pathologies.json (minimal valid skeleton)
  public/species/<assetFolder>/           (directory placeholder)

The script refuses to overwrite existing files, so it's safe to rerun
after typos. SVG assets are not generated — drop them in the public
folder yourself.

Findings JSON updates
---------------------
No runtime hot-reload mechanism is needed in dev: `pathologies.ts`
imports `pathologies.json` and runs `SpeciesFindingsSchema.parse(data)`
at module load, so a JSON edit triggers Vite HMR + an immediate Zod
validation pass. In prod, rebuild and redeploy.

Docs
----
docs/ADDING-A-SPECIES.md rewritten around the new flow: quick start via
the scaffold script first, manual instructions second, and removed the
stale references to the flat `Pathology[]` model and the no-longer-
required registry edit step.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-20 05:46:33 +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 4355055a42 docs(species): document how to add a new species end-to-end
Replace the placeholder with a full 7-step walkthrough: SVG convention,
file placement under public/, species manifest at src/domain/species/<id>/,
registry wiring, vertebral formula, pathology seed (empty allowed in v1),
and the two mirror tests (registry + real-SVG parse + pathologies schema).

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