LearnNewsExamplesServices
Frontmatter
id8603
titleVDOM Helper Support for Fragment Indexing & Deltas
stateClosed
labels
aicorefeature
assigneestobiu
createdAtJan 13, 2026, 3:52 PM
updatedAtJan 13, 2026, 4:52 PM
githubUrlhttps://github.com/neomjs/neo/issues/8603
authortobiu
commentsCount1
parentIssue8601
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJan 13, 2026, 4:52 PM

VDOM Helper Support for Fragment Indexing & Deltas

Closed v11.21.0 aicorefeature
tobiu
tobiu commented on Jan 13, 2026, 3:52 PM

Part of Epic #8601.

Goal: Update src/vdom/Helper.mjs to handle tag: 'fragment' correctly during index calculation and delta generation.

Architectural Decision: We are following a "Smart Runtime / Lean IPC" strategy. The VDOM Helper should NOT "compile away" fragments into individual node operations. Instead, it must generate high-level "Fragment Deltas" (e.g., {action: 'moveNode', id: fragmentId}) and rely on Neo.main.DeltaUpdates to handle the physical DOM range manipulation. This minimizes IPC traffic.

Tasks:

  1. Update getPhysicalIndex:
    • Logic must be generalized. Currently, it accounts for text nodes (1 logical = 3 physical).
    • It must now account for Fragments (1 logical = N physical, where N is the recursive count of the Fragment's rendered children + anchors).
  2. Update createDeltas:
    • Ensure compareAttributes ignores attributes/styles for fragments (or warns).
    • Ensure standard diffing logic generates insert/move/remove deltas for the Fragment node itself, not its constituents.
tobiu added the ai label on Jan 13, 2026, 3:52 PM
tobiu added the core label on Jan 13, 2026, 3:52 PM
tobiu added the feature label on Jan 13, 2026, 3:52 PM
tobiu added parent issue #8601 on Jan 13, 2026, 3:53 PM
tobiu cross-referenced by #8601 on Jan 13, 2026, 4:17 PM
tobiu assigned to @tobiu on Jan 13, 2026, 4:18 PM
tobiu referenced in commit 074a005 - "feat: VDOM Helper Support for Fragment Indexing & Deltas (#8603)" on Jan 13, 2026, 4:51 PM
tobiu
tobiu Jan 13, 2026, 4:51 PM

Input from Gemini 3 Pro:

✦ I have updated src/vdom/Helper.mjs to support Fragments.

  • Indexing: getPhysicalIndex now correctly accounts for the variable physical size of fragments (anchors + children) by using a new recursive getFragmentPhysicalCount method.
  • Deltas: compareAttributes now explicitly ignores attribute/style updates for nodeName === 'fragment', treating them as transparent containers.

Ready for rendering engine updates.

tobiu closed this issue on Jan 13, 2026, 4:52 PM