mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
fix(frontend): Fix Run/Stop button on Builder page refresh (#9503)
When opened graph is running and Builder page is refreshed the bottom says `Run` but should show `Stop` instead. ### Changes 🏗️ - Fix state on refresh, so that the bottom button is `Stop` if graph is currently running ### Checklist 📋 #### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Refresh still retrieves past and ongoing execution updates - [x] Bottom Builder button says `Stop` when page is refreshed and graph is running - [x] `Stop` button works and terminates execution
This commit is contained in:
committed by
GitHub
parent
a692eedb1c
commit
70d095ba98
@@ -610,6 +610,16 @@ export default function useAgentGraph(
|
||||
flowID,
|
||||
flowExecutionID,
|
||||
);
|
||||
if (
|
||||
(execution.status === "QUEUED" || execution.status === "RUNNING") &&
|
||||
saveRunRequest.request === "none"
|
||||
) {
|
||||
setSaveRunRequest({
|
||||
request: "run",
|
||||
state: "running",
|
||||
activeExecutionID: flowExecutionID,
|
||||
});
|
||||
}
|
||||
setUpdateQueue((prev) => [...prev, ...execution.node_executions]);
|
||||
|
||||
// Track execution until completed
|
||||
|
||||
@@ -41,7 +41,6 @@ import {
|
||||
} from "./types";
|
||||
import { createBrowserClient } from "@supabase/ssr";
|
||||
import getServerSupabase from "../supabase/getServerSupabase";
|
||||
import { filter } from "../../../test-runner-jest.config";
|
||||
|
||||
const isClient = typeof window !== "undefined";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user