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>
This commit is contained in:
Bastien ChanotandClaude Opus 4.7 committed 2026-05-20 03:49:11 +02:00
1 parent d08d773d74
commit b67f4cd82b
12 files changed
+473 -186

No files matched your search

+9 -5
View File
@@ -195,12 +195,16 @@ export async function addObservationPage(
const sections: Array<{ label: string; value: string }> = [
{ label: 'ZONES', value: zonesText || '—' },
]
const pathologies = [
...observation.pathologyIds,
...observation.freeTextPathologies,
const findingLabels = [
...observation.findings.map((f) =>
f.requiresVetReferral
? `⚠ ${f.labelFrSnapshot}`
: f.labelFrSnapshot,
),
...observation.freeTextFindings,
]
if (pathologies.length) {
sections.push({ label: 'PATHOLOGIES', value: pathologies.join(' · ') })
if (findingLabels.length) {
sections.push({ label: 'CONSTATS', value: findingLabels.join(' · ') })
}
if (observation.severity) {
sections.push({ label: 'SÉVÉRITÉ', value: observation.severity })