Compare commits

...

1 Commits

Author SHA1 Message Date
Stephen Kirby cba2949c75 fix(site): show delete menu for failed devcontainers
The three-dot menu containing the Delete action was hidden for
devcontainers in a failed/error state because showDevcontainerControls
required both a sub-agent and container reference. For failed
devcontainers, neither is typically present.

Decouple the AgentDevcontainerMoreActions rendering from
showDevcontainerControls so the Delete action is always available
regardless of container state. The SSH and port forwarding controls
remain gated behind showDevcontainerControls since they genuinely
need the sub-agent and container.
2026-04-02 15:31:51 +00:00
2 changed files with 23 additions and 5 deletions
@@ -59,6 +59,26 @@ export const HasError: Story = {
},
};
export const HasErrorMenuOpen: Story = {
args: {
devcontainer: {
...MockWorkspaceAgentDevcontainer,
error: "unable to inject devcontainer with agent",
container: undefined,
agent: undefined,
},
subAgents: [],
},
play: async ({ canvasElement }) => {
const user = userEvent.setup();
const canvas = within(canvasElement);
await user.click(
canvas.getByRole("button", { name: "Dev Container actions" }),
);
},
};
export const NoPorts: Story = {};
export const WithPorts: Story = {
@@ -274,11 +274,9 @@ export const AgentDevcontainerCard: FC<AgentDevcontainerCardProps> = ({
/>
)}
{showDevcontainerControls && (
<AgentDevcontainerMoreActions
deleteDevContainer={deleteDevcontainerMutation.mutate}
/>
)}
<AgentDevcontainerMoreActions
deleteDevContainer={deleteDevcontainerMutation.mutate}
/>
<DevcontainerDeleteErrorDialog
open={deleteDevcontainerMutation.isError}