Skip to content

feat(workspaces): show workspace lifecycle actions in the panel - #1184

Draft
EhabY wants to merge 2 commits into
feat/vsc-1-workspace-actionsfrom
feat/vsc-1-workspace-actions-ui
Draft

EhabY wants to merge 2 commits into
feat/vsc-1-workspace-actionsfrom
feat/vsc-1-workspace-actions-ui

Conversation

@EhabY

@EhabY EhabY commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

React side of the workspace lifecycle actions from #1168.

  • The row menu offers the actions workspaceActions allows, plus Share and Settings. While an action runs, the row shows a spinner and pending status, and its lifecycle actions are disabled; the menu's description says why. One ACTION_LABELS table holds each action's label, icon and pending status.
  • Pushed state lives in the React Query cache (queryOptions with skipToken), whose structural sharing keeps unchanged workspaces by identity.
  • TreeRow compares what a row renders with react-fast-compare (new dependency of @repo/ui), leaving out a node's children, which the row does not render. Agent rows get only IDs and a name, so a push that changes one workspace re-renders only that workspace's own row; a panel test checks it.
  • The shared test QueryWrapper creates its client once per mount, so re-renders keep the cache.

Stacked on #1168.

Generated by Coder Agents for @EhabY.

@linear-code

linear-code Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

VSC-1

VSC-45

@EhabY
EhabY added this pull request to stack #1185 November 9, 2026 12:24
@EhabY
EhabY force-pushed the feat/vsc-1-workspace-actions-ui branch 2 times, most recently from 07ebae7 to 9830450 Compare November 9, 2026 12:36
@EhabY
EhabY force-pushed the feat/vsc-1-workspace-actions-ui branch from 8f0c4a7 to c97bd53 Compare November 9, 2026 12:46
@EhabY
EhabY force-pushed the feat/vsc-1-workspace-actions-ui branch from c97bd53 to e7d7c34 Compare November 9, 2026 13:00
@EhabY
EhabY force-pushed the feat/vsc-1-workspace-actions-ui branch from e7d7c34 to 0435def Compare November 9, 2026 13:25
@EhabY
EhabY force-pushed the feat/vsc-1-workspace-actions-ui branch from 0435def to 71410d6 Compare November 9, 2026 13:42
@EhabY
EhabY force-pushed the feat/vsc-1-workspace-actions-ui branch 2 times, most recently from b93cf5d to 1033dd9 Compare November 12, 2026 15:07
@EhabY
EhabY force-pushed the feat/vsc-1-workspace-actions-ui branch from 1033dd9 to 08f1ed5 Compare November 13, 2026 14:19
@EhabY
EhabY force-pushed the feat/vsc-1-workspace-actions-ui branch from 08f1ed5 to 39d1f8b Compare November 13, 2026 14:20
@EhabY
EhabY force-pushed the feat/vsc-1-workspace-actions-ui branch 2 times, most recently from efd14db to 374d9be Compare November 13, 2026 15:14
@EhabY
EhabY force-pushed the feat/vsc-1-workspace-actions-ui branch from 374d9be to 7023899 Compare November 13, 2026 15:57
@EhabY
EhabY force-pushed the feat/vsc-1-workspace-actions-ui branch from 7023899 to 8d302f9 Compare November 13, 2026 18:43
The row menu offers the actions the workspace allows, including Retry for a
failed start or stop, Update when outdated, and Share. A spinner and a
pending status mark a workspace while its action runs, and its lifecycle
actions are disabled until it finishes.

A push that changes one workspace renders only its rows: pushed state lives
in the React Query cache, whose structural sharing keeps unchanged
workspaces by identity, and TreeRow compares what a row renders with
react-fast-compare instead of comparing the row object. The shared test
QueryWrapper now creates its client once per mount.
- Agent rows render OpenActions with the workspace ID, agent ID and
  name, instead of WorkspaceActions with the whole workspace, so a push
  that changes only the workspace no longer renders its agent rows
  again. A panel test checks that only rows whose content changed render.
- One ACTION_LABELS table holds each action's menu label, icon and
  pending status, used by the menu and the row.
- While an action runs, the menu's description says why the lifecycle
  actions are disabled.
- Drop staleTime from the pushed state query: a skipToken query never
  refetches.
@EhabY
EhabY force-pushed the feat/vsc-1-workspace-actions-ui branch from 8d302f9 to 3ee26b5 Compare November 13, 2026 18:52

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