Description
When a user deletes an agent from the agents list/card view, there is no confirmation dialog — the action can happen accidentally. The ConfigPanel.tsx (agent detail settings) does have a delete confirmation flow, but the agent card components used in the main agents grid do not surface a delete action with a safety prompt at all.
This issue is about adding a proper confirmation dialog (using the existing Dialog UI component) that warns the user before an agent is permanently deleted. The dialog should show the agent name and explain that the gateway will restart.
Where to look
src/components/views/AgentsPage.tsx — The main agents list view. Contains an inline AgentCard component that currently has no delete action. A delete button and confirmation flow should be added here.
src/components/agents/AgentCard.tsx — An alternative agent card component with a dropdown menu (MoreVertical). Currently has "Chat" and "Configure" actions but no "Delete" option. Adding a delete menu item here with confirmation would be the cleanest approach.
src/components/agents/ConfigPanel.tsx — Already implements delete with a confirmation pattern (see showDeleteConfirm state and handleDeleteAgent). Use this as a reference for the delete flow.
src/store/dashboard-store.ts — Contains the deleteAgent(agentId) action that calls agents.delete on the gateway.
src/components/ui/dialog.tsx — The reusable Dialog component to use for the confirmation modal.
src/i18n/locales/en.json — Already has translation keys like "deleteAgent", "confirmDelete", and "deleteDetails" that can be reused.
Acceptance criteria
Description
When a user deletes an agent from the agents list/card view, there is no confirmation dialog — the action can happen accidentally. The
ConfigPanel.tsx(agent detail settings) does have a delete confirmation flow, but the agent card components used in the main agents grid do not surface a delete action with a safety prompt at all.This issue is about adding a proper confirmation dialog (using the existing
DialogUI component) that warns the user before an agent is permanently deleted. The dialog should show the agent name and explain that the gateway will restart.Where to look
src/components/views/AgentsPage.tsx— The main agents list view. Contains an inlineAgentCardcomponent that currently has no delete action. A delete button and confirmation flow should be added here.src/components/agents/AgentCard.tsx— An alternative agent card component with a dropdown menu (MoreVertical). Currently has "Chat" and "Configure" actions but no "Delete" option. Adding a delete menu item here with confirmation would be the cleanest approach.src/components/agents/ConfigPanel.tsx— Already implements delete with a confirmation pattern (seeshowDeleteConfirmstate andhandleDeleteAgent). Use this as a reference for the delete flow.src/store/dashboard-store.ts— Contains thedeleteAgent(agentId)action that callsagents.deleteon the gateway.src/components/ui/dialog.tsx— The reusable Dialog component to use for the confirmation modal.src/i18n/locales/en.json— Already has translation keys like"deleteAgent","confirmDelete", and"deleteDetails"that can be reused.Acceptance criteria
AgentsPage.tsxinline card orAgentCard.tsxdropdown menu) — not only buried inside the agent detail settingsConfigPanel.tsx