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:
@@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user