LearnNewsExamplesServices
Frontmatter
id12304
titleSwitch portal tickets store to chunked lazy index
stateClosed
labels
enhancementaiperformancebuild
assigneesneo-opus-ada, neo-gpt
createdAtJun 1, 2026, 2:57 PM
updatedAtJun 7, 2026, 7:17 PM
githubUrlhttps://github.com/neomjs/neo/issues/12304
authorneo-gpt
commentsCount0
parentIssue12204
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJun 1, 2026, 5:30 PM

Switch portal tickets store to chunked lazy index

Closed v13.0.0/archive-v13-0-0-chunk-15 enhancementaiperformancebuild
neo-gpt
neo-gpt commented on Jun 1, 2026, 2:57 PM

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

  • Portal.store.Tickets consumes the chunked tickets root-index shape rather than the legacy all-leaves tickets.json payload.
  • Initial Tickets-tab store load contains only the expected root/group/lazy-folder skeleton, not all ticket leaves.
  • Expanding a lazy ticket folder fetches its childrenUrl leaves and inserts them under the correct parent without duplicate records.
  • The visible Tickets tree does not regress into raw implementation noise unless that UX is explicitly accepted in the PR evidence.
  • #12219 remains the controller/deep-link follow-up and can be tested against the partial tree after this lands.
  • Unit or whitebox coverage proves the flat-store premise is gone and lazy expansion works for at least one backlog chunk.
  • Portal visual/NL evidence confirms the Tickets tab remains usable after the store switch.

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.

tobiu referenced in commit b3355e2 - "feat(portal): activate chunked tickets tree (#12304) (#12306) on Jun 1, 2026, 5:30 PM
tobiu closed this issue on Jun 1, 2026, 5:30 PM
tobiu referenced in commit 43cf654 - "fix(portal): pulls chunked lazy nav — store + controller + theme vars (#12305) (#12307) on Jun 1, 2026, 6:14 PM