Skip to content
This repository was archived by the owner on Aug 6, 2026. It is now read-only.

feat(loops): add a default trigger to new loops - #3702

Merged
trunk-io[bot] merged 2 commits into
mainfrom
posthog-code/default-loop-trigger
Jul 22, 2026
Merged

trunk-io[bot] merged 2 commits into
mainfrom
posthog-code/default-loop-trigger

Conversation

@MattPua

@MattPua MattPua commented Jul 22, 2026

Copy link
Copy Markdown
Member

Problem

New loop forms start without a trigger, requiring an extra click before configuring when the loop runs.

Changes

  • Start new loop drafts with an enabled weekly schedule trigger
  • Reuse the same trigger factory for additional schedule triggers
  • Preserve manual-only loops when the default is removed

How did you test this?

  • pnpm --filter @posthog/ui exec vitest run src/features/loops/loopFormTypes.test.ts
  • pnpm exec biome check packages/ui/src/features/loops/loopFormTypes.ts packages/ui/src/features/loops/loopFormTypes.test.ts packages/ui/src/features/loops/components/LoopTriggerEditor.tsx
  • pnpm --filter @posthog/ui typecheck

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Created with PostHog Code

Generated-By: PostHog Code
Task-Id: 3206bbfa-c081-4ef7-84e7-e7f20ee878c1
@trunk-io

trunk-io Bot commented Jul 22, 2026

Copy link
Copy Markdown

😎 Merged successfully - details.

@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit f66822c.

Generated-By: PostHog Code
Task-Id: 3206bbfa-c081-4ef7-84e7-e7f20ee878c1
@MattPua
MattPua marked this pull request as ready for review July 22, 2026 13:25
@MattPua MattPua added the Stamphog This will request an autostamp by stamphog on small changes label Jul 22, 2026
@greptile-apps

greptile-apps Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "fix(loops): default new triggers to week..." | Re-trigger Greptile

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small, contained UI/business-logic change to loop trigger defaults, outside risky territory, with test coverage and a positive Greptile bot reaction.

  • 👍 on the PR from greptile-apps[bot].
Gate mechanics and policy version
Gate Result
prerequisites all clear
deny-list no deny categories matched
size 25L, 2F substantive, 40L/3F incl. docs/generated/snapshots — within ceiling
tier T1-agent / T1b-small (40L, 3F, single-area, feat)
stamphog 2.0.0b3 .stamphog/policy.yml @ 0305ec2 · reviewed head f66822c

@trunk-io
trunk-io Bot merged commit 44157f1 into main Jul 22, 2026
44 of 45 checks passed
@trunk-io
trunk-io Bot deleted the posthog-code/default-loop-trigger branch July 22, 2026 13:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Stamphog This will request an autostamp by stamphog on small changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant