Skip to content

feat(workspaces): add workspace and agent actions to the workspaces panel - #1168

Draft
EhabY wants to merge 1 commit into
feat/vsc-1-workspaces-panelfrom
feat/vsc-1-workspace-actions
Draft

EhabY wants to merge 1 commit into
feat/vsc-1-workspaces-panelfrom
feat/vsc-1-workspace-actions

Conversation

@EhabY

@EhabY EhabY commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Stacked on #1154. Enables the overflow-menu actions that #1154 left as disabled placeholders.

Workspace menu, following the dashboard's abilitiesByWorkspaceStatus:

  • Start, Stop, Restart, Update (only when outdated) and Delete... (with a confirmation). A failed build shows Retry, which repeats its transition.
  • When the template forces the active version or updates automatically, an outdated workspace offers Update instead of Start or Restart.
  • Share opens the dashboard's sharing settings (/settings/sharing, Coder 2.26+).

Agent menu: Ping and Speed Test while the agent is connected, and Support Bundle always, since it still collects server-side data without a connection.

Checked before running: every action re-reads the workspace and checks the same shared rules (workspaceActions / agentDiagnostics in @repo/shared). If the status changed since the last list (for example, it started building), the action is skipped with a notification. Stopping or restarting the workspace this window is connected to asks first.

CLI or API:

  • Start uses coder start. It applies the template's version policy, cleans up after a failed start, and reactivates dormant workspaces, matching the server version it was downloaded from.
  • Stop and Delete are single REST builds.
  • Restart is REST: one stop build that queues the start on 2.36+ when the workspace is up to date (a queued start always takes the active version), otherwise stop, wait, then start the same version.
  • Update reuses the existing updateWorkspace.
  • Ping, Speed Test and Support Bundle reuse the existing commands, which now take a { workspace, agent } target. Ping and speed test now target the chosen agent (owner/ws.agent) instead of the workspace's first agent, which also fixes sidebar agent items.

Live status: "All" and "Shared" list only on demand, so the store re-reads just the workspace you acted on every 5s until its build settles, without re-listing.

Pending actions: while an action runs, including its confirmation or parameter prompts, the store publishes it as pendingActions in the panel state. The row shows a spinner in place of the status dot, the hover shows the action ("Stopping"), and the workspace's lifecycle items are disabled. Because the state lives in the extension, the spinner survives the webview being hidden. It clears only after the workspace is re-read, so the old actions never flash back, and the store ignores a second action on a workspace while one runs.

Adds workspace.{stop,restart,delete}.triggered spans and an unavailable abort stage for diagnostics (EVENTS.md). All of this works back to the oldest supported CLI (0.25). One exception: dormant workspaces on 2.1 to 2.6 servers, whose CLIs don't reactivate before starting, so the server's error is shown.

🤖 Generated with Claude Code

@linear-code

linear-code Bot commented Oct 29, 2026

Copy link
Copy Markdown

VSC-1

@EhabY
EhabY added this pull request to stack #1169 October 29, 2026 13:55
@EhabY
EhabY force-pushed the feat/vsc-1-workspace-actions branch 2 times, most recently from af31d97 to fda9174 Compare October 29, 2026 14:44
@EhabY
EhabY force-pushed the feat/vsc-1-workspace-actions branch from fda9174 to 0f3a999 Compare October 29, 2026 17:16
@EhabY
EhabY force-pushed the feat/vsc-1-workspace-actions branch from 0f3a999 to b8691da Compare October 29, 2026 17:21

This branch has not been deployed

No deployments
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