Skip to content

Automate browser based workflows with AI

Revert "feat(frontend): defer blank agent creation until first save" (#6398)

Cindy Lia30b45044296
diff --git a/skyvern-frontend/src/routes/discover/DiscoverPage.tsx b/skyvern-frontend/src/routes/discover/DiscoverPage.tsx
index 02fb8e33b..aa4ced68e 100644
--- a/skyvern-frontend/src/routes/discover/DiscoverPage.tsx
+++ b/skyvern-frontend/src/routes/discover/DiscoverPage.tsx
@@ -1,14 +1,15 @@
import { useFeatureFlag } from "@/hooks/useFeatureFlag";
import { PromptBox } from "../tasks/create/PromptBox";
import { WorkflowTemplates } from "./WorkflowTemplates";
+import { useCreateWorkflowMutation } from "../workflows/hooks/useCreateWorkflowMutation";
import { Button } from "@/components/ui/button";
-import { useNavigate } from "react-router-dom";
-import { navigateToBlankAgentEditor } from "../workflows/blankAgentNavigation";
+import { ReloadIcon } from "@radix-ui/react-icons";
+import { defaultWorkflowRequest } from "../workflows/defaultWorkflowRequest";
function DiscoverPage() {
const enableCopilotHandoff =
useFeatureFlag("ENABLE_DISCOVER_COPILOT_HANDOFF") === true;
- const navigate = useNavigate();
+ const createWorkflowMutation = useCreateWorkflowMutation();
return (
<div className="space-y-10">
@@ -19,10 +20,17 @@ function DiscoverPage() {
variant="ghost"
size="sm"
className="text-slate-400 hover:text-slate-200"
+ disabled={createWorkflowMutation.isPending}
onClick={() =>
- navigateToBlankAgentEditor(navigate, { via: "blank" })
+ createWorkflowMutation.mutate({
+ ...defaultWorkflowRequest,
+ _via: "blank",
+ })
}
>
+ {createWorkflowMutation.isPending && (
+ <ReloadIcon className="mr-2 h-3 w-3 animate-spin" />
+ )}
Skip — start with blank canvas →
</Button>
</div>
diff --git a/skyvern-frontend/src/routes/root/SideNav.test.tsx b/skyvern-frontend/src/routes/root/SideNav.test.tsx
index 6d8797493..abd02cbe5 100644
--- a/skyvern-frontend/src/routes/root/SideNav.test.tsx
+++ b/skyvern-frontend/src/routes/root/SideNav.test.tsx
@@ -6,6 +6,7 @@ import { SideNav } from "./SideNav";
import { useSidebarStore } from "@/store/SidebarStore";
const capture = vi.fn();
+const mutate = vi.fn();
function LocationProbe() {
const location = useLocation();
@@ -24,6 +25,13 @@ vi.mock("posthog-js/react", () => ({
}),
}));
+vi.mock("@/routes/workflows/hooks/useCreateWorkflowMutation", () => ({
+ useCreateWorkflowMutation: () => ({
+ isPending: false,
+ mutate,
+ }),
+}));
+
describe("SideNav", () => {
function setViewportHeight(height: number) {
Object.defineProperty(window, "innerHeight", {
@@ -38,21 +46,28 @@ describe("SideNav", () => {
window.localStorage.clear();
useSidebarStore.setState({ collapsed: false });
setViewportHeight(1024);
+ mutate.mockClear();
capture.mockClear();
});
- it("opens the draft agent builder from the sidebar", () => {
+ it("creates a new agent from the sidebar", () => {
render(
<MemoryRouter>
<SideNav />
- <LocationProbe />
</MemoryRouter>,
);
fireEvent.click(screen.getByRole("button", { name: "New Agent" }));
- expect(screen.getByTestId("location").textContent).toBe(
- "/workflows/new/build?via=sidebar",
+ expect(mutate).toHaveBeenCalledWith(
+ expect.objectContaining({
+ _via: "sidebar",
+ title: "New Agent",
+ workflow_definition: expect.objectContaining({
+ blocks: [],
+ parameters: [],
+ }),
+ }),
);
});
diff --git a/skyvern-frontend/src/routes/root/SideNav.tsx b/skyvern-frontend/src/routes/root/SideNav.tsx
index 3131ef41d..16d923502 100644
--- a/skyvern-frontend/src/routes/root/SideNav.tsx
+++ b/skyvern-frontend/src/routes/root/SideNav.tsx
@@ -13,6 +13,7 @@ import {
PersonIcon,
PlusIcon,
ReaderIcon,
+ ReloadIcon,
Share1Icon,
} from "@radix-ui/react-icons";
@@ -31,10 +32,10 @@ import {
SidebarTreeNav,
type SidebarNavItem,
} from "@/components/SidebarTreeNav";
-import { navigateToBlankAgentEditor } from "@/routes/workflows/blankAgentNavigation";
+import { defaultWorkflowRequest } from "@/routes/workflows/defaultWorkflowRequest";
+import { useCreateWorkflowMutation } from "@/routes/workflows/hooks/useCreateWorkflowMutation";
import { shouldDefaultRecipesOpen } from "./sidebarDefaults";
import { usePostHog } from "posthog-js/react";
-import { useNavigate } from "react-router-dom";
const recipeAnalyticsByPath: Record<string, { beta: boolean; badge?: string }> =
{
@@ -54,7 +55,7 @@ type Props = {
};
function SideNav({ collapsed }: Props = {}) {
- const navigate = useNavigate();
+ const createWorkflowMutation = useCreateWorkflowMutation();
const postHog = usePostHog();
const captureRecipeClick = (label: string, to: string) => {
const analytics = recipeAnalyticsByPath[to] ?? { beta: false };
@@ -80,11 +81,22 @@ function SideNav({ collapsed }: Props = {}) {
icon: <LightningBoltIcon className="size-4" />,
children: [
{
- label: "New Agent",
- icon: <PlusIcon className="size-3.5" />,
+ label: createWorkflowMutation.isPending ? "Creating..." : "New Agent",
+ icon: createWorkflowMutation.isPending ? (
+ <ReloadIcon className="size-3.5 animate-spin" />
+ ) : (
+ <PlusIcon className="size-3.5" />
+ ),
onClick: () => {
- navigateToBlankAgentEditor(navigate, { via: "sidebar" });
+ if (createWorkflowMutation.isPending) {
+ return;
+ }
+ createWorkflowMutation.mutate({
+ ...defaultWorkflowRequest,
+ _via: "sidebar",
+ });
},
+ disabled: createWorkflowMutation.isPending,
},
{
label: "All Agents",
diff --git a/skyvern-frontend/src/routes/tasks/create/PromptBox.test.tsx b/skyvern-frontend/src/routes/tasks/create/PromptBox.test.tsx
index 1f7a5ab3e..977c6ac96 100644
--- a/skyvern-frontend/src/routes/tasks/create/PromptBox.test.tsx
+++ b/skyvern-frontend/src/routes/tasks/create/PromptBox.test.tsx
@@ -170,7 +170,14 @@ describe("PromptBox", () => {
expect(body.request.url).toBe("https://google.com");
});
- test("hands Discover prompts to the draft builder without creating an agent", async () => {
+ test("hands Discover prompts to workflow copilot with agent execution", async () => {
+ mockPost.mockResolvedValue({
+ data: {
+ workflow_permanent_id: "wpid_copilot",
+ workflow_definition: { blocks: [] },
+ },
+ });
+
renderPromptBox(true);
fireEvent.change(screen.getByPlaceholderText("Enter your prompt..."), {
@@ -178,16 +185,16 @@ describe("PromptBox", () => {
});
fireEvent.click(screen.getByLabelText("submit-prompt"));
- await waitFor(() => expect(mockPost).not.toHaveBeenCalled());
- expect(mockNavigate).toHaveBeenCalledWith(
- "/workflows/new/build?via=copilot",
- {
- state: {
- copilotMessage: "Build this workflow",
- draftTitle: "Build this workflow",
- draftRunWith: "agent",
- },
- },
- );
+ await waitFor(() => expect(mockPost).toHaveBeenCalledTimes(1));
+ const call = mockPost.mock.calls[0];
+ expect(call).toBeDefined();
+ const [path, yaml] = call!;
+
+ expect(path).toBe("/workflows");
+ expect(yaml).toContain("run_with: agent");
+ expect(yaml).not.toContain("run_with: code");
+ expect(mockNavigate).toHaveBeenCalledWith("/workflows/wpid_copilot/build", {
+ state: { copilotMessage: "Build this workflow" },
+ });
});
});
diff --git a/skyvern-frontend/src/routes/tasks/create/PromptBox.tsx b/skyvern-frontend/src/routes/tasks/create/PromptBox.tsx
index 2ca2f8713..8bbd27e64 100644
--- a/skyvern-frontend/src/routes/tasks/create/PromptBox.tsx
+++ b/skyvern-frontend/src/routes/tasks/create/PromptBox.tsx
@@ -1,6 +1,7 @@
import { getClient } from "@/api/AxiosClient";
import { Createv2TaskRequest, ProxyLocation } from "@/api/types";
-import { buildBlankAgentBuildPath } from "@/routes/workflows/blankAgentNavigation";
+import { stringify as convertToYAML } from "yaml";
+import { WorkflowCreateYAMLRequest } from "@/routes/workflows/types/workflowYamlTypes";
import img from "@/assets/promptBoxBg.png";
import { AutoResizingTextarea } from "@/components/AutoResizingTextarea/AutoResizingTextarea";
import { CartIcon } from "@/components/icons/CartIcon";
@@ -118,6 +119,24 @@ function deriveHandoffTitle(prompt: string): string {
return `${collapsed.slice(0, HANDOFF_TITLE_MAX_LEN - 1).trimEnd()}…`;
}
+function buildBlankWorkflowRequest(
+ title: string,
+ runWith: "agent" | "code" = "agent",
+): WorkflowCreateYAMLRequest {
+ return {
+ title,
+ description: "",
+ ai_fallback: true,
+ code_version: 2,
+ run_with: runWith,
+ workflow_definition: {
+ version: 2,
+ blocks: [],
+ parameters: [],
+ },
+ };
+}
+
function PromptBox({ enableCopilotHandoff = false }: PromptBoxProps) {
const navigate = useNavigate();
const [prompt, setPrompt] = useState<string>("");
@@ -230,7 +249,50 @@ function PromptBox({ enableCopilotHandoff = false }: PromptBoxProps) {
},
});
- const isSubmitting = generateWorkflowMutation.isPending;
+ const handoffWorkflowMutation = useMutation({
+ mutationFn: async ({
+ prompt,
+ runWith,
+ }: {
+ prompt: string;
+ runWith: "agent" | "code";
+ }) => {
+ const client = await getClient(credentialGetter);
+ const yaml = convertToYAML(
+ buildBlankWorkflowRequest(deriveHandoffTitle(prompt), runWith),
+ );
+ const result = await client.post<string, { data: WorkflowApiResponse }>(
+ "/workflows",
+ yaml,
+ {
+ headers: {
+ "Content-Type": "text/plain",
+ },
+ },
+ );
+ return { data: result.data, prompt };
+ },
+ onSuccess: ({ data: workflow, prompt }) => {
+ queryClient.invalidateQueries({ queryKey: ["workflows"] });
+ queryClient.invalidateQueries({ queryKey: ["folders"] });
+ navigate(`/workflows/${workflow.workflow_permanent_id}/build`, {
+ state: { copilotMessage: prompt },
+ });
+ },
+ onError: (error: AxiosError) => {
+ toast({
+ variant: "destructive",
+ title: "Error creating agent",
+ description: error.message,
+ });
+ },
+ onSettled: () => {
+ submitInFlightRef.current = false;
+ },
+ });
+
+ const isSubmitting =
+ generateWorkflowMutation.isPending || handoffWorkflowMutation.isPending;
const {
isSupported: isSpeechSupported,
@@ -249,14 +311,7 @@ function PromptBox({ enableCopilotHandoff = false }: PromptBoxProps) {
}
submitInFlightRef.current = true;
if (enableCopilotHandoff) {
- navigate(buildBlankAgentBuildPath({ via: "copilot" }), {
- state: {
- copilotMessage: prompt,
- draftTitle: deriveHandoffTitle(prompt),
- draftRunWith: "agent",
- },
- });
- submitInFlightRef.current = false;
+ handoffWorkflowMutation.mutate({ prompt, runWith: "agent" });
return;
}
generateWorkflowMutation.mutate({ prompt });
diff --git a/skyvern-frontend/src/routes/workflows/Workflows.tsx b/skyvern-frontend/src/routes/workflows/Workflows.tsx
index 03c2a30dd..f22b72cc7 100644
--- a/skyvern-frontend/src/routes/workflows/Workflows.tsx
+++ b/skyvern-frontend/src/routes/workflows/Workflows.tsx
@@ -54,7 +54,6 @@ import { CreateFromTemplateDialog } from "./components/CreateFromTemplateDialog"
import { ViewAllFoldersDialog } from "./components/ViewAllFoldersDialog";
import { WorkflowFolderSelector } from "./components/WorkflowFolderSelector";
import { HighlightText } from "./components/HighlightText";
-import { navigateToBlankAgentEditor } from "./blankAgentNavigation";
import { useCreateWorkflowMutation } from "./hooks/useCreateWorkflowMutation";
import { useFoldersQuery } from "./hooks/useFoldersQuery";
import { useActiveImportsPolling } from "./hooks/useActiveImportsPolling";
@@ -69,6 +68,7 @@ import { ParameterDisplayInline } from "./components/ParameterDisplayInline";
import { useKeywordSearch } from "./hooks/useKeywordSearch";
import { useParameterExpansion } from "./hooks/useParameterExpansion";
import { Folder } from "./types/folderTypes";
+import { defaultWorkflowRequest } from "./defaultWorkflowRequest";
// Utility function to create URL-safe folder slugs from folder names
function slugifyFolderName(name: string): string {
@@ -507,8 +507,12 @@ function Workflows() {
/>
<DropdownMenu modal={false}>
<DropdownMenuTrigger asChild>
- <Button>
- <PlusIcon className="mr-2 h-4 w-4" />
+ <Button disabled={createWorkflowMutation.isPending}>
+ {createWorkflowMutation.isPending ? (
+ <ReloadIcon className="mr-2 h-4 w-4 animate-spin" />
+ ) : (
+ <PlusIcon className="mr-2 h-4 w-4" />
+ )}
Create
<ChevronDownIcon className="ml-2 h-4 w-4" />
</Button>
@@ -516,9 +520,10 @@ function Workflows() {
<DropdownMenuContent align="end">
<DropdownMenuItem
onSelect={() => {
- navigateToBlankAgentEditor(navigate, {
- via: "blank",
- folderId: selectedFolderId,
+ createWorkflowMutation.mutate({
+ ...defaultWorkflowRequest,
+ folder_id: selectedFolderId,
+ _via: "blank",
});
}}
>
diff --git a/skyvern-frontend/src/routes/workflows/WorkflowsPageBanner.tsx b/skyvern-frontend/src/routes/workflows/WorkflowsPageBanner.tsx
index 94a3a7aef..2bb40be7f 100644
--- a/skyvern-frontend/src/routes/workflows/WorkflowsPageBanner.tsx
+++ b/skyvern-frontend/src/routes/workflows/WorkflowsPageBanner.tsx
@@ -1,11 +1,11 @@
import { Button } from "@/components/ui/button";
-import { PlusIcon } from "@radix-ui/react-icons";
-import { useNavigate } from "react-router-dom";
+import { PlusIcon, ReloadIcon } from "@radix-ui/react-icons";
+import { useCreateWorkflowMutation } from "./hooks/useCreateWorkflowMutation";
import { ImportWorkflowButton } from "./ImportWorkflowButton";
-import { navigateToBlankAgentEditor } from "./blankAgentNavigation";
+import { defaultWorkflowRequest } from "./defaultWorkflowRequest";
function WorkflowsPageBanner() {
- const navigate = useNavigate();
+ const createNewWorkflowMutation = useCreateWorkflowMutation();
return (
<div className="space-y-8 bg-slate-elevation1 p-12">
@@ -15,11 +15,16 @@ function WorkflowsPageBanner() {
<div className="flex justify-center gap-4">
<ImportWorkflowButton />
<Button
+ disabled={createNewWorkflowMutation.isPending}
onClick={() => {
- navigateToBlankAgentEditor(navigate, { via: "banner" });
+ createNewWorkflowMutation.mutate(defaultWorkflowRequest);
}}
>
- <PlusIcon className="mr-2 h-4 w-4" />
+ {createNewWorkflowMutation.isPending ? (
+ <ReloadIcon className="mr-2 h-4 w-4 animate-spin" />
+ ) : (
+ <PlusIcon className="mr-2 h-4 w-4" />
+ )}
Create Agent
</Button>
</div>
diff --git a/skyvern-frontend/src/routes/workflows/blankAgentNavigation.test.ts b/skyvern-frontend/src/routes/workflows/blankAgentNavigation.test.ts
deleted file mode 100644
index 0cc765206..000000000
--- a/skyvern-frontend/src/routes/workflows/blankAgentNavigation.test.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { describe, expect, it, vi } from "vitest";
-import {
- buildBlankAgentBuildPath,
- navigateToBlankAgentEditor,
-} from "./blankAgentNavigation";
-
-describe("blankAgentNavigation", () => {
- it("builds the draft builder path with via and folder_id", () => {
- expect(
- buildBlankAgentBuildPath({ via: "blank", folderId: "fld_123" }),
- ).toBe("/workflows/new/build?via=blank&folder_id=fld_123");
- });
-
- it("navigates to the draft builder", () => {
- const navigate = vi.fn();
- navigateToBlankAgentEditor(navigate, { via: "sidebar" });
- expect(navigate).toHaveBeenCalledWith("/workflows/new/build?via=sidebar");
- });
-});
diff --git a/skyvern-frontend/src/routes/workflows/blankAgentNavigation.ts b/skyvern-frontend/src/routes/workflows/blankAgentNavigation.ts
deleted file mode 100644
index da69600bb..000000000
--- a/skyvern-frontend/src/routes/workflows/blankAgentNavigation.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-import type { NavigateFunction } from "react-router-dom";
-import { DRAFT_WORKFLOW_PERMANENT_ID } from "./draftWorkflow";
-
-type NavigateToBlankAgentOptions = {
- via?: string;
- folderId?: string | null;
-};
-
-function buildBlankAgentBuildPath({
- via,
- folderId,
-}: NavigateToBlankAgentOptions = {}) {
- const params = new URLSearchParams();
- if (via) {
- params.set("via", via);
- }
- if (folderId) {
- params.set("folder_id", folderId);
- }
- const search = params.toString();
- return `/workflows/${DRAFT_WORKFLOW_PERMANENT_ID}/build${search ? `?${search}` : ""}`;
-}
-
-function navigateToBlankAgentEditor(
- navigate: NavigateFunction,
- options: NavigateToBlankAgentOptions = {},
-) {
- navigate(buildBlankAgentBuildPath(options));
-}
-
-export {
- buildBlankAgentBuildPath,
- navigateToBlankAgentEditor,
- type NavigateToBlankAgentOptions,
-};
diff --git a/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.draft.test.tsx b/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.draft.test.tsx
deleted file mode 100644
index 2d8ac8157..000000000
--- a/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.draft.test.tsx
+++ /dev/null
@@ -1,181 +0,0 @@
-import { act, cleanup, render, screen, waitFor } from "@testing-library/react";
-import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
-
-import type { WorkflowCopilotStreamResponseUpdate } from "./workflowCopilotTypes";
-
-type StreamCall = {
- body: {
- message: string;
- workflow_id: string;
- workflow_permanent_id: string;
- };
- onMessage: (payload: unknown) => boolean;
- resolve: () => void;
- reject: (error: unknown) => void;
-};
-
-const { streamCalls, postStreaming, mutateAsync, toast } = vi.hoisted(() => {
- const calls: StreamCall[] = [];
- const streaming = vi.fn(
- (
- _path: string,
- body: StreamCall["body"],
- onMessage: (payload: unknown) => boolean,
- ) =>
- new Promise<void>((resolve, reject) => {
- calls.push({ body, onMessage, resolve, reject });
- }),
- );
- return {
- streamCalls: calls,
- postStreaming: streaming,
- mutateAsync: vi.fn(),
- toast: vi.fn(),
- };
-});
-
-vi.mock("@/api/sse", () => ({
- getSseClient: vi.fn().mockResolvedValue({ postStreaming }),
-}));
-
-vi.mock("@/api/AxiosClient", () => ({
- getClient: vi.fn().mockResolvedValue({
- get: vi.fn().mockResolvedValue({
- data: {
- workflow_copilot_chat_id: null,
- chat_history: [],
- proposed_workflow: null,
- auto_accept: false,
- },
- }),
- post: vi.fn().mockResolvedValue({}),
- }),
-}));
-
-vi.mock("@/hooks/useCredentialGetter", () => ({
- useCredentialGetter: () => null,
-}));
-
-vi.mock("@/components/ui/use-toast", () => ({ toast }));
-
-vi.mock("react-router-dom", async (importOriginal) => {
- const actual = await importOriginal<typeof import("react-router-dom")>();
- return {
- ...actual,
- useParams: () => ({
- workflowPermanentId: "new",
- workflowRunId: undefined,
- }),
- };
-});
-
-const draftSaveData = {
- title: "Handoff title",
- workflow: {
- workflow_id: "new",
- workflow_permanent_id: "new",
- description: "",
- totp_verification_url: null,
- is_saved_task: false,
- status: "draft",
- },
- settings: {
- proxyLocation: null,
- webhookCallbackUrl: null,
- persistBrowserSession: false,
- browserProfileId: null,
- model: null,
- maxScreenshotScrolls: null,
- extraHttpHeaders: null,
- runWith: "agent",
- scriptCacheKey: "",
- aiFallback: true,
- codeVersion: 2,
- runSequentially: false,
- sequentialKey: null,
- },
- parameters: [],
- blocks: [],
- workflowDefinitionVersion: 1,
-};
-
-const persistedWorkflow = {
- ...draftSaveData.workflow,
- workflow_id: "wf_real",
- workflow_permanent_id: "wpid_real",
- status: "published",
-};
-
-vi.mock("@/store/WorkflowHasChangesStore", () => ({
- useWorkflowHasChangesStore: () => ({
- getSaveData: () => draftSaveData,
- }),
- useWorkflowSave: () => ({
- isPending: false,
- mutateAsync,
- }),
-}));
-
-import { WorkflowCopilotChat } from "./WorkflowCopilotChat";
-
-const terminalResponse = (
- message: string,
-): WorkflowCopilotStreamResponseUpdate => ({
- type: "response",
- workflow_copilot_chat_id: "chat-1",
- message,
- updated_workflow: null,
- response_time: "2026-05-25T00:00:05Z",
- proposal_disposition: "no_proposal",
-});
-
-const turnStart = () => ({
- type: "turn_start" as const,
- turn_id: "turn-1",
- turn_index: 0,
- mode: "build",
- timestamp: "2026-05-25T00:00:00Z",
-});
-
-beforeEach(() => {
- HTMLElement.prototype.scrollIntoView = vi.fn();
- HTMLElement.prototype.scrollTo = vi.fn();
- streamCalls.length = 0;
- postStreaming.mockClear();
- toast.mockClear();
- mutateAsync.mockResolvedValue({
- saveData: draftSaveData,
- createdWorkflow: persistedWorkflow,
- isDraft: true,
- });
-});
-
-afterEach(() => {
- cleanup();
-});
-
-describe("WorkflowCopilotChat — draft auto-send", () => {
- it("persists a draft agent before auto-sending the Discover handoff prompt", async () => {
- render(<WorkflowCopilotChat initialMessage="Build this workflow" />);
-
- await waitFor(() => expect(mutateAsync).toHaveBeenCalledTimes(1));
- await waitFor(() => expect(postStreaming).toHaveBeenCalledTimes(1));
-
- expect(toast).not.toHaveBeenCalledWith(
- expect.objectContaining({ title: "Save your agent first" }),
- );
-
- const streamBody = streamCalls[0]?.body;
- expect(streamBody?.message).toBe("Build this workflow");
- expect(streamBody?.workflow_id).toBe("wf_real");
- expect(streamBody?.workflow_permanent_id).toBe("wpid_real");
-
- await act(async () => {
- streamCalls[0]?.onMessage(turnStart());
- streamCalls[0]?.onMessage(terminalResponse("Done"));
- streamCalls[0]?.resolve();
- });
-
- expect(await screen.findByText("Done")).toBeTruthy();
- });
-});
diff --git a/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.queue.test.tsx b/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.queue.test.tsx
index e07d7fd14..c87225c82 100644
--- a/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.queue.test.tsx
+++ b/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.queue.test.tsx
@@ -114,10 +114,6 @@ const saveData = {
vi.mock("@/store/WorkflowHasChangesStore", () => ({
useWorkflowHasChangesStore: () => ({ getSaveData: () => saveData }),
- useWorkflowSave: () => ({
- isPending: false,
- mutateAsync: vi.fn(),
- }),
}));
import { WorkflowCopilotChat } from "./WorkflowCopilotChat";
diff --git a/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.scroll.test.tsx b/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.scroll.test.tsx
index e4b16165f..c9bf44d06 100644
--- a/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.scroll.test.tsx
+++ b/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.scroll.test.tsx
@@ -57,10 +57,6 @@ vi.mock("react-router-dom", async (importOriginal) => {
vi.mock("@/store/WorkflowHasChangesStore", () => ({
useWorkflowHasChangesStore: () => ({ getSaveData: () => ({}) }),
- useWorkflowSave: () => ({
- isPending: false,
- mutateAsync: vi.fn(),
- }),
}));
import { WorkflowCopilotChat } from "./WorkflowCopilotChat";
diff --git a/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.tsx b/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.tsx
index 666a54834..ad2a4ac3d 100644
--- a/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.tsx
+++ b/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.tsx
@@ -10,13 +10,9 @@ import {
import { getClient } from "@/api/AxiosClient";
import { useCredentialGetter } from "@/hooks/useCredentialGetter";
import { useParams } from "react-router-dom";
-import { isDraftWorkflowPermanentId } from "@/routes/workflows/draftWorkflow";
import { ReloadIcon, Cross2Icon, ChevronDownIcon } from "@radix-ui/react-icons";
import { stringify as convertToYAML } from "yaml";
-import {
- useWorkflowHasChangesStore,
- useWorkflowSave,
-} from "@/store/WorkflowHasChangesStore";
+import { useWorkflowHasChangesStore } from "@/store/WorkflowHasChangesStore";
import { WorkflowCreateYAMLRequest } from "@/routes/workflows/types/workflowYamlTypes";
import { WorkflowApiResponse } from "@/routes/workflows/types/workflowTypes";
import { toast } from "@/components/ui/use-toast";
@@ -391,7 +387,6 @@ export function WorkflowCopilotChat({
const { workflowRunId, workflowPermanentId } = useParams();
const textareaRef = useRef<HTMLTextAreaElement>(null);
const { getSaveData } = useWorkflowHasChangesStore();
- const saveWorkflowMutation = useWorkflowSave();
const hasInitializedPosition = useRef(false);
const hasAutoSentRef = useRef(false);
const isWaitingForLiveBrowser = shouldWaitForLiveBrowser({
@@ -858,23 +853,6 @@ export function WorkflowCopilotChat({
});
return;
}
- let persistedWorkflow: WorkflowApiResponse | null = null;
- if (isDraftWorkflowPermanentId(workflowPermanentId)) {
- if (saveWorkflowMutation.isPending) {
- return;
- }
- try {
- const saveResult = await saveWorkflowMutation.mutateAsync();
- if (!saveResult) {
- return;
- }
- persistedWorkflow = saveResult.createdWorkflow;
- } catch {
- return;
- }
- }
- const activeWorkflowPermanentId =
- persistedWorkflow?.workflow_permanent_id ?? workflowPermanentId;
if (action === "queue_working" || action === "queue_live_browser") {
const reason: QueuedPromptReason =
action === "queue_working" ? "working" : "live_browser";
@@ -938,11 +916,10 @@ export function WorkflowCopilotChat({
try {
const saveData = getSaveData();
- const workflowId =
- persistedWorkflow?.workflow_id ?? saveData?.workflow.workflow_id;
+ const workflowId = saveData?.workflow.workflow_id;
let workflowYaml = "";
- if (!workflowId || !activeWorkflowPermanentId) {
+ if (!workflowId) {
toast({
title: "Missing agent",
description: "Agent ID is required to chat.",
@@ -1152,7 +1129,7 @@ export function WorkflowCopilotChat({
"/workflow/copilot/chat-post",
{
workflow_id: workflowId,
- workflow_permanent_id: activeWorkflowPermanentId,
+ workflow_permanent_id: workflowPermanentId,
workflow_copilot_chat_id: workflowCopilotChatId,
workflow_run_id: workflowRunId,
browser_session_id: liveBrowserSessionId ?? null,
@@ -1272,7 +1249,6 @@ export function WorkflowCopilotChat({
liveBrowserSessionId,
requiresLiveBrowser,
updateQueuedPrompt,
- saveWorkflowMutation,
workflowCopilotChatId,
workflowPermanentId,
workflowRunId,
diff --git a/skyvern-frontend/src/routes/workflows/draftWorkflow.test.ts b/skyvern-frontend/src/routes/workflows/draftWorkflow.test.ts
deleted file mode 100644
index 6bc8ea7fa..000000000
--- a/skyvern-frontend/src/routes/workflows/draftWorkflow.test.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-import { describe, expect, it } from "vitest";
-import {
- DRAFT_WORKFLOW_PERMANENT_ID,
- buildDraftWorkflowApiResponse,
- isDraftWorkflowPermanentId,
-} from "./draftWorkflow";
-
-describe("draftWorkflow", () => {
- it("detects the draft workflow permanent id", () => {
- expect(isDraftWorkflowPermanentId("new")).toBe(true);
- expect(isDraftWorkflowPermanentId("wpid_abc")).toBe(false);
- expect(isDraftWorkflowPermanentId(undefined)).toBe(false);
- });
-
- it("keeps the default title when overrides are undefined", () => {
- const workflow = buildDraftWorkflowApiResponse({
- title: undefined,
- run_with: undefined,
- folder_id: undefined,
- });
-
- expect(workflow.title).toBe("New Agent");
- });
-
- it("builds an in-memory workflow payload without persisting", () => {
- const workflow = buildDraftWorkflowApiResponse({
- title: "Handoff title",
- folder_id: "fld_1",
- run_with: "code",
- });
-
- expect(workflow.workflow_permanent_id).toBe(DRAFT_WORKFLOW_PERMANENT_ID);
- expect(workflow.title).toBe("Handoff title");
- expect(workflow.folder_id).toBe("fld_1");
- expect(workflow.run_with).toBe("code");
- expect(workflow.workflow_definition.blocks).toEqual([]);
- });
-});
diff --git a/skyvern-frontend/src/routes/workflows/draftWorkflow.ts b/skyvern-frontend/src/routes/workflows/draftWorkflow.ts
deleted file mode 100644
index 15cd620f0..000000000
--- a/skyvern-frontend/src/routes/workflows/draftWorkflow.ts
+++ /dev/null
@@ -1,82 +0,0 @@
-import type { WorkflowCreateYAMLRequest } from "./types/workflowYamlTypes";
-import type { WorkflowApiResponse } from "./types/workflowTypes";
-import { defaultWorkflowRequest } from "./defaultWorkflowRequest";
-
-const DRAFT_WORKFLOW_PERMANENT_ID = "new";
-
-type DraftWorkflowOverrides = Partial<
- Pick<WorkflowCreateYAMLRequest, "title" | "run_with" | "folder_id">
->;
-
-function isDraftWorkflowPermanentId(
- workflowPermanentId: string | undefined,
-): workflowPermanentId is typeof DRAFT_WORKFLOW_PERMANENT_ID {
- return workflowPermanentId === DRAFT_WORKFLOW_PERMANENT_ID;
-}
-
-function omitUndefinedOverrides(
- overrides: DraftWorkflowOverrides,
-): DraftWorkflowOverrides {
- return Object.fromEntries(
- Object.entries(overrides).filter(([, value]) => value !== undefined),
- ) as DraftWorkflowOverrides;
-}
-
-function buildDraftWorkflowApiResponse(
- overrides: DraftWorkflowOverrides = {},
-): WorkflowApiResponse {
- const request: WorkflowCreateYAMLRequest = {
- ...defaultWorkflowRequest,
- ...omitUndefinedOverrides(overrides),
- };
- const now = new Date().toISOString();
-
- return {
- workflow_id: DRAFT_WORKFLOW_PERMANENT_ID,
- organization_id: "",
- is_saved_task: false,
- is_template: false,
- title: request.title,
- workflow_permanent_id: DRAFT_WORKFLOW_PERMANENT_ID,
- version: 1,
- description: request.description ?? "",
- workflow_definition: {
- version: request.workflow_definition.version,
- blocks: request.workflow_definition
- .blocks as WorkflowApiResponse["workflow_definition"]["blocks"],
- parameters: request.workflow_definition
- .parameters as WorkflowApiResponse["workflow_definition"]["parameters"],
- },
- proxy_location: null,
- webhook_callback_url: null,
- extra_http_headers: null,
- cdp_connect_headers: null,
- persist_browser_session: false,
- browser_profile_id: null,
- model: null,
- totp_verification_url: null,
- totp_identifier: null,
- max_screenshot_scrolls: null,
- max_elapsed_time_minutes: null,
- status: "draft",
- created_at: now,
- modified_at: now,
- deleted_at: null,
- run_with: request.run_with ?? "agent",
- cache_key: null,
- ai_fallback: request.ai_fallback ?? true,
- adaptive_caching: null,
- code_version: request.code_version ?? null,
- run_sequentially: false,
- sequential_key: null,
- folder_id: request.folder_id ?? null,
- import_error: null,
- };
-}
-
-export {
- DRAFT_WORKFLOW_PERMANENT_ID,
- buildDraftWorkflowApiResponse,
- isDraftWorkflowPermanentId,
- type DraftWorkflowOverrides,
-};
diff --git a/skyvern-frontend/src/routes/workflows/editor/WorkflowEditor.tsx b/skyvern-frontend/src/routes/workflows/editor/WorkflowEditor.tsx
index 40e41030a..2639d73b3 100644
--- a/skyvern-frontend/src/routes/workflows/editor/WorkflowEditor.tsx
+++ b/skyvern-frontend/src/routes/workflows/editor/WorkflowEditor.tsx
@@ -79,7 +79,7 @@ function WorkflowEditor() {
persistBrowserSession: workflow.persist_browser_session,
browserProfileId: workflow.browser_profile_id ?? null,
proxyLocation: workflow.proxy_location,
- webhookCallbackUrl: workflow.webhook_callback_url ?? "",
+ webhookCallbackUrl: workflow.webhook_callback_url,
model: workflow.model,
maxScreenshotScrolls: workflow.max_screenshot_scrolls,
maxElapsedTimeMinutes: workflow.max_elapsed_time_minutes ?? null,
diff --git a/skyvern-frontend/src/routes/workflows/editor/nodes/components/NodeHeader.tsx b/skyvern-frontend/src/routes/workflows/editor/nodes/components/NodeHeader.tsx
index b41e7200f..bc2c9f108 100644
--- a/skyvern-frontend/src/routes/workflows/editor/nodes/components/NodeHeader.tsx
+++ b/skyvern-frontend/src/routes/workflows/editor/nodes/components/NodeHeader.tsx
@@ -156,7 +156,7 @@ const getPayload = (opts: {
workflowPermanentId: string;
workflowSettings: WorkflowSettingsState;
}): Payload | null => {
- const webhook_url = (opts.workflowSettings.webhookCallbackUrl ?? "").trim();
+ const webhook_url = opts.workflowSettings.webhookCallbackUrl.trim();
let extraHttpHeaders = null;
diff --git a/skyvern-frontend/src/routes/workflows/hooks/useBlockScriptsQuery.ts b/skyvern-frontend/src/routes/workflows/hooks/useBlockScriptsQuery.ts
index 8f41922cf..ed53cc7e3 100644
--- a/skyvern-frontend/src/routes/workflows/hooks/useBlockScriptsQuery.ts
+++ b/skyvern-frontend/src/routes/workflows/hooks/useBlockScriptsQuery.ts
@@ -1,7 +1,6 @@
import { getClient } from "@/api/AxiosClient";
import { useCredentialGetter } from "@/hooks/useCredentialGetter";
import { useQuery } from "@tanstack/react-query";
-import { isDraftWorkflowPermanentId } from "../draftWorkflow";
import { ScriptBlocksResponse } from "../types/scriptTypes";
type Props = {
@@ -50,8 +49,7 @@ function useBlockScriptsQuery({
}
return Math.max(2000, pollIntervalMs);
},
- enabled:
- !!workflowPermanentId && !isDraftWorkflowPermanentId(workflowPermanentId),
+ enabled: !!workflowPermanentId,
});
}
diff --git a/skyvern-frontend/src/routes/workflows/hooks/useCacheKeyValuesQuery.ts b/skyvern-frontend/src/routes/workflows/hooks/useCacheKeyValuesQuery.ts
index cffcd0604..baa60b72c 100644
--- a/skyvern-frontend/src/routes/workflows/hooks/useCacheKeyValuesQuery.ts
+++ b/skyvern-frontend/src/routes/workflows/hooks/useCacheKeyValuesQuery.ts
@@ -2,7 +2,6 @@ import { getClient } from "@/api/AxiosClient";
import { useCredentialGetter } from "@/hooks/useCredentialGetter";
import { useQuery, keepPreviousData } from "@tanstack/react-query";
import { useEffect, useState } from "react";
-import { isDraftWorkflowPermanentId } from "../draftWorkflow";
import { CacheKeyValuesResponse } from "../types/scriptTypes";
type Props = {
@@ -56,11 +55,7 @@ function useCacheKeyValuesQuery({
return result;
},
- enabled:
- !!workflowPermanentId &&
- !isDraftWorkflowPermanentId(workflowPermanentId) &&
- !!cacheKey &&
- cacheKey.length > 0,
+ enabled: !!workflowPermanentId && !!cacheKey && cacheKey.length > 0,
placeholderData: keepPreviousData,
staleTime: 5 * 60 * 1000,
});
diff --git a/skyvern-frontend/src/routes/workflows/hooks/useDebugSessionQuery.ts b/skyvern-frontend/src/routes/workflows/hooks/useDebugSessionQuery.ts
index 8c21fa33c..d85c7d6ec 100644
--- a/skyvern-frontend/src/routes/workflows/hooks/useDebugSessionQuery.ts
+++ b/skyvern-frontend/src/routes/workflows/hooks/useDebugSessionQuery.ts
@@ -2,7 +2,6 @@ import { getClient } from "@/api/AxiosClient";
import { DebugSessionApiResponse } from "@/api/types";
import { useCredentialGetter } from "@/hooks/useCredentialGetter";
import { useQuery } from "@tanstack/react-query";
-import { isDraftWorkflowPermanentId } from "../draftWorkflow";
interface Opts {
workflowPermanentId?: string;
@@ -18,10 +17,9 @@ function useDebugSessionQuery({
const credentialGetter = useCredentialGetter();
const baseEnabled =
- (enabled !== undefined
+ enabled !== undefined
? enabled && !!workflowPermanentId
- : !!workflowPermanentId) &&
- !isDraftWorkflowPermanentId(workflowPermanentId);
+ : !!workflowPermanentId;
return useQuery<DebugSessionApiResponse>({
queryKey: ["debugSession", workflowPermanentId],
diff --git a/skyvern-frontend/src/routes/workflows/hooks/useWorkflowQuery.ts b/skyvern-frontend/src/routes/workflows/hooks/useWorkflowQuery.ts
index 42c1f481a..555394760 100644
--- a/skyvern-frontend/src/routes/workflows/hooks/useWorkflowQuery.ts
+++ b/skyvern-frontend/src/routes/workflows/hooks/useWorkflowQuery.ts
@@ -1,48 +1,20 @@
import { getClient } from "@/api/AxiosClient";
import { useCredentialGetter } from "@/hooks/useCredentialGetter";
import { useQuery } from "@tanstack/react-query";
-import { useLocation, useSearchParams } from "react-router-dom";
import { WorkflowApiResponse } from "../types/workflowTypes";
import { useGlobalWorkflowsQuery } from "./useGlobalWorkflowsQuery";
-import {
- buildDraftWorkflowApiResponse,
- isDraftWorkflowPermanentId,
-} from "../draftWorkflow";
type Props = {
workflowPermanentId?: string;
};
-type DraftLocationState = {
- draftTitle?: string;
- draftRunWith?: "agent" | "code";
-};
-
function useWorkflowQuery({ workflowPermanentId }: Props) {
const { data: globalWorkflows } = useGlobalWorkflowsQuery();
const credentialGetter = useCredentialGetter();
- const [searchParams] = useSearchParams();
- const location = useLocation();
- const isDraft = isDraftWorkflowPermanentId(workflowPermanentId);
return useQuery<WorkflowApiResponse>({
- queryKey: [
- "workflow",
- workflowPermanentId,
- isDraft ? searchParams.toString() : null,
- isDraft ? location.state : null,
- ],
+ queryKey: ["workflow", workflowPermanentId],
queryFn: async () => {
- if (isDraft) {
- const locationState = location.state as DraftLocationState | null;
- const folderId = searchParams.get("folder_id");
- return buildDraftWorkflowApiResponse({
- title: locationState?.draftTitle,
- run_with: locationState?.draftRunWith,
- folder_id: folderId ?? undefined,
- });
- }
-
const client = await getClient(credentialGetter);
const isGlobalWorkflow = globalWorkflows?.some(
(workflow) => workflow.workflow_permanent_id === workflowPermanentId,
@@ -55,7 +27,8 @@ function useWorkflowQuery({ workflowPermanentId }: Props) {
.get(`/workflows/${workflowPermanentId}`, { params })
.then((response) => response.data);
},
- enabled: isDraft ? true : !!globalWorkflows && !!workflowPermanentId,
+ enabled: !!globalWorkflows && !!workflowPermanentId,
+ // Keep showing stale data during refetch to prevent flash of empty content
placeholderData: (previousData) => previousData,
});
}
diff --git a/skyvern-frontend/src/store/WorkflowHasChangesStore.ts b/skyvern-frontend/src/store/WorkflowHasChangesStore.ts
index a62bf9421..5890504e2 100644
--- a/skyvern-frontend/src/store/WorkflowHasChangesStore.ts
+++ b/skyvern-frontend/src/store/WorkflowHasChangesStore.ts
@@ -4,12 +4,10 @@ import { create } from "zustand";
import { useMutation, useQueryClient } from "@tanstack/react-query";
import { stringify as convertToYAML } from "yaml";
import { usePostHog } from "posthog-js/react";
-import { useLocation, useNavigate, useSearchParams } from "react-router-dom";
import { getClient } from "@/api/AxiosClient";
import { toast } from "@/components/ui/use-toast";
import { useCredentialGetter } from "@/hooks/useCredentialGetter";
-import { isDraftWorkflowPermanentId } from "@/routes/workflows/draftWorkflow";
import {
type BlockYAML,
type ParameterYAML,
@@ -88,9 +86,6 @@ const useWorkflowSave = (opts?: WorkflowSaveOpts) => {
const credentialGetter = useCredentialGetter();
const queryClient = useQueryClient();
const postHog = usePostHog();
- const navigate = useNavigate();
- const location = useLocation();
- const [searchParams] = useSearchParams();
const {
getSaveData,
saidOkToCodeCacheDeletion,
@@ -105,13 +100,9 @@ const useWorkflowSave = (opts?: WorkflowSaveOpts) => {
if (!saveData) {
setHasChanges(false);
- return null;
+ return;
}
- const isDraft = isDraftWorkflowPermanentId(
- saveData.workflow.workflow_permanent_id,
- );
-
const client = await getClient(credentialGetter);
const extraHttpHeaders: Record<string, string> = {};
@@ -216,30 +207,11 @@ const useWorkflowSave = (opts?: WorkflowSaveOpts) => {
status: opts?.status ?? saveData.workflow.status,
run_sequentially: saveData.settings.runSequentially,
sequential_key: saveData.settings.sequentialKey,
- ...(isDraft && saveData.workflow.folder_id
- ? { folder_id: saveData.workflow.folder_id }
- : {}),
};
const yaml = convertToYAML(requestBody);
- if (isDraft) {
- const created = await client.post<
- string,
- { data: WorkflowApiResponse }
- >("/workflows", yaml, {
- headers: {
- "Content-Type": "text/plain",
- },
- });
- return {
- saveData,
- createdWorkflow: created.data,
- isDraft: true as const,
- };
- }
-
- const updated = await client.put<string, WorkflowApiResponse>(
+ return client.put<string, WorkflowApiResponse>(
`/workflows/${saveData.workflow.workflow_permanent_id}`,
yaml,
{
@@ -253,58 +225,37 @@ const useWorkflowSave = (opts?: WorkflowSaveOpts) => {
},
},
);
- return { saveData, createdWorkflow: updated, isDraft: false as const };
},
- onSuccess: (result) => {
- if (!result) {
+ onSuccess: () => {
+ const saveData = getSaveData();
+
+ if (!saveData) {
return;
}
- const { saveData, createdWorkflow, isDraft } = result;
- const workflowPermanentId = createdWorkflow.workflow_permanent_id;
-
postHog.capture("builder.workflow.saved", {
- org_id:
- createdWorkflow.organization_id || saveData.workflow.organization_id,
- workflow_permanent_id: workflowPermanentId,
+ org_id: saveData.workflow.organization_id,
+ workflow_permanent_id: saveData.workflow.workflow_permanent_id,
block_count: saveData.blocks.length,
block_types: saveData.blocks.map((b) => b.block_type),
});
toast({
- title: isDraft ? "Agent created" : "Changes saved",
- description: isDraft
- ? "Your agent has been saved"
- : "Your changes have been saved",
+ title: "Changes saved",
+ description: "Your changes have been saved",
variant: "success",
});
- if (isDraft) {
- const via = searchParams.get("via");
- const nextSearch = via ? `?via=${encodeURIComponent(via)}` : "";
- navigate(`/workflows/${workflowPermanentId}/build${nextSearch}`, {
- replace: true,
- state: location.state,
- });
- queryClient.setQueryData(
- ["workflow", workflowPermanentId],
- createdWorkflow,
- );
- } else {
- queryClient.invalidateQueries({
- queryKey: ["workflow", workflowPermanentId],
- });
- }
-
queryClient.invalidateQueries({
- queryKey: ["workflows"],
+ queryKey: ["workflow", saveData.workflow.workflow_permanent_id],
});
+
queryClient.invalidateQueries({
- queryKey: ["folders"],
+ queryKey: ["workflows"],
});
queryClient.invalidateQueries({
- queryKey: ["block-scripts", workflowPermanentId],
+ queryKey: ["block-scripts", saveData.workflow.workflow_permanent_id],
});
setHasChanges(false);
diff --git a/skyvern-frontend/src/store/WorkflowTitleStore.ts b/skyvern-frontend/src/store/WorkflowTitleStore.ts
index 70ce50970..167b75e1f 100644
--- a/skyvern-frontend/src/store/WorkflowTitleStore.ts
+++ b/skyvern-frontend/src/store/WorkflowTitleStore.ts
@@ -20,18 +20,15 @@ const useWorkflowTitleStore = create<WorkflowTitleStore>((set, get) => {
return get().title === DEFAULT_WORKFLOW_TITLE;
},
setTitle: (title: string) => {
- const normalizedTitle = (title ?? "").trim();
- set({ title: normalizedTitle, titleHasBeenGenerated: true });
+ set({ title: title.trim(), titleHasBeenGenerated: true });
},
setTitleFromGeneration: (title: string) => {
- const normalizedTitle = (title ?? "").trim();
- set({ title: normalizedTitle, titleHasBeenGenerated: true });
+ set({ title: title.trim(), titleHasBeenGenerated: true });
},
initializeTitle: (title: string) => {
- const normalizedTitle = (title ?? "").trim();
set({
- title: normalizedTitle,
- titleHasBeenGenerated: normalizedTitle !== DEFAULT_WORKFLOW_TITLE,
+ title: title.trim(),
+ titleHasBeenGenerated: title.trim() !== DEFAULT_WORKFLOW_TITLE,
});
},
resetTitle: () => {