From edda75518f8307e8bbb2b0f3666c5d0253c8c891 Mon Sep 17 00:00:00 2001 From: Gage Krumbach Date: Wed, 14 Jan 2026 10:52:50 -0600 Subject: [PATCH] fix: auto-activate custom workflow after submission Previously, custom workflows were only set as pending but never activated, which meant no network call was made to the backend API. This fix ensures custom workflows are automatically activated after submission, matching the behavior of out-of-the-box workflows. The fix adds an immediate call to activateWorkflow() after setCustomWorkflow(), which triggers the POST request to /api/projects/{project}/agentic-sessions/{session}/workflow --- .../projects/[name]/sessions/[sessionName]/page.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/components/frontend/src/app/projects/[name]/sessions/[sessionName]/page.tsx b/components/frontend/src/app/projects/[name]/sessions/[sessionName]/page.tsx index 355b08ae..8f98e05c 100644 --- a/components/frontend/src/app/projects/[name]/sessions/[sessionName]/page.tsx +++ b/components/frontend/src/app/projects/[name]/sessions/[sessionName]/page.tsx @@ -2034,6 +2034,17 @@ export default function ProjectSessionDetailPage({ onSubmit={(url, branch, path) => { workflowManagement.setCustomWorkflow(url, branch, path); setCustomWorkflowDialogOpen(false); + // Automatically activate the custom workflow (same as OOTB workflows) + const customWorkflow = { + id: "custom", + name: "Custom workflow", + description: `Custom workflow from ${url}`, + gitUrl: url, + branch: branch || "main", + path: path || "", + enabled: true, + }; + workflowManagement.activateWorkflow(customWorkflow, session?.status?.phase); }} isActivating={workflowManagement.workflowActivating} />