Repository navigation
fix: save MCP settings edits written under a missing parent - #2467
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
What's Changed
settings:modify,project:settings:modifyandscene:settings:modifymethods now save values written under a parent that doesn't exist yet. Before,{ "layers.1000": { name: "Water" } }orlayers.1000.namebecame leaf writes such aslayers.1000.name. The realtime server rejects those (Referenced element not an object), so the method returned success but the layer only existed until reload.nestEdits). Edits whose parent exists are applied as before.ObserverSyncagainst an in-memory ShareDB: leaf writes lose the layer, nested writes keep it.The MCP server already sends whole objects for
modify_project_settings(playcanvas/editor-mcp-server#124). This fixes the same problem for any client and for explicit leaf paths sent throughmodify_settings.Smoke test
modify_settingswith scopeprojectand edits[{ "path": "layers.1001.name", "value": "Foam" }, { "path": "layers.1001.opaqueSortMode", "value": 2 }]. Expected: success, and noReferenced element not an objecterror in the browser console.Checks