FN-8195: label replan task status
Display the needs-replan task state with a clear localized operator-facing label. - Map needs-replan status badges to Replan centrally. - Add English i18n resources and generated resource typings. - Cover the status-label mapping and add a patch changeset. Files changed: .changeset/fn-8195-replan-badge.md | 7 +++++++ .../dashboard/app/utils/__tests__/taskStatusBadgeLabel.test.ts | 4 ++++ packages/dashboard/app/utils/taskStatusBadgeLabel.ts | 8 ++++++++ packages/i18n/locales/en/app.json | 2 ++ packages/i18n/src/resources.d.ts | 2 ++ 5 files changed, 23 insertions(+) Fusion-Task-Id: FN-8195 Fusion-Task-Lineage: 7ad115b8-6405-426e-9201-bfa1258fff5e Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
This commit is contained in:
7
.changeset/fn-8195-replan-badge.md
Normal file
7
.changeset/fn-8195-replan-badge.md
Normal file
@@ -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.
|
||||
@@ -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");
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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",
|
||||
|
||||
2
packages/i18n/src/resources.d.ts
vendored
2
packages/i18n/src/resources.d.ts
vendored
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user