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

Collaboration when websockets disable overides content #456

Open
virgile-dev opened this issue Nov 26, 2024 · 1 comment · May be fixed by #517
Open

Collaboration when websockets disable overides content #456

virgile-dev opened this issue Nov 26, 2024 · 1 comment · May be fixed by #517
Assignees

Comments

@virgile-dev
Copy link
Collaborator

Bug Report

Problematic behavior
A user that blocks websockets that is working on a collaborative documents will overide the other user content (or his content will get erased) when refreshing the page.

This is an issue because the user without websockets saves automatically in the Django data base.

Expected behavior/code
I shouldn't overide content when collaborating.

Steps to Reproduce

  1. Disable web sockets
  2. Open 2 tabs with the same doc (or share the link with someone with websockets)
  3. Write content on the 3 first blocks on both tabs
  4. Wait 30 sec and refresh the page
  5. See that one version was kept over the other one. One was overidden.

Environment

  • Impress version:
  • Platform:

Possible Solution

  • Detect when a user doesn't have access to web sockets and display a banner "Your laptop configuration prevents live collaboration, if you continue editing the document you might override others' work and vice versa.
    • The banner should be displayed when the doc is shared (specific invite + link sharing + edit permission)
  • We could disable auto-saving if the user is disconnected from websocket and add a manual saving button that syncs the edits and does a merge
  • Attributing a version to a user we could see if the user editing is the one who last saved
  • The hocus pocus server could be configured in a way where it centralizes the edits and prevent conflicts
  • Add long polling support when we detect there are no web sockets support

Additional context/Screenshots
Add any other context about the problem here. If applicable, add screenshots to help explain.

@virgile-dev
Copy link
Collaborator Author

An interesting solution would be to use a proxy server that accepts long-polling and connects to HocusPocus via Websockets (this way we don't need to change HocusPocus and / or rely on them merging the changes). That's what @AntoLC will investigate in the next few weeks.

@AntoLC AntoLC linked a pull request Dec 18, 2024 that will close this issue
8 tasks
@virgile-dev virgile-dev moved this from To do to In Progress in Docs - La Suite Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

2 participants