-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: pass file id for direct editing and fail y.js provider setup if none was passed #4124
Conversation
Note that the error behaviour is currently quite bad as when this happens the Editor.vue is just empty, will see if we can improve that as well. |
/backport to stable26 |
1 flaky tests on run #9681 ↗︎
Details:
cypress/e2e/sync.spec.js • 1 flaky test
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a minor comment.
And to be honest I don't fully understand the situation. So directediting sessions didn't pass a fileId
before the change to DirectEditing.vue
from this PR, which lead to WebsocketProvider
instances with similar identifiers, which in turn could result in content from leftover sessions getting mixed into the new session. Is this roughly the scenario that this PR aims to fix?
Yes with the addition that the mobile apps might not immediately cleanup the old web view which I've seen happening on iOS for example. This could also happen on desktop when users use the desktop client option for direct editing. |
ff0249f
to
812ff13
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
…none was passed Signed-off-by: Julius Härtl <[email protected]>
812ff13
to
23a46cd
Compare
/compile |
Signed-off-by: nextcloud-command <[email protected]>
The backport to stable26 failed. Please do this backport manually. # Switch to the target branch and update it
git checkout stable26
git pull origin/stable26
# Create the new backport branch
git checkout -b fix/foo-stable26
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts. Resolve them.
git cherry-pick abc123
# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable26 More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport |
/backport 23a46cd to stable26 |
Great catch @juliushaertl and thanks for the quick review and backport @mejo- ! ❤️ |
📝 Summary
When setting up the WebsocketProvider we still used to create them even if no file id was passed. This is actually the case for direct editing trough android/iOS and would mean that if some browser states in the webview is still present it could mix up documents.
This is basically a follow up to b2186da
🏁 Checklist
npm run lint
/npm run stylelint
/composer run cs:check
)