From 12580ae9ce856635ad4ba3184f1648a0ee995fce Mon Sep 17 00:00:00 2001 From: Huskies Agent Date: Sat, 18 Jul 2026 12:31:30 +0000 Subject: [PATCH] huskies: merge 1215 story Pipeline board shows active-agent state distinctly from idle-blocked --- frontend/src/components/StagePanel.test.tsx | 61 +++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/frontend/src/components/StagePanel.test.tsx b/frontend/src/components/StagePanel.test.tsx index a0fe5a05..5947a230 100644 --- a/frontend/src/components/StagePanel.test.tsx +++ b/frontend/src/components/StagePanel.test.tsx @@ -453,6 +453,67 @@ describe("StagePanel", () => { expect(badge).toHaveTextContent("BLOCKED"); }); + // Story 1215 — confirms the board shows an active-agent indicator instead + // of the plain blocked icon whenever a running/pending agent is present, + // even though blocked=true, and falls back to the plain icon otherwise. + it("shows active-agent indicator instead of blocked icon when a running/pending agent is present, even if blocked=true", () => { + const items: PipelineStageItem[] = [ + { + story_id: "54_story_blocked_active_agent", + name: "Blocked With Active Agent", + error: null, + merge_failure: null, + agent: { agent_name: "coder", model: "claude", status: "running" }, + review_hold: null, + qa: null, + depends_on: null, + blocked: true, + }, + ]; + render(); + const badge = screen.getByTestId("blocked-badge-54_story_blocked_active_agent"); + expect(badge).not.toHaveTextContent("BLOCKED"); + expect(badge).toHaveTextContent("RECOVERING"); + }); + + it("drives the distinct indicator off the agent's running/pending status, not the blocked flag alone", () => { + const items: PipelineStageItem[] = [ + { + story_id: "55_story_blocked_stale_agent", + name: "Blocked With Completed Agent", + error: null, + merge_failure: null, + agent: { agent_name: "coder", model: "claude", status: "completed" }, + review_hold: null, + qa: null, + depends_on: null, + blocked: true, + }, + ]; + render(); + const badge = screen.getByTestId("blocked-badge-55_story_blocked_stale_agent"); + expect(badge).toHaveTextContent("BLOCKED"); + }); + + it("shows the plain blocked icon for a story that is blocked with no live agent", () => { + const items: PipelineStageItem[] = [ + { + story_id: "56_story_blocked_no_agent", + name: "Blocked No Agent", + error: null, + merge_failure: null, + agent: null, + review_hold: null, + qa: null, + depends_on: null, + blocked: true, + }, + ]; + render(); + const badge = screen.getByTestId("blocked-badge-56_story_blocked_no_agent"); + expect(badge).toHaveTextContent("BLOCKED"); + }); + it("shows spinning icon for merge_failure item with running mergemaster", () => { const items: PipelineStageItem[] = [ {