Skip to content

feat(workspaces): public and private workspaces (D2) - #496

Merged
huyplb merged 1 commit into
mainfrom
feat/workspaces-public
Oct 10, 2026
Merged

huyplb merged 1 commit into
mainfrom
feat/workspaces-public

Conversation

@huyplb

@huyplb huyplb commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

D2 of the workspaces plan, the last of the series. Stacked on #495 (D6) → #494 → #493 → #492 → #491.

What changes

  • Workspace settings → Who can find it: Private, invite only and hidden (the default), or Public, listed to every signed-in account, which can join it. Going public asks first, because joiners use its saved connections.
  • Join role: viewer (default) or editor, never owner, so a stranger joining cannot remove the owners and archive it.
  • Profile menu → Browse public workspaces → Join switches into it. Already-joined, private, archived and personal workspaces are never listed, and joining one answers 404.
  • Public → private keeps the members and hides it from everyone else. Personal workspaces stay private.
  • PATCH /api/workspaces/:id takes visibility and joinRole; new GET /api/workspaces/discover and POST /api/workspaces/:id/join (contract table 134 → 136).
  • The plan is marked built, with a list of where it differs.

Tests

  • Directory tests (+6): private is hidden and unjoinable; public is listed with its join role; join gives that role and is idempotent; back to private keeps members and hides; personal stays private; settings need workspace.settings; values are checked (owner refused); archived is neither listed nor joinable. A/B: private-joinable, personal-may-go-public and discover-lists-private each fail.
  • Component tests: browse → join → switch, empty list, visibility + join role (viewer/editor only), no change without confirming, no visibility section for personal workspaces or viewers.
  • e2e workspaces.test.ts 8/8 against the dev server: the owner makes the workspace public in settings; a second throwaway account (editor account) finds it under Browse, joins as viewer, has no editor.ddl there, and sees the shared connection; back to private keeps it and hides it from others.
  • Full suite 6042 passed.

Review

Fixed: an owner join role, going public with no confirmation, the join role being cut off by long names.

🤖 Generated with Claude Code


Note

Medium Risk
Changes who can join workspaces and at what role, exposing saved connections to any signed-in user when public; join role is capped at editor but membership and permission boundaries still need careful review.

Overview
Adds public workspaces so owners can list a team workspace to every signed-in user and let them self-join, with a configurable join role (viewer or editor only).

Backend: PATCH /api/workspaces/:id now accepts visibility and joinRole via updateSettings (rename folded in). New GET /api/workspaces/discover and POST /api/workspaces/:id/join add members at the workspace’s join role; private, personal, archived, and already-joined workspaces are excluded or return not found. Personal workspaces cannot go public.

UI: Workspace settings (Who can find it) for owners includes a visibility select with a confirmation when going public, plus join-role when public. The profile menu adds Browse public workspaces with list/join and switches workspace after join.

Tests & docs: Directory, component, and e2e coverage for the full flow; HTTP contract count 134→136; workspaces plan marked built; new test IDs.

Reviewed by Cursor Bugbot for commit 743677f. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor

cursor Bot commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot 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: a9c5b604-2829-4b23-8381-882e4db4ff60)

@github-actions

Copy link
Copy Markdown
Contributor

Test IDs

Added (8)

  • workspace-menu-browse
  • workspace-menu-public
  • workspace-menu-public-empty
  • workspace-menu-public-join-{…}
  • workspace-menu-public-{…}
  • workspace-settings-join-role
  • workspace-settings-visibility
  • workspace-settings-visibility-select

{…} is a part filled in at run time. The full tree: docs/testing/TEST_IDS.md.

@huyplb
huyplb force-pushed the feat/workspaces-admin branch from 64361a5 to 922cc7d Compare October 10, 2026 04:36
Base automatically changed from feat/workspaces-admin to main October 10, 2026 04:40
…ns a public one

D2 of the workspaces plan, and the last of the series.

- Workspace settings: Private (invite only, hidden) or Public (listed
  to every signed-in account), with the role joiners get: viewer or
  editor, never owner. Going public asks first: joiners use its saved
  connections.
- Profile menu: Browse public workspaces → Join (switches there).
- GET /api/workspaces/discover, POST /api/workspaces/:id/join; a
  private, archived or personal workspace answers not found.
- Public → private keeps members and hides it. Personal workspaces
  stay private.
- Plan marked built, with where it differs; handoff doc updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@huyplb
huyplb force-pushed the feat/workspaces-public branch from bea20e2 to 743677f Compare October 10, 2026 04:41
@cursor

cursor Bot commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot 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: 8b4cbbe8-a664-4ead-9c52-7515fc781190)

@huyplb
huyplb merged commit 68b4113 into main Oct 10, 2026
13 checks passed
@huyplb
huyplb deleted the feat/workspaces-public branch October 10, 2026 04:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant