prometheus / prometheus/alertmanager
UI: build and serve the Mantine application at /ui/
@siavashs is already working on this.
Since Aug 29, 2026.
- Dominant language
- Go
- Stars
- 8.6k
- Forks
- 2.5k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 61
Description
Parent: #5451
Summary
Build, embed, and release the Mantine application alongside the Elm UI, serving it permanently at <route-prefix>/ui/ with clean client-side routes.
The existing Elm application remains at the route-prefix root and remains the default UI.
Build and packaging
- Add first-class Mantine build, test, and lint targets to the root Makefile without duplicating expensive work.
- Configure Vite for hashed assets, third-party license attribution, and gzip/Brotli output compatible with the existing Go asset server.
- Preserve a small uncompressed
index.htmlas a no-cache runtime template while precompressing immutable JS, CSS, fonts, images, and license assets. - Embed both
ui/app/distandui/mantine-ui/distin Alertmanager binaries. - Update CI artifacts and release builds to carry both distributions.
- Preserve the current Elm prebuilt-assets tarball extraction contract; add a separate Mantine prebuilt-assets tarball rather than silently changing its layout.
Runtime paths and routing
Register route-prefix-aware handlers for:
/ui→/ui/./ui/→ the Mantine index./ui/assets/*→ immutable static assets./ui/*→ the Mantine index for valid clean client routes and direct refreshes.
The SPA fallback must be bounded to the UI mount and must not replace missing assets or shadow /, /favicon.ico, /assets/*, /api/*, /-/*, /metrics, or /debug/*.
Inject an escaped <base href="<route-prefix>/ui/"> and non-inline bootstrap metadata for UI and API base paths into the no-cache index response. This must support nested routes such as /ui/silences/:id/edit, arbitrary route prefixes, and CSP hardening without inline executable configuration.
Add a route-prefix-safe “New UI” link to Elm and a “Classic UI” link to Mantine.
Acceptance criteria
- One Alertmanager binary serves Elm at
<route-prefix>/and Mantine at<route-prefix>/ui/. - Root and non-root route prefixes are covered.
- Direct loads and refreshes work for
/ui/status,/ui/silences/:id, and/ui/silences/:id/edit. - Missing
/ui/assets/*files return 404 and are not replaced by the SPA shell. - Dynamic HTML is no-cache and safely injects the runtime base paths.
- Hashed assets retain immutable caching and identity, gzip, and Brotli negotiation.
- Third-party license notices are generated and shipped.
- Root Make targets, UI CI, common CI, release builds, clean targets, and prebuilt asset workflows include the Mantine distribution.
- Existing Elm routes, compression, caching, and prebuilt tarball behavior remain unchanged.
- Go UI tests walk and serve both embedded filesystems under root and prefixed routers.
Likely code areas
Makefileui/mantine-ui/package.json,package-lock.json,vite.config.mjs,index.htmlui/web.go,ui/web_test.goui/app/src/Views/NavBar/{Types,Views}.elm.github/workflows/{ci,ui-ci,release}.ymlREADME.md,CHANGELOG.md
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.