import { Trash2 } from "lucide-react"; import { Button } from "@/shared/ui/button"; import { Input } from "@/shared/ui/input"; import { Textarea } from "@/shared/ui/textarea"; import { FieldLabel, FormSelect } from "./workflowFormPrimitives"; import { ACTION_LABELS, ACTION_TYPES } from "./workflowFormTypes"; import { WorkflowWebhookHeadersEditor } from "./WorkflowWebhookHeadersEditor"; import type { ActionType, StepFormState, TriggerType, } from "./workflowFormTypes"; function BackendSupportHint({ action }: { action: StepFormState["action"] }) { switch (action) { case "send_dm": return (
Backend note: `send_dm` is not executed yet, so runs fail at this step.
); case "set_channel_topic": return (Backend note: `set_channel_topic` is not executed yet, so runs fail at this step.
); case "request_approval": return (Backend note: approval gates still stop runs with WF-08; approval records are not persisted yet.
); default: return null; } } function StepConfigFields({ step, prefix, disabled, triggerType, onUpdate, }: { step: StepFormState; prefix: string; disabled?: boolean; triggerType: TriggerType; onUpdate: (step: StepFormState) => void; }) { switch (step.action) { case "delay": return (Leave empty to use the trigger channel. Webhook runs and manual Trigger runs need an explicit channel override.
{triggerType === "webhook" && !(step.channel ?? "").trim() ? (This step will fail for webhook-triggered runs until a channel override is set.
) : null}URL must start with https://
) : null}