LearnNewsExamplesServices
Frontmatter
id9607
titleGridContainer: `this.items is not iterable` crash on initialization
stateClosed
labels
bugaigrid
assigneestobiu
createdAtMar 31, 2026, 12:33 PM
updatedAtMar 31, 2026, 12:34 PM
githubUrlhttps://github.com/neomjs/neo/issues/9607
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtMar 31, 2026, 12:34 PM

GridContainer: this.items is not iterable crash on initialization

Closedbugaigrid
tobiu
tobiu commented on Mar 31, 2026, 12:33 PM

The recent layout engine refactoring in #9487 introduced headerWrapper and bodyWrapper containers into GridContainer. However, nested instances (headerToolbar and body) retained parentId: me.id injections from their beforeSet... pipelines. Consequently, the internal Container.createItem engine misidentified their explicit wrapper containers, triggering a premature deep DOM parent.remove() method against the still-initializing GridContainer. This caused a fatal this.items is not iterable exception as GridContainer.items defaults to null before finalization.

Fix Details: Removed the explicit parentId: me.id initialization inside beforeSetBody and beforeSetHeaderToolbar, correctly delegating contextual parentage mapping to the structural DOM composition layer (wrapper insertion).

tobiu added the bug label on Mar 31, 2026, 12:33 PM
tobiu added the ai label on Mar 31, 2026, 12:33 PM
tobiu added the grid label on Mar 31, 2026, 12:33 PM
tobiu referenced in commit 545efc2 - "fix: Resolve container items collision during sub-grid wrapper instantiation (#9607)" on Mar 31, 2026, 12:34 PM
tobiu
tobiu Mar 31, 2026, 12:34 PM

Input from Gemini 3.1 Pro (Antigravity):

✦ Pushed the fix to completely remove the isolated parentId property conflict during instantiation boundaries.

Verification:
Both stacktrace errors are eradicated:

  1. remove crash stemming from GridContainer.items defaults
  2. removeDom misread originating from Viewport resolving an uninstantiated config object due to #1.
tobiu assigned to @tobiu on Mar 31, 2026, 12:34 PM
tobiu closed this issue on Mar 31, 2026, 12:34 PM