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

Commits on Apr 2, 2024

  1. Configuration menu
    Copy the full SHA
    85795d6 View commit details
    Browse the repository at this point in the history
  2. fix(backend): Reset document session when updated from outside editor

    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 <[email protected]>
    mejo- committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    8e741de View commit details
    Browse the repository at this point in the history
  3. fix(backend): Remove yjs file and all steps when resetting document s…

    …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 <[email protected]>
    mejo- committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    8e1ad16 View commit details
    Browse the repository at this point in the history
  4. fix: catch expected exception in event handler

    Signed-off-by: Julius Härtl <[email protected]>
    juliushaertl authored and mejo- committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    cc2e6c3 View commit details
    Browse the repository at this point in the history
  5. fix: Clean up logic to return document state file or file content

    Signed-off-by: Julius Härtl <[email protected]>
    juliushaertl authored and mejo- committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    aa236cf View commit details
    Browse the repository at this point in the history
  6. fix: Set base version etag to a unique id per document creation

    Signed-off-by: Julius Härtl <[email protected]>
    juliushaertl authored and mejo- committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    c2798f2 View commit details
    Browse the repository at this point in the history
  7. 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.
    
    Signed-off-by: Jonas <[email protected]>
    mejo- committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    ae78252 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    f72fb5b View commit details
    Browse the repository at this point in the history
  9. fix(DocumentStatus): Refactor and migrate to NcNoteCard

    Fixes: #4905
    
    Signed-off-by: Jonas <[email protected]>
    mejo- committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    af37fe4 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    25ad80e View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    628e463 View commit details
    Browse the repository at this point in the history
  12. fix(response): Make sure JSONResponse returns valid data

    Wrap error messages into an array when responding with `JSONResponse`.
    
    Signed-off-by: Jonas <[email protected]>
    mejo- committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    907d2d4 View commit details
    Browse the repository at this point in the history
  13. fix: Create idempotent y.js doc for initial content

    Signed-off-by: Julius Härtl <[email protected]>
    juliushaertl authored and mejo- committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    261051c View commit details
    Browse the repository at this point in the history
  14. tests: Add tests for loading documents from different preconditions

    Signed-off-by: Julius Härtl <[email protected]>
    juliushaertl authored and mejo- committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    134106f View commit details
    Browse the repository at this point in the history
  15. fix: Always return initial content when needed

    Signed-off-by: Julius Härtl <[email protected]>
    juliushaertl authored and mejo- committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    64a6252 View commit details
    Browse the repository at this point in the history
  16. tests: Adjust tests covering initial state

    Signed-off-by: Julius Härtl <[email protected]>
    juliushaertl authored and mejo- committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    d464338 View commit details
    Browse the repository at this point in the history
  17. ci: Make cypress test more stable by closing connections

    Signed-off-by: Julius Härtl <[email protected]>
    juliushaertl authored and mejo- committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    ddabaf0 View commit details
    Browse the repository at this point in the history
  18. fix: Adapt to review feedback

    Signed-off-by: Julius Härtl <[email protected]>
    juliushaertl authored and mejo- committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    499a54f View commit details
    Browse the repository at this point in the history