From 7fc84ecf0b4dfab149e0447c013a5b29decb4a7c Mon Sep 17 00:00:00 2001 From: "blinkagent[bot]" <237617714+blinkagent[bot]@users.noreply.github.com> Date: Thu, 15 Jan 2026 16:19:20 +0000 Subject: [PATCH] feat: move stop button from shortcuts to kebab menu in workspace list (#21518) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Moves the stop action from the icon-button shortcuts to the kebab menu (WorkspaceMoreActions) in the workspaces list view. ## Problem The stop icon was difficult to recognize without context in the workspace list view. Users couldn't easily identify what the stop button did based on the icon alone. ## Solution - The stop action is not a primary action and doesn't need to be highlighted in the icon-button view - Moved the stop action into the kebab (⋮) menu - The start button remains as a primary action when the workspace is offline, since starting a workspace is a more common and expected action ## Changes - `WorkspaceMoreActions`: Added optional `onStop` and `isStopPending` props to conditionally render a "Stop" menu item - `WorkspacesTable`: Removed the stop `PrimaryAction` button and instead passes the stop callback to `WorkspaceMoreActions` when the workspace can be stopped ## Testing - TypeScript compiles without errors - All existing tests pass - Manually verified that the stop action appears in the kebab menu when the workspace is running Fixes #21516 --- Created on behalf of @jacobhqh1 --------- Co-authored-by: blink-so[bot] <211532188+blink-so[bot]@users.noreply.github.com> Co-authored-by: Jake Howell --- .../WorkspaceMoreActions.tsx | 12 ++++++++++++ .../pages/WorkspacesPage/WorkspacesTable.tsx | 17 ++++++----------- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/site/src/modules/workspaces/WorkspaceMoreActions/WorkspaceMoreActions.tsx b/site/src/modules/workspaces/WorkspaceMoreActions/WorkspaceMoreActions.tsx index ca0e980333..d9418db618 100644 --- a/site/src/modules/workspaces/WorkspaceMoreActions/WorkspaceMoreActions.tsx +++ b/site/src/modules/workspaces/WorkspaceMoreActions/WorkspaceMoreActions.tsx @@ -21,6 +21,7 @@ import { EllipsisVertical, HistoryIcon, SettingsIcon, + SquareIcon, TrashIcon, } from "lucide-react"; import { type FC, useEffect, useState } from "react"; @@ -37,11 +38,15 @@ import { WorkspaceDeleteDialog } from "./WorkspaceDeleteDialog"; type WorkspaceMoreActionsProps = { workspace: Workspace; disabled: boolean; + onStop?: () => void; + isStopping?: boolean; }; export const WorkspaceMoreActions: FC = ({ workspace, disabled, + onStop, + isStopping, }) => { const queryClient = useQueryClient(); @@ -115,6 +120,13 @@ export const WorkspaceMoreActions: FC = ({ + {onStop && ( + + + Stop… + + )} + = ({ )} - {abilities.actions.includes("stop") && ( - setIsStopConfirmOpen(true)} - isLoading={stopWorkspaceMutation.isPending} - label="Stop workspace" - > - - - )} - {abilities.actions.includes("updateAndStart") && ( <> = ({ setIsStopConfirmOpen(true) + : undefined + } + isStopping={stopWorkspaceMutation.isPending} />