diff --git a/.changeset/fn-8195-replan-badge.md b/.changeset/fn-8195-replan-badge.md new file mode 100644 index 0000000000..a3fd5096c9 --- /dev/null +++ b/.changeset/fn-8195-replan-badge.md @@ -0,0 +1,7 @@ +--- +"@runfusion/fusion": patch +--- + +summary: Task status badge now reads "Replan" instead of the raw "needs-replan" token. +category: fix +dev: Maps needs-replan in getTaskStatusBadgeLabel via tasks.statusReplan i18n key. diff --git a/packages/dashboard/app/utils/__tests__/taskStatusBadgeLabel.test.ts b/packages/dashboard/app/utils/__tests__/taskStatusBadgeLabel.test.ts index f1ca358633..d31d51d76c 100644 --- a/packages/dashboard/app/utils/__tests__/taskStatusBadgeLabel.test.ts +++ b/packages/dashboard/app/utils/__tests__/taskStatusBadgeLabel.test.ts @@ -34,6 +34,10 @@ describe("getTaskStatusBadgeLabel", () => { expect(getTaskStatusBadgeLabel("merging-fix", t)).toBe("Merging fixes…"); }); + it("maps needs-replan to the operator-facing Replan label", () => { + expect(getTaskStatusBadgeLabel("needs-replan", t)).toBe("Replan"); + }); + it("passes through non-merge statuses", () => { expect(getTaskStatusBadgeLabel("planning", t)).toBe("planning"); expect(getTaskStatusBadgeLabel("failed", t)).toBe("failed"); diff --git a/packages/dashboard/app/utils/taskStatusBadgeLabel.ts b/packages/dashboard/app/utils/taskStatusBadgeLabel.ts index 8547489bc9..95c809ddc3 100644 --- a/packages/dashboard/app/utils/taskStatusBadgeLabel.ts +++ b/packages/dashboard/app/utils/taskStatusBadgeLabel.ts @@ -30,5 +30,13 @@ export function getTaskStatusBadgeLabel( if (isActiveMergeStatus(status)) { return t("tasks.statusMerging", "Merging…"); } + /* + 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. + */ + if (status === "needs-replan") { + return t("tasks.statusReplan", "Replan"); + } return status; } diff --git a/packages/i18n/locales/en/app.json b/packages/i18n/locales/en/app.json index 01c9de7fd7..eef3ae16fc 100644 --- a/packages/i18n/locales/en/app.json +++ b/packages/i18n/locales/en/app.json @@ -3320,6 +3320,7 @@ "statsInColumn_one": "{{count}} of {{total}} tasks in {{column}}", "statsInColumn_other": "{{count}} of {{total}} tasks in {{column}}", "statusMergingFix": "Merging fixes…", + "statusReplan": "Replan", "stuck": "Stuck", "taskCreationUnavailable": "Task creation not available", "unpauseSelected": "Unpause selected", @@ -8365,6 +8366,7 @@ "showSteps": "Show steps", "stalled": "Stalled", "statusMergingFix": "Merging fixes…", + "statusReplan": "Replan", "stepCount_one": "{{count}} step", "stepCount_other": "{{count}} steps", "stuck": "Stuck", diff --git a/packages/i18n/src/resources.d.ts b/packages/i18n/src/resources.d.ts index 9afe50a743..54197826a3 100644 --- a/packages/i18n/src/resources.d.ts +++ b/packages/i18n/src/resources.d.ts @@ -3322,6 +3322,7 @@ export default interface Resources { "stats_one": "{{count}} of {{total}} tasks", "stats_other": "{{count}} of {{total}} tasks", "statusMergingFix": "Merging fixes…", + "statusReplan": "Replan", "stuck": "Stuck", "taskCreationUnavailable": "Task creation not available", "unpauseSelected": "Unpause selected", @@ -8412,6 +8413,7 @@ export default interface Resources { "showSteps": "Show steps", "stalled": "Stalled", "statusMergingFix": "Merging fixes…", + "statusReplan": "Replan", "stepCount_one": "{{count}} step", "stepCount_other": "{{count}} steps", "stuck": "Stuck",