[pull] main from tldraw:main#599
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 : )