Context
Part of epic #12207 (Track B; #11372 Phase 2). V-B-A confirmed Neo Store has no fetch-children-on-expand (autoInitRecords/initialChunkSize/streaming are in-memory/instantiation features); the tree loads the whole index up front.
The Fix
Add an opt-in lazyChildLoad config to the shared src/app/content/TreeList.mjs / src/tree/List.mjs: on first folder expand, the base tree awaits onFolderItemClick() before toggling the folder. Neo.app.content.TreeList uses that hook to fetch a node chunk once and store.add() its children; the flat parentId shape slots straight into createItemLevel recursion with no structural change. Per-node isChildrenLoaded / isChildrenLoading guards. Default OFF so blog, release, and medium trees keep full-load behavior.
Acceptance Criteria
Contract Ledger
| Target Surface |
Source of Authority |
Proposed Behavior |
Fallback / Edge Case |
Docs |
Evidence |
src/tree/List.mjs onFolderItemClick(record, item, data) |
Shared tree interaction pipeline |
Await the folder hook before toggling VDOM/open state so subclasses can prepare children lazily. |
Hook default is a no-op; returning false cancels the folder toggle. |
JSDoc on hook and async click path. |
Focused tree unit coverage. |
src/tree/Accordion.mjs onItemClick() override |
Accordion selection/event semantics |
Await the base tree click pipeline, then apply Accordion selection/event behavior without rewriting record.collapsed. |
Base hook rejection propagates to awaited callers; base tree remains the collapsed-state owner. |
JSDoc return contract. |
New Accordion regression spec. |
src/app/content/TreeList.mjs lazy configs |
Portal content-tree specialization |
lazyChildLoad, lazyChildUrlPrefix, and lazyChildUrlField opt in to one-shot child-chunk fetch on first expand. |
Disabled by default; missing URL or already loaded/loading records skip fetch. |
Config JSDoc and method summaries. |
App content TreeList lazy-load spec. |
apps/portal/model/Ticket.mjs chunk metadata fields |
Portal ticket JSON chunk emitter contract |
Preserve childCount, childrenUrl, contentDir, and filePrefix on ticket tree records. |
Existing full-index records without chunk metadata remain valid. |
Model field declarations. |
Portal ticket tree fixture coverage through TreeList tests. |
apps/portal/view/news/tickets/MainContainer.mjs treeConfig |
Tickets tab is the first lazy-load consumer |
Opt only the tickets tree into lazy loading and point chunk URLs at portal data resources. |
Other portal content tabs retain current eager loading until separately opted in. |
Config surface in MainContainer. |
Build/lazy TreeList verification in PR. |
Related
Epic #12207; #11372 Phase 2. Depends on the chunked emitter (sub 12); unblocks the lazy-aware controller (sub 14).
Context
Part of epic #12207 (Track B; #11372 Phase 2). V-B-A confirmed Neo Store has no fetch-children-on-expand (
autoInitRecords/initialChunkSize/streaming are in-memory/instantiation features); the tree loads the whole index up front.The Fix
Add an opt-in
lazyChildLoadconfig to the sharedsrc/app/content/TreeList.mjs/src/tree/List.mjs: on first folder expand, the base tree awaitsonFolderItemClick()before toggling the folder.Neo.app.content.TreeListuses that hook to fetch a node chunk once andstore.add()its children; the flatparentIdshape slots straight intocreateItemLevelrecursion with no structural change. Per-nodeisChildrenLoaded/isChildrenLoadingguards. Default OFF so blog, release, and medium trees keep full-load behavior.Acceptance Criteria
lazyChildLoadis off.Contract Ledger
src/tree/List.mjsonFolderItemClick(record, item, data)falsecancels the folder toggle.src/tree/Accordion.mjsonItemClick()overriderecord.collapsed.src/app/content/TreeList.mjslazy configslazyChildLoad,lazyChildUrlPrefix, andlazyChildUrlFieldopt in to one-shot child-chunk fetch on first expand.apps/portal/model/Ticket.mjschunk metadata fieldschildCount,childrenUrl,contentDir, andfilePrefixon ticket tree records.apps/portal/view/news/tickets/MainContainer.mjstreeConfigRelated
Epic #12207; #11372 Phase 2. Depends on the chunked emitter (sub 12); unblocks the lazy-aware controller (sub 14).