Commit Graph
448 Commits
Author SHA1 Message Date
Bastien ChanotandClaude Opus 4.7 b67f4cd82b feat(editor): findings tree picker + scope disclaimer + PDF render
Replaces the flat PathologyPicker with FindingsTreePicker — breadcrumb
navigation, drill into intermediate categories, toggle leaves, optional
vet-referral badge, optional description rendering. One picker per zone
that has a catalog entry; zones without a tree fall back to the free-text
input (renamed FreeTextFindingInput to match the new vocabulary).

EditorRoute now loads SpeciesFindings instead of a Pathology[] and shows
the scope_disclaimer once per session via a sessionStorage flag so the
practitioner is reminded of the legal perimeter the first time.

PDF observationPage renders findings via the snapshotted FR label and
prefixes ⚠ on vet-referral items, keeping the existing layout pipeline
intact (LRN-007/008/009 still apply).

Also drops the unused Toast and ZoneTooltip stubs, refreshes the
CLAUDE.md folder map, and adds a FindingsTreePicker test covering
navigation, leaf toggle, vet-referral flag, and back-out.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 03:49:11 +02:00
Bastien ChanotandClaude Opus 4.7 d08d773d74 feat(schema): bump report to v2 + observation findings + drop pathology
ObservationSchema now carries a hierarchical Finding (zoneId + path +
labelFrSnapshot + labelEnSnapshot + requiresVetReferral?) plus a renamed
freeTextFindings list, replacing the flat pathologyIds /
freeTextPathologies pair. Snapshot labels keep already-exported reports
readable if the catalog is later edited.

ReportSchema.version bumped from 1 → 2. PDF import surfaces a distinct,
French-language error message on legacy v1 attachments instead of the
generic "not an osteo PDF" line, via a new IncompatibleReportVersionError
detected before the strict Zod parse runs.

Store seed and tests updated for the new shape. The standalone Pathology
Zod schema and its test are removed — the new findings tree is the single
source of truth for what an observation can carry.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 03:48:57 +02:00
Bastien ChanotandClaude Opus 4.7 f80e161d61 feat(schema): add findings tree + parse species JSON via Zod
Replaces the flat Pathology[] model with a hierarchical SpeciesFindings
tree (zones → categories → nested children → leaves) authored as JSON and
validated at boot. Equine catalog JSON is now wired through
SpeciesFindingsSchema.parse() so malformed data fails loudly instead of
corrupting an observation later.

Species manifest swaps `pathologies` loader for `findings`. JSON species
id renamed equin → equine to match the registry. Old equine pathology
test deleted; new findings test covers parse + FR/EN label coverage +
zone/category/leaf structure.

Foundational step of the v2 domain pivot; callers in observation/store/
UI/PDF migrated in follow-up commits.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 03:48:43 +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 ff7ac5969e fix(editor): scope zone highlight to active obs + repaint detail SVG + harmonize header
Three related editor polish bugs from PDF-import dogfooding.

(1) boneStates previously walked every observation, marking zones
in collapsed observations as 'linked' (faint) or 'multi' (bold) —
so deselected zones kept lingering color states. Now we read only
the active observation; everything else renders neutral.

(2) AnatomyCanvas applied highlight attributes once on mount; when
the SVG (esp. inside DetailModal) loaded after the boneStates
effect had already run, the freshly-mounted nodes had no
data-state. Track loadedSrc and re-run the highlight effect after
each SVG swap so detail-popup zones get colored on open.

(3) NewReportRoute had "← Accueil" on the right while EditorRoute
keeps it on the left — disorienting. Both headers now share the
same left-aligned back-button + clickable Brand pattern.

Deviation: hotfix rule caps at 2 files, this touches 3. Each fix
is mechanical and obvious; bundling is cheaper than three separate
patches.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-19 06:55:16 +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 2cfc49df04 fix(pdf): pack observation SVGs into 2-column grid, reserve text space
Multi-SVG observations previously stacked vertically and pushed
the zones/pathologies/severity/comment sections off the page.
Now SVGs are laid out 2 per row with cell width = (page - 2*margin
- col-gap)/2. Each cell scales to its own aspect, capped by a
per-row height budget that subtracts the reserved bottom (text
sections + bottom margin) from the available image area. Single-
SVG observations keep a full-width row.

