Exports LateralSideSchema (z.enum left/right) and LateralSide type.
Adds optional side field to ObservationZoneSchema for bilateral zone distinction.
Covers new schema with 6 dedicated tests (accepts/rejects for both types).
Co-Authored-By: Claude <noreply@anthropic.com>
Read data-anno-lateral from annotated SVG elements and expose it as
Bone.lateral ('bilateral' | 'unpaired' | undefined). Follows the same
merge logic used for data-anno-special.
Co-Authored-By: Claude <noreply@anthropic.com>
- 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>
h-full (height:100%) doesn't resolve when the parent only has flex-1
without an explicit height. flex-1 (flex-grow) works because the
parent App.tsx <main> IS a flex container — no explicit height needed.
Co-Authored-By: Claude <noreply@anthropic.com>
App.tsx <main> was flex-1 but not a flex container itself, so child
routes with h-full + grid place-items-center couldn't resolve their
height for vertical centering.
Co-Authored-By: Claude <noreply@anthropic.com>
Remove h1 heading from editors page, use same centered grid layout
as home page — cards vertically and horizontally centered in viewport.
Co-Authored-By: Claude <noreply@anthropic.com>
Replaced min-h-screen with h-full on both routes — App.tsx flex layout
already provides min-h-screen + flex-1, so the inner min-h-screen was
doubling the minimum height and pushing the footer off-screen.
Co-Authored-By: Claude <noreply@anthropic.com>
Header with brand link + FR/EN segmented toggle reading/writing
osteo:locale localStorage key. 76 translation keys covering all
UI strings. View state tracked for re-render on locale switch.
Co-Authored-By: Claude <noreply@anthropic.com>
Compact header (Brand + LanguageSwitcher) above the SVG editor.
All 58 hardcoded strings in JSX template and vanilla JS replaced with
t() calls via TFn passed to initSvgEditor. Editor re-inits on locale
change. CSS drop overlay uses data-drop-label attr for translated text.
Co-Authored-By: Claude <noreply@anthropic.com>
New /editors route listing SVG editor and pathology editor with
descriptions and CTAs. Footer gains Éditeurs link, Paws iin Harmony
credit, and pipe-separated layout. 69 i18n keys added (editors.*,
footer.*, svg_editor.*) in both FR and EN dicts.
Co-Authored-By: Claude <noreply@anthropic.com>
Custom floating tooltip replaces native SVG <title> — follows cursor,
shows zone name in active locale (FR/EN), dark pill style with 120ms
fade. getAnnotatedElement() helper added to svgConvention.ts.
Co-Authored-By: Claude <noreply@anthropic.com>
Add pathology-editor.html to folder structure, specs listing, and
README feature list.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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>
Extract AppShell with useLocation to conditionally hide Footer on
/svg-editor. Add max-height: 100% + width: auto to SVG canvas CSS
so loaded SVGs fill available space without overflowing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Wrap standalone vanilla JS SVG annotation editor (~1630 lines) into
React via useRef+useEffect. CSS restyled to Zoosteo design tokens.
Route registered at /svg-editor with noindex meta tag and back-to-home
link. DOMParser used for safe SVG file loading. Zero behavior loss
from original editor.html.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Previous 16px / 180ms transition was barely visible on a 360-420px
wide mobile viewport. Adjustments:
- Slide distance 16px → 32px so the off-position is clearly off-axis
on small screens.
- Duration 180ms → 220ms — slightly longer keeps the slide visible
through the iOS/Android touch-event paint cycle.
- Hint with willChange: 'transform, opacity' so mobile Safari
promotes the ul to its own compositor layer up front, avoiding a
first-frame flicker on weaker GPUs.
No behavioural change to direction logic; tests still 155/155.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Opening a finding category (e.g. "Dysfonction ostéopathique") and
backing out felt abrupt — list content swapped instantly with no
visual continuity. Now the list animates a short slide+fade between
levels:
- Drill down → new list enters from the right (+16px → 0).
- Back / breadcrumb up → new list enters from the left (-16px → 0).
Implementation:
- Wrap the list in `motion.ul` keyed by the path string so React
remounts when the level changes; motion's `initial`/`animate`
variants then play on every remount.
- A direction state (1 | -1) feeds the `enter` variant via `custom`
so forward vs. back have opposite slide directions.
- All path mutations go through `goInto` / `goBack` / `goToDepth`
helpers that set direction before calling `setPath`.
- 180ms ease-out — perceptible but does not block interaction.
AnimatePresence was deliberately omitted: it defers DOM swap, which
broke the existing synchronous `getByLabelText` assertions in
components.FindingsTreePicker.test.tsx. The key-based remount keeps
the new content reachable immediately while still providing a
direction-aware entrance.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Navigating to /editor (either from /new or by re-importing a PDF)
landed the user at the bottom of the page because the browser
restored its previous scroll position on a long route. Force a
one-shot scroll to (0,0) on mount with an empty-deps effect so the
report opens at the header.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Make the header consistent across Home, New report, and Editor:
- Tagline (cfg.tagline) now sits next to the brand on the left for
every page, instead of right-aligned on Home only.
- LanguageSwitcher moved to the far right of the action group on
every page (previously sandwiched between brand and report info on
Editor).
- Dropped the redundant "← Accueil" ghost button on New report and
Editor headers; the brand itself is already a link to "/", so two
controls were doing the same job. Aria label preserved on the
brand link.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
`listen ${PORT:-8080};` in docker/nginx.conf used bash-style default
expansion. envsubst (GNU gettext) does not implement `:-default`; it
either leaves the token literal or substitutes only `${PORT}` and
keeps `:-8080`, producing `listen 8080:-8080;`. Either way nginx
errors with "invalid port in '${PORT:-8080}' of the listen
directive" and the container restart-loops.
entrypoint.sh already exports PORT with a bash default
(`PORT="${PORT:-8080}"`) before calling envsubst, so the template
only needs `${PORT}`.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Docker Compose v2 always appends a replica index (-1) to container
names by default. Single-instance service doesn't need scaling →
pin container_name for stable references in scripts and docs.
DEPLOY.md log-prune command updated to match.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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>
Prior pin pnpm@11.1.3 was insufficient — pnpm 11.x itself imports
`node:sqlite` and requires Node 22.13+, not just 11.4 as the previous
blocker entry assumed. Local builds passed only because no `pnpm
install` ran on Node 20 (lockfile already resolved). VPS cold build
still crashes `ERR_UNKNOWN_BUILTIN_MODULE: node:sqlite`.
Switch to pnpm 10.13.1 — already cached on the dev host via corepack,
last major before the node:sqlite cache backend, reads lockfile v9.0
unchanged.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- 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>
`corepack prepare pnpm@latest` now resolves to pnpm >=11.4, which
imports `node:sqlite` and requires Node 22.13+. The builder stage
runs `node:20-alpine`, so the install crashes with
`ERR_UNKNOWN_BUILTIN_MODULE: node:sqlite`. Pinning to the same
version the host already uses (pnpm 11.1.3) restores a reproducible,
Node-20-safe build.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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>
First versioned changelog for the project. v1.0.0 entry covers the
shipped state on master at this commit: scaffold + B0..B3 (findings
schema, Report v2, FindingsTreePicker, i18n FR/EN), catalog v2.0
adoption, WinAnsi PDF hotfix, docs refresh, branch rename main →
master, push to https://git.bchanot.fr/bchanot/osteo-report.git.
Added / Changed / Fixed sections + Known limitations + a "Pre-1.0
milestones" appendix referencing git history for the un-tagged
scaffold / editor-polish / findings-tree-pivot / catalog-v2.0
sessions.
Note: package.json `version` field is still 0.1.0 — bump to 1.0.0
deliberately deferred until you're ready to tag the release on the
Gitea remote.
- 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.
Root cause: src/pdf/fonts.ts embeds StandardFonts.Helvetica /
HelveticaBold / TimesRoman, which use WinAnsi encoding (Latin-1
only). PDF export threw `WinAnsi cannot encode "⚠" (0x26a0)` the
moment the text-height estimator measured a vet-flagged leaf
label (countSegmentedLines → widthOfTextAtSize).
Fix: replace the PDF prefix "⚠ " with WinAnsi-safe "(!) ". The
picker DOM keeps the original "⚠" since browsers render U+26A0
natively — the limitation is purely on the PDF side.
Regression test exercises embedFonts + widthOfTextAtSize on a
realistic prefixed label; would catch any future non-WinAnsi
marker re-introduction.
Follow-up (not in scope): switch the PDF body to embedded TTF
(Inter / Fraunces per CLAUDE.md spec) so the catalog can carry
arbitrary glyphs. CLAUDE.md states TTFs should be used; current
StandardFonts is a drift from intent.
155/155 tests green, typecheck clean.
- schema_version "2.0" everywhere; new Changelog section with
v1.0 → v2.0 entries highlighting the breaking change.
- New Scope (legal périmètre) section listing inclusions / exclusions
and the two flag mechanisms (root scope_disclaimer + leaf boolean).
- Clarified SVG ↔ JSON link via strict label equality (not data-anno-id)
and cranio-caudal zone ordering rule.
- Documented the 3 standardized categories per zone
(*-dysfunctions / *-observations / anamnesis) and the 5 dysfunctions
taxonomy patterns (head SSB / head peripheral / articular /
vertebral hinge / vertebral region).
- Documented structural authoring rules (depth ≤ 4, ≥ 2 children per
intermediate, sibling-scoped ID uniqueness).
- Spelled out the v2.0 requires_vet_referral / description_fr policy
(boolean = source of truth; description_fr survives only on
differential leaves) and the breaking-change notice for any consumer
relying on description_fr.includes('vétérinaire').
- Rewrote the minimal example using v2.0 contract (boolean only,
description_fr only when it adds a differential).
- Noted Zod's silent strip of unknown fields (e.g. species.notes,
per-leaf metadata).
- Added current horse.json stats table (26 zones / 792 nodes /
612 leaves / 41 vet leaves).
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.
- localeStore.readInitial now consults navigator.language(s) when
localStorage is empty (first fr/en hit, FR fallback). Persisted user
choice still wins.
- New helper src/anatomy/labels.ts (boneLabel(b, locale, fallback))
with cross-language fallback so missing labels never render blank.
- AnatomyCanvas rewrites native SVG <title> tooltips per locale on
mount and on locale change (upstream SVG ships titles as "FR / EN"
concat; we replace with the active-locale label only). Detail-popup
trigger titles ("🔍 Zoom: …") left intact.
- DetailModal + EditorRoute detail title prefix + vertebra picker
title now route through useT()/boneLabel.
- ObservationCard.describeZone takes locale, picks bone.fr / bone.en.
- PDF: buildZoneLabels returns Map<id, { fr, en }> instead of FR-only;
observationPage picks per locale with cross-language fallback.
- Tests: FindingsTreePicker + VertebraPicker reset locale to 'fr' in
beforeEach (navigator-detect may land on EN in happy-dom).
- pdf.zoneLabels test updated to assert the new pair shape.
154/154 tests pass, lint clean, typecheck clean, build OK.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Review surfaced 3 critical paths where hardcoded French leaked into
the EN UI:
- src/pdf/import.ts ImportError default message
- src/pdf/attachment.ts IncompatibleReportVersionError message
- src/app/routes/HomeRoute.tsx propagated err.message verbatim
Refactor:
- ImportError carries a typed `kind` discriminant
('invalid_pdf' | 'incompatible_version' | 'no_attachment') plus
optional `foundVersion`. Removes hardcoded localized strings.
- IncompatibleReportVersionError keeps `foundVersion` only; message
collapses to an internal sentinel.
- HomeRoute resolves the user-facing message via the active i18n
dict using `err.kind`, with `{version}` template substitution for
the incompatible-version case.
- 3 new dict keys (fr+en): home.import.error_invalid_pdf,
home.import.error_no_attachment, home.import.error_incompatible_version
- pdf.roundtrip v1 case asserts ImportError instance + kind +
foundVersion instead of grepping the message text.
154/154 tests pass, lint clean, typecheck clean, build OK.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
3 new cases:
- exports with locale=fr roundtrips
- exports with locale=en roundtrips
- both produce non-empty byte streams and the imported JSON payloads
match (locale lives outside the Report, so finding labelFr/EnSnapshot
are byte-identical between exports — only the static dict labels
rendered into the PDF differ, verified manually since pdf-lib font
subsets make byte-grep unreliable per LRN-016)
154/154 tests pass.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>