diff options
Diffstat (limited to 'makima/frontend')
| -rw-r--r-- | makima/frontend/src/components/contracts/ContractCliInput.tsx | 6 | ||||
| -rw-r--r-- | makima/frontend/src/routes/contracts.tsx | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/makima/frontend/src/components/contracts/ContractCliInput.tsx b/makima/frontend/src/components/contracts/ContractCliInput.tsx index 821d03c..54d9f3a 100644 --- a/makima/frontend/src/components/contracts/ContractCliInput.tsx +++ b/makima/frontend/src/components/contracts/ContractCliInput.tsx @@ -279,9 +279,9 @@ export function ContractCliInput({ contractId, contract, onUpdate }: ContractCli } }, [messages]); - // Auto-start supervisor when component mounts if it's pending + // Auto-start supervisor when component mounts if it's pending (but not for completed contracts) useEffect(() => { - if (supervisorTask && isSupervisorPending && !supervisorStarting) { + if (supervisorTask && isSupervisorPending && !supervisorStarting && contract.status !== 'completed') { console.log("Auto-starting supervisor task on mount..."); ensureSupervisorStarted().then((started) => { if (started) { @@ -289,7 +289,7 @@ export function ContractCliInput({ contractId, contract, onUpdate }: ContractCli } }); } - }, [supervisorTask?.id]); // Only run when task ID changes, not on every render + }, [supervisorTask?.id, contract.status]); // Only run when task ID or contract status changes // Convert supervisor output events to messages useEffect(() => { diff --git a/makima/frontend/src/routes/contracts.tsx b/makima/frontend/src/routes/contracts.tsx index 0893ff6..6acda29 100644 --- a/makima/frontend/src/routes/contracts.tsx +++ b/makima/frontend/src/routes/contracts.tsx @@ -1,4 +1,4 @@ -import { useState, useCallback, useEffect, useMemo } from "react"; +import { useState, useCallback, useEffect } from "react"; import { useParams, useNavigate } from "react-router"; import { Masthead } from "../components/Masthead"; import { ContractList } from "../components/contracts/ContractList"; |
