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

[stable28] Refactor document and session handling #5541

Merged
merged 18 commits into from Apr 3, 2024

Conversation

@backportbot backportbot bot added this to the Nextcloud 28.0.4 milestone Mar 20, 2024
@mejo- mejo- changed the title [stable28] Reset document session on filesystem change [stable28] Refactor document and session handling Mar 20, 2024
@Altahrim Altahrim mentioned this pull request Mar 21, 2024
9 tasks
@mejo-
Copy link
Member

mejo- commented Mar 21, 2024

/backport! to stable27

@mejo-
Copy link
Member

mejo- commented Mar 21, 2024

Let's wait for next months releases with this, so this gets tested a bit on Nextcloud 29 first.

mejo- and others added 10 commits April 2, 2024 15:31
When a text file is updated via other means than from the editor (e.g.
when uploaded/synced via webdav) and there is no unsaved steps in the
document session, reset the document session  This will prevent conflict
resolution dialogs in this case. Client frontends will have to reload
the document afterwards though.

Signed-off-by: Jonas <jonas@freesources.org>
…ession

Instead of just deleting the newest steps, always remove all session
data: document, sessions and steps from the database as well as the yjs
(document state) file.

Without the `--force` option, don't reset document sessions with unsaved
steps.

Signed-off-by: Jonas <jonas@freesources.org>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
`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>
Fixes: #4905

Signed-off-by: Jonas <jonas@freesources.org>
…eanup

Signed-off-by: Jonas <jonas@freesources.org>
Wrap error messages into an array when responding with `JSONResponse`.

Signed-off-by: Jonas <jonas@freesources.org>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
@mejo- mejo- marked this pull request as ready for review April 2, 2024 14:02
@juliushaertl juliushaertl merged commit 4c08893 into stable28 Apr 3, 2024
64 checks passed
@juliushaertl juliushaertl deleted the backport/5481/stable28 branch April 3, 2024 10:22
@Altahrim Altahrim mentioned this pull request Apr 17, 2024
5 tasks
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.

None yet

2 participants