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:
@@ -562,26 +562,6 @@ describe("Agent runs routes (with HeartbeatMonitor)", () => {
|
||||
});
|
||||
expect(mockExecuteHeartbeat).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
it("terminated agent also unpauses tasks paused by that agent", async () => {
|
||||
(store.getTasksByAssignedAgent as ReturnType<typeof vi.fn>).mockResolvedValueOnce([
|
||||
{ id: "FN-9", paused: true, pausedByAgentId: "agent-001" },
|
||||
]);
|
||||
mockUpdateAgentState.mockResolvedValue({ id: "agent-001", state: "terminated" });
|
||||
|
||||
const response = await request(
|
||||
app,
|
||||
"POST",
|
||||
"/api/agents/agent-001/state",
|
||||
JSON.stringify({ state: "terminated" }),
|
||||
{ "content-type": "application/json" },
|
||||
);
|
||||
|
||||
expect(response.status).toBe(200);
|
||||
await vi.waitFor(() => {
|
||||
expect(store.pauseTask).toHaveBeenCalledWith("FN-9", false);
|
||||
});
|
||||
});
|
||||
|
||||
it("resuming to active does not auto-trigger heartbeat when disabled", async () => {
|
||||
mockGetAgent.mockResolvedValue({
|
||||
id: "agent-001",
|
||||
|
||||
Reference in New Issue
Block a user