Keep base version etag during reload
📝 Summary
this.$syncService is cleared during the close method.
However we need the baseVersionEtag to ensure the editing session
on the server
is still in sync with our local ydoc.
See https://github.com/nextcloud/text/issues/5724#issuecomment-2180699808 for a trace of the effect of this.
Also fixes #5726
🏁 Checklist
- [x] Code is properly formatted (
npm run lint/npm run stylelint/composer run cs:check) - [x] Sign-off message is added to all commits
- [x] Tests (unit, integration and/or end-to-end) passing and the changes are covered with tests
- [x] Documentation is not required
I'm looking into the flaky sync tests and fixing some issues with lost network connectivity on the way. In particular when clicking reconnect the editor and the status message go away now. If the reconnect fails there's nothing one can do anymore. For now I'll focus on just keeping the status message so one can try to reconnect multiple times. Keeping the editor would be great but seems more involved.
/backport to stable29
/backport to stable28
When cutting the network and pressing "Reconnect", we run into
sendStepsNow(): this.connection is undefinedbecause the connection got closed butsendRemainingSteps()still tries to runsendStepsNow().In the same scenario
Error: Close has already been called on the connectionis also still logged.
I tried but failed to reproduce these two.
I also don't see how that would happen as reconnect should not send the remaining steps anymore. But I will take a look at the code to confirm.
Merged as i could not reproduce the remaining issue. @mejo- Please open a new issue based on the comment if this still happens for you.