diff options
Diffstat (limited to 'makima/frontend/src/components/directives')
| -rw-r--r-- | makima/frontend/src/components/directives/DirectiveDAG.tsx | 23 | ||||
| -rw-r--r-- | makima/frontend/src/components/directives/DirectiveDetail.tsx | 29 |
2 files changed, 7 insertions, 45 deletions
diff --git a/makima/frontend/src/components/directives/DirectiveDAG.tsx b/makima/frontend/src/components/directives/DirectiveDAG.tsx index 8c7def9..142df41 100644 --- a/makima/frontend/src/components/directives/DirectiveDAG.tsx +++ b/makima/frontend/src/components/directives/DirectiveDAG.tsx @@ -2,7 +2,6 @@ import { useMemo } from "react"; import type { DirectiveStep } from "../../lib/api"; import { StepNode } from "./StepNode"; import { - OrchestratorStepNode, type OrchestratorStepType, type OrchestratorStepStatus, } from "./OrchestratorStepNode"; @@ -35,13 +34,6 @@ interface Layer { steps: DirectiveStep[]; } -/** Types that should appear before the regular DAG steps */ -const BEFORE_TYPES = new Set<OrchestratorStepType>([ - "planning", - "replanning", - "plan-orders", -]); - function topoSort(steps: DirectiveStep[]): Layer[] { if (steps.length === 0) return []; @@ -97,14 +89,13 @@ export function DirectiveDAG({ steps, specializedSteps, onComplete, onFail, onSk </div> )} <div className="flex flex-wrap gap-3 justify-center"> - {afterSteps.map((vs) => ( - <OrchestratorStepNode - key={`${vs.type}-${vs.taskId}`} - type={vs.type} - taskId={vs.taskId} - status={vs.status} - label={vs.label} - hasQuestions={vs.hasQuestions} + {layer.steps.map((step) => ( + <StepNode + key={step.id} + step={step} + onComplete={onComplete ? () => onComplete(step.id) : undefined} + onFail={onFail ? () => onFail(step.id) : undefined} + onSkip={onSkip ? () => onSkip(step.id) : undefined} /> ))} </div> diff --git a/makima/frontend/src/components/directives/DirectiveDetail.tsx b/makima/frontend/src/components/directives/DirectiveDetail.tsx index 171654d..8f39207 100644 --- a/makima/frontend/src/components/directives/DirectiveDetail.tsx +++ b/makima/frontend/src/components/directives/DirectiveDetail.tsx @@ -177,35 +177,6 @@ export function DirectiveDetail({ setEditingGoal(false); }; - // Build virtual steps for orchestrator tasks to display in the DAG - const virtualSteps = useMemo(() => { - const steps: VirtualStep[] = []; - if (directive.orchestratorTaskId) { - const hasOrchestratorQuestions = directiveQuestions.some( - (q) => q.taskId === directive.orchestratorTaskId - ); - steps.push({ - type: "planning", - taskId: directive.orchestratorTaskId, - status: "running", - label: "Planning", - hasQuestions: hasOrchestratorQuestions, - }); - } - if (directive.completionTaskId) { - const hasCompletionQuestions = directiveQuestions.some( - (q) => q.taskId === directive.completionTaskId - ); - steps.push({ - type: directive.prUrl ? "pr-update" : "pr", - taskId: directive.completionTaskId, - status: "running", - label: directive.prUrl ? "Updating PR" : "Creating PR", - hasQuestions: hasCompletionQuestions, - }); - } - return steps; - }, [directive.orchestratorTaskId, directive.completionTaskId, directive.prUrl, directiveQuestions]); return ( <div className="flex flex-col h-full overflow-y-auto"> |
