Report abuse for agents and flows

Release notes

You can now report abuse for agents and flows directly to your instance administrators when you encounter problematic content. Simply use the reporting option in the more actions menu to submit your feedback along with a reason and optional details, helping keep your agents and flows safe and high-quality for your entire organization.

report_abuse

About

We want to allow people to report AI Catalog items to the instance admin.

The instance admin will be able to delete the item if they choose, through the feature in !209547 (merged). We must guide admins to hard-delete the items. As hard deleting will also remove it from any projects it had been enabled for #579029 (comment 2861851675).

Proposal

We will allow logged-in users to report AI Catalog items to the instance's configured abuse_notification_email.

  • Frontend: Reporting AI Catalog items through the ... menu.
  • Backend: Submitting the report through a new mutation.

See design recommendations in #579029 (closed).

documentation

Add documentation for how admins can delete AI Catalog items.

frontend

The reporting UI should be displayed when a new userPermissions field called reportAiCatalogItem is true. This field will be implemented by the backend.

The form should submit:

  • required reason will be enum of options
  • optional body limited to 1000 characters

Form will submit the arguments to a new aiCatalogItemReport mutation.

backend

Add new ability to ItemPolicy called report_ai_catalog_item. The permission will be true when:

  • current_user.present? (user must be logged in)
  • Gitlab::CurrentSettings.current_application_settings.abuse_notification_email.present? the application setting must be present

Add the new permission to AiCatalogItemPermissions so that the frontend can read it.

New aiCatalogItemReport mutation, marked as experiment.

Mutation arguments:

  • required reason enum of options Mutation will authorize using the new report_ai_catalog_item ability.
  • optional body limited to 1000 characters

Mutation will submit a new email notification to Gitlab::CurrentSettings.current_application_settings.abuse_notification_email.

See https://docs.gitlab.com/development/emails/ for details on implementing new email mailers.

Edited by Amanda Rueda