Skip to content

feat(loops): edit loop details inline - #3848

Draft
MattPua wants to merge 10 commits into
mainfrom
posthog-code/inline-loop-scheduling
Draft

feat(loops): edit loop details inline#3848
MattPua wants to merge 10 commits into
mainfrom
posthog-code/inline-loop-scheduling

Conversation

@MattPua

@MattPua MattPua commented Jul 27, 2026

Copy link
Copy Markdown
Member

Problem

Editing loop metadata, schedules, or model configuration requires navigating to the full edit flow.

Changes

  • Edit titles, descriptions, and instructions inline
  • Edit schedule and model configuration from loop details
  • Preserve unsaved configuration across unrelated loop updates
  • Save metadata on blur, with keyboard cancel support

How did you test this?

  • UI typecheck and loop tests covered by CI
  • Focused QA across logic, contracts/security, and performance/reliability

Automatic notifications

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

Created with PostHog Code

Generated-By: PostHog Code
Task-Id: c163b9ac-f496-4ea0-9412-c48cf357eab0
@trunk-io

trunk-io Bot commented Jul 27, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

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

@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown

React Doctor found 9 issues in 2 files · 9 warnings.

9 warnings

src/features/loops/components/InlineLoopScheduleEditor.tsx

src/features/loops/components/LoopDetailView.tsx

Reviewed by React Doctor for commit 6e210c6.

MattPua added 5 commits July 27, 2026 13:21
Generated-By: PostHog Code
Task-Id: c163b9ac-f496-4ea0-9412-c48cf357eab0
Generated-By: PostHog Code
Task-Id: c163b9ac-f496-4ea0-9412-c48cf357eab0
Generated-By: PostHog Code
Task-Id: c163b9ac-f496-4ea0-9412-c48cf357eab0
Generated-By: PostHog Code
Task-Id: c163b9ac-f496-4ea0-9412-c48cf357eab0
Generated-By: PostHog Code
Task-Id: c163b9ac-f496-4ea0-9412-c48cf357eab0
@MattPua
MattPua requested a review from charlesvien July 27, 2026 17:32
@MattPua
MattPua marked this pull request as ready for review July 27, 2026 17:32
@MattPua MattPua changed the title feat: edit loop schedules inline feat(loops): edit loop schedules inline Jul 27, 2026
@MattPua MattPua changed the title feat(loops): edit loop schedules inline feat(loops): edit loop config inline Jul 27, 2026
@greptile-apps

greptile-apps Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor
Prompt To Fix All With AI
Fix the following 2 code review issues. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 2
packages/ui/src/features/loops/components/LoopDetailView.tsx:489-498
**Model edits create schedules**

When a loop has no schedule and the user changes only its model configuration, the synthetic enabled schedule draft is unconditionally appended to the update payload, causing the loop to begin running automatically on the default schedule.

### Issue 2 of 2
packages/ui/src/features/loops/components/LoopDetailView.tsx:416-421
**Loop updates leave stale drafts**

When the queried loop changes while this view remains mounted, these states retain the previous configuration; `hasChanges` then compares stale drafts with the latest loop and saving writes the stale model and schedule values back, overwriting newer configuration.

Reviews (1): Last reviewed commit: "fix: clarify loop agent selector label" | Re-trigger Greptile

Comment thread packages/ui/src/features/loops/components/LoopDetailView.tsx
Comment thread packages/ui/src/features/loops/components/LoopDetailView.tsx
MattPua added 2 commits July 27, 2026 17:38
Generated-By: PostHog Code
Task-Id: 04bf4629-bd34-4c53-bdde-acd162d6b045
Generated-By: PostHog Code
Task-Id: 04bf4629-bd34-4c53-bdde-acd162d6b045
@charlesvien

charlesvien commented Jul 27, 2026

Copy link
Copy Markdown
Member

Does this work with GitHub triggers and the other options? Maybe we should just prompt that same wizard view and make it a shared dialog and just have an edit button.

Generated-By: PostHog Code
Task-Id: 04bf4629-bd34-4c53-bdde-acd162d6b045
@MattPua

MattPua commented Jul 27, 2026

Copy link
Copy Markdown
Member Author

Does this work with GitHub triggers and the other options? Maybe we should just prompt that same wizard view and make it a shared dialog and just have an edit button.

do you mean like show the wizard view as a modal vs the inline?

i havent checked the other triggers yet, selfishly only looked at the stuff i needed

@MattPua
MattPua marked this pull request as draft July 27, 2026 18:32
Generated-By: PostHog Code
Task-Id: 04bf4629-bd34-4c53-bdde-acd162d6b045
@MattPua MattPua changed the title feat(loops): edit loop config inline feat(loops): edit loop details inline Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants