Remote create route, headings, menu entry, and the prefilled source section (monolith/S07 Steps 5-6)

Part of epic &22455 (Repository CRUD, monolith/S07). Covers Steps 5-6 of the Phase 2 (remote) plan, docs/plans/monolith/2026-08-20-repository-crud-remote.md in the artifact-registry repo.

The ungated half of the remote frontend: the route and menu entry that reach the remote create form, and the Source section that renders a remote repository's stored settings on the edit form. Both are reviewable against out-of-band-seeded remote rows, ahead of either AR gate. All dark behind artifact_registry_ui; no changelog. Both steps add user-facing strings, externalized, with the regenerated locale/gitlab.pot.

Files sit under ee/app/assets/javascripts/packages_and_registries/artifact_registry/, with Jest specs under ee/spec/frontend/packages_and_registries/artifact_registry/.

Implementation details

Step 5: Remote create route, per-kind headings, and the create-menu entry (type::feature)

  • router/index.js (Modify): the new/remote route with its title and crumb. The bare new redirect stays pointed at hosted.
  • constants.js (Modify): per-kind create and edit titles and descriptions replacing REPOSITORY_NEW_TITLE and REPOSITORY_EDIT_TITLE, plus the remote kind value. These are replacements, not additions, so this file needs a deliberate rebase against the other steps that touch it.
  • repositories/create/repositories_create_form.vue (Modify): kind, heading, and description from the route rather than the hosted constants. The create page is parameterized by kind rather than duplicated.
  • repositories/edit/repositories_edit_form.vue (Modify): heading from the loaded repository's kind.
  • repositories/components/create_button.vue (Modify): the remote entry. The menu keeps the order hosted, remote, virtual, with the virtual entry still absent.
  • This step wires no mutation. Until plan Step 9 lands, the remote entry leads to a form whose submit is not connected. That is an accepted interim state, held off users by the disabled flag.

Step 6: Remote source section, prefilled and read-only (type::feature)

  • repositories/components/repository_form.vue (Modify): the kind-specific section slot. The common fields and their validation are untouched.
  • repositories/components/remote_source_section.vue (Create): the Source section rendering the prefilled upstream URL, the cache windows, and the stored-credentials indicator.
  • graphql/queries/get_repository.query.graphql (Modify): select the settings fields for the prefill.
  • constants.js (Modify): section labels, credential-indicator copy, and cache-window bounds.
  • The controls are read-only at this step, not disabled, because the write path lands in plan Step 8 and because a disabled input leaves the tab order and some screen readers skip it. repository_form.vue already carries that reasoning on its own nameReadonly prop.
  • The metadata cache window renders on a Maven or npm remote and not on a Docker or OCI one, so a container remote shows one cache control rather than two.
  • The stored-credentials indicator is driven by the boolean AR returns, exposes its state to assistive technology rather than by styling alone, and carries externalized copy. It is the only signal on screen that a secret exists.
  • The credential pair and the test action arrive in plan Steps 8 and 7, so the full control order is only demonstrable once those land.

Acceptance

Step 5:

  • new/remote resolves to the create page rendering the remote heading and description, and new/hosted is unchanged.
  • The edit page's heading names the loaded repository's kind.
  • The menu lists Hosted then Remote.
  • A route change into the remote create view moves focus and announces the title.

Step 6:

  • Editing a remote repository renders the Source section with the stored URL and cache windows.
  • A Maven or npm remote renders both cache windows; a Docker or OCI remote renders one.
  • The stored-credentials indicator appears when AR reports credentials are stored and not when it does not, and its state reaches assistive technology.
  • Editing a hosted repository renders no Source section.
  • No control in the section renders a cache-eviction action.

Dependencies

  • The Phase 2 plan merge request must merge before any merge request here opens.
  • Step 6 depends on plan Step 2, in the GraphQL surface issue. That is the only backend edge. Steps 3 and 4 block nothing here.
  • Step 5 has no dependency. It is unordered against Step 6, and the plan states a preference: land Step 5 first where the order is free, so the reviewable state does not read "Edit hosted repository" above a remote Source section.
  • monolith/S01 (SPA shell) merged: the router and the shared flag these steps register into.
  • No AR contract gate. The prefill reads a contracted field through the frozen client.
  • Blocks the edit-form write issue (plan Steps 7 and 8).