Update Duo Workflow Action to only display when the Flow is enabled
Summary
The DuoWorkflowAction component currently shows the trigger button based on its own logic, but doesn't check if the foundational flow is actually enabled in the namespace settings.
Problem
When foundational flows are enabled/disabled via namespace settings (cascading settings at group/project level), the DuoWorkflowAction component doesn't respect these settings. This means:
- Users may see trigger buttons for flows that are disabled in their namespace
- Clicking the button would fail because the flow isn't enabled
- Poor UX - users shouldn't see actions they can't perform
The component currently checks isDuoActionEnabled based on duoWorkflowStatusCheck, but this doesn't consider the per-flow enablement status from namespace settings.
Expected Behavior
The DuoWorkflowAction component should only display the trigger button when:
- The workflow is generally enabled (current check)
- The specific foundational flow is enabled in the namespace settings
Proposed Solution
Update the DuoWorkflowAction component to:
- Query whether the specific
workflow_definitionis enabled for the namespace/project - Only render the button when both general workflow access AND specific flow enablement are true
- This likely requires adding the foundational flow enablement status to the GraphQL query or adding a new check
Relevant Code
-
ee/app/assets/javascripts/ai/duo_workflow/components/duo_workflow_action.vue(lines 94-98,isDuoActionEnabledcomputed property) -
ee/ai/graphql/get_duo_workflow_status_check.query.graphql(GraphQL query for workflow status) - Namespace settings for foundational flow enablement
-
app/services/ai/catalog/item_consumers/create_service.rb(flow enablement logic)
Edited by 🤖 GitLab Bot 🤖