Context
Neo.grid.column.AnimatedChange, and AnimatedCurrency through it, marks a cell when its record's value changes. It subscribes to its grid's store once, in construct(): me.parent.store.on({recordChange: me.onRecordChange, scope: me}) (src/grid/column/AnimatedChange.mjs:35). Nothing rebinds that listener. It is the only column type that listens to the store.
Design authority: "in case we dynamically change the store (incl. a state.Provider store binding resolving after construction), grid.Body + the scrollbar need to get the new reference" (Neo.grid.Container#afterSetStore). The container hands a new store to its bodies, scrollbar, view and toolbars, but not to its columns.
The problem
Measured at dev bf864c781f with a throwaway unit probe; each arm has a passing control.
A grid created without a store throws. Neo.create(Neo.grid.Container, {columns: [{type: 'animatedChange', dataField: 'crew'}]}) throws TypeError: Cannot read properties of null (reading 'on'). store_ defaults to null (src/grid/Container.mjs:236), and Neo.gantt.Container#beforeSetStore returns null for a missing store. So a grid whose store arrives later cannot use this column: one bound through a state.Provider, or one a parent creates before its data exists.
A store swap is not followed. Created with store: first, the column holds one recordChange listener on first (the control). After grid.store = second it still listens to first and not to second, so edits to the grid's current store never animate.
A locked column never animates. (Added 2026-11-15 16:0xZ, found consuming this column in a locked task column.) onRecordChange() asks parent.body, the grid's center body, for the changed record's row. A locked column's cells live in the grid's bodyStart or bodyEnd, so VdomUtil.find finds no cell. With a recorder on each body, a locked: 'start' column asked the center body (center: [1], start: []).
Not a defect, checked: after grid.destroy() the store still holds the column's entry, but Observable#fire drops a listener whose scope is destroyed before calling it.
The architectural reality
Neo.grid.Container#createColumns creates each column with parent: me (Container.mjs, the Neo.create(columnClass, {parent: me, windowId, ...column}) call). AnimatedChange#construct reads parent.store at that moment.
Neo.grid.Container#afterSetStore re-points body.store, the vertical scrollbar, view.bindStore() and the toolbars. Columns are not on that list.
AnimatedChange#onRecordChange needs only the record and its changed fields; it finds the row through parent.body.getRow(record). The binding is the whole defect.
- Ruling on the shape (#18198, Avoided Traps): the operator chose the config system over instance fields.
The fix
AnimatedChange gets a reactive store_ config (src/grid/column/AnimatedChange.mjs): afterSetStore(value, oldValue) removes the recordChange listener from oldValue and adds it to value; both may be null. construct() takes the parent's store through that config instead of calling parent.store.on().
- The container hands its store to the columns that hold one (
Neo.grid.Container#afterSetStore), beside the bodies, scrollbar, view and toolbars it already updates.
onRecordChange() asks the body that renders the column: bodyStart for locked: 'start', bodyEnd for locked: 'end', else body.
- Specs (
test/playwright/unit/grid/column/AnimatedChange.spec.mjs, new): a grid created without a store constructs, and its column hears the store set later; a store swap moves the listener to the new store, so an edit there reaches the column and an edit to the old store does not. NestedDataField.spec.mjs's stub parent keeps working unchanged.
Contract Ledger
| Target surface |
Source of authority |
Proposed behaviour |
Fallback |
Docs |
Evidence |
Neo.grid.column.AnimatedChange#store_ (new reactive config) |
Neo.grid.Container#afterSetStore's comment, quoted above |
Follows the grid's current store, null included |
No store: no listener, no error |
Class and config JSDoc |
Unit |
Neo.grid.Container#afterSetStore |
Same |
Also hands the store to columns that hold one |
A column without a store config is untouched |
Method JSDoc |
Unit |
Acceptance criteria
Out of scope
- The default
.neo-animated style, which runs a .4s ease-in-out literal outside _motion.scss's tokens. It is a separate defect-note.
- Batch edits (
Store#updateRows) and the Body's row repaint: #20968 and its PR settled those.
- Other columns: none of them listens to the store.
Avoided traps
- Rebinding inside
onRecordChange, or reading parent.store on every event: either leaves the construct-time null crash in place.
- An instance field for the bound store: #18198's ruling chose the config system over instance fields.
- Recreating the columns on a store change, to re-run one
construct() subscription.
Related
#18198 (the descriptor ruling; it names AnimatedChange.mjs) · #20968 (batch edits publish recordChange with isBatch, which this column hears).
Ownership: self-assigned (Grace). This blocks a delivery leaf of mine, so good first issue / help wanted do not apply.
Live latest-open + closed sweep: latest 20 open (53 open, red band; no owning epic for grid columns), open search (AnimatedChange, animatedChange, "animated change": none) and closed search (AnimatedChange store: #20968, #18198 read, #20799, #18186, #8985 unrelated) at 2026-11-15T15:01Z; A2A claims of the last hour checked, none on grid columns. MC sweep: "AnimatedChange grid column subscribes to the store at construction; null store throws; store swap not followed", 5 results, no prior decision found. Own-assignment sweep: 4 open (#20986, #20911, #20884, #20790), none overlapping.
Origin Session ID: 42a76101-e5aa-4c83-8513-8709e3a84ec4
Retrieval Hint: "AnimatedChange column store binding: null store at construct throws, store swap not followed"
Context
Neo.grid.column.AnimatedChange, andAnimatedCurrencythrough it, marks a cell when its record's value changes. It subscribes to its grid's store once, inconstruct():me.parent.store.on({recordChange: me.onRecordChange, scope: me})(src/grid/column/AnimatedChange.mjs:35). Nothing rebinds that listener. It is the only column type that listens to the store.Design authority: "in case we dynamically change the store (incl. a state.Provider store binding resolving after construction), grid.Body + the scrollbar need to get the new reference" (
Neo.grid.Container#afterSetStore). The container hands a new store to its bodies, scrollbar, view and toolbars, but not to its columns.The problem
Measured at
devbf864c781fwith a throwaway unit probe; each arm has a passing control.A grid created without a store throws.
Neo.create(Neo.grid.Container, {columns: [{type: 'animatedChange', dataField: 'crew'}]})throwsTypeError: Cannot read properties of null (reading 'on').store_defaults tonull(src/grid/Container.mjs:236), andNeo.gantt.Container#beforeSetStorereturnsnullfor a missing store. So a grid whose store arrives later cannot use this column: one bound through astate.Provider, or one a parent creates before its data exists.A store swap is not followed. Created with
store: first, the column holds onerecordChangelistener onfirst(the control). Aftergrid.store = secondit still listens tofirstand not tosecond, so edits to the grid's current store never animate.A locked column never animates. (Added 2026-11-15 16:0xZ, found consuming this column in a locked task column.)
onRecordChange()asksparent.body, the grid's center body, for the changed record's row. A locked column's cells live in the grid'sbodyStartorbodyEnd, soVdomUtil.findfinds no cell. With a recorder on each body, alocked: 'start'column asked the center body (center: [1],start: []).Not a defect, checked: after
grid.destroy()the store still holds the column's entry, butObservable#firedrops a listener whose scope is destroyed before calling it.The architectural reality
Neo.grid.Container#createColumnscreates each column withparent: me(Container.mjs, theNeo.create(columnClass, {parent: me, windowId, ...column})call).AnimatedChange#constructreadsparent.storeat that moment.Neo.grid.Container#afterSetStorere-pointsbody.store, the vertical scrollbar,view.bindStore()and the toolbars. Columns are not on that list.AnimatedChange#onRecordChangeneeds only the record and its changed fields; it finds the row throughparent.body.getRow(record). The binding is the whole defect.The fix
AnimatedChangegets a reactivestore_config (src/grid/column/AnimatedChange.mjs):afterSetStore(value, oldValue)removes therecordChangelistener fromoldValueand adds it tovalue; both may benull.construct()takes the parent's store through that config instead of callingparent.store.on().Neo.grid.Container#afterSetStore), beside the bodies, scrollbar, view and toolbars it already updates.onRecordChange()asks the body that renders the column:bodyStartforlocked: 'start',bodyEndforlocked: 'end', elsebody.test/playwright/unit/grid/column/AnimatedChange.spec.mjs, new): a grid created without a store constructs, and its column hears the store set later; a store swap moves the listener to the new store, so an edit there reaches the column and an edit to the old store does not.NestedDataField.spec.mjs's stub parent keeps working unchanged.Contract Ledger
Neo.grid.column.AnimatedChange#store_(new reactive config)Neo.grid.Container#afterSetStore's comment, quoted abovenullincludedNeo.grid.Container#afterSetStorestoreconfig is untouchedAcceptance criteria
animatedChangecolumn, constructs; once a store is set, an edit to it reaches the column, which looks up the edited row (unit).AnimatedCurrencyinherits both, covered by one arm (unit).animatedChangecolumn asks the body that renders it for the changed row (unit).devand green at the head; the full unit suite passes on both.Out of scope
.neo-animatedstyle, which runs a.4s ease-in-outliteral outside_motion.scss's tokens. It is a separate defect-note.Store#updateRows) and the Body's row repaint: #20968 and its PR settled those.Avoided traps
onRecordChange, or readingparent.storeon every event: either leaves the construct-timenullcrash in place.construct()subscription.Related
#18198 (the descriptor ruling; it names
AnimatedChange.mjs) · #20968 (batch edits publishrecordChangewithisBatch, which this column hears).Ownership: self-assigned (Grace). This blocks a delivery leaf of mine, so
good first issue/help wanteddo not apply.Live latest-open + closed sweep: latest 20 open (53 open, red band; no owning epic for grid columns), open search (AnimatedChange, animatedChange, "animated change": none) and closed search (AnimatedChange store: #20968, #18198 read, #20799, #18186, #8985 unrelated) at 2026-11-15T15:01Z; A2A claims of the last hour checked, none on grid columns. MC sweep: "AnimatedChange grid column subscribes to the store at construction; null store throws; store swap not followed", 5 results, no prior decision found. Own-assignment sweep: 4 open (#20986, #20911, #20884, #20790), none overlapping.
Origin Session ID: 42a76101-e5aa-4c83-8513-8709e3a84ec4
Retrieval Hint: "AnimatedChange column store binding: null store at construct throws, store swap not followed"