feat(FN-3270): remove task detail status color fallbacks

Removed fallback logic for task status colors in TaskDetailModal, simplifying the component by relying on proper CSS token fallbacks instead of inline JavaScript defaults.

Fusion-Task-Id: FN-3270
This commit is contained in:
Fusion
2026-05-04 07:42:39 -07:00
committed by gsxdsm
parent 152828dab0
commit 34f0bba76b
2 changed files with 8 additions and 8 deletions

View File

@@ -117,14 +117,14 @@ function resolveEffectivePlanning(
function getStepStatusColor(status: string): string {
switch (status) {
case "done":
return "var(--color-success, #3fb950)";
return "var(--color-success)";
case "in-progress":
return "var(--todo, #58a6ff)";
return "var(--todo)";
case "skipped":
return "var(--text-dim, #484f58)";
return "var(--text-dim)";
case "pending":
default:
return "var(--border, #30363d)";
return "var(--border)";
}
}

View File

@@ -2553,10 +2553,10 @@ describe("TaskDetailModal", () => {
);
const segments = container.querySelectorAll(".step-progress-segment");
expect((segments[0] as HTMLElement).style.backgroundColor).toBe("var(--color-success, #3fb950)");
expect((segments[1] as HTMLElement).style.backgroundColor).toBe("var(--todo, #58a6ff)");
expect((segments[2] as HTMLElement).style.backgroundColor).toBe("var(--border, #30363d)");
expect((segments[3] as HTMLElement).style.backgroundColor).toBe("var(--text-dim, #484f58)");
expect((segments[0] as HTMLElement).style.backgroundColor).toBe("var(--color-success)");
expect((segments[1] as HTMLElement).style.backgroundColor).toBe("var(--todo)");
expect((segments[2] as HTMLElement).style.backgroundColor).toBe("var(--border)");
expect((segments[3] as HTMLElement).style.backgroundColor).toBe("var(--text-dim)");
});
it("displays singular completion label for one-step tasks", () => {