Draft: fix: add UI feedback for Issue to MR flow
Relates to issue #578654 (closed)
Changes
1. Increased Toast Visibility Duration
-
File:
ee/app/assets/javascripts/ai/components/duo_workflow_action.vue -
Change: Increased
TOAST_HIDE_DELAYfrom 4000ms to 8000ms (4 seconds → 8 seconds) - Impact: Users now have twice as long to see and interact with the success notification
2. Optimized Toast Timing
-
File:
ee/app/assets/javascripts/ai/components/duo_workflow_action.vue -
Change: Reordered the
startWorkflowmethod to callshowSuccessToast()immediately after successful API response, before emitting the 'agent-flow-started' event - Impact: Toast appears as quickly as possible after the workflow starts, ensuring users receive immediate feedback
3. Enhanced Test Coverage
-
File:
ee/spec/frontend/ai/components/duo_workflow_action_spec.js -
Changes:
- Updated all existing test expectations to reflect the new 8-second auto-hide delay
- Added new test suite "toast notification timing" with two test cases verifying:
- Toast is called before emitting the agent-flow-started event
- Toast displays immediately with correct parameters (message, action link, and delay)
Expected User Experience
After these changes, when users click "Generate MR with Duo":
- Button shows loading state for 2-3 seconds (existing behavior)
-
Immediately after successful API response, a toast notification appears with:
- Message: "Issue to merge request #[id] created"
- "View" button linking directly to the agent session
- 8-second display duration (doubled from previous 4 seconds)
- Users have clear, visible feedback about what happened and where to navigate next
Edited by Marcel van Remmerden