Safety: the text-area reservation guarantees the sections always
fit; the cell-height cap prevents runaway when many details are
selected. A floor (IMAGE_MIN_CELL_H) avoids zero-height cells in
pathological cases.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-19 06:42:47 +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 908790123d feat(editor): home navigation and edit-infos dialog
Header now exposes a back button and clickable brand title both
linking to /. New "Modifier les infos" button opens a dialog that
edits practitioner, animal, and owner via the existing forms with
cancel/save and required-name validation. Save also refreshes the
practitioner localStorage cache.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-19 06:27:38 +02:00
Bastien ChanotandClaude 1280f9feb8 feat(store): add practitioner/animal/owner setters
Enables in-place edit of report identity blocks from the editor.
Mirrors existing setConclusion/setRecommendations pattern; no-op
when no report is loaded.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-19 06:27:32 +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 d7ea99e040 fix(pdf): stack eyebrow + title without overlap, color-code severity pill
Eyebrow OBSERVATION / SYNTHÈSE now baseline-anchored at y=height-95;
title baseline at y=height-122. 27pt separation between baselines so
the Times-22 ascender no longer reaches into the eyebrow line.

Severity next to the observation number is rendered as a filled pill
with white uppercase label. Background color encodes severity at a
glance:
- légère  → sage green
- modérée → amber
- sévère  → red

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-19 06:14:14 +02:00
Bastien ChanotandClaude ee5b7f0277 fix(pdf): push titles below header rule + style headings and section labels
Layout:
- Title baseline dropped from height-90 to height-115 so the size-22
  ascender clears the header rule at y=760 with a real cushion.
- Image area starts further down to match.

Visual style:
- Eyebrow label (small bold accent) above each title: OBSERVATION /
  SYNTHÈSE. Title uses Times 22; observation page shows the index
  as a zero-padded number (01, 02, …) with severity as a muted
  inline note next to it.
- 2pt accent rule (48pt wide) under each title.
- Section labels (ZONES, PATHOLOGIES, SÉVÉRITÉ, COMMENTAIRE,
  CONCLUSION, RECOMMANDATIONS, PROCHAIN RENDEZ-VOUS) rendered as
  small bold uppercase accent labels with the value on the next
  line in regular body.
- Image area gets a "VUE GÉNÉRALE" / "VUE DÉTAIL — <id>" eyebrow.

Colors are inlined as rgb tokens (ink, muted, accent terracotta).
No new assets, only the three Standard fonts already embedded.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-19 06:08:12 +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 bc9a51784a fix(pdf): clear header, wrap zone line, hide non-selected zones, skip main SVG when only details
Four coupled PDF rendering bugs:
1. Title "Observation #N" and "Conclusion" overlapped the header rule
   (y = height - 80; rule at y = 760; size-16 ascender ate the line).
   Lowered both titles to y = height - 90.
2. Long zones lines visually wrapped via maxWidth but the cursor only
   advanced one slot per array entry, so pathologies/sévérité/commentaire
   collided with the wrapped tail. Added wrapLines + per-line advance.
3. The rasterized anatomy still showed unselected zones (purple spine
   fills, orange head trigger) because colorizedSvgString only mutated
   selected elements. Non-selected annotated elements are now hidden via
   display="none" and every data-anno-* attribute is stripped from the
   serialized output (data-anno are runtime-only hints).
4. Main SVG was drawn even when every zone lived in a detail popup.
   Render it only when at least one zone has no detailSourceId.

Layout constants extracted at the top of observationPage.ts.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-19 05:31:54 +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 6e3a839595 fix(editor): keep detail-popup bones available to ObservationCard after popup closes
Detail bones were cleared on popup close, so zone labels reverted to
raw ids (point-mpbynls5✕) once the head modal was dismissed. Now the
detailBones map accumulates across opens, and a merged allBones map
(main ∪ detail) is passed to ObservationList so describeZone resolves
the FR label every time.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-19 05:18:24 +02:00
Bastien ChanotandClaude b3bd75d2e2 feat(editor): VertebraPicker preselects region tab inferred from zone label
When opened from a spine zone, the picker now lands on the matching
region tab instead of defaulting to Cervicales every time. Inference is
substring-based on the FR label first, EN as fallback (cervic→C,
thorac/dors→T, lombair/lumbar→L, sacral/sacre→S, caudal/coccyg→Cd),
case- and accent-insensitive. An existing selection still wins over
the inferred region so re-opening lands where the user left off.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-19 05:09:57 +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 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 21b678c3d5 refactor(anatomy): category becomes free-form string, no enum / no auto-trigger
User asked that the app interact with anything carrying data-anno-*
attributes without hardcoding any specific category, id, or name. Future
SVGs may introduce new categories, and the existing SVGs may be updated.

Changes:
- `BoneCategory` is now `type BoneCategory = string`. The closed union
  is gone; the parser accepts any non-empty value. New categories don't
  require code changes.
- `VALID_CATEGORIES` and `isValidCategory()` removed from
  svgConvention.ts. `validateBoneElement()` now only enforces presence
  of `data-anno-id` and `data-anno-category`.
- EditorRoute no longer auto-triggers the vertebra picker when the
  clicked annotation is `zone-colonne`. Any zone is added the same way
  to the active observation regardless of category.
- ObservationCard shows a "Vertèbres…" link on every zone badge (was
  conditional on `category === 'zone-colonne'`). The praticien picks
  vertebrae only when relevant — the UI no longer knows or cares which
  zones are spinal.
- Tests rewritten: removed the `isValidCategory` enum assertions and
  the "rejects unknown category" branch. New test demonstrates that
  parseSvgBones accepts a completely novel category string.

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

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 04:10:54 +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 e8c29c1fdf fix(editor,pdf): accordion observation cards + seed 1 obs + native SVG rasterization
Three issues from manual QA:

1. UX restructure — observations are now an accordion list. Each card has
   a header that's always visible (title + chips + chevron + action
   buttons) and a body that expands inline showing zones / pathologies /
   severity / comment. Click the header (or the chevron) to toggle.
   ObservationEditor has been merged into ObservationCard so each card
   owns its own details. Only one observation is expanded at a time; the
   chevron on the active card collapses everything. EditorRoute uses
   activeObservationIndex === -1 to represent "all collapsed".

2. App used to start with 2 observations instead of 1. Root cause:
   EditorRoute had a "seed first observation" useEffect that fired twice
   under React 19 StrictMode in dev, both invocations seeing length=0 and
   queueing addObservation(). Fixed by moving the seed into the store's
   initReport (synchronous, one-shot) and removing the useEffect entirely.
   Store tests updated to assert the seed behaviour (90/90 pass).

3. PDF export still failed with "The input is not a PNG file!" — canvg
   was returning bytes that pdf-lib rejected at embedPng(). Switched
   rasterizeSvg to the browser-native pipeline: serialize the SVG into a
   Blob URL, load it with an Image element, drawImage onto a 2D canvas,
   then toBlob → PNG bytes (with a toDataURL fallback). Validates the
   PNG signature before returning. Tree-shaking dropped canvg from the
   bundle (979 kB → 874 kB JS).

Tests updated for the new initReport behaviour and the new svgToPng
pipeline (Image mock + dataURL fallback case). lint + typecheck + build
all clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 23:32:01 +02:00
Bastien ChanotandClaude Opus 4.7 bdf5e6475b fix(bugs): obs card click + next-RDV radio + PDF toBlob fallback + head svg interactivity
Five fixes from manual QA:

1. ObservationCard — clicking anywhere on the card now selects it.
   The wrapping button only covered the text rows; empty space was dead.
   The whole card is now role="button" with keyboard (Enter/Space) support;
   inner action buttons (↑ ↓ 🗑) stop propagation so they don't double-fire.
   This was also the root cause of "details look stuck" — the active
   observation simply wasn't being switched.

2. NextAppointmentPicker — when value === undefined the "Date" radio was
   still showing as checked because `kind` defaulted to 'date'. The three
   radios now read from the raw `value?.kind` (which can be undefined),
   so "Aucun" is the only checked option when no next RDV is set.

3. svgToPng.rasterizeSvg — `canvas.toBlob` can return null in some
   browsers when the canvas state is unusual; the call now falls back to
   `canvas.toDataURL('image/png')` and decodes the base64 payload. Also
   paints a white background before canvg renders (so the PDF embed is
   opaque) and clamps width/height to >= 1px to avoid zero-area canvases.
   canvg errors are caught + logged instead of propagating, so the export
   still produces a (possibly blank) page rather than throwing.

4. svgConvention.parseSvgBones — clickable bones are now distinguished
   from decorative ones. Interactive = has a hitbox element OR category
   is spine-zone OR head. Decorative bones (teeth, malar, mandible,
   nasal-bone, facial-crest, individual vertebrae paths…) get
   `pointer-events: none` applied to their elements and are excluded from
   the returned map. Result: in Horse_head.svg, frontal/temporal/parietal/
   sphenoid/occipital/atm/ssb/c0-c1/hyoid become clickable as intended,
   while teeth / malar / mandible no longer intercept the clicks.

