Skip to content

[pull] main from xyflow:main#101

Merged
pull[bot] merged 5 commits intocode:mainfrom
xyflow:main
Mar 25, 2026
Merged

[pull] main from xyflow:main#101
pull[bot] merged 5 commits intocode:mainfrom
xyflow:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented Mar 25, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

AlaricBaraou and others added 5 commits March 21, 2026 05:52
StoreUpdater was rendered after GraphView, so on remount its cleanup
(reset) and repopulation effects fired after GraphView's subtree
effects. Custom nodes reading the store in their effects would see
empty nodes/nodeLookup/edges during this window.

Move StoreUpdater before GraphView so its effects run first, and
switch to useIsomorphicLayoutEffect so the store is repopulated
before any child useEffect or useLayoutEffect fires.
Reset spy history before clicking remount so the post-remount
assertion only checks calls from the fresh mount, not pre-remount
calls that trivially pass.
This improves the DX in cases like this:

    const NODES: BuiltInNode[] = [
    //           ~~~~~~~~~~~~~
    //           TS error here currently, because these nodes
    //           don't explicitly set `type: "default"`
      { id: "1", position: { x: 0, y: 0 }, data: { label: "Node 1" } },
      { id: "2", position: { x: 100, y: 100 }, data: { label: "Node 2" } },
    ];
Explicitly allow missing `type` field in BuiltInNode type definition
…remount

fix(react): prevent empty store during ReactFlow remount
@pull pull Bot locked and limited conversation to collaborators Mar 25, 2026
@pull pull Bot added the ⤵️ pull label Mar 25, 2026
@pull pull Bot merged commit 613ad30 into code:main Mar 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants