Keep per-event instructions when editing from a flow page

What does this MR do and why?

With duo_automations on, Edit on a flow page opened the automation modal even when the trigger's events had different instructions. The modal edits one instruction for the whole trigger, so saving replaced the others and the per-event instructions were lost.

Those triggers now go to the edit page instead, the same way the Automations list already handles them. This applies to project and group flow pages, using the group edit route from !266483 (merged) on group pages. Triggers whose events share one instruction still open the modal.

This is the first of the smaller MRs split out of !267601 (closed), as agreed in #637503 (comment 4195437584).

References

Screenshots or screen recordings

No new UI. For a trigger with different instructions per event, Edit on the flow page now opens the existing edit page instead of the modal.

How to set up and validate locally

  1. In the Rails console, enable the flags:

    Feature.enable(:duo_automations)
    Feature.enable(:ai_flow_trigger_goals)
  2. Create a trigger for an enabled flow with two events and different instructions for each, for example with the full-page form at AI > Automations.

  3. Go to AI > Flows, open that flow, and select Edit on the trigger. The edit page opens and shows both instructions.

  4. Select Edit on a trigger whose events share one instruction. The modal opens.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

🤖 Generated with Claude Code

Edited by Tars Cunha

Merge request reports

Loading
Loading