Context
Two sightings, both on Gantt examples while their columns were changed at runtime: Maryam's defect-note 2ba8b461 and mine, 17178e75 (found building #21680, which kept its 220 px task column on phones because of it).
Repro on dev 4b444e4e7a: open examples/gantt/basic at 1440 × 900, then in the App Worker
gantt.taskColumns = [{type: 'tree', dataField: 'title', text: 'Task', width: 160, locked: 'start'}]The page then reports:
pageerror: Cannot read properties of undefined (reading 'id')
at src/grid/header/Toolbar.mjs:419:72
at Array.map (<anonymous>)
at Toolbar.passSizeToBody (src/grid/header/Toolbar.mjs:419:50)
at Column.syncBodyGeometry (src/timeline/Column.mjs:1129:21)
at Column.bindGridContext (src/timeline/Column.mjs:538:12)The Problem
Neo.gantt.Container#afterSetTaskColumns rebuilds the columns, and the center header toolbar replaces its Neo.timeline.TimeAxisHeader. The new header binds its column while it is still being constructed (TimeAxisHeader#bindGridContext → Column#bindGridContext → Column#syncBodyGeometry), and syncBodyGeometry calls toolbar.passSizeToBody() because the toolbar is mounted. At that moment the toolbar's one item is still the header's config object. It has no vdom, so items.map(item => item.vdom.id) throws inside the async method, and the rejection is unhandled.
The measurement it was trying is not needed: the toolbar measures the constructed header right after. A probe wrapping passSizeToBody logged the center toolbar's items at each call of one reassignment:
| Call |
From |
Items |
| 1 |
Column#onConstructed |
the constructed TimeAxisHeader |
| 2 |
TimeAxisHeader#bindGridContext |
a plain object, no vdom: throws |
| 3 |
the toolbar's post-update pass (Toolbar.mjs:313) |
the constructed TimeAxisHeader |
The Architectural Reality
Neo.grid.header.Toolbar#passSizeToBody (src/grid/header/Toolbar.mjs:395) measures every item; its dynamic-width branch reads item.vdom.id (:419).
- The toolbar measures itself once its items have rendered:
promiseUpdate().then(() => mounted && me.passSizeToBody()) (:313).
Neo.timeline.Column#syncBodyGeometry (src/timeline/Column.mjs:1118 on dev) calls it whenever the toolbar is mounted, which includes mid-construction.
Neo.typeOf(item) === 'NeoInstance' tells an item from its config (src/container/Base.mjs:694).
- Design authority: n/a — an unhandled TypeError is not a behaviour anyone intends.
The Fix
Neo.grid.header.Toolbar#passSizeToBody returns without measuring while any item is not yet an instance: a toolbar between two sets of items has no geometry to report, and its post-update pass reports the new one.
Acceptance Criteria
Out of Scope
- Why the timeline column measures the toolbar while its header is still being constructed.
Related
Found beside #21680. Blocks nothing.
Live latest-open + closed sweep: latest 20 open read at 00:59Z and the newest 5 again at 01:06Z; open and closed search ("taskColumns runtime", "passSizeToBody", "header toolbar TypeError", "reassign columns grid throws") and open PRs ("passSizeToBody OR taskColumns") at 2026-11-21T01:03Z: no equivalent; the closed passSizeToBody hits (#21526, #20517, #20512, #19757) fix other paths. 78 open (red band); no owning ticket. A2A in-flight sweep: latest 25 messages, all read states, back to 23:59Z: the two defect-notes, no claim. MC sweep ("grid header toolbar throws reading id when a Gantt's task columns are reassigned at runtime"): 5 results, no prior decision. Own-assignment sweep: 6 open, none overlapping.
Decision Record impact: none.
Retrieval Hint: "header toolbar passSizeToBody item.vdom undefined, TimeAxisHeader bindGridContext during construction, taskColumns reassignment"
⚖️ Ada · @neo-opus-ada · Claude Opus 5.5 · Claude Code
Context
Two sightings, both on Gantt examples while their columns were changed at runtime: Maryam's defect-note
2ba8b461and mine,17178e75(found building#21680, which kept its 220 px task column on phones because of it).Repro on
dev4b444e4e7a: openexamples/gantt/basicat 1440 × 900, then in the App Workergantt.taskColumns = [{type: 'tree', dataField: 'title', text: 'Task', width: 160, locked: 'start'}]The page then reports:
pageerror: Cannot read properties of undefined (reading 'id') at src/grid/header/Toolbar.mjs:419:72 at Array.map (<anonymous>) at Toolbar.passSizeToBody (src/grid/header/Toolbar.mjs:419:50) at Column.syncBodyGeometry (src/timeline/Column.mjs:1129:21) at Column.bindGridContext (src/timeline/Column.mjs:538:12)The Problem
Neo.gantt.Container#afterSetTaskColumnsrebuilds the columns, and the center header toolbar replaces itsNeo.timeline.TimeAxisHeader. The new header binds its column while it is still being constructed (TimeAxisHeader#bindGridContext→Column#bindGridContext→Column#syncBodyGeometry), andsyncBodyGeometrycallstoolbar.passSizeToBody()because the toolbar is mounted. At that moment the toolbar's one item is still the header's config object. It has novdom, soitems.map(item => item.vdom.id)throws inside the async method, and the rejection is unhandled.The measurement it was trying is not needed: the toolbar measures the constructed header right after. A probe wrapping
passSizeToBodylogged the center toolbar's items at each call of one reassignment:Column#onConstructedTimeAxisHeaderTimeAxisHeader#bindGridContextvdom: throwsToolbar.mjs:313)TimeAxisHeaderThe Architectural Reality
Neo.grid.header.Toolbar#passSizeToBody(src/grid/header/Toolbar.mjs:395) measures every item; its dynamic-width branch readsitem.vdom.id(:419).promiseUpdate().then(() => mounted && me.passSizeToBody())(:313).Neo.timeline.Column#syncBodyGeometry(src/timeline/Column.mjs:1118ondev) calls it whenever the toolbar is mounted, which includes mid-construction.Neo.typeOf(item) === 'NeoInstance'tells an item from its config (src/container/Base.mjs:694).The Fix
Neo.grid.header.Toolbar#passSizeToBodyreturns without measuring while any item is not yet an instance: a toolbar between two sets of items has no geometry to report, and its post-update pass reports the new one.Acceptance Criteria
taskColumnsat runtime reports no error.dev(theworkerErrorsfixture sees the TypeError), green at head.Out of Scope
Related
Found beside
#21680. Blocks nothing.Live latest-open + closed sweep: latest 20 open read at 00:59Z and the newest 5 again at 01:06Z; open and closed search ("taskColumns runtime", "passSizeToBody", "header toolbar TypeError", "reassign columns grid throws") and open PRs ("passSizeToBody OR taskColumns") at 2026-11-21T01:03Z: no equivalent; the closed
passSizeToBodyhits (#21526,#20517,#20512,#19757) fix other paths. 78 open (red band); no owning ticket. A2A in-flight sweep: latest 25 messages, all read states, back to 23:59Z: the two defect-notes, no claim. MC sweep ("grid header toolbar throws reading id when a Gantt's task columns are reassigned at runtime"): 5 results, no prior decision. Own-assignment sweep: 6 open, none overlapping.Decision Record impact: none.
Retrieval Hint: "header toolbar passSizeToBody item.vdom undefined, TimeAxisHeader bindGridContext during construction, taskColumns reassignment"
⚖️ Ada ·
@neo-opus-ada· Claude Opus 5.5 · Claude Code