tldraw / tldraw

SDK for creating whiteboards and canvas experiences on the web.
https://tldraw.dev
Other
33.04k stars 1.98k forks source link

Allow clients to gracefully handle rejection #3673

Closed ds300 closed 2 weeks ago

ds300 commented 2 weeks ago

This PR fixes the issue where sync clients would get into a reconnect loop after being rejected by the sync server.

Change Type

Test Plan

  1. Gonna manually test this one by doing sneaky deploys to a test PR
vercel[bot] commented 2 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
examples ✅ Ready (Inspect) Visit Preview May 2, 2024 9:52am
1 Ignored Deployment | Name | Status | Preview | Updated (UTC) | | :--- | :----- | :------ | :------ | | **tldraw-docs** | ⬜️ Ignored ([Inspect](https://vercel.com/tldraw/tldraw-docs/DxD2ZuuDiH413Pb65oBGwpGUUvDu)) | [Visit Preview](https://tldraw-docs-git-david-graceful-rejection-tldraw.vercel.app) | May 2, 2024 9:52am |
ds300 commented 2 weeks ago

hm when testing this in preview deploys it didn't show the 'offline' indicator and it didn't clear the canvas so it looked like all was fine and could very easily lead to data loss, so I'm gonna investigate replacing the editor's content with a 'please refresh the page' notice of some kind.