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

[stable27] Refactor document and session handling #5543

Merged
merged 19 commits into from
Apr 3, 2024

Conversation

backportbot[bot]
Copy link

@backportbot backportbot bot commented Mar 21, 2024

@backportbot backportbot bot added this to the Nextcloud 27.1.8 milestone Mar 21, 2024
@mejo- mejo- force-pushed the backport/5541/stable27 branch from ed4ce31 to 5fab1fc Compare March 21, 2024 10:37
@mejo- mejo- changed the title [stable27] [stable28] Refactor document and session handling [stable27] Refactor document and session handling Mar 21, 2024
@mejo- mejo- force-pushed the backport/5541/stable27 branch from 5fab1fc to e9cc009 Compare March 21, 2024 10:50
@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- mejo- force-pushed the backport/5541/stable27 branch from e9cc009 to 6c50404 Compare March 27, 2024 13:40
mejo- and others added 8 commits April 2, 2024 15:37
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>
@mejo- mejo- force-pushed the backport/5541/stable27 branch from 6c50404 to cd524da Compare April 2, 2024 13:45
mejo- and others added 8 commits April 2, 2024 17:24
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>
@mejo- mejo- force-pushed the backport/5541/stable27 branch from cd524da to f89a498 Compare April 2, 2024 16:09
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
@mejo- mejo- force-pushed the backport/5541/stable27 branch from f89a498 to 4dabf75 Compare April 2, 2024 16:13
@mejo- mejo- marked this pull request as ready for review April 3, 2024 10:24
@mejo-
Copy link
Member

mejo- commented Apr 3, 2024

/compile

Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@mejo- mejo- merged commit 0d4d8b3 into stable27 Apr 3, 2024
56 of 58 checks passed
@mejo- mejo- deleted the backport/5541/stable27 branch April 3, 2024 13:08
@Altahrim Altahrim mentioned this pull request Apr 17, 2024
4 tasks
@max-nextcloud max-nextcloud mentioned this pull request Jun 5, 2024
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.

3 participants