Skip to content

Fix FlowGraphCoordinator not adding itself to SceneCoordinators list#18128

Merged
deltakosh merged 1 commit intoBabylonJS:masterfrom
marns:flow-graph-coordinator
Mar 19, 2026
Merged

Fix FlowGraphCoordinator not adding itself to SceneCoordinators list#18128
deltakosh merged 1 commit intoBabylonJS:masterfrom
marns:flow-graph-coordinator

Conversation

@marns
Copy link
Contributor

@marns marns commented Mar 18, 2026

FlowGraphCoordinator: SceneCoordinators weren't persisting. The constructor created a new array via ?? [] but never called .set() on the Map, so SceneCoordinators.get(scene) always returned undefined. Any tooling using this API could never discover running coordinators. Fixed by initializing and storing the array on first use.

@sebavan sebavan requested a review from RaananW March 18, 2026 19:25
@sebavan
Copy link
Member

sebavan commented Mar 18, 2026

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@bjsplat
Copy link
Collaborator

bjsplat commented Mar 18, 2026

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Collaborator

bjsplat commented Mar 18, 2026

Snapshot stored with reference name:
refs/pull/18128/merge

Test environment:
https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/18128/merge/index.html

To test a playground add it to the URL, for example:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/18128/merge/index.html#WGZLGJ#4600

Links to test your changes to core in the published versions of the Babylon tools (does not contain changes you made to the tools themselves):

https://playground.babylonjs.com/?snapshot=refs/pull/18128/merge
https://sandbox.babylonjs.com/?snapshot=refs/pull/18128/merge
https://gui.babylonjs.com/?snapshot=refs/pull/18128/merge
https://nme.babylonjs.com/?snapshot=refs/pull/18128/merge

To test the snapshot in the playground with a playground ID add it after the snapshot query string:

https://playground.babylonjs.com/?snapshot=refs/pull/18128/merge#BCU1XR#0

If you made changes to the sandbox or playground in this PR, additional comments will be generated soon containing links to the dev versions of those tools.

@bjsplat
Copy link
Collaborator

bjsplat commented Mar 18, 2026

@bjsplat
Copy link
Collaborator

bjsplat commented Mar 18, 2026

@bjsplat
Copy link
Collaborator

bjsplat commented Mar 18, 2026

Copy link
Member

@RaananW RaananW left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very valid, but it is not being used anywhere in the code. I am trying to understand if this is a bug fix from experience, and where do you use the SceneCoordinators map.

@marns
Copy link
Contributor Author

marns commented Mar 18, 2026

Just ran into it while debugging some FlowGraphCoordinator issues on my side. Not actually using it but thought might as well fix.

Copy link
Member

@RaananW RaananW left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clearly a bug, thank you very much. Just FYI - a lot of changes are coming to the flow graph and the flow graph coordinator. No breaking changes of course, but we are expanding and fixing bugs under the hood.

@deltakosh deltakosh merged commit 869f082 into BabylonJS:master Mar 19, 2026
21 checks passed
@marns
Copy link
Contributor Author

marns commented Mar 19, 2026

Clearly a bug, thank you very much. Just FYI - a lot of changes are coming to the flow graph and the flow graph coordinator. No breaking changes of course, but we are expanding and fixing bugs under the hood.

@RaananW cool to hear this. Any way I could get a peek into that branch / conversation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants