diff options
Diffstat (limited to 'makima/frontend/src/components/directives/StepNode.tsx')
| -rw-r--r-- | makima/frontend/src/components/directives/StepNode.tsx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/makima/frontend/src/components/directives/StepNode.tsx b/makima/frontend/src/components/directives/StepNode.tsx index 775b898..f854297 100644 --- a/makima/frontend/src/components/directives/StepNode.tsx +++ b/makima/frontend/src/components/directives/StepNode.tsx @@ -23,9 +23,10 @@ interface StepNodeProps { onComplete?: () => void; onFail?: () => void; onSkip?: () => void; + onViewTask?: (taskId: string) => void; } -export function StepNode({ step, onComplete, onFail, onSkip }: StepNodeProps) { +export function StepNode({ step, onComplete, onFail, onSkip, onViewTask }: StepNodeProps) { const colors = STATUS_COLORS[step.status] || STATUS_COLORS.pending; const label = STATUS_LABELS[step.status] || step.status.toUpperCase(); const isContractBacked = !!step.contractType; @@ -66,12 +67,13 @@ export function StepNode({ step, onComplete, onFail, onSkip }: StepNodeProps) { </a> )} {step.taskId && !step.contractId && ( - <a - href={`/exec/${step.taskId}`} - className="text-[9px] font-mono text-[#556677] hover:text-[#75aafc] underline block mb-1" + <button + type="button" + onClick={() => onViewTask?.(step.taskId!)} + className="text-[9px] font-mono text-[#556677] hover:text-[#75aafc] underline block mb-1 bg-transparent border-none p-0 cursor-pointer text-left" > {step.status === "running" ? "Auto-executing..." : "View task"} - </a> + </button> )} {(step.status === "running" || step.status === "ready") && ( <div className="flex gap-1 mt-1"> |
