diff --git a/frontend/src/components/pilot/script/TemplateMatchPanel.tsx b/frontend/src/components/pilot/script/TemplateMatchPanel.tsx index 142be724..deae0ad2 100644 --- a/frontend/src/components/pilot/script/TemplateMatchPanel.tsx +++ b/frontend/src/components/pilot/script/TemplateMatchPanel.tsx @@ -28,6 +28,9 @@ interface TemplateMatchPanelProps { fix: SessionSuggestedFix sessionId: string onClose: () => void + /** Fires when the engineer declares the script was run. Parent calls + * applyFix() to stamp applied_at. */ + onMarkRun?: () => void } interface ParamSchemaEntry { @@ -39,7 +42,7 @@ interface ParamSchemaEntry { options?: Array<{ label: string; value: string }> } -export function TemplateMatchPanel({ fix, sessionId, onClose }: TemplateMatchPanelProps) { +export function TemplateMatchPanel({ fix, sessionId, onClose, onMarkRun }: TemplateMatchPanelProps) { const [template, setTemplate] = useState(null) const [templateLoading, setTemplateLoading] = useState(true) const [templateError, setTemplateError] = useState(null) @@ -243,6 +246,16 @@ export function TemplateMatchPanel({ fix, sessionId, onClose }: TemplateMatchPan > Edit parameters + {onMarkRun && ( + + )} )}