Skip to content

[pull] main from tldraw:main#544

Merged
pull[bot] merged 2 commits into
code:mainfrom
tldraw:main
May 12, 2026
Merged

[pull] main from tldraw:main#544
pull[bot] merged 2 commits into
code:mainfrom
tldraw:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented May 12, 2026

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 : )

MitjaBezensek and others added 2 commits May 12, 2026 12:16
…8819)

This PR fixes two distinct breakages in dotcom preview deploys.

## 1. Sync worker durable-object migrations

In order to make preview builds of the sync worker succeed, this PR
overrides the durable-object migration list at the `env.preview` level
so preview workers skip the v10 `delete_classes` migration for
`TLDrawDurableObject`.

Background:
- v1 created `TLDrawDurableObject`. v10 deletes it.
- Fresh preview workers (`pr-XXXX-tldraw-multiplayer`) have no prior
script version, so Cloudflare rejects v10 with code 10074: `Cannot apply
delete-class migration to class 'TLDrawDurableObject' which was not
exported in the previous version of the script`.
- Staging and production already have v10 applied; they keep the
top-level migration list unchanged.

#8638 attempted to drop v10 outright, which would have violated the
append-only invariant (and would orphan the migration tag staging/prod
already recorded). This PR instead adds an `[[env.preview.migrations]]`
block: per Cloudflare's docs, env-level migrations fully replace the
top-level list, so this is a preview-only override.

The preview block also skips v1, since the only point of creating
`TLDrawDurableObject` was to delete it in v10. The leftover `export
class TLDrawDurableObject {}` stub in `worker.ts` is an unbound class
export with no migration record on preview, which CF treats as a no-op
(verified by this PR's own preview deploy).

Relates to #8638 (closed).

## 2. Vercel CLI `--yes` flag

After fixing (1), the deploy job still failed at the `vercel alias set`
step with `Error: unknown or unexpected option: --yes` ([failed
run](https://github.com/tldraw/tldraw/actions/runs/25655757937/job/75303692969)).

Cause: `internal/scripts/deploy-dotcom.ts` had a `vercelCli` helper that
unconditionally injected `--yes` into every subcommand. Per [Vercel's
docs](https://vercel.com/docs/cli/alias), `--yes` is per-subcommand, not
a global flag — valid for `vercel link`, `vercel deploy`, and `vercel
alias rm`, but never for `vercel alias set` / `alias ls`. The injection
was silently tolerated for a long time because the Vercel CLI parsed
`alias` permissively;
[vercel/vercel#14881](vercel/vercel#14881)
removed `permissive: true` from leaf commands so unknown flags now
hard-error.

Fix: drop `--yes` from the generic helper and pass it explicitly only at
the `link` and `deploy` call sites.

### Change type

- [x] `bugfix`

### Test plan

1. Confirm preview deploy of this PR succeeds end-to-end: sync worker
uploads cleanly, and `vercel alias set` no longer rejects `--yes`.
2. Confirm staging/production deploys still apply v1-v10 from the
top-level migration list and still skip prompts via the explicit `--yes`
on `vercel link` and `vercel deploy`.

- [ ] Unit tests
- [ ] End to end tests

### Code changes

| Section        | LOC change |
| -------------- | ---------- |
| Apps           | +50 / -4   |
| Config/tooling | +9 / -3    |
In order to keep the camera position reactor focused on positioning the
HTML layer, this PR moves the text outline / LOD logic into a dedicated
`set text outline` quick reactor. The new reactor reads
`editor.getEfficientZoomLevel()` and only updates the
`--tl-text-outline` CSS custom property when the LOD bucket changes,
instead of recomputing the check on every camera tick alongside the
layer transform.

The `allowTextOutline` ref is renamed to `canUpdateTextOutline` to
better describe what the flag does — it gates future updates after
Safari's one-shot opt-out.

### Change type

- [x] `improvement`

### Test plan

1. Open the examples app and pan/zoom the canvas; text shapes should
still toggle outlines when crossing the `textShadowLod` threshold.
2. Open the examples app in Safari and verify that text outlines remain
disabled.

- [ ] Unit tests
- [ ] End to end tests

### Release notes

- Internal refactor: split text outline updates into their own reactor
on the canvas.

### Code changes

| Section   | LOC change |
| --------- | ---------- |
| Core code | +34 / -26  |
@pull pull Bot locked and limited conversation to collaborators May 12, 2026
@pull pull Bot added the ⤵️ pull label May 12, 2026
@pull pull Bot had a problem deploying to deploy-production May 12, 2026 15:13 Failure
@pull pull Bot had a problem deploying to bemo-canary May 12, 2026 15:13 Failure
@pull pull Bot had a problem deploying to deploy-staging May 12, 2026 15:13 Failure
@pull pull Bot had a problem deploying to npm deploy May 12, 2026 15:13 Failure
@pull pull Bot had a problem deploying to vsce publish May 12, 2026 15:13 Failure
@pull pull Bot had a problem deploying to npm deploy May 12, 2026 15:13 Failure
@pull pull Bot had a problem deploying to deploy-staging May 12, 2026 15:13 Error
@pull pull Bot merged commit 96f18a6 into code:main May 12, 2026
7 of 17 checks passed
@pull pull Bot added the ⤵️ pull label May 12, 2026
@pull pull Bot had a problem deploying to bemo-canary May 12, 2026 15:14 Failure
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