diff --git a/apps/epiphany-gui/src-tauri/src/lib.rs b/apps/epiphany-gui/src-tauri/src/lib.rs index 74d61e0e..3a54611b 100644 --- a/apps/epiphany-gui/src-tauri/src/lib.rs +++ b/apps/epiphany-gui/src-tauri/src/lib.rs @@ -69,6 +69,7 @@ fn run_operator_action( "coordinatorPlan" => run_coordinator_plan(&repo_root, request), "launchModeling" | "readModelingResult" + | "acceptModeling" | "launchVerification" | "readVerificationResult" | "launchReorient" diff --git a/apps/epiphany-gui/src/App.tsx b/apps/epiphany-gui/src/App.tsx index e70415f2..bb281b20 100644 --- a/apps/epiphany-gui/src/App.tsx +++ b/apps/epiphany-gui/src/App.tsx @@ -22,6 +22,7 @@ const actionButtons: Array<{ title: string; requiresThread?: boolean; requiresReadyState?: boolean; + requiresModelingPatch?: boolean; requiresReorientResult?: boolean; icon: "file" | "check" | "play" | "eye" | "accept"; }> = [ @@ -63,6 +64,16 @@ const actionButtons: Array<{ requiresThread: true, icon: "eye", }, + { + action: "acceptModeling", + label: "Accept Modeling", + runningLabel: "Accepting", + title: "Accept a reviewed modeling graph/checkpoint patch into Epiphany state", + requiresThread: true, + requiresReadyState: true, + requiresModelingPatch: true, + icon: "accept", + }, { action: "launchVerification", label: "Launch Verification", @@ -210,6 +221,9 @@ export function App() { const reorientResult = status?.reorientResult ?? {}; const readyState = scene.stateStatus === "ready"; const currentThreadId = request.threadId; + const modelingFinding = roleResults?.modeling?.finding; + const canAcceptModeling = + text(roleResults?.modeling?.status).toLowerCase() === "completed" && Boolean(modelingFinding?.statePatch); const canAcceptReorient = text(reorientResult?.status).toLowerCase() === "completed"; return ( @@ -248,15 +262,18 @@ export function App() { {actionButtons.map((button) => { const needsThread = button.requiresThread && !currentThreadId; const needsState = button.requiresReadyState && !readyState; + const needsModeling = button.requiresModelingPatch && !canAcceptModeling; const needsReorient = button.requiresReorientResult && !canAcceptReorient; - const disabled = runningAction !== null || needsThread || needsState || needsReorient; + const disabled = runningAction !== null || needsThread || needsState || needsModeling || needsReorient; const title = needsThread ? "Prepare a checkpoint or enter a persisted thread id first" : needsState ? "Prepare Epiphany state before launching this lane" - : needsReorient - ? "Read a completed reorient result before accepting it" - : button.title; + : needsModeling + ? "Read a completed modeling result with a state patch before accepting it" + : needsReorient + ? "Read a completed reorient result before accepting it" + : button.title; return (