FN-7492: show active triage plan review progress
Show triage task cards when Plan Review is actively running. - Render the existing progress affordance for triage cards only when unified progress has an active item. - Keep enabled-but-idle workflow steps hidden to avoid false active indicators and empty progress shells. - Cover running, idle, and empty triage progress states in TaskCard tests. - Add a patch changeset for the published Fusion package. Files changed: .../FN-7492-task-card-plan-review-progress.md | 7 +++ packages/dashboard/app/components/TaskCard.tsx | 7 ++- .../app/components/__tests__/TaskCard.test.tsx | 73 ++++++++++++++++++++++ 3 files changed, 86 insertions(+), 1 deletion(-) Fusion-Task-Id: FN-7492 Fusion-Task-Lineage: 582aea40-8a14-4571-9a7c-e770bc2ab1fb Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
This commit is contained in:
7
.changeset/FN-7492-task-card-plan-review-progress.md
Normal file
7
.changeset/FN-7492-task-card-plan-review-progress.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
"@runfusion/fusion": patch
|
||||
---
|
||||
|
||||
summary: Show active Plan Review progress on triage task cards.
|
||||
category: fix
|
||||
dev: TaskCard now renders the existing progress affordance for Triage only when unified progress has active workflow work.
|
||||
@@ -1163,8 +1163,13 @@ function TaskCardComponent({
|
||||
() => unifiedProgress.items.filter((item) => item.status === "in-progress" || item.status === "running").length,
|
||||
[unifiedProgress.items],
|
||||
);
|
||||
/*
|
||||
FNXC:TaskCardWorkflowProgress 2026-07-04-09:08:
|
||||
Prompt Reviewer / Plan Review can run before a task leaves Triage. Show the existing card progress affordance when Triage has an actually active unified progress item, but keep enabled-only workflow steps hidden so idle review gates do not create false active indicators or empty progress shells.
|
||||
*/
|
||||
const showProgressSection =
|
||||
unifiedProgress.total > 0 && (task.status === "executing" || task.column === "in-progress");
|
||||
unifiedProgress.total > 0 &&
|
||||
(task.status === "executing" || task.column === "in-progress" || (task.column === "triage" && activeProgressCount > 0));
|
||||
|
||||
useEffect(() => {
|
||||
if (task.column !== "in-progress" && task.column !== "in-review") {
|
||||
|
||||
@@ -2564,6 +2564,79 @@ describe("TaskCard", () => {
|
||||
expect(container.querySelector(".card-step-name.active")?.textContent).toBe("Step 1");
|
||||
});
|
||||
|
||||
it("shows running Plan Review progress while the task is still in triage", () => {
|
||||
const { container } = render(
|
||||
<TaskCard
|
||||
task={makeTask({
|
||||
column: "triage",
|
||||
status: "planning" as any,
|
||||
steps: [],
|
||||
enabledWorkflowSteps: ["plan-review", "code-review"],
|
||||
workflowStepResults: [
|
||||
{
|
||||
workflowStepId: "plan-review",
|
||||
workflowStepName: "Plan Review",
|
||||
status: "pending",
|
||||
startedAt: "2026-07-04T00:00:00.000Z",
|
||||
},
|
||||
],
|
||||
})}
|
||||
onOpenDetail={noop}
|
||||
addToast={noop}
|
||||
/>,
|
||||
);
|
||||
|
||||
expect(screen.getByText("0/2")).toBeDefined();
|
||||
expect(screen.getByText("1 active")).toBeDefined();
|
||||
|
||||
fireEvent.click(screen.getByRole("button", { name: "Show steps" }));
|
||||
|
||||
expect(container.querySelector(".card-step-name.active")?.textContent).toBe("Plan Review");
|
||||
expect(container.querySelector(".card-step-active-badge")?.textContent).toBe("active");
|
||||
const dots = container.querySelectorAll(".card-step-dot");
|
||||
expect(dots[0]?.className).toContain("card-step-dot--running");
|
||||
expect(dots[0]?.className).not.toContain("card-step-dot--pending");
|
||||
});
|
||||
|
||||
it("does not show a false triage active indicator for enabled-but-not-started Plan Review", () => {
|
||||
const { container } = render(
|
||||
<TaskCard
|
||||
task={makeTask({
|
||||
column: "triage",
|
||||
status: "planning" as any,
|
||||
steps: [],
|
||||
enabledWorkflowSteps: ["plan-review", "code-review"],
|
||||
workflowStepResults: [],
|
||||
})}
|
||||
onOpenDetail={noop}
|
||||
addToast={noop}
|
||||
/>,
|
||||
);
|
||||
|
||||
expect(screen.queryByText("1 active")).toBeNull();
|
||||
expect(container.querySelector(".card-progress")).toBeNull();
|
||||
expect(container.querySelector(".card-steps-toggle")).toBeNull();
|
||||
});
|
||||
|
||||
it("does not render an empty triage progress shell without workflow progress", () => {
|
||||
const { container } = render(
|
||||
<TaskCard
|
||||
task={makeTask({
|
||||
column: "triage",
|
||||
status: undefined as any,
|
||||
steps: [],
|
||||
enabledWorkflowSteps: undefined,
|
||||
workflowStepResults: undefined,
|
||||
})}
|
||||
onOpenDetail={noop}
|
||||
addToast={noop}
|
||||
/>,
|
||||
);
|
||||
|
||||
expect(container.querySelector(".card-progress")).toBeNull();
|
||||
expect(container.querySelector(".card-steps-toggle")).toBeNull();
|
||||
});
|
||||
|
||||
it("uses singular step label when unified progress total is one", () => {
|
||||
render(
|
||||
<TaskCard
|
||||
|
||||
Reference in New Issue
Block a user