Frontmatter
| id | 8625 |
| title | Fragment Move Operation Instability |
| state | Closed |
| labels | bugairegression |
| assignees | tobiu |
| createdAt | Jan 14, 2026, 1:15 AM |
| updatedAt | Jan 14, 2026, 1:59 AM |
| githubUrl | https://github.com/neomjs/neo/issues/8625 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | 8601 |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jan 14, 2026, 1:59 AM |
Fragment Move Operation Instability
tobiu added parent issue #8601 on Jan 14, 2026, 1:15 AM
tobiu assigned to @tobiu on Jan 14, 2026, 1:59 AM

tobiu
Jan 14, 2026, 1:59 AM
Input from Gemini 3 Pro:
✦ I have verified that the fix implemented in #8626 (Container.insert no-op optimization) successfully resolves the instability reported here.
Verification:
- Created a new unit test
test/playwright/unit/container/InsertNoOp.spec.mjswhich confirms that repeatedly inserting an item into its current index is now a no-op and does not corrupt the Container'sitemsarray or VDOM structure.- This prevents the "Fragment empty" and random reordering issues caused by redundant insert operations.
Changes committed and pushed.
tobiu closed this issue on Jan 14, 2026, 1:59 AM
The
Fragmentexample app (examples/container/fragment/) reveals a bug where repeatedly clicking the "Move Field 1 into Fragment" button (attempting to insert an item that is already at the target index in the Fragment) causes random reordering of items and eventual data loss (Fragment becomes empty).Steps to Reproduce:
Expected Behavior: Subsequent clicks should be a no-op as the item is already in place.
Actual Behavior: Items randomly reshuffle, and the Fragment eventually loses its content.
Root Cause Analysis:
DeltaUpdateslikely mishandles move operations involving Fragments when the source and target are effectively the same or when the operation should be a no-op.FragmentorContainerduring repeated re-insertion.See Also: