Open KallynGowdy opened 10 months ago
This bug happens on ab1.bot and also on alpha.ab1.bot (after the WebsocketController changes), so it is likely related to YJS itself or something else, but not the WebsocketController.
This video shows another situation where this is easily reproducible and is most likely related.
https://www.loom.com/share/4348bdb33887423f9fc0204560a2b156?sid=7d385ce7-4805-4e75-915a-5523bb12bffa
Yeah I believe that these two situations are the same underlying issue.
I did the bot drag test between two tabs in the same inst and logged the position to the console with each change and the second tab is getting undefined
for some of the tags as the bot is being dragged in the other tab.
This issue on YJS seems to be related. I've also added a repro here: https://github.com/casual-simulation/casualos/blob/f79e16421c826eeede89c289567e06045a44284d/src/aux-runtime/YjsTest.spec.ts
When dragging a bot around fairly quickly, other tabs will see the bot sometimes snap back to the center of the screen or to a spot where it was never dragged. This is a bug as updates should only be sent for tags that have been changed, and other tabs should only change tags to the correct updated values.