import { router } from '@inertiajs/react'; import { useEffect } from 'react'; interface ExecutionView { execution: { id: number; jeannie_execution_id: string; status: string; output: string; error: string; report_id: number; }; proposal: { id: number; scope: string; target: string; evidence_hash: string; }; } export default function ExecutionPage({ view }: { view: ExecutionView }) { const active = view.execution.status === 'queued' || view.execution.status === 'running'; useEffect(() => { if (!active) return; const timer = window.setInterval(() => router.reload({ only: ['view'] }), 2000); return () => window.clearInterval(timer); }, [active]); return (

Approval-gated execution

{view.proposal.scope} / {view.proposal.target}

{view.execution.jeannie_execution_id} {view.execution.status}
                        {view.execution.output || (active ? 'Waiting for Jeannie output…' : view.execution.error || 'No output returned.')}
                    
{active &&

Refreshing every two seconds.

} {!active && view.execution.report_id > 0 && ( Open incident report )}
); }