From 4e3ab9700fe090c220613161e31c4e0cd412ef84 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Mon, 29 Dec 2025 15:25:30 +0000 Subject: [PATCH 1/3] feat(ui-v2): Add trigger form templates for deployment-status, work-pool-status, work-queue-status, and custom triggers - Create DeploymentStatusTriggerFields component with status select - Create WorkPoolStatusTriggerFields component with status select - Create WorkQueueStatusTriggerFields component with status select - Create CustomTriggerFields component with textarea for expected events - Update TriggerStep to use new components instead of placeholders - Export all new components from index.ts All components follow the same pattern as FlowRunStateTriggerFields with: - PostureSelect for Reactive/Proactive toggle - Threshold input field - Conditional Within field (shown only for Proactive posture) Co-Authored-By: alex.s@prefect.io --- .../trigger-step/custom-trigger-fields.tsx | 95 +++++++++++++++ .../deployment-status-trigger-fields.tsx | 108 +++++++++++++++++ .../automations-wizard/trigger-step/index.ts | 4 + .../trigger-step/trigger-step.tsx | 28 ++--- .../work-pool-status-trigger-fields.tsx | 109 ++++++++++++++++++ .../work-queue-status-trigger-fields.tsx | 109 ++++++++++++++++++ 6 files changed, 433 insertions(+), 20 deletions(-) create mode 100644 ui-v2/src/components/automations/automations-wizard/trigger-step/custom-trigger-fields.tsx create mode 100644 ui-v2/src/components/automations/automations-wizard/trigger-step/deployment-status-trigger-fields.tsx create mode 100644 ui-v2/src/components/automations/automations-wizard/trigger-step/work-pool-status-trigger-fields.tsx create mode 100644 ui-v2/src/components/automations/automations-wizard/trigger-step/work-queue-status-trigger-fields.tsx diff --git a/ui-v2/src/components/automations/automations-wizard/trigger-step/custom-trigger-fields.tsx b/ui-v2/src/components/automations/automations-wizard/trigger-step/custom-trigger-fields.tsx new file mode 100644 index 000000000000..be262f3001e7 --- /dev/null +++ b/ui-v2/src/components/automations/automations-wizard/trigger-step/custom-trigger-fields.tsx @@ -0,0 +1,95 @@ +import { useFormContext, useWatch } from "react-hook-form"; +import type { AutomationWizardSchema } from "@/components/automations/automations-wizard/automation-schema"; +import { + FormControl, + FormField, + FormItem, + FormLabel, + FormMessage, +} from "@/components/ui/form"; +import { Input } from "@/components/ui/input"; +import { Textarea } from "@/components/ui/textarea"; +import { PostureSelect } from "./posture-select"; + +export const CustomTriggerFields = () => { + const form = useFormContext(); + const posture = useWatch({ name: "trigger.posture" }); + + return ( +
+
+ +
+ + { + const events = field.value ?? []; + const textValue = events.join("\n"); + return ( + + Expected Events (one per line) + +