Commit 1e3db39
authored
fix: auto-activate custom workflow after submission (#510)
## Problem
Custom workflows were not being activated after submission - the form
dialog would close, but no network call was made to the backend API to
actually load the workflow.
## Root Cause
When submitting a custom workflow, the code was only calling
`setCustomWorkflow()` which set it as "pending" but never called
`activateWorkflow()`. Out-of-the-box workflows automatically activated,
but custom ones didn't.
## Solution
Modified the `CustomWorkflowDialog` submission handler to automatically
activate the workflow after setting it as pending. This now:
1. Sets the workflow as pending
2. Closes the dialog
3. Creates a workflow config object
4. **Immediately activates it** (makes the POST request to
`/api/projects/{project}/agentic-sessions/{session}/workflow`)
This matches the behavior of OOTB workflows.
## Testing
- ✅ Frontend builds successfully with `npm run build`
- ✅ No linting errors
- Ready to test on dev cluster after deployment
## Changes
- Modified
`components/frontend/src/app/projects/[name]/sessions/[sessionName]/page.tsx`
- Added automatic activation call in `CustomWorkflowDialog` onSubmit
handler1 parent a6ced3a commit 1e3db39
File tree
1 file changed
+11
-0
lines changed- components/frontend/src/app/projects/[name]/sessions/[sessionName]
1 file changed
+11
-0
lines changedLines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2034 | 2034 | | |
2035 | 2035 | | |
2036 | 2036 | | |
| 2037 | + | |
| 2038 | + | |
| 2039 | + | |
| 2040 | + | |
| 2041 | + | |
| 2042 | + | |
| 2043 | + | |
| 2044 | + | |
| 2045 | + | |
| 2046 | + | |
| 2047 | + | |
2037 | 2048 | | |
2038 | 2049 | | |
2039 | 2050 | | |
| |||
0 commit comments