Commit 98541f1
authored
server-side-init followup (tldraw#7066)
accidentally merged tldraw#7058 without these commits
### Change type
- [x] `other`
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Triggers a welcome dialog on first-time user init and hardens
server-side user creation with a duplicate-check and unified timestamps.
>
> - **Client (TldrawApp)**
> - Show welcome dialog after initializing a brand-new user by updating
local session state (`updateLocalSessionState` in `TldrawApp.create`).
> - **Sync Worker (TLUserDurableObject)**
> - Guard user/group creation inside transaction to avoid duplicate
inserts if concurrent requests race.
> - Use a single `now` timestamp for `createdAt`/`updatedAt` across
inserted rows.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
a90eac1. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent ef0eba1 commit 98541f1
2 files changed
Lines changed: 13 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
782 | 783 | | |
783 | 784 | | |
784 | 785 | | |
| 786 | + | |
785 | 787 | | |
786 | 788 | | |
787 | 789 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
95 | 100 | | |
96 | 101 | | |
97 | 102 | | |
| |||
104 | 109 | | |
105 | 110 | | |
106 | 111 | | |
107 | | - | |
108 | | - | |
| 112 | + | |
| 113 | + | |
109 | 114 | | |
110 | 115 | | |
111 | 116 | | |
| |||
114 | 119 | | |
115 | 120 | | |
116 | 121 | | |
117 | | - | |
118 | | - | |
| 122 | + | |
| 123 | + | |
119 | 124 | | |
120 | 125 | | |
121 | 126 | | |
| |||
125 | 130 | | |
126 | 131 | | |
127 | 132 | | |
128 | | - | |
129 | | - | |
| 133 | + | |
| 134 | + | |
130 | 135 | | |
131 | 136 | | |
132 | 137 | | |
| |||
0 commit comments