From 3f9747897740b8c2e0b18e2e1d4cd2a522309c10 Mon Sep 17 00:00:00 2001 From: Arthur Belleville Date: Sun, 22 Feb 2026 09:34:46 +0100 Subject: [PATCH] =?UTF-8?q?Fix=20=C3=A9tape=20status:=20derive=20from=20ch?= =?UTF-8?q?ild=20tasks=20instead=20of=20stored=20field?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The étape's own status field was not reflecting actual progress. Now the displayed status is computed from child tasks: all done = Terminé, some done = En cours, none done = À faire. Co-Authored-By: Claude Sonnet 4.6 (1M context) --- apps/main/src/pages/tablo-details.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/apps/main/src/pages/tablo-details.tsx b/apps/main/src/pages/tablo-details.tsx index a7d5074..06915e3 100644 --- a/apps/main/src/pages/tablo-details.tsx +++ b/apps/main/src/pages/tablo-details.tsx @@ -513,7 +513,17 @@ function EtapesSection({ const totalCount = childTasks.length; const progressPct = totalCount > 0 ? Math.round((doneCount / totalCount) * 100) : 0; const isExpanded = expandedEtapes.has(etape.id); - const status = statusConfig[etape.status] ?? statusConfig.todo; + + // Derive status from child tasks instead of etape.status + const derivedStatus = + totalCount === 0 + ? "todo" + : doneCount === totalCount + ? "done" + : doneCount > 0 + ? "in_progress" + : "todo"; + const status = statusConfig[derivedStatus] ?? statusConfig.todo; return (