fix(dashboard): drop terminated-state leftovers and AgentListModal duplicate Resume
Removes no-op `agents.filter((a) => true)` calls (a leftover from the
terminated AgentState refactor) flagged by eslint and updates affected
tests and fixtures so `terminated` is no longer referenced. Also:
- Deletes the duplicate `state === "paused"` render branch in
AgentListModal list view that produced two "Resume" buttons.
- Updates the AgentDetailView help text to reflect the current
deletable states ("idle or paused").
- Aligns the bundled-plugin-install test with the new auto-load
behavior for already-installed enabled plugins.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -865,23 +865,6 @@ describe("NewTaskModal", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("excludes terminated agents from picker", async () => {
|
||||
const { fetchAgents } = await import("../../api");
|
||||
vi.mocked(fetchAgents).mockResolvedValueOnce([
|
||||
{ id: "agent-1", name: "Active Agent", role: "executor", state: "active" as const, metadata: {}, createdAt: "", updatedAt: "" },
|
||||
{ id: "agent-2", name: "Terminated Agent", role: "executor", state: "terminated" as const, metadata: {}, createdAt: "", updatedAt: "" },
|
||||
]);
|
||||
|
||||
renderNewTaskModal();
|
||||
|
||||
fireEvent.click(screen.getByTestId("new-task-agent-button"));
|
||||
|
||||
await waitFor(() => {
|
||||
expect(screen.getByText("Active Agent")).toBeTruthy();
|
||||
expect(screen.queryByText("Terminated Agent")).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
it("shows selected agent name in button", async () => {
|
||||
const { fetchAgents } = await import("../../api");
|
||||
vi.mocked(fetchAgents).mockResolvedValueOnce([
|
||||
|
||||
Reference in New Issue
Block a user