Derive a platform label from the manifest platform triple
What does this MR do and why?
The Docker and OCI manifest detail page arriving with monolith/S06 Phase 2 renders a platform per manifest, and a Platforms block listing one per child of a multi-arch index. Artifact Registry serves that as three independent columns — architecture, os, and os_variant — rather than as a composed string.
This adds the derivation beside fileType, as the same kind of pure per-format display value, so the header, the sidebar and the eventual version-list column all read one implementation. Nothing renders the label yet.
This is Step 0b of monolith/S06 Phase 2, and it has no predecessor. The platform triple it reads is one of the ten fields declared by ops/artifact-registry!2317.
Two things worth a reviewer's attention
The triple is nullable per value, not as a unit. All three are null on an index and on an image manifest whose config was absent, not an image config, unreadable, oversized, or unparseable at push — and os_variant alone is null on most images. So every partial combination renders what it has rather than a string with a hole in it, and an absent triple renders nothing at all. The spec is table-driven over the combinations.
A variant with no architecture to qualify is dropped rather than joined. [os, architecture, osVariant].filter(Boolean).join('/') is the obvious one-liner and it is wrong here: it renders linux/v8, which reads as an architecture named v8. That is a wrong platform rather than an incomplete one, so the variant is only appended when there is an architecture in front of it. There is a one-line comment on this, because collapsing it back into the filter chain is the edit a reader would plausibly make.
Screenshots or screen recordings
No UI changes in this MR — the derivation has no call sites yet. What it is for is the sidebar's Platforms block on the manifest detail page, from the design prototype. It serves two shapes, which is why it has to handle a partial triple.
A multi-arch index — Platforms, plural, one row per child, each linking to that child's own page:
A single-platform child — Platform, singular and unlinked, beside a Referenced by link back up to the index:
Note the index itself carries no platform of its own — it describes its children's. That is the '' return, and it is also the open design question for the step that renders this: an empty cell or a placeholder. Worth settling with product design rather than picking one here.
linux/ard64 for one platform. That is a typo in the design, not a variant to reproduce.
How to set up and validate locally
yarn jest ee/spec/frontend/packages_and_registries/artifact_registry/utils_spec.jsVUE_VERSION=3 yarn jest ee/spec/frontend/packages_and_registries/artifact_registry/utils_spec.js
139 tests pass on both.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist.

