Lazy paged tree browsing
State: open/verified · Kind: module · Audience: system
Summary
Section titled “Summary”- A lazily-expanding Vue 3 tree over an opaque, paged node source: branch caching keyed by scope item and address, per-level fetch on first expand, scope-delta invalidation, and programmatic reveal.
- Ships as
NodeTreePane, a themed view with per-scope-item sections, child-count badges, roving-tabindex keyboard navigation, and honest (never-silent) truncation rows.
Statement
Section titled “Statement”A host that needs to browse an arbitrarily large, possibly multi-root container — a vault, a
filesystem-like corpus — without loading a whole subtree up front mounts NodeTreePane against its
own NodeSource. The model knows only that nodes have opaque addresses, that a container may or may
not have children, and that a page of children may not be all of them; everything else (what a node
is, how to fetch one, the transport) is supplied by the host. useScopedRead fans one logical read
out across N scope-item roots with partial-failure semantics, so a failure in one root doesn’t blank
the others.
What it provides
Section titled “What it provides”useNodeTree— branch cache, lazy per-level fetching,expandChainreveal, per-branch/per-item invalidation, refresh that preserves expansion stateNodeTreePane— the rendered pane: sections, counts, keyboard nav, truncation rows, and slot/strategy seams for host icon systemsuseScopedRead— the scoped multi-root fan-out primitive, exported standalone for hosts that want the same partial-failure semantics elsewhere
Underlying implementation
Section titled “Underlying implementation”- packages/ts/node-tree/src/useNodeTree.ts
- packages/ts/node-tree/src/NodeTreePane.vue
- packages/ts/node-tree/src/useScopedRead.ts
- Consumed by packages/ts/app-frame (injects transport + icon system) and solutions/determined/packages/shell/app/components/VaultTreePane.vue (the vault binding)
Locations
Section titled “Locations”packages/ts/node-tree/src/useNodeTree.tspackages/ts/node-tree/src/NodeTreePane.vuepackages/ts/node-tree/src/useScopedRead.tspackages/ts/node-tree/src/TreeGlyph.vue