You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
State mutation handling has a bug. The app runner sends which parts of the state has changed to the UI components. The changes (called mutations) are encoded as a json. Field names in the JSON are interpreted as paths to nested objects. A dot in a field name means a nested object. This has problems if the original StateProxy object had dots in the key names.
I've only encountered that this is a user-facing problem when updating the state for a Repeater object.
Thanks for sharing, we'll definitely take a look at this. Internally, the intended behaviour is that dots should be automatically escaped with backslashes i.e. "." in the generated JSON, when used as part of the name of a state element.
@aleloi fix was merged into dev branch. I personally verified the behavior of Repeater in this particular scenario, and, with the new fix, the issue appears to be resolved. I would greatly appreciate if you could confirm it on your end as well, just to be safe.
Screenshot demonstrating the issue:
State mutation handling has a bug. The app runner sends which parts of the state has changed to the UI components. The changes (called mutations) are encoded as a json. Field names in the JSON are interpreted as paths to nested objects. A dot in a field name means a nested object. This has problems if the original StateProxy object had dots in the key names.
I've only encountered that this is a user-facing problem when updating the state for a Repeater object.
This branch contains a minimal reproduction: https://github.com/aleloi/streamsync/tree/issue/repro-of-dots-in-stateproxy-keys-issue. Link to commit with diff.
To get the image above, check out the branch and run
streamsync run tests/testapp
. Go to the repeater tab and press 'Re-randomize repeater' button.The expected result is this:
The text was updated successfully, but these errors were encountered: