feat(desktop): Implement loops ➿#3411
Conversation
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
React Doctor found 10 issues in 6 files · 10 warnings. 10 warnings
Reviewed by React Doctor for commit |
|
Reviews (1): Last reviewed commit: "chore(loops): remove mobile UI, desktop-..." | Re-trigger Greptile |
cbd07a3 to
7312c2e
Compare
|
👋 Visual changes detected for this PR. Review and approve in PostHog Visual Review If these changes are unexpected, they may be caused by a flaky test or a broken snapshot on master. Don't approve — rerun the job or wait for a fix. |
3c14317 to
75e0cf0
Compare
Problem
Loops put recurring PostHog work on autopilot. Instead of kicking off the same agent task by hand every time, you define a loop once and it runs itself on PostHog's managed cloud infrastructure: on a schedule, when a GitHub event fires, or when your own code calls its API. This PR adds the desktop UI to create and manage them. The backend API lives in the posthog repo [companion PR].
Changes
loops-reviewcard, whose Create button is the only path that creates the loop. Templates and "Create manually" open the guided wizard (Prompt, When, Options, Review) with a clickable stepper.context.mdupdated and/or maintain a canvas (forces team visibility). Each context gets its own Loops tab with a scoped composer.@posthog/api-clientloops module (CRUD, run/trigger with idempotency keys, run history, preview) until the OpenAPI client regenerates.finishtool, gated to background cloud runs: the agent marks its task run completed or failed so the sandbox tears down instead of idling to a timeout.loops-reviewcard on desktop, and OAuth now requests the explicit scope list (includingloop:read/loop:writeandllm_gateway:read) instead of*, with a scope version bump forcing re-auth.How did you test this?
Automatic notifications