Skip to content

Add a Shared Workspaces view #992

Description

@EhabY

Add a Shared Workspaces view to the Coder sidebar so users can see workspaces that other people have shared with them, alongside their own.

Tracked by #991.

What it does

  • New Shared Workspaces tree view in the Coder activity bar, shown only when authenticated (when: coder.authenticated), sitting beneath My Workspaces.
  • Lists workspaces returned by the shared:true query, with the owner shown (owner / workspace) since these belong to other users.
  • Filters out workspaces the current user owns and shared outward, so the view shows only what was shared with them.
  • Has its own search/filter command (coder.searchSharedWorkspaces) and refreshes on the same interval and sign-in/out events as the other views.

Implementation notes

  • WorkspaceProvider is now query-driven via a per-view config (showOwner / showMetadata / excludeOwn), so My / All / Shared share one implementation. WorkspaceQuery.Shared = "shared:true" was added.
  • Workspace refresh keys off a shared session state (WorkspaceSessionState) exposed by DeploymentManager, with a dedicated SessionStore owning sign-in/out transitions and revision tracking. This drives clear-and-refetch when the user signs in or out, and prevents stale results from races during deployment switches.
  • View registered as sharedWorkspaces in package.json and wired in extension.ts.

Verification

pnpm typecheck, pnpm lint, and the full unit suite (1854 passed / 1 skipped) all green.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions