Add the artifact registry disable and enable actions
What does this MR do and why?
Fills in the actions half of the organization's Artifact Registry activation settings section: the enable action, the disable action and its typed-handle confirmation, the failure rendering, and the accessibility behaviours both carry.
- The section renders the one action the current status permits, and none
at all for a status Artifact Registry imposed for security or billing
reasons (
suspended,blocked,deleted,purged, or an unrecognised value), since that condition is not the organization owner's to lift. - Disabling opens a confirmation built on the shared
ConfirmDangerModal, whose destructive action stays unavailable until the registry handle is typed. Focus moves into the dialog, is dismissible from the keyboard, and returns to the invoking control on close. - The section owns both mutations and reports each outcome up to the page,
which renders it in a
GlAlert. The alert is not wrapped in a live region of its own:GlAlertsetsrole="alert"for thesuccessanddangervariants used here, androle="alert"is announced on insertion.
Two deliberate omissions, both from the spec rather than oversights:
- The confirmation omits the repository count and stored size the design shows, because no contracted endpoint returns them.
- It says nothing about deletion. Disabling applies a service condition and retains the data, so the design's permanent-deletion date and restore copy belong to the deferred offboarding state, not here.
Both mutation documents are entirely @client, served by local Apollo
resolvers, and carry no non-@client sibling selection. A mutation's root
selection is the field that does not exist yet, so no sibling can print, the
redactor leaves zero fields, and graphql-verify skips the document as a
client query. The resolvers are stateful, so a condition mutation moves the
status a later read reports. All of it is retired when the GraphQL mutations
land.
Feature flag
Behind artifact_registry_ui, which is disabled by default. The settings
route returns not-found with the flag off, so nothing here is reachable and the
change ships dark. No changelog entry for the same reason.
References
- Issue: #608396 (closed) (Activation settings section: identity, status, and disable/enable actions)
- Predecessor: !249570 (merged) (the identity and status rendering this builds on)
Screenshots or screen recordings
| State | Image |
|---|---|
| Enabled | ![]() |
| Disable modal | ![]() |
| Disabled | ![]() |
How to set up and validate locally
The section reads its registry through the local Apollo resolvers, so no backend or mapping row is needed.
-
Enable the flag in the Rails console:
Feature.enable(:artifact_registry_ui) -
As an owner of an organization, visit
/-/organizations/<organization>/-/settings/artifact_registry. -
The Activation section reports the registry as enabled and offers Disable Artifact Registry. The mock's starting status is
active. -
Click it. The confirmation's destructive action stays disabled until you type the registry handle shown in the dialog.
-
Confirm. The section reports the registry as disabled, offers Enable Artifact Registry, and the outcome is announced in an alert above it.
-
Click enable. The section returns to the active state with its own announcement, and the disable confirmation does not reopen.
-
To exercise the no-action statuses, change
mockRegistryStatusinee/app/assets/javascripts/packages_and_registries/artifact_registry/graphql/mock_resolvers.jstosuspended,blocked,deleted,purged, or an unrecognised string: the identity renders with no action offered.
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.
Related to #608396 (closed)


