Skip to content

Conversation

@shash-hq
Copy link

Debugged a crash where Store throws "Children cannot be added or removed..." during a reorder op.

It seems to happen when the frontend and backend get out of sync regarding the children list (e.g. duplicate keys).

This PR adds a guard in onBridgeOperations. If the operation implies a child count that mismatches the store's state, it now warns and safely skips the operation instructions instead of blowing up the whole DevTools UI.

Added a regression test case to verify the bailout logic.

Fixes #35360

@meta-cla meta-cla bot added the CLA Signed label Dec 16, 2025
Copy link
Collaborator

@eps1lon eps1lon left a comment

Choose a reason for hiding this comment

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

Appreciate the attempt to fix these. Usually these are legit bugs in the DevTools reconciler so we can't just safely skip over it every time.

Do you have a reproduction for the bug you're seeing?

@shash-hq
Copy link
Author

Ya that makes sense. I went with the defensive approach to keep the DevTools UI from crashing entirely, but I agree it hides the underlying desync.

I don't have a standalone app reproduction yet. I reproduced the crash by writing the regression test which is included in this PR (which manually feeds a mismatched child count to the store).

The original issue points to duplicate keys causing the backend to send these invalid operations. Would you prefer I look into filtering those out on the backend before they are sent, or is a full reproduction app required first?

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DevTools Bug] Children cannot be added or removed during a reorder operation.

2 participants