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>
This commit is contained in:
Bastien ChanotandClaude committed 2026-05-20 06:21:39 +02:00
1 parent 70f21ccf37
commit bffa6fba26
3 files changed
+67

No files matched your search

+20
View File
@@ -47,3 +47,23 @@ Bundled B0+B1+B2 shipped on feat/findings-tree-v2. 3 atomic commits.
- 107/107 tests green, lint 0 warn, typecheck clean, vite build OK (882KB main + 15KB lazy pathologies chunk).
- BDR-009 (snake_case JSON fields preserved in TS), LRN-011 (Zod recursive via z.lazy + explicit ZodType<T>), LRN-012 (sessionStorage flag pattern for once-per-session UX modals) to capitalize.
- NEXT: push branch + PR. After merge: B3 (i18n FR/EN) + B4 (PDF observationPage polish for vet-referral) + C (full horse.json + QA + deploy).
---
## 2026-05-20 (session 2)
Iterated on the findings-tree branch — 11 more commits on top of B0+B1+B2.
- 1731adf fix(editor): match findings tree to SVG zones via FR label (strict equality, dropped raw-boneId lookup).
- 95d746b feat(editor): fuzzy zone matcher (src/lib/zoneMatch.ts) — normalize + Levenshtein, EN-first + FR fallback. 23 new tests.
- 34acb0c feat(editor): count badges on intermediate FindingsTreePicker nodes (pathStartsWith + countSelectedUnder).
- 93294a4 fix(pdf): buildZoneLabels per-source try/catch + parallel + warn + exported for tests. Fixes raw-boneId fallback when detail SVG fetch fails.
- 1e12f22 fix(editor): EditorRoute eagerly preloads every species.details SVG so re-imported PDFs render their pickers immediately.
- de40c5f feat(editor+pdf): per-zone PDF sections "CONSTATS — <ZONE>" + dedicated "CONSTATS LIBRES"; ObservationCard accordion (one zone picker open at a time).
- add408e feat(pdf): single-SVG observations halved + centered; first halo glow on main-view selections.
- 4f8ea9e fix(pdf): bumped halo with stacked feGaussianBlur (stdDeviation 18 + 8) to survive the SVG→canvas→PNG→pdf-lib alpha attenuation.
- 700567f feat(pdf): inter-item separator rendered as accent-coloured bold "•" @14pt with per-segment layout instead of plain join (height-estimator updated).
- 70b7f20 feat(species): auto-discover species via import.meta.glob default-export contract + `pnpm scaffold:species` Node script + docs refresh.
- 70f21cc docs: PATHOLOGIES-FORMAT.md — canonical findings-JSON spec mirroring src/domain/schema/findings.ts.
- BDR-012 (auto-discovery import.meta.glob), BDR-013 (fuzzy FR/EN label bridge), LRN-013 (glob+default plugin pattern), LRN-014 (normalize+Levenshtein cross-walk), LRN-015 (per-source try/catch), LRN-016 (pdf-lib subset-font bytes-grep caveat) captured.
- Tests 139/139 green, lint 0, typecheck clean, vite build OK throughout. Branch feat/findings-tree-v2 = 15 commits ahead of main, no remote configured (push + PR still pending).
- NEXT: push branch + PR; then B3 (i18n FR/EN), B4 (PDF observationPage vet-referral polish), C (full horse.json + QA + Scaleway deploy).