feat(workflow-bar): optimistic F1 at start; all-green when session finalized
This commit is contained in:
@@ -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 && (
|
||||
|
||||
Reference in New Issue
Block a user