Context
#12219 is blocked because the tickets route is not actually running in lazy mode yet. @neo-opus-ada verified this on the issue, and a fresh dev check confirms it:
apps/portal/store/Tickets.mjs still loads ../../apps/portal/resources/data/tickets.json.
apps/portal/resources/data/tickets/index.json, manifest.json, and per-chunk files already exist from the chunked emitter work.
apps/portal/view/news/tickets/MainContainer.mjs sets lazyChildLoad: true, but that is inert while the store consumes the flat all-leaves tree.
buildScripts/docs/index/tickets.mjs explicitly emits both the legacy full tree and the chunked root-index shape.
This ticket preserves the missing prerequisite instead of silently widening #12219 or closing it against a flat-store premise.
The Problem
The Portal news perf track expects tickets to load only the root/group skeleton first, then fetch chunk leaves on folder expansion. Today the data exists, but the consumer still points at the legacy monolith. That means:
- first paint still pays the full tickets-tree payload cost;
- #12219 cannot honestly test lazy-aware deep-link/default-route behavior because
store.get(itemId) succeeds against eagerly loaded leaves;
- the epic's chunked-index work has build artifacts but no tickets-route adoption;
- switching the store naively could expose
chunk-N implementation folders as user-facing UI, which would violate the Portal news UX intent.
The Architectural Reality
Portal.store.Tickets owns the tickets tree data source.
buildScripts/docs/index/tickets.mjs owns the emitted legacy and chunked ticket index artifacts.
src/app/content/TreeList.mjs owns opt-in lazyChildLoad folder expansion using childrenUrl.
apps/portal/view/news/tickets/MainContainer.mjs already opts into lazyChildLoad, but the current store shape does not contain lazy folders.
- #12219 owns deep-link/default-route controller behavior after a partial tree exists.
The store switch is therefore the activation layer between the emitter/mechanism work and the controller work.
The Fix
Switch the tickets route from the legacy flat tickets.json consumer to the chunked tickets root index, while preserving the intended user-facing tree behavior.
The implementation must decide and verify the UI contract for chunk folders: either chunk folders are an internal lazy unit hidden from the human-facing tree, or they are rendered in a deliberate, acceptable grouping shape. The default assumption should be that raw chunk-N implementation labels are not a polished Portal UI.
Contract Ledger Matrix
| Target Surface |
Source of Authority |
Proposed Behavior |
Fallback |
Docs |
Evidence |
Portal.store.Tickets.url |
This ticket + #12204 Track B |
Loads the chunked tickets root index rather than the full legacy tree |
Keep tickets.json only until this adoption lands |
Store JSDoc |
Unit/runtime check proves initial store lacks eager leaves |
| Tickets tree lazy folders |
ADR 0004 chunk-folder architecture + TreeList.lazyChildLoad |
Expanding a folder fetches its childrenUrl leaves on demand |
If a chunk fetch fails, retain visible parent and surface load failure without corrupting selection |
TreeList / tickets route docs as needed |
Test with root skeleton before and after folder expansion |
| Tickets route UX |
#12204 “Portal news” intent |
Avoid exposing raw implementation-only chunk-N labels unless explicitly accepted as the UX |
Retain current flat tree until a non-regressive UX is implemented |
PR evidence / screenshot or NL check |
Visual or DOM evidence on Tickets tab |
| #12219 controller prerequisite |
#12219 |
After this ticket, #12219 can test deep-link/default-route behavior against a genuinely partial tickets tree |
#12219 remains blocked while store is flat |
Comment linkage |
store.get(itemId) for an unloaded leaf fails until chunk fetch |
Decision Record Impact
Aligned with ADR 0004 and #12204 Track B. No ADR amendment expected.
Acceptance Criteria
Out of Scope
- Implementing #12219 deep-link/default-route prefetch logic.
- Changing the ticket index generator shape unless a consumer contract gap is discovered during implementation.
- Changing Pull Requests or Discussions store behavior.
- Reworking ADR 0004 chunk naming or content folder layout.
Avoided Traps
- Do not code #12219 against the current flat store; that tests a dead premise.
- Do not assume
lazyChildLoad: true means lazy is active; the store data must contain childrenUrl folder nodes.
- Do not expose raw chunk implementation labels as a finished human-facing UI without explicit evidence that this is acceptable.
- Do not delete the legacy
tickets.json output in this ticket unless every consumer and release/data-sync path is verified.
Related
Origin Session ID: f3165fbb-7c0e-4790-8a97-b2557f5340e3
Handoff Retrieval Hints: Portal.store.Tickets tickets/index.json lazyChildLoad childrenUrl #12219 flat store blocked; buildScripts/docs/index/tickets.mjs legacy full-tree chunked root-index.
Context
#12219 is blocked because the tickets route is not actually running in lazy mode yet. @neo-opus-ada verified this on the issue, and a fresh
devcheck confirms it:apps/portal/store/Tickets.mjsstill loads../../apps/portal/resources/data/tickets.json.apps/portal/resources/data/tickets/index.json,manifest.json, and per-chunk files already exist from the chunked emitter work.apps/portal/view/news/tickets/MainContainer.mjssetslazyChildLoad: true, but that is inert while the store consumes the flat all-leaves tree.buildScripts/docs/index/tickets.mjsexplicitly emits both the legacy full tree and the chunked root-index shape.This ticket preserves the missing prerequisite instead of silently widening #12219 or closing it against a flat-store premise.
The Problem
The Portal news perf track expects tickets to load only the root/group skeleton first, then fetch chunk leaves on folder expansion. Today the data exists, but the consumer still points at the legacy monolith. That means:
store.get(itemId)succeeds against eagerly loaded leaves;chunk-Nimplementation folders as user-facing UI, which would violate the Portal news UX intent.The Architectural Reality
Portal.store.Ticketsowns the tickets tree data source.buildScripts/docs/index/tickets.mjsowns the emitted legacy and chunked ticket index artifacts.src/app/content/TreeList.mjsowns opt-inlazyChildLoadfolder expansion usingchildrenUrl.apps/portal/view/news/tickets/MainContainer.mjsalready opts intolazyChildLoad, but the current store shape does not contain lazy folders.The store switch is therefore the activation layer between the emitter/mechanism work and the controller work.
The Fix
Switch the tickets route from the legacy flat
tickets.jsonconsumer to the chunked tickets root index, while preserving the intended user-facing tree behavior.The implementation must decide and verify the UI contract for chunk folders: either chunk folders are an internal lazy unit hidden from the human-facing tree, or they are rendered in a deliberate, acceptable grouping shape. The default assumption should be that raw
chunk-Nimplementation labels are not a polished Portal UI.Contract Ledger Matrix
Portal.store.Tickets.urltickets.jsononly until this adoption landsTreeList.lazyChildLoadchildrenUrlleaves on demandTreeList/ tickets route docs as neededchunk-Nlabels unless explicitly accepted as the UXstore.get(itemId)for an unloaded leaf fails until chunk fetchDecision Record Impact
Aligned with ADR 0004 and #12204 Track B. No ADR amendment expected.
Acceptance Criteria
Portal.store.Ticketsconsumes the chunked tickets root-index shape rather than the legacy all-leavestickets.jsonpayload.childrenUrlleaves and inserts them under the correct parent without duplicate records.Out of Scope
Avoided Traps
lazyChildLoad: truemeans lazy is active; the store data must containchildrenUrlfolder nodes.tickets.jsonoutput in this ticket unless every consumer and release/data-sync path is verified.Related
Origin Session ID: f3165fbb-7c0e-4790-8a97-b2557f5340e3
Handoff Retrieval Hints:
Portal.store.Tickets tickets/index.json lazyChildLoad childrenUrl #12219 flat store blocked;buildScripts/docs/index/tickets.mjs legacy full-tree chunked root-index.