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): push local changes on reconnect #5279

Merged
merged 6 commits into from
Jan 19, 2024
Merged

Commits on Jan 18, 2024

  1. fix(sync): push local changes on reconnect

    When an editing session is interrupted
    steps that were already pushed to the server
    may be cleared alongside the sync service session.
    
    Make sure to push all local state
    that is not part of the document state
    when (re-)connecting.
    
    Tests
    
    Yjs relies on a browser environment.
    Therefore we test it in a cypress test.
    Move these tests into component tests
    to separate them from 'normal' e2e tests.
    
    Signed-off-by: Max <[email protected]>
    max-nextcloud committed Jan 18, 2024
    Configuration menu
    Copy the full SHA
    57662df View commit details
    Browse the repository at this point in the history
  2. fix(sync): keep yjs file during sync session cleanup

    Even if all sessions have expired and been removed
    there may still be disconnected clients
    that hold state from the last editing session.
    
    When they reconnect they will send their yjs updates
    based on the old state they had.
    Preserve the yjs state accross editing sessions
    so updates send after a reconnect can still be processed.
    
    Signed-off-by: Max <[email protected]>
    max-nextcloud committed Jan 18, 2024
    Configuration menu
    Copy the full SHA
    fa145e8 View commit details
    Browse the repository at this point in the history
  3. test(cy): components in CI

    Signed-off-by: Max <[email protected]>
    max-nextcloud committed Jan 18, 2024
    Configuration menu
    Copy the full SHA
    a643da0 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    31d0592 View commit details
    Browse the repository at this point in the history
  5. docs(js): add return type annotations

    Signed-off-by: Max <[email protected]>
    max-nextcloud committed Jan 18, 2024
    Configuration menu
    Copy the full SHA
    a7b6175 View commit details
    Browse the repository at this point in the history
  6. fix(sync): yjs messages are Uint8Arrays in the queue

    Remove duplicate encoding for updateMessage
    
    Signed-off-by: Max <[email protected]>
    max-nextcloud committed Jan 18, 2024
    Configuration menu
    Copy the full SHA
    89493af View commit details
    Browse the repository at this point in the history