Skip to content

[pull] main from tldraw:main#253

Merged
pull[bot] merged 2 commits intocode:mainfrom
tldraw:main
Nov 4, 2025
Merged

[pull] main from tldraw:main#253
pull[bot] merged 2 commits intocode:mainfrom
tldraw:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented Nov 4, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

mimecuvalo and others added 2 commits November 4, 2025 09:30
followup to #6951

we were getting these errors which it seems happens when there's a
server error, and it's trying to set an error response code (e.g.
4xx/5xx):
https://tldraw.sentry.io/issues/6965320409/events/97f5af83422748fc82dc345776874544/events/?environment=production-tldraw-multiplayer&project=4503966963662848&query=user.display%3A2a06%3A98c0%3A3600%3A%3A103&referrer=previous-event

### Change type

- [ ] `bugfix`
- [ ] `improvement`
- [ ] `feature`
- [ ] `api`
- [x] `other`

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Wrap the response in `worker.ts` before calling `corsify` to prevent
immutable headers errors while preserving `set-cookie` handling.
> 
> - **Worker CORS handling**
> - In `apps/dotcom/sync-worker/src/worker.ts` `after` hook, create a
mutable `Response` (`new Response(response.body, response)`) and pass it
to `corsify`.
> - Continue manually restoring `set-cookie` headers on the final
response.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
d83e76d. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
persistence_good wasn't triggering reliably

### Change type

- [x] `other`

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Track persistence health state to emit `persistence_bad` on threshold
and `persistence_good` after successful recovery.
> 
> - **Sync worker (`TLDrawDurableObject.ts`)**:
> - Add `persistenceBad` flag to track persistence health state across
retries.
>   - In `persistToDatabase`:
> - Set `persistenceBad = true` and broadcast `persistence_bad` when
`attempt === PERSIST_RETRIES_NOTIFY_THRESHOLD`.
> - After a successful persist, if `persistenceBad` is true, broadcast
`persistence_good` and reset the flag.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
519d626. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@pull pull Bot locked and limited conversation to collaborators Nov 4, 2025
@pull pull Bot added the ⤵️ pull label Nov 4, 2025
@pull pull Bot merged commit 6e26a8c into code:main Nov 4, 2025
@pull pull Bot had a problem deploying to deploy-staging November 4, 2025 15:13 Failure
@pull pull Bot had a problem deploying to deploy-production November 4, 2025 15:13 Failure
@pull pull Bot had a problem deploying to deploy-staging November 4, 2025 15:13 Failure
@pull pull Bot had a problem deploying to deploy-staging November 5, 2025 00:23 Failure
@pull pull Bot temporarily deployed to e2e-dotcom November 5, 2025 02:20 Inactive
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants