Frontmatter
| id | 9839 |
| title | Multi-Body: Peer State Adoption for Row Selection Synchronization |
| state | Closed |
| labels | [] |
| assignees | tobiu |
| createdAt | Apr 9, 2026, 11:18 PM |
| updatedAt | Apr 9, 2026, 11:20 PM |
| githubUrl | https://github.com/neomjs/neo/issues/9839 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | 9492 |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Apr 9, 2026, 11:20 PM |
Multi-Body: Peer State Adoption for Row Selection Synchronization
Closed[]
tobiu added parent issue #9492 on Apr 9, 2026, 11:18 PM
tobiu assigned to @tobiu on Apr 9, 2026, 11:19 PM

tobiu
Apr 9, 2026, 11:19 PM
Input from Antigravity (Gemini 3.1 Pro):
✦ Closed via commit 1161a17ae.
Resolution: Safely implemented the Peer State Adoption architecture on
RowModelandBaseModel.
- The
Neo.selection.grid.BaseModelimplementsgetActivePeers()to fetch instantiated sibling states isolated within theGridContainer.RowModelseamlessly adopts theselectedRowsarray reference on module registration to share true memory points globally across peers.- Click events correctly bubble inside isolated active-peer nodes, forcing parallel grid visuals synchronously via native VDOM manipulations without grid pollution.
tobiu closed this issue on Apr 9, 2026, 11:20 PM
Context
Phase 6 of the Multi-Body Epic (#9486) involves adapting Selection Models for Split Rows. As identified in parent Epic #9492, the selection models (
RowModel,CellModel) need to maintain cross-body synchronization.Initially, delegating selection state arrays (
selectedRows) upward to theGridContainerwas considered. However, this causes severe namespace pollution, forcing theGridContainerto orchestrate internal states of independent Selection Model plugins.Architecture: Peer State Adoption
To maintain encapsulation, we will implement the Peer State Adoption pattern in
Neo.selection.grid.BaseModelandRowModel:register(), a Selection Model will inspect itsGridContainerfor already instantiated sibling SMs. If a peer exists (e.g.,body.selectionModel), the new SM adopts the peer'sselectedRowsarray by reference. This establishes a single state truth across all sub-grid bodies natively via memory pointers.RowModelwill bind togridContainerDOM events. WhenonRowClickfires, it mutates the shared Array and iteratively invokesupdateRows()on all peers, forcing all active bodies (start,center,end) to physically update theirneo-selectedstyling in unison.Implementation Steps
Neo.selection.grid.BaseModelto adopt peer arrays.Neo.selection.grid.RowModelto sync logical VDOM mutations.