Skip to content

[pull] main from tldraw:main#599

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

[pull] main from tldraw:main#599
pull[bot] merged 3 commits into
code:mainfrom
tldraw:main

Conversation

@pull

@pull pull Bot commented Jun 17, 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 : )

steveruizok and others added 3 commits June 17, 2026 08:53
…naming (#9244)

In order to capture how the dotcom workspaces (groups) feature currently
behaves and to document it for users, this PR adds:

- **`apps/dotcom/workspaces-feature.md`** — an engineering feature
review of the current implementation: data model, permission model, sync
model, core rules, user journeys, and multiplayer scenarios. It
describes present behavior, not a proposal for a new design.
- **`apps/dotcom/user-manual.md`** — a user-facing workspaces manual
covering home vs team workspaces, roles, invites, member management, and
the separation between file sharing and workspace membership.
-
**`apps/dotcom/client/e2e/tests/workspaces-feature-coverage.scenario.spec.ts`**
— skipped (`test.fixme`) e2e scenario placeholders for the multiplayer
and import behaviors the review flagged as untested. Each names the
behavior to assert when implemented.

It also aligns a few stale source comments and migration text to reflect
that the home workspace now defaults to "My workspace" and is renameable
(follow-up to #9242).

### Change type

- [x] `other`

### Test plan

- Documentation and comment-only changes; no behavior change. Migration
`036` text is comment-only.
- The new e2e file contains only `test.fixme` placeholders, so it adds
no running tests; it imports the existing `scenario-test` fixture.

### Release notes

- Internal documentation only; no user-facing changes.
…#9085)

In order to make workspace invite links feel intentional to people who
aren't signed in, this PR shows the invite message before sign-in
(#9082) — and rather than presenting that dialog on a blank page, the
invite route now resolves to the normal root experience with the dialog
overlaid on top.

For a logged-out visitor, `/invite/:token` stores the token, redirects
to `/`, and the anonymous editor renders behind the sign-in dialog,
which reads "You have been invited to join **{workspace name}**". The
invite info comes from the auth-free `/api/app/invite/:token` endpoint;
invalid or expired tokens fall back to the plain sign-in dialog, so
nothing hangs if the lookup fails. For a signed-in visitor nothing
changes: they land on their most recent file with the accept-invite
dialog on top, as before.

Mechanically, `WorkspaceInviteHandler` (mounted at the root) now owns
both halves of the invite flow. The invite route redirects with an
`?invite=true` marker; the handler shows the sign-in dialog only when
arriving with that marker and strips it once the dialog is up. This
matters because the invite token intentionally stays in session storage
after the dialog is dismissed (so a later sign-in still completes the
join) — without the marker, every reload of tldraw.com in the same tab
would re-show the dialog. Dismissing the dialog simply leaves the
visitor on the usable anonymous editor.

### Change type

- [x] `improvement`

### Test plan

You need a workspace invite link. Create it while signed in, then test
the logged-out experience in an incognito window.

**Setup**

1. Open the preview deploy at https://pr-9085-preview-deploy.tldraw.com/
and sign in.
2. Turn on the workspaces UI for your account: go to
https://pr-9085-preview-deploy.tldraw.com/admin, search for your email,
and enrol yourself in groups.
3. Create a workspace, open workspace settings, and copy the invite
link.

**Logged-out invite (the change)**

4. Open an incognito window and paste the invite link
(`/invite/:token`).
5. ✅ You land on the anonymous editor (not a blank page) with the
sign-in dialog on top reading "You have been invited to join
**{workspace name}**".
6. Close the dialog → you stay on the anonymous editor and can draw.
7. Reload tldraw.com in the same tab → the invite dialog does not
reappear.
8. Open a second workspace's invite link → the dialog shows the new
workspace's name.
9. Sign in through the dialog → the join completes (accept-invite
dialog, or the already-a-member toast) as before.

**Edge cases / no regression**

10. In an incognito window, open an invalid or expired invite link → the
plain sign-in dialog shows over the editor with no invite line (doesn't
hang).
11. While signed in, open a valid invite link → still lands on your most
recent file and shows the accept-invite dialog.

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

### Release notes

- Show the invited workspace's name on the sign-in dialog when a
logged-out user opens an invite link, with the anonymous editor visible
behind instead of a blank page.

### Code changes

| Section         | LOC change |
| --------------- | ---------- |
| Apps            | +143 / -75 |
| Tests           | +93 / -1   |
| Automated files | +19 / -0   |
In order to avoid showing a control that does nothing, this PR hides the
"Move to" submenu in the sidebar file menu for linked files — files the
user doesn't own but has visited, which appear in "My workspace" and
cannot be moved to another workspace.

Previously the "Move to" submenu rendered for every file when workspaces
were enabled. For a linked file, picking a destination workspace
dispatched `moveFileToWorkspace`, which the server rejects because the
user lacks `removeFiles` permission on the file's owning workspace. The
menu options looked actionable but silently did nothing.

The submenu is now gated on `hasAdminRights` (from
`useHasFileAdminRights`), the same check already used for the rename
item and the delete-vs-forget label. Linked files return `false` here,
so the three owner-only actions are now consistently hidden together.

### Change type

- [x] `bugfix`

### Test plan

1. Enable workspaces (`groups_frontend`).
2. Visit a file shared by another user so it appears under "My
workspace" as a linked/guest file.
3. Open that file's menu in the sidebar and confirm there is no "Move
to" submenu (and the action is "Forget", not "Delete").
4. Open the menu for a file you own and confirm "Move to" still appears
and works.

### Release notes

- Hide the "Move to" submenu for linked files in the sidebar, since they
can't be moved to another workspace.
@pull pull Bot locked and limited conversation to collaborators Jun 17, 2026
@pull pull Bot added the ⤵️ pull label Jun 17, 2026
@pull
pull Bot merged commit 1e5fce8 into code:main Jun 17, 2026
@pull
pull Bot had a problem deploying to bemo-canary June 17, 2026 09:13 Failure
@pull
pull Bot had a problem deploying to deploy-production June 17, 2026 09:13 Failure
@pull
pull Bot had a problem deploying to deploy-staging June 17, 2026 09:13 Failure
@pull
pull Bot had a problem deploying to deploy-staging June 17, 2026 09:13 Error
@pull
pull Bot had a problem deploying to bemo-canary June 17, 2026 09:13 Failure
@pull
pull Bot had a problem deploying to vsce publish June 17, 2026 09:13 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