From 182dcf55270827d5b16a62e193cfcf25bc941832 Mon Sep 17 00:00:00 2001 From: Charles Vien Date: Tue, 14 Jul 2026 11:51:31 -0700 Subject: [PATCH 1/2] add auto-fix pull requests toggle to loop form --- .../loops/components/LoopBehaviorFields.tsx | 44 +++++++++++++++++++ .../features/loops/components/LoopForm.tsx | 16 +++++++ .../ui/src/features/loops/loopFormTypes.ts | 28 ++++++++++++ 3 files changed, 88 insertions(+) create mode 100644 packages/ui/src/features/loops/components/LoopBehaviorFields.tsx diff --git a/packages/ui/src/features/loops/components/LoopBehaviorFields.tsx b/packages/ui/src/features/loops/components/LoopBehaviorFields.tsx new file mode 100644 index 0000000000..935185a321 --- /dev/null +++ b/packages/ui/src/features/loops/components/LoopBehaviorFields.tsx @@ -0,0 +1,44 @@ +import type { LoopSchemas } from "@posthog/api-client/loops"; +import { Switch } from "@posthog/quill"; +import { Flex, Text } from "@radix-ui/themes"; +import { isAutoFixEnabled, withAutoFix } from "../loopFormTypes"; + +interface LoopBehaviorFieldsProps { + behaviors: LoopSchemas.LoopBehaviors; + onChange: (behaviors: LoopSchemas.LoopBehaviors) => void; + disabled?: boolean; +} + +export function LoopBehaviorFields({ + behaviors, + onChange, + disabled, +}: LoopBehaviorFieldsProps) { + return ( + + + + + Auto-fix pull requests + + + Watch CI and review comments on PRs this loop opens, and let Claude + push fixes. + + + + onChange(withAutoFix(behaviors, checked)) + } + /> + + + ); +} diff --git a/packages/ui/src/features/loops/components/LoopForm.tsx b/packages/ui/src/features/loops/components/LoopForm.tsx index f7e26acae0..0229680f03 100644 --- a/packages/ui/src/features/loops/components/LoopForm.tsx +++ b/packages/ui/src/features/loops/components/LoopForm.tsx @@ -21,11 +21,13 @@ import { useLoopDraftStore } from "../loopDraftStore"; import { emptyLoopFormValues, formValuesToLoopWrite, + isAutoFixEnabled, isLoopFormValid, isTriggerDraftValid, type LoopFormValues, loopToFormValues, } from "../loopFormTypes"; +import { LoopBehaviorFields } from "./LoopBehaviorFields"; import { Field } from "./LoopFormPrimitives"; import { LoopModelFields } from "./LoopModelFields"; import { LoopNotificationsFields } from "./LoopNotificationsFields"; @@ -230,6 +232,16 @@ export function LoopForm({ loop }: LoopFormProps) { + + patch({ behaviors })} + /> + + + + + Date: Tue, 14 Jul 2026 11:52:04 -0700 Subject: [PATCH 2/2] allow jumping to any loop wizard step --- packages/ui/src/features/loops/components/LoopForm.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/ui/src/features/loops/components/LoopForm.tsx b/packages/ui/src/features/loops/components/LoopForm.tsx index 0229680f03..15647e6f73 100644 --- a/packages/ui/src/features/loops/components/LoopForm.tsx +++ b/packages/ui/src/features/loops/components/LoopForm.tsx @@ -370,9 +370,8 @@ function Stepper({ {STEPS.map((label, index) => { const isCurrent = index === current; const isDone = index < current && complete[index]; - // Free navigation back to any earlier step; forward only into the step - // immediately after a completed one, so you can't skip required fields. - const reachable = index <= current || complete[index - 1]; + // Steps navigate freely in both directions; skipping ahead is safe + // because Next stays gated per step and Create on the whole form. return (