text icon indicating copy to clipboard operation
text copied to clipboard

Keep base version etag during reload

Open max-nextcloud opened this issue 1 year ago • 1 comments

📝 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

max-nextcloud avatar Jun 24 '24 16:06 max-nextcloud

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.

max-nextcloud avatar Jun 27 '24 12:06 max-nextcloud

/backport to stable29

max-nextcloud avatar Jul 02 '24 07:07 max-nextcloud

/backport to stable28

max-nextcloud avatar Jul 02 '24 07:07 max-nextcloud

When cutting the network and pressing "Reconnect", we run into

sendStepsNow(): this.connection is undefined because the connection got closed but sendRemainingSteps() still tries to run sendStepsNow().

In the same scenario Error: Close has already been called on the connection is 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.

max-nextcloud avatar Jul 03 '24 10:07 max-nextcloud

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.

max-nextcloud avatar Jul 03 '24 10:07 max-nextcloud