Files
faunosteo/tests
Bastien ChanotandClaude 34acb0cc94 feat(editor): badge selected-count on findings tree intermediate nodes
When drilling through the findings catalog, intermediate categories
and sub-categories now carry a rounded accent-coloured badge that
counts every selected leaf in their subtree. Sibling nodes with no
descendant selections stay badge-free, so the practitioner can scan
a level and see at a glance which branches already hold findings
without re-opening each one.

Implementation is a small `pathStartsWith` helper plus a `countSelectedUnder`
lookup against the current observation's findings — restricted to the
picker's `zoneId` so two parallel pickers on the same card never
cross-contaminate counts.

5 new tests cover: count of 2 visible at root, the same 2 visible one
level deeper on the right sub-branch, no badge on un-selected siblings,
singular aria label for 1 selection, and zone isolation.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-20 04:45:45 +02:00
..