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>
43 lines
1.6 KiB
TypeScript
43 lines
1.6 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-07-16-12:00:
|
|
FN-8170 requires the raw "planning" status badge to stay off Todo and In Progress cards while preserving it in triage. Suppression is unconditional because Coding (Ideas) in-place planning writes only status:"planning", with no durable client-visible active-planner signal; the additive Reviewing Plan Review badge remains independent.
|
|
*/
|
|
export function shouldSuppressPlanningStatusBadge({
|
|
status,
|
|
column,
|
|
}: {
|
|
status?: string | null;
|
|
column: string;
|
|
}): boolean {
|
|
return status === "planning" && (column === "todo" || column === "in-progress");
|
|
}
|
|
|
|
export function getTaskStatusBadgeLabel(
|
|
status: string | null | undefined,
|
|
t: TFunction<"app">,
|
|
): string {
|
|
if (!status) return "";
|
|
if (status === "merging-fix") {
|
|
return t("tasks.statusMergingFix", "Merging fixes…");
|
|
}
|
|
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;
|
|
}
|