Skip to content
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(sync): If baseVersionEtag changed, reset frontend #5523

Merged
merged 6 commits into from
Mar 20, 2024

Conversation

mejo-
Copy link
Member

@mejo- mejo- commented Mar 18, 2024

📝 Summary

The PR builds on #5477

  • fix(sync): If baseVersionEtag changed, reset frontend
    baseVersionEtag changes when a new document session got initialized, e.g. after an old document session without session clients got cleaned up, or because the markdown file got changed via webdav.
    Detect this in the client and ask the user to reload the page for resetting the session.
  • fix(Middleware): Response with 412 if baseVersionEtag doesn't match
  • fix(DocumentStatus): Refactor and migrate to NcNoteCard

Screenshot

warning
2024-03-18T20:06:02,244342045+01:00

🚧 TODO

  • Testing

🏁 Checklist

  • Code is properly formatted (npm run lint / npm run stylelint / composer run cs:check)
  • Sign-off message is added to all commits
  • Tests (unit, integration and/or end-to-end) passing and the changes are covered with tests

@mejo- mejo- self-assigned this Mar 18, 2024
@mejo- mejo- force-pushed the fix/baseversionetag_change branch from 2a5117c to e186a56 Compare March 18, 2024 19:09
@mejo- mejo- force-pushed the fix/5476/document-cleanup branch from aee2afa to a63daee Compare March 20, 2024 09:17
Base automatically changed from fix/5476/document-cleanup to main March 20, 2024 09:43
@mejo- mejo- force-pushed the fix/baseversionetag_change branch 2 times, most recently from f787fa4 to 97ee7d5 Compare March 20, 2024 14:27
mejo- added 2 commits March 20, 2024 15:27
`baseVersionEtag` changes when a new document session got initialized,
e.g. after an old document session without session clients got cleaned
up, or because the markdown file got changed via webdav.

Detect this in the client and ask the user to reload the page for
resetting the session.

Signed-off-by: Jonas <jonas@freesources.org>
Signed-off-by: Jonas <jonas@freesources.org>
@mejo- mejo- force-pushed the fix/baseversionetag_change branch from 97ee7d5 to 17efed4 Compare March 20, 2024 14:27
@mejo- mejo- marked this pull request as ready for review March 20, 2024 14:27
Fixes: #4905

Signed-off-by: Jonas <jonas@freesources.org>
@mejo- mejo- force-pushed the fix/baseversionetag_change branch from 17efed4 to aac9123 Compare March 20, 2024 14:28
Copy link
Collaborator

@max-nextcloud max-nextcloud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Just some minor nitpicks.

cypress/e2e/sync.spec.js Outdated Show resolved Hide resolved
cypress/support/sessions.js Outdated Show resolved Hide resolved
mejo- added 2 commits March 20, 2024 16:29
…eanup

Signed-off-by: Jonas <jonas@freesources.org>
@mejo- mejo- force-pushed the fix/baseversionetag_change branch from 9e9288b to a4e8747 Compare March 20, 2024 15:31
Wrap error messages into an array when responding with `JSONResponse`.

Signed-off-by: Jonas <jonas@freesources.org>
@mejo- mejo- merged commit dd10927 into main Mar 20, 2024
55 of 63 checks passed
@mejo- mejo- deleted the fix/baseversionetag_change branch March 20, 2024 17:11
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