Minimal yjs based collaboration#2971
Conversation
5df761c to
11f5abd
Compare
9cd3d29 to
0b8e260
Compare
0b8e260 to
3057169
Compare
Passing run #8385 ↗︎Details:
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. |
|||||||||||||||
| // This way the user can still resolve conflicts in the editor view | ||
| if ($document->getLastSavedVersion() !== $document->getCurrentVersion()) { | ||
| $stepsVersion = $this->stepMapper->getLatestVersion($document->getId()); | ||
| if ($stepsVersion && ($document->getLastSavedVersion() !== $stepsVersion)) { |
There was a problem hiding this comment.
If we drop the step version that check against the last saved version will no longer work, so maybe we need to find a different approach to determine the collision case.
5ab0d4c to
9cae5ea
Compare
2dc7029 to
1c3564a
Compare
1c3564a to
2885e2a
Compare
juliusknorr
left a comment
There was a problem hiding this comment.
First half of the review for backend bits
| $oldVersion = $document->getCurrentVersion(); | ||
| $newVersion = $oldVersion + count($steps); | ||
| $stepsVersion = $this->stepMapper->getLatestVersion($document->getId()); | ||
| $newVersion = $stepsVersion + count($steps); |
There was a problem hiding this comment.
If we get rid of the lock we may want to wrap this in a transaction so that reading the current version, increasing and writing steps is an atomic operation.
Should be easy with https://docs.nextcloud.com/server/latest/developer_manual/basics/storage/database.html#transactions
e9f4dd1 to
1e7224f
Compare
|
Locally only |
1e7224f to
4326eb3
Compare
|
Pushed a bit of polishing for the backend code to make CI happy and a fix for direct editing to pass the initial session data to the web socket polyfill. Let's see what CI says. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
98bffa2 to
0ae0ea0
Compare
|
@max-nextcloud So far for my week I pushed couple of fixes and polishing. I ended up also refactoring the PollingBackend a bit to clean this up. Cypress tests pass now though there are two draft commits that we should discuss on Monday about on how to best handle that.
|
|
@juliushaertl Wow... thanks for looking into this and pushing the pr forward like that! |
|
@juliushaertl Given your last commit i wonder what happens if...
Ideally the conflict would get resolved for the other user as well, right? In particular so they do not pick different strategies. |
We didn't have any handling for different strategies in the past. My additional commit would already solve this by just moving any resulution to happen trough y.js, so individual users can also undo. One thing that might need further work is to timely propagate the resolved conflict, but I'd not consider that a blocker for the merge as it has been worse before ;) |
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net> Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
…flict through force save Signed-off-by: Julius Härtl <jus@bitgrid.net> Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Max <max@nextcloud.com>
Replaying old awareness state will trigger cursor moves which in turn trigger new awareness messages. Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Sometimes loading the doc will trigger one sync, sometimes two. Make sure we always inspect the actual save request by waiting for two syncs before we trigger and inspect it. Signed-off-by: Max <max@nextcloud.com>
3f4f352 to
23c9e2b
Compare
Signed-off-by: Max <max@nextcloud.com>
|
🎉🎉🎉🎉🎉 |
Uh oh!
There was an error while loading. Please reload this page.