Add security AI flow feedback component

What does this MR do and why?

Users need a place in the UI to tell us whether an AI security flow's verdict is correct. This MR adds the SecurityAiFlowFeedback Vue component that asks for that feedback:

  • It asks "Is this assessment correct?" Yes submits right away. No shows optional reasons, then Submit feedback and Cancel.
  • It sends the feedback with the securityAiFlowFeedbackCreate mutation from !265520 (merged).
  • It isn't mounted anywhere yet. The SAST FP analysis drawer adds it in a follow-up MR, using the #disagree-extra slot for its "Remove the false positive flag" checkbox.
  • The reason chips follow the approved mockups in #636347 (closed). The @gitlab/duo-ui feedback components don't fit: they are single-select and only emit events.

The design and decisions are in #636352.

References

Screenshots or screen recordings

The component isn't mounted yet, so these come from Storybook. In-product screenshots will come with the drawer MR.

State Screenshot
Default 1-default
No: optional reasons, Submit feedback and Cancel 2-disagree-reasons
Reasons selected 3-reasons-selected
Saving 4-saving
Submitted 5-submitted
#disagree-extra slot (as the drawer will use it) 6-disagree-extra-slot
Error from the mutation payload 7-payload-error
Network error 8-network-error

How to set up and validate locally

  1. Run Storybook: yarn storybook:start.
  2. Open ee/vulnerabilities/components/security_ai_flow_feedback/security_ai_flow_feedback. Each story opens its state for you; mocked responses resolve after one second.
  3. Check the keyboard flow: No moves focus to the first reason, and pressing No again closes the form. Submit feedback moves focus to the thanks message. An error moves focus back to Submit feedback or Yes. Focus stays on the button while saving.

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.

Edited by AJ Biton

Merge request reports

Loading
Loading