feat(workflow-bar): processing-only elapsed timer + optimistic phase paint on resume

Timer now accumulates only while the harness works, pausing while a gate awaits
the reviewer and freezing when finalized (keyed per session, in-memory). Resume
now colours the re-entry phase immediately from the manifest's phase (1..8),
mirroring the F1 paint for new questions.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-03 14:13:02 +02:00
co-authored by Claude Opus 4.8
parent e4ada07dab
commit 56ed8b29bd
5 changed files with 91 additions and 49 deletions
+7 -5
View File
@@ -27,12 +27,14 @@ const DOT: Record<DotState, string> = {
export function WorkflowBar({
finalized = false,
createdAt = null,
updatedAt = null,
running = false,
resetKey = null,
}: {
finalized?: boolean;
createdAt?: string | null;
updatedAt?: string | null;
/** The harness/model is actively working (drives the processing timer). */
running?: boolean;
/** Active session id — remounts the timer (resets it) when the session changes. */
resetKey?: string | null;
}) {
const currentPhase = useSessionStore((s) => s.currentPhase);
const phaseError = useSessionStore((s) => s.phaseError);
@@ -96,7 +98,7 @@ export function WorkflowBar({
);
})}
</nav>
<ElapsedTimer startedAt={createdAt} stoppedAt={finalized ? updatedAt : null} />
<ElapsedTimer key={resetKey ?? "none"} running={running} />
</div>
);
}