From 24d25bb8ffdd3e21444f27a7b74d494997c2c6fd Mon Sep 17 00:00:00 2001 From: Callum Alpass Date: Tue, 3 Nov 2026 01:51:16 +1100 Subject: [PATCH] Start the folded to-do list two steps before the current one --- src/model/details.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/model/details.ts b/src/model/details.ts index 6367407..eae86e4 100644 --- a/src/model/details.ts +++ b/src/model/details.ts @@ -276,8 +276,8 @@ function latestTasks(projection: OrchestrationV2ThreadProjection | null): Tasks const steps = item.steps; const running = steps.findIndex((step) => step.status === "running"); const current = running >= 0 ? running : Math.max(0, steps.findIndex((step) => step.status === "pending")); - // One more step than fits would fold into "1 more"; show it instead. - const start = Math.max(0, Math.min(current - 1, steps.length - MAX_TASKS)); + // Two finished steps lead into the current one; one more step than fits shows rather than folds. + const start = Math.max(0, Math.min(current - 2, steps.length - MAX_TASKS)); return { done: steps.filter((step) => step.status === "completed").length, total: steps.length,