Repository navigation
Fix reactive list separators corrupting sibling output - #454
Merged
timotheeguerin merged 1 commit intoNov 3, 2026
Merged
timotheeguerin merged 1 commit into
timotheeguerin merged 1 commit into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
All changed packages have been documented.
Show changes
|
timotheeguerin
approved these changes
Nov 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Keep
mapJoinseparators in ashallowRefso rendered Alloy nodes retain their identity during reactive updates.This fixes output corruption affecting multipart
<For>separators, including TypeScript union members that resolve through forward references.Root cause
Since the AlloyNode renderer introduced in #402, JSX intrinsics are live nodes with parent and sibling pointers. A separator such as
<><br />{"| "}</>contains one of these nodes.createJoinerRefcurrently stores separators in a deep Vueref. This proxies the node and its sibling pointers. Runtime range reconciliation compares sibling pointers with their original end-marker objects; a proxied pointer no longer equals the raw marker, so updating an item can remove subsequent items and even output following the list.For example, a union of three forward-referenced interfaces becomes:
Using a
shallowRefpreserves reactive separator replacement without proxying the rendered children. It also removes the unnecessary cast previously used bycreateJoinerRef.Coverage
Discovered while validating Azure/js-provisioning-lib#599 after upgrading Alloy core from 0.23.0 to 0.24.1.
Validation
pnpm formatpnpm buildpnpm test: 243 test files and 2,116 tests passedpnpm lintpnpm run sync-publish-config:check