Skip to content

Conversation

@backportbot
Copy link

@backportbot backportbot bot commented Oct 16, 2025

Backport of #7787

Todo

  • Review and resolve any conflicts
  • Amend HEAD commit to remove the line stating to skip CI

Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

Process initial document state as incoming message.
This way it will be tracked as received from the remote server by y-websocket
and the update send to the server will exclude it.

Also use the sync services `opened` event inside WebsocketPolyfill
rather than mixing async `syncService.open().then` and event handling.
This allows us to emit `opened` and then `sync` from `syncService.open()`.

Signed-off-by: Max <max@nextcloud.com>
@mejo- mejo- force-pushed the backport/7787/stable31 branch from 7b1d02f to dcaef41 Compare October 16, 2025 11:22
@mejo- mejo- marked this pull request as ready for review October 16, 2025 11:22
@codecov
Copy link

codecov bot commented Oct 16, 2025

Codecov Report

❌ Patch coverage is 34.61538% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.35%. Comparing base (a6f16d4) to head (d0da538).
⚠️ Report is 4 commits behind head on stable31.

Files with missing lines Patch % Lines
src/services/SyncService.ts 14.28% 12 Missing ⚠️
src/services/WebSocketPolyfill.ts 50.00% 4 Missing ⚠️
src/helpers/yjs.ts 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           stable31    #7790      +/-   ##
============================================
- Coverage     51.36%   51.35%   -0.01%     
============================================
  Files           291      291              
  Lines         41660    41673      +13     
  Branches        868      867       -1     
============================================
+ Hits          21399    21403       +4     
- Misses        20142    20151       +9     
  Partials        119      119              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@max-nextcloud max-nextcloud force-pushed the backport/7787/stable31 branch from dcaef41 to 7d81038 Compare October 16, 2025 11:55
* Emit the documents last saved version in the push response
  if document state is send as well.
* Otherwise send the version as 0 so it cannot increase the sync service version.
* Use the versions returned by create and push requests alongside the document state
  to construct a consistent step with the last saved version that matches the document state.

This will result in the sync service version getting bumped
to the documents last saved version
once the coresponding document state has been processed.

Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Jonas <jonas@freesources.org>
@max-nextcloud max-nextcloud force-pushed the backport/7787/stable31 branch from 7d81038 to d0da538 Compare October 16, 2025 13:09
@mejo- mejo- merged commit 4a8617d into stable31 Oct 16, 2025
66 of 68 checks passed
@mejo- mejo- deleted the backport/7787/stable31 branch October 16, 2025 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants