tldraw/packages
David Sheldrick f2827f6409
Allow clients to gracefully handle rejection (#3673)
This PR fixes the issue where sync clients would get into a reconnect
loop after being rejected by the sync server.

- Close the socket when in the error state (see useRemoteSyncClient)
- Show a 'plx refresh the page' screen that doesn't have a sad face on
it.
  
<img width="665" alt="image"
src="https://github.com/tldraw/tldraw/assets/1242537/96025fa3-cc20-4f53-8f58-74e473e16702">

- If older clients who can't handle rejection well need to be rejected
(e.g. due to a store migration being added) then we send them to a
special purgatory where the canvas goes blank and it shows the offline
indicator but the websocket connection stays open and it won't try to
reconnect.

### Change Type

- [x] `dotcom` — Changes the tldraw.com web app
- [x] `bugfix` — Bug fix


### Test Plan

1. Gonna manually test this one by doing sneaky deploys to a test PR
2024-05-02 13:54:21 +00:00
..
assets Fix missing icons (#3654) 2024-04-30 10:39:53 +00:00
dotcom-shared make route prefixes have a single place where they are defined (#3624) 2024-04-27 10:57:55 +00:00
editor Fix className.includes bug (#3672) 2024-05-01 10:43:27 +00:00
namespaced-tldraw Don't check api.json files into git (#3565) 2024-04-24 15:58:26 +00:00
state [signia] perf thing again (#3645) 2024-04-30 13:44:52 +00:00
store Automatic undo/redo (#3364) 2024-04-24 18:26:10 +00:00
tldraw don't render the minimap if it fails to initialize the gl context (#3679) 2024-05-02 11:20:02 +00:00
tlschema Lokalise: Translations update (#3649) 2024-04-30 10:23:23 +00:00
tlsync Allow clients to gracefully handle rejection (#3673) 2024-05-02 13:54:21 +00:00
utils Don't check api.json files into git (#3565) 2024-04-24 15:58:26 +00:00
validate Don't check api.json files into git (#3565) 2024-04-24 15:58:26 +00:00