diff --git a/frontend/src/components/procedural/StepDetail.tsx b/frontend/src/components/procedural/StepDetail.tsx index 1e5616b5..1af4b6c2 100644 --- a/frontend/src/components/procedural/StepDetail.tsx +++ b/frontend/src/components/procedural/StepDetail.tsx @@ -1,6 +1,6 @@ import { useState } from 'react' import { AlertTriangle, CheckCircle2, Info, Zap, Copy, Check, ExternalLink } from 'lucide-react' -import type { ProceduralStep, StepContentType, CommandBlock } from '@/types' +import type { RuntimeStep, StepContentType, CommandBlock } from '@/types' import { resolveVariables } from '@/lib/variableResolver' import { cn } from '@/lib/utils' @@ -12,7 +12,7 @@ const contentTypeConfig: Record @@ -39,13 +39,18 @@ export function StepDetail({ isLast, }: StepDetailProps) { const [copiedIndex, setCopiedIndex] = useState(null) + const isCustom = 'isCustom' in step && step.isCustom const contentType = step.content_type || 'action' const config = contentTypeConfig[contentType] const Icon = config.icon // Derive verification from either flat fields or nested object - const verificationPrompt = step.verification_prompt || step.verification?.prompt - const verificationType = step.verification_type || step.verification?.type + const verificationPrompt = !isCustom && 'verification_prompt' in step + ? step.verification_prompt || step.verification?.prompt + : undefined + const verificationType = !isCustom && 'verification_type' in step + ? step.verification_type || step.verification?.type + : undefined const resolve = (text: string | undefined) => { if (!text) return '' @@ -87,14 +92,20 @@ export function StepDetail({

{step.title}

- - - {config.label} - + {isCustom ? ( + + ✦ Custom Step + + ) : ( + + + {config.label} + + )} Step {stepNumber} of {totalSteps} - {step.estimated_minutes && ( + {'estimated_minutes' in step && step.estimated_minutes && ( ~{step.estimated_minutes} min )}
@@ -102,7 +113,7 @@ export function StepDetail({
{/* Warning banner */} - {step.warning_text && ( + {'warning_text' in step && step.warning_text && (

{resolve(step.warning_text)}

@@ -142,7 +153,7 @@ export function StepDetail({ )} {/* Expected outcome */} - {step.expected_outcome && ( + {'expected_outcome' in step && step.expected_outcome && (

Expected Outcome

{resolve(step.expected_outcome)}

@@ -181,7 +192,7 @@ export function StepDetail({ )} {/* Notes */} - {step.notes_enabled !== false && ( + {(!('notes_enabled' in step) || step.notes_enabled !== false) && (