Add a toggle to turn AI flow triggers on and off

What does this MR do and why?

This is part 3 of 3 for #598439 (closed), which lets people disable an AI flow trigger without deleting it, so its filter configuration survives being paused.

Part 1 (!250342 (merged)) added the active column to ai_flow_triggers (default true, NOT NULL) and gated every automatic firing path on it, so an inactive trigger never runs. Part 2 (!250361 (merged)) exposed active on the GraphQL type and as an argument on the create and update mutations. This MR adds the UI control and the user documentation.

Changes

  • ee/app/assets/javascripts/ai/duo_agents_platform/pages/flow_triggers/index/components/flow_triggers_table.vue: Added a new Status column between Owner and Actions containing a GlToggle per row. Column widths are rebalanced to make room. The toggle is the only state indicator: row-level gl-text-subtle was tried and dropped, because cell-level colour wins over the row's inherited colour, so it had no visual effect. The table remains presentational and emits toggle-trigger events, matching how it already emits delete-trigger events.
  • ee/app/assets/javascripts/ai/duo_agents_platform/pages/flow_triggers/index/flow_triggers_index.vue: Owns the mutation, manages per-row loading state, displays a toast on success, and shows an alert on failure. Because the toggle reads active from the Apollo cache, a failed mutation leaves the cache untouched and the control returns to its previous position automatically.
  • flow_trigger.fragment.graphql: Added active field.
  • update_ai_flow_trigger.mutation.graphql: Now returns aiFlowTrigger { id active } in addition to errors, allowing Apollo to normalize the updated record into the cache instead of requiring a refetch. This deliberately returns only the two fields rather than the whole fragment, so the existing edit form does not start resolving configUrl on every save.
  • No new mutation was added. This reuses aiFlowTriggerUpdate with the active argument from part 2.
  • Docs: Added a new "Turn a trigger on or off" section in doc/user/duo_agent_platform/triggers/_index.md, plus a 19.4 history entry. This covers the documentation requirement for all three MRs in the series.
  • locale/gitlab.pot regenerated for the five new strings.

How to test

yarn jest ee/spec/frontend/ai/duo_agents_platform/pages/flow_triggers

All 281 tests in that suite pass. New coverage includes the toggle reflecting active and inactive state, the per-row loading state, the row de-emphasis when inactive, the emitted event payload, the mutation being called with the new state, the success path, and the error path surfacing an alert.

Manual testing:

  1. Create a trigger on the Mention event.
  2. Turn it off with the toggle.
  3. Mention the service account in a comment and confirm no workflow starts.
  4. Turn the trigger back on and confirm a mention does start a workflow.
  5. Reload the page and confirm the trigger is still listed with its conditions intact.

Screenshots

Screenshot 2026-08-26 at 7.02.02 AM.png

Screenshot 2026-08-26 at 7.03.25 AM.png

References

Edited by Peter Gumeson

Merge request reports

Loading
Loading