5. (covered by #1) — the per-observation details panel always read the
   active observation; the bug was the click handler scope. Confirmed by
   switching observations: the editor section now updates immediately.

88 tests still pass, lint clean, build clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 22:48:13 +02:00
Bastien ChanotandClaude Opus 4.7 9a99fc916b docs: reframe as multi-praticien + multi-species (equine = first data set, not specialization)
The app is open to any praticien who wants to use it (not 'single-praticien'),
and the architecture is multi-species — equine ships first, dog/cat/goat/cow/
pig/rabbit/donkey/sheep come as pure data drops following the same convention.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 22:20:03 +02:00
Bastien ChanotandClaude Opus 4.7 cfefde6aab docs(readme): sync status to v1.0 MVP complete (88 tests, build clean)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 22:16:59 +02:00
Bastien ChanotandClaude Opus 4.7 188e79e76d fix(review): address code-review yellows — onExport catch, vertebra picker fresh-read, draft validation
Three impactful fixes from the post-impl code review:

1. EditorRoute.onExport now catches PDF generation failures, logs to
   console, and alerts the praticien in French — previously errors were
   swallowed by try/finally with only `setExporting(false)`.
2. VertebraPicker onConfirm reads the active observation from the store
   at confirm time instead of closing over the render-scope `activeObs`.
   Prevents mutating a stale observation if the praticien switches active
   observation while the picker is open.
3. readPersistedDraft validates the parsed JSON with ReportSchema instead
   of a raw `as Report` cast. Corrupted drafts now return null cleanly
   rather than poisoning the store.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 22:16:12 +02:00
Bastien ChanotandClaude Opus 4.7 dabab59656 chore: drop dead svgToPngDataUrl stub (replaced by pdf/render/svgToPng.rasterizeSvg)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 22:06:26 +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 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 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 a33693580f fix(lint): escape JSX entities and narrow useEffect dep
Escape French apostrophes/quotes in JSX text per react/no-unescaped-entities
and replace the report?.observations.length dependency with a derived
observationsCount value so react-hooks/exhaustive-deps is satisfied without
re-firing on every report change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 22:00:15 +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 Chanot 97ab4f67d1 feat(pdf): importReportFromPdf with ImportError on non-osteo PDFs 2026-05-18 21:55:03 +02:00
Bastien Chanot cf57297d2d feat(pdf): exportReportToPdf orchestrator with finalized page numbering 2026-05-18 21:53:55 +02:00
Bastien Chanot fb9a8fc3bd feat(pdf): attach + extract report JSON via pdf-lib (with fallback traversal) 2026-05-18 21:53:26 +02:00
Bastien Chanot 1c0b507458 feat(pdf): addConclusionPage with wrapped conclusion + recommendations + next RDV 2026-05-18 21:46:23 +02:00
Bastien Chanot 384d2918d4 feat(pdf): addObservationPage with rasterized colorized SVG + summary 2026-05-18 21:45:58 +02:00
Bastien Chanot 6cbc6ce328 feat(pdf): drawFooter with brand from runtime config 2026-05-18 21:45:26 +02:00
Bastien Chanot 099ebf326b feat(pdf): drawHeader with practitioner + animal/owner/date 2026-05-18 21:45:05 +02:00
Bastien Chanot ba30e0dbaf feat(pdf): embed Helvetica + Times-Roman standard fonts (MVP) 2026-05-18 21:44:25 +02:00
Bastien Chanot 55d9c32076 feat(pdf): rasterize SVG via canvg → PNG bytes 2026-05-18 21:43:58 +02:00
Bastien Chanot 3ea8f522c0 test(species): pin pathology DB integrity contract (empty allowed in v1) 2026-05-18 21:42:15 +02:00
Bastien Chanot a3a4d4e1f6 feat(app): NotFoundRoute 2026-05-18 21:38:55 +02:00
Bastien Chanot 337f8c3aea feat(editor): wire canvas + observation panel + conclusion + export 2026-05-18 21:38:38 +02:00
Bastien Chanot 2b2a7db63c feat(new): NewReportRoute wires forms + practitioner cache 2026-05-18 21:37:24 +02:00