LearnNewsExamplesServices
Frontmatter
id19368
titleStore append loads drop or replace rows and reset the grid
stateClosed
labels
bugaicore
assigneesneo-gpt-sophie
createdAtOct 2, 2026, 9:58 PM
updatedAtOct 2, 2026, 10:34 PM
githubUrlhttps://github.com/neomjs/neo/issues/19368
authorneo-gpt-sophie
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtOct 2, 2026, 10:34 PM

Store append loads drop or replace rows and reset the grid

neo-gpt-sophie
neo-gpt-sophie commented on Oct 2, 2026, 9:58 PM

Context

The Store portion of #17835 is independently reproducible after the scroll-edge protocol and its Institution consumers shipped. The originating author agreed to extract this bounded repair and retire the superseded protocol prescription.

At dev@42b80fee8102664f9e9fc1d19373efabf0aa00f9, a real-Store five-arm probe confirms:

  • populated Pipeline + bulk response + append:true: the new page is swallowed;
  • populated API Store + append:true: the old rows are replaced;
  • ordinary Pipeline replacement still works;
  • the built-in Stream parser appends nonempty chunks exactly once and leaves an empty stream unchanged.

The Problem

Store.load honors append when deciding whether to clear for a Pipeline, then admits its bulk result only when count === 0. The API branch always assigns data, whose setter clears the old collection. Merely fixing membership is insufficient: an appended page reported as an ordinary load makes a bound grid reset to the top.

The Architectural Reality

  • src/data/Store.mjs:954–1077 owns transport result admission; its blob is a025804e40b3cb5ae3ee2bacb4ff835abbf60ec0.
  • Store.add owns Model conversion and normal collection notifications; afterSetData:338–351 is the replacement path.
  • onCollectionMutate:1116–1127 carries the existing postChunkLoad continuation signal. grid.Body.onStoreLoad suppresses the scroll-to-top dispatch when that signal is true. list.Buffered.onStoreLoad already preserves its scroll anchor.
  • The built-in parser.Stream emits nonempty data chunks and returns count metadata, not a second aggregate. Other parsers can emit data events; avoid adding a returned aggregate twice.
  • currentPage is an explicit caller input here. A caller selects params.page; this repair does not advance the config or add an acquisition fence.

The Fix

Repair the successful append paths in Store.load, using the existing add and continuation-notification contract. A non-progressive Pipeline result is admitted on a populated Store; the API path adds instead of replacing when requested. Appended records retain normal conversion, filtering and sorting. All load notifications caused by that append must describe continuation, including the final Pipeline notification.

Preserve ordinary replacement and existing progressive rendering. Keep any notification context local to the data commit, not across the asynchronous request. Extend the existing Store loading tests and the owning grid load/scroll tests; no new production module.

Contract Ledger

Surface Authority Behavior Fallback / edge Docs Evidence
Store.load({append:true}), bulk Pipeline Existing append option and Store.add Keep old rows and admit the fetched page once Empty result retains rows; streamed chunks are not added again from a final aggregate load JSDoc Populated, empty and stream controls
API append Existing api.read branch and collection membership Add successful response rows; resolve to the held collection, consistent with Pipeline append Unsuccessful response keeps rows and current null/refusal behavior load JSDoc Real Store with a controlled API service
Load continuation Existing postChunkLoad / grid.Body.onStoreLoad An append is incremental and does not request a scroll-to-top Non-append and unrelated later mutations/sorts retain existing semantics Event/loader JSDoc Load-envelope assertions and a bound-grid reset control
Paging input Existing params.page / currentPage Caller owns the page requested; no implicit advancement Rejection does not advance page metadata; no new streamed rollback promise load JSDoc Explicit-page and failed-read controls

Acceptance Criteria

  • A populated Store retains old rows and admits the new page for both a bulk Pipeline and a successful API append; returned data agrees with the held collection.
  • Built-in streaming, empty responses, and a data-event/final-response combination add each page once; ordinary non-append replacement remains unchanged.
  • A mounted grid receiving the append does not request a scroll-to-top; replacement still does. No append marker leaks into an unrelated later mutation/sort.
  • Failed reads retain the existing failure behavior and do not implicitly advance currentPage; the caller-owned page contract is documented.
  • Focused Store/grid tests and the relevant data/grid regression suites pass under their named configs.

Out of Scope

edgeDemand, view-owned acquisition fences, retries, automatic page-number advancement, transactional rollback of already-rendered stream chunks, Institution pane changes and Buffered-list feature expansion.

Avoided Traps

Do not remove the bulk guard in a way that re-adds progressive data. Do not use isLoading as a new single-flight guarantee or manufacture streaming state to suppress scrolling. Do not repair a Store result-admission defect in each consumer.

Related

#17835 (author-approved salvage: its independent Store defect) · #19357 / #19364 (shipped scroll-edge seam).

Decision Record impact: none — existing Store and view-notification semantics; no topology or config authority changes.

Sweeps: latest20 open Engine issues and recent all-status A2A claims read2026-10-02, no competing narrow repair. Exact search found #17835 as the encompassing predecessor; its author approved extraction. KB returned that same predecessor; raw-memory symptom sweep returned no relevant decision. Own Engine assignments: none. Structure map N/A: existing Body data class and tests, no new production module.

Origin Session ID: 308bda12-9bd8-4421-b836-138deae72eb2 Retrieval Hint: "Store append populated Pipeline bulk page swallowed API replaces rows continuation postChunkLoad"

Authored by Sophie (GPT-6 Astra, Codex Desktop).

tobiu referenced in commit d59b9eb - "fix(data): preserve Store append results and scroll position (#19368) (#19369)" on Oct 2, 2026, 10:34 PM
tobiu closed this issue on Oct 2, 2026, 10:34 PM