FN-8493: show revising status badges
Rename the needs-replan badge to Revising across dashboard task views. - Map needs-replan status badges to the Revising translation. - Update English resources and generated resource types. - Cover board cards and desktop/mobile list rows with regression tests. - Add a patch changeset for the operator-facing copy fix. Files changed: .changeset/fn-8493-revising-status-badge.md | 7 ++++++ .../app/components/__tests__/ListView.test.tsx | 25 ++++++++++++++++++++++ .../app/components/__tests__/TaskCard.test.tsx | 13 +++++++++++ .../utils/__tests__/taskStatusBadgeLabel.test.ts | 6 ++++-- .../dashboard/app/utils/taskStatusBadgeLabel.ts | 8 +++---- packages/i18n/locales/en/app.json | 4 ++-- packages/i18n/src/resources.d.ts | 4 ++-- 7 files changed, 57 insertions(+), 10 deletions(-) Fusion-Task-Id: FN-8493 Fusion-Task-Lineage: 569d271b-48f9-42f4-83f8-4e9f86fdab68 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
This commit is contained in:
7
.changeset/fn-8493-revising-status-badge.md
Normal file
7
.changeset/fn-8493-revising-status-badge.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
"@runfusion/fusion": patch
|
||||
---
|
||||
|
||||
summary: Show Revising instead of Replan on needs-replan task status badges.
|
||||
category: fix
|
||||
dev: getTaskStatusBadgeLabel maps needs-replan to Revising; EN tasks.statusReplan updated.
|
||||
@@ -2211,6 +2211,31 @@ describe("ListView", () => {
|
||||
}
|
||||
});
|
||||
|
||||
it("FN-8493 renders Revising, not Replan, for bare needs-replan list rows on desktop and mobile", () => {
|
||||
const task = createMockTask({ id: "FN-8493-needs-replan", column: "triage", status: "needs-replan" });
|
||||
|
||||
const desktopViewport = mockDesktopViewport();
|
||||
try {
|
||||
const { unmount } = renderListView({ tasks: [task] });
|
||||
const row = screen.getByText(task.id).closest("tr") as HTMLElement;
|
||||
expect(within(row).getByText("Revising")).toHaveClass("list-status-badge");
|
||||
expect(within(row).queryByText("Replan")).not.toBeInTheDocument();
|
||||
unmount();
|
||||
} finally {
|
||||
desktopViewport.mockRestore();
|
||||
}
|
||||
|
||||
const mobileViewport = mockMobileViewport();
|
||||
try {
|
||||
renderListView({ tasks: [task] });
|
||||
const card = screen.getByText(task.id).closest(".list-card") as HTMLElement;
|
||||
expect(within(card).getByText("Revising")).toHaveClass("list-status-badge");
|
||||
expect(within(card).queryByText("Replan")).not.toBeInTheDocument();
|
||||
} finally {
|
||||
mobileViewport.mockRestore();
|
||||
}
|
||||
});
|
||||
|
||||
it("renders paused tasks with dimmed styling", () => {
|
||||
const tasks = [createMockTask({ id: "FN-001", paused: true })];
|
||||
|
||||
|
||||
@@ -2292,6 +2292,19 @@ describe("TaskCard", () => {
|
||||
expect(screen.getByText("executing")).toBeDefined();
|
||||
});
|
||||
|
||||
it("FN-8493 renders Revising, not Replan, for a bare needs-replan Board card", () => {
|
||||
render(
|
||||
<TaskCard
|
||||
task={makeTask({ column: "triage", status: "needs-replan" })}
|
||||
onOpenDetail={noop}
|
||||
addToast={noop}
|
||||
/>,
|
||||
);
|
||||
|
||||
expect(screen.getByText("Revising")).toHaveClass("card-status-badge");
|
||||
expect(screen.queryByText("Replan")).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it.each([
|
||||
{ column: "todo" as const, status: "planning" },
|
||||
{ column: "in-progress" as const, status: "planning" },
|
||||
|
||||
@@ -52,8 +52,10 @@ describe("getTaskStatusBadgeLabel", () => {
|
||||
expect(getTaskStatusBadgeLabel("needs-replan", t, "Plan Review")).toBe("Plan Review");
|
||||
});
|
||||
|
||||
it("maps needs-replan to the operator-facing Replan label", () => {
|
||||
expect(getTaskStatusBadgeLabel("needs-replan", t)).toBe("Replan");
|
||||
it("maps needs-replan to the operator-facing Revising label", () => {
|
||||
const label = getTaskStatusBadgeLabel("needs-replan", t);
|
||||
expect(label).toBe("Revising");
|
||||
expect(label).not.toBe("Replan");
|
||||
});
|
||||
|
||||
it("passes through non-merge statuses", () => {
|
||||
|
||||
@@ -43,12 +43,12 @@ export function getTaskStatusBadgeLabel(
|
||||
if (workflowStepLabel) return workflowStepLabel;
|
||||
if (!status) return "";
|
||||
/*
|
||||
FNXC:TaskStatusBadge 2026-07-28-00:00:
|
||||
FN-8195 requires the raw engine status "needs-replan" to appear as "Replan" on board cards
|
||||
and list rows. Keep the task.status token unchanged and map centrally so both consumers agree.
|
||||
FNXC:TaskStatusBadge 2026-07-22-09:22:
|
||||
FN-8493 requires operator copy "Revising" while a revise/replan cycle is in progress. Keep the
|
||||
engine token "needs-replan" unchanged and map centrally so board cards and list rows agree.
|
||||
*/
|
||||
if (status === "needs-replan") {
|
||||
return t("tasks.statusReplan", "Replan");
|
||||
return t("tasks.statusReplan", "Revising");
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -3334,7 +3334,7 @@
|
||||
"statsInColumn_one": "{{count}} of {{total}} tasks in {{column}}",
|
||||
"statsInColumn_other": "{{count}} of {{total}} tasks in {{column}}",
|
||||
"statusMergingFix": "Merging fixes…",
|
||||
"statusReplan": "Replan",
|
||||
"statusReplan": "Revising",
|
||||
"stuck": "Stuck",
|
||||
"taskCreationUnavailable": "Task creation not available",
|
||||
"unpauseSelected": "Unpause selected",
|
||||
@@ -8461,7 +8461,7 @@
|
||||
"showSteps": "Show steps",
|
||||
"stalled": "Stalled",
|
||||
"statusMergingFix": "Merging fixes…",
|
||||
"statusReplan": "Replan",
|
||||
"statusReplan": "Revising",
|
||||
"stepCount_one": "{{count}} step",
|
||||
"stepCount_other": "{{count}} steps",
|
||||
"stuck": "Stuck",
|
||||
|
||||
4
packages/i18n/src/resources.d.ts
vendored
4
packages/i18n/src/resources.d.ts
vendored
@@ -3309,7 +3309,7 @@ export default interface Resources {
|
||||
"stats_one": "{{count}} of {{total}} tasks",
|
||||
"stats_other": "{{count}} of {{total}} tasks",
|
||||
"statusMergingFix": "Merging fixes…",
|
||||
"statusReplan": "Replan",
|
||||
"statusReplan": "Revising",
|
||||
"stuck": "Stuck",
|
||||
"taskCreationUnavailable": "Task creation not available",
|
||||
"unpauseSelected": "Unpause selected",
|
||||
@@ -8418,7 +8418,7 @@ export default interface Resources {
|
||||
"showSteps": "Show steps",
|
||||
"stalled": "Stalled",
|
||||
"statusMergingFix": "Merging fixes…",
|
||||
"statusReplan": "Replan",
|
||||
"statusReplan": "Revising",
|
||||
"stepCount_one": "{{count}} step",
|
||||
"stepCount_other": "{{count}} steps",
|
||||
"stuck": "Stuck",
|
||||
|
||||
Reference in New Issue
Block a user