Add delete action to the artifact version list heading

What does this MR do and why?

The Artifact Registry version list page shows one image or one package inside a repository. Before this change, the page had no way to delete that artifact. Users had to go back to the repository page and use the row menu instead.

This MR adds a kebab menu to the page heading. The menu has one destructive action: "Delete image" for Docker and OCI artifacts, or "Delete package" for Maven and npm artifacts. The action reuses the existing confirmation modal and the existing artifactRegistryArtifactDelete GraphQL mutation from the repository page. After the mutation is accepted, a toast confirms the artifact is scheduled for deletion, and the page routes back to the repository detail page. The repository page re-reads its artifact list on arrival, so no Apollo cache patching is needed.

  • New component: ee/app/assets/javascripts/packages_and_registries/artifact_registry/repositories/versions/artifact_actions.vue, with Jest specs.
  • Server errors and request failures show an alert.
  • A second confirmation while a delete request is in flight is ignored.

This MR also addresses four non-blocking review notes from !253595 (merged):

  • The mutation reports acceptance, not completion, so the three toasts now say "successfully scheduled for deletion" (image, package, cache entry) instead of "successfully deleted".
  • The artifacts table now awaits its refetch queries, so a row's menu shows a loading spinner until the list has re-read. This reuses the pending-deletion state that was already tracked but not shown before.
  • The delete modal keeps naming the artifact while it fades out, instead of blanking the name. Its copy moved into $options.i18n.
  • locale/gitlab.pot was regenerated for the three changed strings.

References

Screenshots or screen recordings

Container Package
Screenshot_2026-09-07_at_1.53.52_pm Screenshot_2026-09-07_at_1.52.54_pm

How to set up and validate locally

  1. Start a running Artifact Registry service.
  2. In a Rails console, run Feature.enable(:artifact_registry_ui).
  3. Open an organization's Artifact Registry and open a hosted repository.
  4. Click an image or package name to reach its version list.
  5. Open the kebab menu in the page heading.
  6. Choose "Delete image" or "Delete package" and check the modal text.
  7. Confirm the deletion.
  8. Check that a "scheduled for deletion" toast appears and that you land on the repository page.
  9. On the repository page, delete a row from the artifacts table.
  10. Check that the row's menu shows a spinner until the list refreshes, and that the toast says the artifact is scheduled for deletion.

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 Rahul Chanila

Merge request reports

Loading
Loading