diff --git a/frontend/src/app/pages/Workflows/app/ScheduleCard.tsx b/frontend/src/app/pages/Workflows/app/ScheduleCard.tsx index 84c0ab9a..c26748a1 100644 --- a/frontend/src/app/pages/Workflows/app/ScheduleCard.tsx +++ b/frontend/src/app/pages/Workflows/app/ScheduleCard.tsx @@ -79,6 +79,10 @@ const ScheduleCard: React.FC<{ workflow: Workflow }> = ({ workflow }) => { // Picking a finite limit resets the lifetime counter so "run 3 times" always means 3 from now. const setMaxRuns = (n: number | null) => patchSched(n == null ? { max_runs: null } : { max_runs: n, runs_count: 0 }); + // A scheduled workflow with no steps fires but does nothing, so flag it. + // Mirror the test-warning's draft-or-live read so the banner tracks edits. + const hasNoSteps = !(workflow.draft_steps ?? workflow.steps ?? []).some((s) => s.text && s.text.trim()); + return (
@@ -89,7 +93,14 @@ const ScheduleCard: React.FC<{ workflow: Workflow }> = ({ workflow }) => {
- {enabled && needsScheduleTestWarning(workflow) && ( + {enabled && hasNoSteps && ( +
+ + This workflow has no steps, so a scheduled run won't do anything. Add a step first. +
+ )} + + {enabled && !hasNoSteps && needsScheduleTestWarning(workflow) && (
Not test-run yet. A scheduled run can't pause for permission prompts, so if this needs tool access it may fail silently. Hit Run once to grant access.