Files
Anso 1ad20da31f Surface runtime build identity across About, shell, and Admiral Account (#1899)
* feat: surface runtime build identity across About, shell, and Admiral Account

Add one canonical source for the control instance's runtime build identity so
a development image is visibly identified even when its packaged semver still
matches the previous stable release.

SelfIdentityService now retains the running image reference and assembles a
BuildInfo (version, channel, imageRef, imageId, revision) via a bounded,
failure-isolated image-inspect step during initialization. getBuildInfo() is a
cached read that never triggers Docker. classifyBuildChannel() labels the
running reference stable, dev, preview, or unknown.

A new proxy-exempt GET /api/build-info returns that identity to a signed-in
human session, redacting hardened image references to non-admins with a
restricted flag so the UI shows Restricted rather than Unknown. Public
/api/meta gains a bounded buildChannel enum without leaking the image
reference.

A BuildInfoProvider context shares one fetch across the About section, the
sidebar DEV/PREVIEW chip, the mobile tab bar, and the Admiral Account Channel
and Current image rows, keeping the control-instance identity separate from
remote nodes.

* fix: move chipDetail helper out of the component file to satisfy fast refresh

SidebarBrand.tsx exported both the SidebarBrand component and the chipDetail
helper, which trips react-refresh/only-export-components and fails the lint
gate. The helper now lives in its own chipDetail.ts module so the component
file exports only the component; the direct unit test keeps its coverage by
importing from the new module.

* fix(build-info): resolve revision-enrichment race and harden identity rendering

- Await the detached revision enrichment before serving /api/build-info so a
  successful response never freezes a transient null revision.
- Lay the mobile DEV/PREVIEW pill in-flow as a non-overlapping flex sibling
  instead of an absolutely positioned overlay.
- Wrap long image and revision tokens with break-all so they do not overflow
  the About panel.
- Surface a toast when copying the image id fails instead of leaving an
  unhandled rejection.
2026-09-07 14:20:47 -04:00
..