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

Issue with y.js state loading for read only documents #5574

Closed
juliusknorr opened this issue Mar 27, 2024 · 0 comments · Fixed by #5589
Closed

Issue with y.js state loading for read only documents #5574

juliusknorr opened this issue Mar 27, 2024 · 0 comments · Fixed by #5589
Labels
1. to develop bug Something isn't working high

Comments

@juliusknorr
Copy link
Member

juliusknorr commented Mar 27, 2024

Steps to reproduce:

  • Create a new text document with some content
  • Create a read only share link
  • Close the document
  • Reset the document
  • Open the read only share link in a private window
  • Reload the share link in the browser

With the refactoring of the initialization of the document from the document content only happening once we now have a situation where the second attempt of the initialization assumes a y.js state and steps containing the document content, but those steps have never been pushed by the first session as it is read only.

Catched by cypress when the first test is failing and the retry is running into that

Screenshots from the failing tests on main (cannot reproduce locally)

Open test md in viewer -- Opens the editor as guest (failed)

Open test md in viewer -- Opens the editor as guest (failed) (attempt 2)

Open test md in viewer -- Opens the editor as guest (failed) (attempt 3)

Briefly discussed options with @mejo-

  • If we are creating a read only session we could always reset the state if no steps and an empty state is present
  • Just use the document content to show the read only document until a edit session has actually pushed a state (likely preferrable as the cleanup could be too heavy on high traffic documents)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop bug Something isn't working high
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant