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>
55 lines
2.5 KiB
TypeScript
55 lines
2.5 KiB
TypeScript
/*
|
|
FNXC:MergeQueue 2026-07-15-10:45:
|
|
AI merge sets task.status to reviewing/landing for most of the live merge window. Board/list badges must never show those raw engine strings; map the full active-merge pipeline to operator-facing Merging… (and Merging fixes… for merging-fix).
|
|
*/
|
|
import type { TFunction } from "i18next";
|
|
import { isActiveMergeStatus } from "../../../core/src/active-merge-status";
|
|
|
|
/*
|
|
FNXC:TaskStatusBadge 2026-08-19-00:00:
|
|
FN-8475 restores truthful status visibility: Coding (Ideas) deliberately plans in Todo,
|
|
so a real non-queued task status must not be hidden based only on its board column.
|
|
Queued remains an intake-only presentation exclusion at TaskCard and ListView call sites.
|
|
*/
|
|
export function hasTaskStatusBadge(status: string | null | undefined): boolean {
|
|
return typeof status === "string" && status.trim().length > 0;
|
|
}
|
|
|
|
export function getTaskStatusBadgeLabel(
|
|
status: string | null | undefined,
|
|
t: TFunction<"app">,
|
|
/*
|
|
FNXC:TaskStatusBadge 2026-07-19-02:55 (U12 / R2 / R11):
|
|
Workflow-step state wins over the raw status vocabulary. A card whose Plan Review is running
|
|
reads "Plan Review" — the step's own IR-declared name — instead of the engine token "planning"
|
|
or "needs-replan". Pass `getRunningWorkflowStepLabel(task)` here; omit it and the legacy status
|
|
mapping below is unchanged, so every existing caller keeps its behavior.
|
|
*/
|
|
workflowStepLabel?: string,
|
|
): string {
|
|
/*
|
|
FNXC:TaskStatusBadge 2026-07-19-09:40:
|
|
Every active-merge status ("merging", "merging-pr", "merging-fix", "reviewing", "landing") must
|
|
win over a still-running workflow-step label (a pre-merge step's startedAt-without-completedAt
|
|
state can survive into the merge pipeline). Checking the status before the workflow-step override
|
|
enforces this for every caller (TaskCard, ListView grouped rows, ListView table rows) instead of
|
|
relying on per-call-site pre-checks. "merging-fix" keeps its distinct "Merging fixes…" label.
|
|
*/
|
|
if (isActiveMergeStatus(status)) {
|
|
return status === "merging-fix"
|
|
? t("tasks.statusMergingFix", "Merging fixes…")
|
|
: t("tasks.statusMerging", "Merging…");
|
|
}
|
|
if (workflowStepLabel) return workflowStepLabel;
|
|
if (!status) return "";
|
|
/*
|
|
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", "Revising");
|
|
}
|
|
return status;
|
|
}
|