Skip to content

fix: persist comments on reload in collab mode#1949

Open
palmer-cl wants to merge 4 commits intomainfrom
colep/sd-1260-collaboration-comment-load-failure-on-page-refresh
Open

fix: persist comments on reload in collab mode#1949
palmer-cl wants to merge 4 commits intomainfrom
colep/sd-1260-collaboration-comment-load-failure-on-page-refresh

Conversation

@palmer-cl
Copy link
Collaborator

• Fixed collaboration refresh issues for comments and document content.

Summary

  • Added comment hydration from Yjs on init/rejoin so sidebar comments auto-populate without
    manual comments injection.
  • Ensured collaboration comment sync initializes once and re-hydrates safely when the comments store
    becomes available.
  • Prevented duplicate comment sync listeners/observers during repeated init paths.

Tests

  • Added focused collaboration tests for comment population:
    • Hydration from ydoc (including importedId normalization + dedupe).
    • Re-init behavior that re-hydrates store without duplicating listeners.

@linear
Copy link

linear bot commented Feb 5, 2026

@palmer-cl
Copy link
Collaborator Author

@harbournick @caio-pizzol - let me know what the best way is to test this. I tested in multiple tabs, but Im not sure if theres a more robust way to test this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant