Artifact registry: connect manifest detail and paginate referrers
What does this MR do and why?
This change is behind the feature flag :artifact_registry_ui, which is default-off. It is EE-only, and the page stays dark.
The Docker and OCI manifest detail page was built against a local Apollo layer:
both of its query documents selected their fields with @client, and a runtime
mock resolver answered them. That layer existed because Artifact Registry served
no single-manifest read at all — the by-digest route was DELETE only, so there
was nothing to query. Artifact Registry serves that read now and the monolith
reads it, so this MR connects the page to the schema, removes the local layer,
gives the page its first entry point from the manifest list, and pages the
Referrers tab.
It carries three steps of the phase plan — Step 15 (connect the view), Step 11 (the list row link, which the plan folds into Step 15), and Step 10 (referrers keyset pagination) — so it is larger than the ~500 reviewable LOC the plan aims at, though the teardown means it deletes more than it adds. If the size is a problem, the plan's own documented fallback is to split the row link back out as its own step behind this one; say so and I will.
Six commits, in dependency order:
- Read the manifest detail from the schema. Drops
@clientfromget_manifest.query.graphqlandget_manifest_referrers.query.graphql, deletesgraphql/mock_resolvers.jsand the manifest half ofgraphql/mock_artifacts.js, drops themockResolversargument fromrepositories/index.js, repoints the stories onto mocked Apollo handlers, adds a:jsfeature spec, and turns the manifests table digest cell into a router link to the page. - Page the referrers tab. Adds the cursor variables to the referrers
document and a
GlKeysetPaginationtoreferrers_section.vue, reading its cursor from the route query through the shared page-params helper. - Fix four findings from a self-review, recorded in full in a comment below: the referrers read is now announced in the page's live region, the errored page-info guard has a test that can actually fail, and a document selection plus four typename constants that only the removed mock layer needed are gone.
- Consolidate the Storybook fixtures. The artifact generators sat under
graphql/only because they fed the deleted local resolver; they are now folded into the spec tree's mock data, where the manifest stories already read their fixtures from. - Trim the specs. Removes the mock-data spec, since fixtures are not a unit under test, and folds the referrers paging cases back into the component's own spec file over a reactive mocked route rather than a second file with a real router.
Three things worth a reviewer's attention:
- The field name and both argument names the schema declares match what the
local layer declared, which is why this is a directive removal rather than a
document rewrite. The
:jsfeature spec is what establishes that, driving both documents through the real schema and resolvers in a browser. - The referrers tab could not show data before this MR. Its document asked the server for the manifest while the rows came from the mock, and a server-resolved parent carries no seeded rows to hand back. Connecting the read is what makes the tab work.
- The referrers query needs
CACHE_AND_NETWORK. The connection's cache policy keys on no argument, so under the default cache-first policy a cursored read is answered from the page already held and the pager moves nothing. This was found in a browser, not by a spec, soreferrers_section_spec.jsnow asserts the re-read.
Two deliberate divergences from the plan, stated rather than left to be found:
- The plan scoped the row link against the repository detail artifacts table,
which links only for hosted repositories. This links unconditionally: the
sibling
referrers_table.vuealready links manifest digests unconditionally, and the contract serves this page for a remote repository too: the platform triple and the annotations are null there, while children and referrers come back empty and the referrer count zero, which the sidebar and the tab already handle. A remote repository therefore gets a Referrers tab with a0count and the "Nothing refers to this manifest." empty state, not a hidden or errored one. - The plan listed a
graphql/cache_config.jschange and mock cursor slicing for Step 10. Neither was written. The referrers connection policy already keys on no argument and replaces on merge, which is what a keyset pager wants; and the mock work would have been written and deleted inside this one MR, so the pagination lands straight on the real connection instead.
References
- Plan, Steps 10, 11 and 15: https://gitlab.com/gitlab-org/ops/artifact-registry/-/blob/main/docs/plans/monolith/2026-09-08-container-manifest-detail.md
- Spec: https://gitlab.com/gitlab-org/ops/artifact-registry/-/blob/main/docs/specs/monolith/S06-version-detail.md
- Design prototype, the surface this matches: https://gitlab-org.gitlab.io/ci-cd/package-stage/artifact-registry-design-proposal/repositories/hosted/manifest/
- The backend this connects to, all merged:
- Client manifest and referrers reads: !255569 (merged)
- GraphQL manifest details type and resolver: !255669 (merged)
- GraphQL referrers connection and resolver: !255686 (merged)
Screenshots or screen recordings
| Before | After | |
|---|---|---|
| Referrers tab | ![]() |
![]() |
| Referrers tab, page two | No pager existed | ![]() |
| Manifests table digest cell | ![]() |
![]() |
The two Referrers captures show different row counts, and that is the change rather than a difference in framing: the before state renders the one referrer the local Apollo mock seeded, and the after state renders the 26 that Artifact Registry holds, 20 of them on the first page. The manifests table pair is directly comparable, because that list was already server-backed — the only difference is that the digest is now a link.
How to set up and validate locally
This needs a local Artifact Registry the SPA can read from — the GDK client stub
is enough, and it has to stand in for manifest and manifest_referrers, which
are the two reads this MR starts making.
- Enable the flag in a Rails console:
Feature.enable(:artifact_registry_ui) - Visit a container repository's image at
/o/<organization>/-/artifact_registry/<slug>/repositories/<repository>/<image_id>. - Click a digest in the Digest column. It now navigates to that manifest's page, and the breadcrumb trail reads organization, Repositories, repository, image, short digest.
- Open the Referrers tab on a manifest with more than 20 referrers. Page forward with Next and back with Previous; the cursor is in the URL, so the page is shareable and survives a reload.
- Leave the Referrers tab and return to it. The cursor is dropped, so you land on the first page rather than mid-list.
What was run:
- Jest over
ee/spec/frontend/packages_and_registries/artifact_registryon Vue 2 and on Vue 3, 67 suites passing. Seven suites fail identically onmasterat the same commit on missing generated fixtures and contribute no tests either way:repository_detail_spec.js,upstream_repositories_table_spec.js,repositories_list_spec.js,repositories_table_spec.js,version_detail_paging_spec.js,version_detail_spec.js,version_list_spec.js. bin/rspec ee/spec/features/artifact_registry/manifest_detail_spec.rb.- ESLint with
--max-warnings 0on every changed JavaScript and Vue file, and RuboCop on both new Ruby spec files. locale/gitlab.potis unchanged. The one string the row link needs,ArtifactRegistry|Manifest %{digest}, is already in the catalog from the referrers table.
No changelog trailer: the feature sits behind a default-off flag.
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.
Written by GitLab Duo




