diff --git a/web/react/src/App.tsx b/web/react/src/App.tsx index 90507f1..3309d8c 100644 --- a/web/react/src/App.tsx +++ b/web/react/src/App.tsx @@ -219,6 +219,7 @@ export function App() { const startRunTimer = () => { if (runTimer.current) return; runTimer.current = setInterval(() => { if (runStepPending.current) return; runStepPending.current = true; operationController.execute("SIM_STEP", { cycles: 5, response: "motion_delta" }, { state: axisState, gate: false }).catch(() => undefined).finally(() => { runStepPending.current = false; }); }, 50); }; const dispatch = (kind: string, payload: Record = {}, gate = true, action: string | null = null): Promise => { setCommandStatus(`${kind} pending`); + if (kind === "JOG_STOP") stopJogTimer(); const pending = operationController.execute(kind, payload, { state: axisState, gate, ...(action ? { action } : {}) }); setOperationTrace(operationController.exportTrace()); return pending.then(() => { setOperationTrace(operationController.exportTrace()); setCommandStatus(`${kind} acknowledged`); if (kind === "PROGRAM_RUN") startRunTimer(); if (kind === "PROGRAM_ABORT" || kind === "PROGRAM_RESTART") stopRunTimer(); if (kind === "JOG_START") startJogTimer(); if (kind === "JOG_STOP") stopJogTimer(); }).catch((error: Error) => {