Context
A live grid over a large Turbo Mode store (autoInitRecords: false) is fed by a producer that edits many rows per tick. Today every edit goes through a record. Store#get(key) hydrates the raw row (src/data/Store.mjs:876–888), and record.set() fires recordChange for that row. The store re-applies filters and sorters per record (onRecordChange, :1658), and the grid's Body handles each event on its own (src/grid/Body.mjs:644–645).
So a producer that edits N rows per tick pays N events and N hydrations per tick. The records stay for the session: touching every row of a 100,000-row store hydrates all of them.
The Problem
Neither cost buys anything when the edits land together. A grid renders only its visible rows, a few dozen. Turbo Mode exists so that raw rows stay raw until something needs a record, and per-row edits defeat it.
The Architectural Reality
- Turbo Mode:
Neo.data.Store keeps raw objects and sorts and filters them (Store.mjs:34–65). get() and getAt() hydrate (:876–897).
onRecordChange (:1658) re-filters and re-sorts per changed record before it fires recordChange.
- A record can change silently (
setSilent, src/data/RecordFactory.mjs), which fires nothing.
Neo.grid.Body follows load and recordChange (Body.mjs:644–645). Its createViewData(false, true) refreshes the visible rows even when record identity is stable. onStoreLoad (:1570) wraps that call but also scrolls the view to the top 50 ms later.
- Prior art (March 2026): a silent update of mounted records left stale rows, because nothing told the grid to refresh. A batch must always end in one refresh.
- Design authority: n/a: this adds a path and calls no existing behavior wrong.
The Fix
Neo.data.Store takes a batch of row edits, [{key, values}]; the method name is the implementer's.
- Raw rows are written in place, without hydrating them.
- Rows that are already records adopt their values together (
RecordFactory#applyPreparedFields) and publish recordChange with isBatch: true. Records have observers (the grid's AnimatedChange column, grid.View, record observers), and a record written silently is the stale-row class above. Refined at implementation, PR #20975; the ticket first said "updated silently".
- Filters and sorters are reapplied once.
- One batch event names the changed keys.
Neo.grid.Body follows that event with a handler that calls createViewData(false, true). The visible rows re-render once, without onStoreLoad's scroll to the top.
- A subclass can extend the batch. A grouping store, for example, applies each row's contribution and flushes its groups once.
Contract Ledger
| Target surface |
Source of authority |
Proposed behaviour |
Fallback / edge |
Docs |
Evidence |
Neo.data.Store batch edit (new) |
This ticket |
Writes raw rows in place; hydrated records adopt their values together and publish recordChange with isBatch; reapplies filters and sorters once; fires one batch event |
An unknown key is skipped and reported; an empty batch fires nothing |
Store JSDoc |
Unit |
Neo.grid.Body batch handler (new) |
createViewData |
Re-renders the visible rows once per batch and keeps the scroll position |
— |
Body JSDoc |
Unit and e2e |
recordChange (existing) |
onRecordChange |
Unchanged for single edits; a batch fires it only for rows that already are records, with isBatch: true, never for raw rows |
— |
Store JSDoc |
Unit |
Acceptance Criteria
Out of Scope
Changing how a single record.set() behaves; server-side batching; what a subclass does with its own derived state; the containers' bulkUpdateRecords (#20974).
Related
#20928 (canonical keys at the Store boundary; the batch's keys go through it) · #20185 (100,000 rows in a browser grid) · #20974 (the containers' bulkUpdateRecords moves onto the batch)
Ownership: self-assigned (Grace).
Live latest-open + closed sweep: checked latest 20 open (52 open, red band; no owning epic for store write paths) + closed search ("store batch update records one event Turbo": #18269 read, unrelated) and open search ("batch update records store event": #20185, #20498, both unrelated) at 2026-11-14T19:58Z; A2A recent claims: none on Store write paths; Memory Core problem-noun search: the March 2026 Turbo Mode and stale-row design threads, cited above; own assignments (#20964, #20952, #20911, #20884, #20790) do not overlap. No equivalent found.
Retrieval Hint: "Turbo Mode store batch row edits one event no hydration grid createViewData refresh"
Context
A live grid over a large Turbo Mode store (
autoInitRecords: false) is fed by a producer that edits many rows per tick. Today every edit goes through a record.Store#get(key)hydrates the raw row (src/data/Store.mjs:876–888), andrecord.set()firesrecordChangefor that row. The store re-applies filters and sorters per record (onRecordChange,:1658), and the grid's Body handles each event on its own (src/grid/Body.mjs:644–645).So a producer that edits N rows per tick pays N events and N hydrations per tick. The records stay for the session: touching every row of a 100,000-row store hydrates all of them.
The Problem
Neither cost buys anything when the edits land together. A grid renders only its visible rows, a few dozen. Turbo Mode exists so that raw rows stay raw until something needs a record, and per-row edits defeat it.
The Architectural Reality
Neo.data.Storekeeps raw objects and sorts and filters them (Store.mjs:34–65).get()andgetAt()hydrate (:876–897).onRecordChange(:1658) re-filters and re-sorts per changed record before it firesrecordChange.setSilent,src/data/RecordFactory.mjs), which fires nothing.Neo.grid.BodyfollowsloadandrecordChange(Body.mjs:644–645). ItscreateViewData(false, true)refreshes the visible rows even when record identity is stable.onStoreLoad(:1570) wraps that call but also scrolls the view to the top 50 ms later.The Fix
Neo.data.Storetakes a batch of row edits,[{key, values}]; the method name is the implementer's.RecordFactory#applyPreparedFields) and publishrecordChangewithisBatch: true. Records have observers (the grid'sAnimatedChangecolumn,grid.View, record observers), and a record written silently is the stale-row class above. Refined at implementation, PR #20975; the ticket first said "updated silently".Neo.grid.Bodyfollows that event with a handler that callscreateViewData(false, true). The visible rows re-render once, withoutonStoreLoad's scroll to the top.Contract Ledger
Neo.data.Storebatch edit (new)recordChangewithisBatch; reapplies filters and sorters once; fires one batch eventNeo.grid.Bodybatch handler (new)createViewDatarecordChange(existing)onRecordChangeisBatch: true, never for raw rowsAcceptance Criteria
recordChange(unit).Out of Scope
Changing how a single
record.set()behaves; server-side batching; what a subclass does with its own derived state; the containers'bulkUpdateRecords(#20974).Related
#20928 (canonical keys at the Store boundary; the batch's keys go through it) · #20185 (100,000 rows in a browser grid) · #20974 (the containers'
bulkUpdateRecordsmoves onto the batch)Ownership: self-assigned (Grace).
Live latest-open + closed sweep: checked latest 20 open (52 open, red band; no owning epic for store write paths) + closed search ("store batch update records one event Turbo": #18269 read, unrelated) and open search ("batch update records store event": #20185, #20498, both unrelated) at 2026-11-14T19:58Z; A2A recent claims: none on Store write paths; Memory Core problem-noun search: the March 2026 Turbo Mode and stale-row design threads, cited above; own assignments (#20964, #20952, #20911, #20884, #20790) do not overlap. No equivalent found.
Retrieval Hint: "Turbo Mode store batch row edits one event no hydration grid createViewData refresh"