feat(workflow-bar): optimistic F1 at start; all-green when session finalized

This commit is contained in:
2026-07-03 13:22:09 +02:00
parent 37b3eb45e9
commit e630ac98f9
5 changed files with 33 additions and 10 deletions
+11 -9
View File
@@ -24,7 +24,7 @@ const DOT: Record<DotState, string> = {
pending: "bg-transparent text-muted-foreground/70 ring-border",
};
export function WorkflowBar() {
export function WorkflowBar({ finalized = false }: { finalized?: boolean }) {
const currentPhase = useSessionStore((s) => s.currentPhase);
const phaseError = useSessionStore((s) => s.phaseError);
const activeIdx = PHASES.findIndex((p) => p.id === currentPhase);
@@ -37,14 +37,16 @@ export function WorkflowBar() {
{PHASES.map((p, i) => {
const isActive = currentPhase === p.id;
const isDone = activeIdx > -1 && i < activeIdx;
const state: DotState = isActive
? phaseError === p.id
? "error"
: "running"
: isDone
? "done"
: "pending";
const connectorDone = activeIdx > -1 && i <= activeIdx;
const state: DotState = finalized
? "done"
: isActive
? phaseError === p.id
? "error"
: "running"
: isDone
? "done"
: "pending";
const connectorDone = finalized || (activeIdx > -1 && i <= activeIdx);
return (
<div key={p.id} className="flex items-center">
{i > 0 && (