Skip to content

[pull] main from tldraw:main#579

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

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

Conversation

@pull

@pull pull Bot commented Jun 8, 2026

Copy link
Copy Markdown

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

jsscclr and others added 2 commits June 8, 2026 16:04
In order to let an admin turn the groups experience on for a specific
user, this PR adds an "Enroll in groups" action to the `/admin` page
that grants both groups flags. Closes #9062.

The page previously only had a single-user "Migrate to Groups" control
that was hidden unless you'd searched a user lacking `groups_backend`,
and it only granted `groups_backend` — never `groups_frontend`, the flag
that actually shows the groups UI (otherwise only granted on accepting a
group invite). So there was no usable way to enroll a specific user into
the groups experience.

This replaces that control with an always-visible (per found user)
"Groups enrollment" block that shows the user's current `groups_backend`
/ `groups_frontend` status and an "Enroll in groups" button. The button
calls a new admin endpoint `POST /app/admin/user/enroll_groups` (behind
the existing `@tldraw.com` admin gate), which runs
`admin_enrollInGroups`: migrate the data model if needed (idempotent
`migrate_user_to_groups`) and add `groups_frontend`, then reboot the
user so it takes effect. It reports what changed and is safe to re-run.
The existing batch migration and `POST /app/admin/user/migrate` are
unchanged.

### Change type

- [x] `improvement`

### Test plan

1. Sign in to a local/staging dotcom with an `@tldraw.com` account and
open `/admin`.
2. Enter a user's email or id → **Find User**.
3. In **User Data**, the **Groups enrollment** block shows
`groups_backend ✓/✗ · groups_frontend ✓/✗`.
4. For a user lacking `groups_frontend` (e.g. a freshly created account
— new users get `groups_backend` by default but not `groups_frontend`),
click **Enroll in groups** → confirm. The status flips to both ✓, and
the groups UI appears for that user on their next load.
5. Re-running on an already-enrolled user reports "already fully
enrolled" (idempotent).

### Code changes

| Section | LOC change |
| ------- | ---------- |
| Apps    | +101 / -21 |
#9018)

👩: this also has the nice effect of removing a hardcoded reference to
the select tool from `editor` and moving it up into `tldraw`

---

In order to keep `@tldraw/editor` free of concrete default overlay
utils, this PR moves `ShapeIndicatorOverlayUtil` (and its
`TLShapeIndicatorOverlay` type) out of the editor package and into
`tldraw`, where every other built-in overlay util already lives
(`BrushOverlayUtil`, `ScribbleOverlayUtil`, `ShapeHandleOverlayUtil`,
and the rest). `ShapeIndicatorOverlayUtil` was the lone concrete overlay
util still defined in the editor package; after this change
`defaultOverlayUtils` is assembled entirely from tldraw-local utils, and
the editor package keeps only the abstractions: the `OverlayUtil` base
class and the `strokeShapeIndicators` helper.

The `strokeShapeIndicators` helper stays in `@tldraw/editor` — it
depends only on `ShapeUtil.getIndicatorPath` and is shared by other
indicator overlays (e.g. `CollaboratorShapeIndicatorOverlayUtil`). It's
been extracted into its own `strokeShapeIndicators.ts` module so the
moved class can import it from the editor.

For consumers importing from `'tldraw'`, nothing changes —
`ShapeIndicatorOverlayUtil` and `TLShapeIndicatorOverlay` are still
exported from there. Only code importing those two symbols directly from
`'@tldraw/editor'` needs to update its import path.

The `defaultOverlayUtils` array is also reordered alphabetically. This
is cosmetic: registration order only breaks ties between utils with
equal `zIndex`, and every overlay util has a distinct `zIndex`, so paint
and hit-test order are unchanged.

This PR also tidies the `indicators-logic` example: the four geo shapes
are given a clearer layout (an ellipse and a text shape are added), the
two bottom-left shapes are grouped on mount to show indicators on a
group, and the README explains what shape indicators are.

### Change type

- [x] `api`

### Test plan

1. Open the `indicators-logic` example; confirm indicators are drawn
around every shape, including the grouped pair in the bottom left and
the group itself.
2. In any default tldraw editor, confirm selection and hover indicators
still render and hit-test correctly (selection, brushing, handles).
3. Confirm `import { ShapeIndicatorOverlayUtil, TLShapeIndicatorOverlay
} from 'tldraw'` resolves.

- [x] Unit tests

### Release notes

- Move `ShapeIndicatorOverlayUtil` and `TLShapeIndicatorOverlay` from
`@tldraw/editor` to `tldraw`. They remain exported from `tldraw`; update
any direct `@tldraw/editor` imports of these two symbols.

### API changes

`@tldraw/editor`:

- Breaking! Removed `ShapeIndicatorOverlayUtil` (moved to `tldraw`).
- Breaking! Removed `TLShapeIndicatorOverlay` (moved to `tldraw`).
- `strokeShapeIndicators` is unchanged and still exported (now from its
own module).

`tldraw`:

- Added `ShapeIndicatorOverlayUtil` (moved from `@tldraw/editor`).
- Added `TLShapeIndicatorOverlay` (moved from `@tldraw/editor`).
- `defaultOverlayUtils` now references the tldraw-local
`ShapeIndicatorOverlayUtil`; its entries are reordered alphabetically
(behavior-preserving, since all z-indices are distinct).

### Code changes

| Section         | LOC change |
| --------------- | ---------- |
| Core code       | +108 / -107 |
| Automated files | +28 / -29  |
| Documentation   | +19 / -6   |
@pull pull Bot locked and limited conversation to collaborators Jun 8, 2026
@pull pull Bot added the ⤵️ pull label Jun 8, 2026
@pull pull Bot merged commit 5e2eb65 into code:main Jun 8, 2026
@pull pull Bot had a problem deploying to bemo-canary June 8, 2026 21:13 Failure
@pull pull Bot had a problem deploying to npm deploy June 8, 2026 21:13 Failure
@pull pull Bot had a problem deploying to npm deploy June 8, 2026 21:13 Failure
@pull pull Bot had a problem deploying to deploy-staging June 8, 2026 21:13 Error
@pull pull Bot had a problem deploying to deploy-staging June 8, 2026 21:13 Failure
@pull pull Bot had a problem deploying to vsce publish June 8, 2026 21:13 Failure
@pull pull Bot had a problem deploying to deploy-production June 8, 2026 21:13 Failure
@pull pull Bot had a problem deploying to bemo-canary June 8, 2026 21:13 Failure
@pull pull Bot had a problem deploying to deploy-staging June 9, 2026 00:51 Failure
@pull pull Bot temporarily deployed to e2e-dotcom June 9, 2026 02:38 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