diff --git a/frontend/src/app/pages/Workflows/app/ComposeView.tsx b/frontend/src/app/pages/Workflows/app/ComposeView.tsx index 26ddab7c..f38e7a6b 100644 --- a/frontend/src/app/pages/Workflows/app/ComposeView.tsx +++ b/frontend/src/app/pages/Workflows/app/ComposeView.tsx @@ -2,8 +2,7 @@ import React, { useEffect, useRef, useState } from 'react'; import { useAppDispatch, useAppSelector } from '@/shared/hooks'; import { createWorkflow, updateWorkflow } from '@/shared/state/workflowsSlice'; import { sendMessage } from '@/shared/state/agentsSlice'; -import { defaultSchedule, stepsSignature, needsScheduleTestWarning } from '@/app/pages/Workflows/scheduleUtils'; -import { runWorkflowTest } from '@/app/pages/Workflows/runWorkflowTest'; +import { defaultSchedule } from '@/app/pages/Workflows/scheduleUtils'; import AgentChat from '@/app/pages/AgentChat/AgentChat'; import InlineEditableTitle from '@/app/components/InlineEditableTitle'; import { Typewriter } from '@/app/components/feedback/Animated'; @@ -13,7 +12,6 @@ import { useEditAgentSession } from './useEditAgentSession'; import { useWorkflowPatch } from './useWorkflowPatch'; import ScheduleCard from './ScheduleCard'; import StepsCard from './StepsCard'; -import SaveGuard from './SaveGuard'; import type { AppNav } from './types'; // Short pill label for the clean cluster, plus the richer prompt actually sent so the agent gets real detail. Spread across personas (work, money, research, lifestyle, monitoring) so most people see one that fits. Keep labels similar length so they cluster two-per-row. @@ -30,8 +28,6 @@ const ComposeView: React.FC<{ nav: AppNav }> = ({ nav }) => { const dispatch = useAppDispatch(); const patch = useWorkflowPatch(); const [draftId, setDraftId] = useState(null); - const [testing, setTesting] = useState(false); - const [guardOpen, setGuardOpen] = useState(false); // null = follow the auto open-on-first-message behavior; true/false = user override. const [paneManual, setPaneManual] = useState(null); const created = useRef(false); @@ -100,25 +96,6 @@ const ComposeView: React.FC<{ nav: AppNav }> = ({ nav }) => { ); } - const tested = workflow.steps.length > 0 && stepsSignature(workflow.steps) === (workflow.tested_signature ?? ''); - - const doTest = async () => { - if (testing || workflow.steps.length === 0) return; - setTesting(true); - try { await runWorkflowTest(workflow.id, workflow.steps, async () => {}); } - finally { setTesting(false); } - }; - - // No steps / no title is fine, you can save a bare workflow and fill it in later. No If-Match: this is the user's own brand-new draft, so there's no concurrent edit to guard against and a stale stamp shouldn't block the save. - const finalizeSave = () => { - dispatch(updateWorkflow({ id: workflow.id, patch: { unsaved: false } })); - nav.selectWorkflow(workflow.id); - }; - const onSave = () => { - if (needsScheduleTestWarning(workflow)) { setGuardOpen(true); return; } - finalizeSave(); - }; - return ( <>
@@ -174,14 +151,6 @@ const ComposeView: React.FC<{ nav: AppNav }> = ({ nav }) => { )}
- {guardOpen && ( - setGuardOpen(false)} - onSaveAnyway={() => { setGuardOpen(false); finalizeSave(); }} - onRunTest={() => { setGuardOpen(false); doTest(); }} - /> - )} {/* Hidden on the blank landing page; opens with a smooth width/fade once @@ -192,23 +161,6 @@ const ComposeView: React.FC<{ nav: AppNav }> = ({ nav }) => { -
- {!tested && ( -
- - Not tested yet. A test run grants the tool access this workflow needs. -
- )} -
- - -
-
diff --git a/frontend/src/app/pages/Workflows/app/SaveGuard.tsx b/frontend/src/app/pages/Workflows/app/SaveGuard.tsx deleted file mode 100644 index 6b4734e1..00000000 --- a/frontend/src/app/pages/Workflows/app/SaveGuard.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import React from 'react'; -import { useWC } from './uiKit'; - -// Test-first nudge before scheduling: a test run grants the tool access the workflow needs, so unattended runs don't stall reaching for them. -const SaveGuard: React.FC<{ - title: string; - onClose: () => void; - onSaveAnyway: () => void; - onRunTest: () => void; -}> = ({ title, onClose, onSaveAnyway, onRunTest }) => { - const WC = useWC(); - return ( -
-
e.stopPropagation()} style={{ width: 430, maxWidth: '100%', background: WC.paper, borderRadius: WC.radius.lg, boxShadow: WC.shadow.lg, overflow: 'hidden' }}> -
-
-
- -
-

Test run recommended

-
-

- You haven’t tested “{title}” yet. A quick test run confirms the steps work and grants the tool access it needs before it goes on a schedule. -

-
-
- - -
-
-
- ); -}; - -export default SaveGuard;