LearnNewsExamplesServices
Frontmatter
id9840
titleMulti-Body: Peer State Adoption for Column Selection Synchronization
stateClosed
labels
enhancementai
assigneestobiu
createdAtApr 9, 2026, 11:30 PM
updatedAtApr 9, 2026, 11:40 PM
githubUrlhttps://github.com/neomjs/neo/issues/9840
authortobiu
commentsCount1
parentIssue9492
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtApr 9, 2026, 11:40 PM

Multi-Body: Peer State Adoption for Column Selection Synchronization

Closedenhancementai
tobiu
tobiu commented on Apr 9, 2026, 11:30 PM

Architectural Context

The Neo.mjs Multi-Body Grid architecture partitions the DOM into segregated bodyStart, body, and bodyEnd components. Historically, ColumnModel relied on isolated states (selectedColumns). When clicking a cell, multiple bodies capture the bubbled cellClick event, resulting in race conditions or isolated states breaking cross-body column selection physics.

Objective

Apply the same "Peer State Adoption" pattern deployed in #9839 to ColumnModel.

Implementation Details

  1. Event Binding Security: ColumnModel binds to gridContainer (similar behavior to RowModel). It must immediately abort processing if event.body !== view.
  2. Peer State Adoption: In BaseModel.register(), selectedColumns must be adopted natively from the first active, instantiated sibling peer to guarantee a single memory array instance.
  3. Visual Synchronization: When a column is clicked and selection is toggled, it must map to getActivePeers().forEach(peer => { peer.view.createViewData() }) (or equivalent method) to mutate and refresh column highlights across all split grid segments concurrently.

Avoided Pitfalls

  • Do NOT pollute the GridContainer namespace with state variables.
  • We must decouple row and column selections into respective arrays without breaking the VDOM single-thread event loop mapping.
tobiu added the enhancement label on Apr 9, 2026, 11:30 PM
tobiu added the ai label on Apr 9, 2026, 11:30 PM
tobiu added parent issue #9492 on Apr 9, 2026, 11:30 PM
tobiu referenced in commit 6e704c3 - "feat: column selection models proxy multi-body grid container (#9840)" on Apr 9, 2026, 11:40 PM
tobiu assigned to @tobiu on Apr 9, 2026, 11:40 PM
tobiu
tobiu Apr 9, 2026, 11:40 PM

Implementation complete via 6e704c3. Sibling visual arrays and BaseModel adoption logic implemented. The ColumnModel is fully decoupled from the GridContainer and independently synchronizes its visuals across active peers.

tobiu closed this issue on Apr 9, 2026, 11:40 PM