#291: facet hierarchy tree for Sampled Feature + Specimen Type#294
Merged
rdhyee merged 1 commit intoJun 18, 2026
Merged
Conversation
… Specimen Type Generalizes the material-specific tree machinery to a dim-parameterized model over all three hierarchical dims (material, context=Sampled Feature, object_type=Specimen Type). source stays flat. The data pipeline already builds tree_summaries + membership for all three. - TREE_DIM_BODY / TREE_DIM_KEYS config (OJS cells). - treeActive(key) / treeSelection(key) / syncTreeVisual(bodyId) replace the material-specific helpers; renderTreeFacet(facetType, bodyId, flatItems, allLabel). - facetFilterSQL, writeQueryState, applyQueryToFacetFilters, describeCrossFilters, buildCrossFilterWhere, updateCrossFilteredCounts all loop/key by dim: tree dim → membership (facet_type='<key>'); flat → facets_v3. Per-dim live-count gate (zoomed→membership, global→baseline) and per-dim flat fallback. Verified (202608): all three trees render (material 18 / context 21 / object_type 14 nodes, correct roots + counts), each filters via membership, material coherence legend==table holds, multi-dim selections register + round-trip to the URL. 10 facet-tree specs + smoke green; render clean (OJS parse OK). Codex: no blocking findings (validated 3 simultaneous tree filters coherent natively). Known follow-up (isamplesorg#293): multi-tree filtering does N membership scans (one per selected tree dim) — fast natively but slow in WASM at scale; single-dim (the common case) is fast. Combine into one scan / add a cube. (The global-view live-count baseline gate from isamplesorg#290 also applies per-dim.) Heavy live-count integration specs retry under accumulated WASM load (gated/local, not CI). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#291 — extend the facet hierarchy tree to Sampled Feature + Specimen Type
Follow-up to the shipped Material tree (#281/#282 + live counts #290). Now all three hierarchical facets render as expandable trees: Material, Sampled Feature (context), Specimen Type (object_type).
sourcestays flat. Caveat #1 from the Slack note (material-only) → closed.What
Generalizes the previously material-specific machinery to a dim-parameterized model:
TREE_DIM_BODY/TREE_DIM_KEYSconfig;treeActive(key)/treeSelection(key)/syncTreeVisual(bodyId)replace thematerial*helpers;renderTreeFacet(facetType, bodyId, …).facetFilterSQL,writeQueryState,applyQueryToFacetFilters,describeCrossFilters,buildCrossFilterWhere,updateCrossFilteredCountsall loop/key by dim — tree dim → membership (facet_type='<key>'), flat →facets_v3. Per-dim live-count gate (zoomed → membership, global → baseline) and per-dim flat fallback.Verified (202608)
quarto renderclean (OJS parse OK).Known follow-up (filed #293)
Multi-tree filtering issues one membership scan per selected tree dim (AND-ed) — fast natively (~0.1s) but slow in WASM at scale; single-dim (the common case) is fast. Collapse into one scan / cube. (The #290 global-view live-count baseline gate also applies per-dim — counts at global view aren't cross-filtered; #290's cube follow-up covers it.)
Heavy live-count integration specs
retryunder accumulated WASM load (gated/local, not CI).🤖 Generated with Claude Code