LearnNewsExamplesServices
Frontmatter
id19566
titleStore data assignments can declare continuation intent
stateClosed
labels
enhancementaicoregrid
assigneesneo-gpt-sophie
createdAtOct 10, 2026, 9:36 PM
updatedAtOct 10, 2026, 10:02 PM
githubUrlhttps://github.com/neomjs/neo/issues/19566
authorneo-gpt-sophie
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtOct 10, 2026, 10:02 PM

Store data assignments can declare continuation intent

Closed v13.2.0/archive-v13-2-0-chunk-24 enhancementaicoregrid
neo-gpt-sophie
neo-gpt-sophie commented on Oct 10, 2026, 9:36 PM

Context

Related: neomjs/neo-agent-institution#602. Loading older Mailbox rows must retain the reader's position. The Mailbox deliberately recomputes its complete in-memory projection so thread counts, collapse facts and fresh pooled-cell records stay coherent. It has no fetch pipeline. The existing fetched-page append path from #19368 cannot express that operation publicly.

Design authority: grid.Body.onStoreLoad already treats postChunkLoad as continuation and suppresses its normal top-reset dispatch. The operator's reading-position requirement and the Store-owned boundary are recorded on Institution #602, including Vega's independent contract read.

The Problem

A current AgentMailbox/Store probe projects 50 then 100 rows through Grid.applyBags. Both loads report postChunkLoad:false; row identities are fresh, counts correct and thread facts coherent. The grid consequently treats the continuation as a new dataset and requests a scroll to the top. An application must not call the Store's private addLoadedItems, fabricate a fetch pipeline, or restore scroll after a visible jump.

The Architectural Reality

At Engine 1c43d51e, src/data/Store.mjs owns data assignment (beforeSetData / afterSetData), record creation, filtering, and load publication. addLoadedItems already scopes a private continuation flag synchronously with try/finally; onCollectionMutate emits the existing postChunkLoad field. src/grid/Body.mjs:1314 consumes that field. The installed Engine 699bcb9b has identical Store/Grid source on these paths.

Prescription checked: Neo.data.Store owns the intent on data assignment. Grid must consume the existing notification contract; a new view-local scroll policy would treat the symptom. This is a bounded additive Body API, with no new subsystem, wire format, config primitive, or breaking default. Structure map: N/A — existing src/data/Store.mjs and existing data/grid tests; no new module placement.

The Fix

Add public synchronous store.setData(data, {continuation = false} = {}). It assigns through the existing reactive data config and scopes the existing continuation-notification context for that synchronous operation, restoring its prior value even if a config hook or listener throws. It returns no value. It does not append data, bypass hooks, alter ordinary data-assignment semantics, or fetch anything.

The downstream Mailbox will choose continuation only for an older-page extension, and continue to use ordinary replacement on a first page or subject switch. That consumer and its actual browser paging witness remain Institution #602.

Contract Ledger

Target surface Source of authority Behavior Default/fallback Docs Evidence
Store.setData(data, options) (new) existing reactive data config synchronous assignment with explicit continuation intent; same records, filtering, sorting and config hooks as direct assignment omitted/false uses ordinary load notification; returns void method JSDoc AC-1, AC-2
existing load.postChunkLoad Store.onCollectionMutate → grid.Body.onStoreLoad true during a declared continuation commit; no empty intermediate load introduced ordinary later assignments/adds/sorts keep their current notification existing event/method docs AC-1, AC-3
continuation context retirement existing addLoadedItems scoped pattern nested setData calls and thrown hooks restore the previous context later unrelated mutations do not inherit continuation method JSDoc AC-2

Decision Record impact: none. Architectural routing: ticket-intake + focused unit/browser verification; no ideation graduation needed for this additive use of an existing event contract.

Acceptance Criteria

  • AC-1: Data-config-driven stores retain assignment semantics in eager and lazy modes, with filtering/sorting and fresh record identities where the existing setter creates them. Continuation loads are marked; omitted/false remains ordinary. Test growing, shorter and empty projections without duplicate rows or incorrect counts.
  • AC-2: Config hooks remain observable; a nested explicit ordinary assignment and a thrown hook/listener cannot leak continuation into subsequent operations. No fetch or direct private-helper call is required.
  • AC-3: A mounted-grid regression observes no top-reset dispatch for continuation assignment and does observe the existing reset on ordinary assignment. Existing fetched append controls continue to pass.
  • AC-4: The API and its limits are documented. The downstream browser/installed witness remains linked on Institution #602; this Engine PR does not claim that consumer is delivered.

Out of Scope

Mailbox ownership/freshness, thread policy, selection APIs, changing ordinary grid reset behavior, a new paging mechanism, or fixing unrelated data-setter semantics.

Avoided Traps

No Grid-specific option on Store, persistent append flag, silent batching that corrupts collection counts, fake remote pipeline, or post-render scroll restoration. Reuse the current notification; do not create a parallel event family.

Related

#19368; neomjs/neo-agent-institution#602.

Sweeps: latest 20 open Engine issues and recent all-state A2A read immediately before filing on 2026-10-10; no competing Store lane. Own assignments contain only unrelated #19515. Current source/public-method enumeration and the real Store probe confirm no public in-memory continuation entry. MC recovered the original Mailbox observation; broader queries also returned old streaming discussions, treated as historical rather than current API truth. No matching completed PR found; #19368 covers fetched append and remains intact.

Origin Session ID: 3b93f03c-7a85-47e2-9dc7-3ba16a294c2b Retrieval Hint: Store setData continuation postChunkLoad in-memory Mailbox projection

tobiu referenced in commit 9e48135 - "feat(data): allow continuation intent on Store data assignment (#19566) (#19567) on Oct 10, 2026, 10:02 PM
tobiu closed this issue on Oct 10, 2026, 10:02 PM