Repository navigation
feat(workspaces): create shared workspaces, switch, manage members (D3) - #493
Merged
Merged
Conversation
Contributor
Test IDsAdded (22)
|
Contributor
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: f1eaecb9-b024-4c46-85f7-42f6d8ae33d4) |
This was referenced Oct 10, 2026
huyplb
force-pushed
the
feat/workspaces-foundation
branch
from
October 10, 2026 04:23
94b7577 to
fd40ee9
Compare
…ge members D3 of the workspaces plan. - /api/workspaces: list (with the current one), create, select, rename, archive, members (add directly as admin, change role, remove, leave). - What a caller may do to a workspace comes from its role in that workspace. A workspace always keeps an owner; a personal workspace always keeps its account. - Creating is for admins, or everyone when the admin turns on "Members can create workspaces" (App users). - The current workspace is kept on the server (last selected), so switching is select + reload and every request, tab and CLI follow. - Profile menu: workspace list, Workspace settings, New workspace. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
huyplb
force-pushed
the
feat/workspaces-shared
branch
from
October 10, 2026 04:27
e86e756 to
e133993
Compare
Contributor
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: db890e35-59fd-4610-b503-2c331f84f691) |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
D3 of the workspaces plan. Stacked on #492 (D5) → #491 (D1).
What changes
/api/workspaces: list withcurrentIdandcanCreate, create,select, rename, archive, members (admin adds an existing account directly; owners change roles and remove; anyone leaves). Contract table 119 → 127.workspace.members,workspace.settings), not from the workspace the request acts in. Non-members get 404.user_preferences.last_workspace_id), so switching is select + reload. Several feature APIs callfetchdirectly and would never send a header.Tests
workspace-directory.service.test.ts(14): creating (admin / setting / name rules), a shared connection visible to members and only there, viewer-in-workspace permissions, a viewer account owning a workspace gets no code cells, select, owner and personal guards, leave, archive. A/B: no role check, no owner guard and anyone-creates each fail.workspaces.test.tsagainst the dev server: create from the menu → current; a connection saved there is absent from the personal workspace; rename via settings. It always restores the admin's own workspace.Review
Left as is: tabs saved in the browser can name a connection from the previous workspace after switching; a non-owner account can't rename its own workspace.
🤖 Generated with Claude Code
Note
Medium Risk
Touches auth-scoped data isolation (connections per workspace), session workspace selection, and member/role enforcement—important for access control but heavily tested.
Overview
Adds shared workspaces end-to-end: a new
/api/workspacessurface (list withcurrentId/canCreate, create, select, rename, archive, members) backed byWorkspaceDirectory, with permissions evaluated against the target workspace role and non-members getting 404.The profile menu gains lazy-loaded Workspace UI: switch workspaces (select + full reload), create when allowed, and open Workspace settings for rename, member roles, leave, and archive. Admins get a Members can create workspaces toggle on the app-users policy screen, wired through
membersCanCreateWorkspaceson/admin/policy.Coverage includes server directory tests, component tests for the menu/dialog, an e2e
workspaces.test.tsin the default runner, generated test IDs, and HTTP contract entries (119 → 127 routes).Reviewed by Cursor Bugbot for commit e133993. Bugbot is set up for automated code reviews on this repo. Configure here.