Skip to content

feat: add shared workspaces view#991

Open
EhabY wants to merge 3 commits into
mainfrom
feat/shared-workspaces-review-fixes
Open

feat: add shared workspaces view#991
EhabY wants to merge 3 commits into
mainfrom
feat/shared-workspaces-review-fixes

Conversation

@EhabY
Copy link
Copy Markdown
Collaborator

@EhabY EhabY commented Jun 4, 2026

Summary

  • Add a Shared Workspaces tree view with search and manual refresh actions.
  • Query shared:true, then filter out workspaces owned by the authenticated user outside WorkspaceProvider.
  • Track authenticated user and auth-state version in DeploymentManager so concurrent auth/session changes do not leak stale users into shared-workspace filtering.

Testing

  • pnpm format:check
  • pnpm typecheck
  • pnpm lint
  • pnpm test:extension
Implementation plan and decision log
  • Cherry-picked PR feat: shared workspaces support #957 onto current origin/main and resolved the DeploymentManager conflict while preserving current main's recovery and concurrency guards.
  • Verified coder/coder shared-workspace semantics: shared:true matches any workspace with non-empty user/group ACLs, including current-user-owned workspaces that were shared out, so the extension must filter out workspace.owner_id === currentUserId client-side.
  • Avoided shared_with_user:me because server-side me support is not implemented there and direct-user filtering misses group shares.
  • User chose manual refresh only for Shared Workspaces, matching All Workspaces, instead of polling like My Workspaces.
  • Decoupled WorkspaceProvider from current-user knowledge by adding a filterWorkspaces callback and a state-version guard.
  • Stored the validated authenticated user as #authedUser: User | null in DeploymentManager and exposed getCurrentUserId()/getAuthStateVersion() for shared filtering and stale-fetch detection.

Generated with Coder Agents on behalf of @EhabY.

@EhabY EhabY self-assigned this Jun 4, 2026
@EhabY EhabY force-pushed the feat/shared-workspaces-review-fixes branch from 77214b6 to 67f3cee Compare June 5, 2026 10:39
@EhabY EhabY force-pushed the feat/shared-workspaces-review-fixes branch from 67f3cee to 5073b43 Compare June 5, 2026 10:52
@EhabY EhabY linked an issue Jun 5, 2026 that may be closed by this pull request
@EhabY EhabY force-pushed the feat/shared-workspaces-review-fixes branch 2 times, most recently from 710aebd to 6072dba Compare June 5, 2026 10:59
@EhabY EhabY requested a review from code-asher June 5, 2026 11:02
EhabY and others added 3 commits June 5, 2026 14:05
- collapse per-query branches into a readonly WORKSPACE_QUERY_CONFIG table
- drop the unreachable re-entry branch in the workspace refresh loop
- remove test-only getCurrentUserId; tests read getSnapshot via a helper
- extract the repeated tree-view wiring in extension.ts into a helper
- drive metadata tests through the real watcher over MockEventStream
- move shared test doubles (session, workspaces client, flush) into testHelpers
- replace describe-scoped state + beforeEach/afterEach with a setup() helper
@EhabY EhabY force-pushed the feat/shared-workspaces-review-fixes branch from 6072dba to 0c47e82 Compare June 5, 2026 11:05
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.

Add a Shared Workspaces view

1 participant