You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generate TypeScript clients from Alertmanager's public v3alpha protobuf contracts and establish the route-prefix-aware Connect/TanStack Query data layer for the Mantine UI.
Production Mantine code must not use API v2 fallbacks or handwritten wire models.
Code generation
Add pinned @bufbuild/protobuf, @connectrpc/connect, @connectrpc/connect-web, and @connectrpc/connect-query runtimes.
Add pinned local ES and Connect-Query generators.
Add a frontend Buf template that emits only public proto/api/** bindings into a clearly generated directory under ui/mantine-ui/src/.
Integrate frontend generation with scripts/genproto.sh and make common-proto.
Ensure generated output changes only with proto sources, generation configuration, or pinned generator versions.
Keep internal cluster, nflog, silence-storage, and event-recorder protos out of the frontend bundle.
Target <route-prefix>/api with same-origin browser credentials.
Define conventions for unary queries, mutations, cancellation, infinite pagination, stable keys, invalidation, and retry/refetch behavior using Connect-Query and TanStack Query.
Define direct generated-client infrastructure for server streams; do not model streaming through unary-only Connect-Query hooks.
Translate ConnectError codes and structured validation, required-feature, and partial-result details into reusable UI error models.
Make provider composition and test utilities supply Transport, QueryClient, Router, Suspense, and error boundaries without cross-test cache leakage.
The current handwritten /api/v2 fetch layer may coexist only while Status is being migrated in its child issue; no new screen may depend on it, and it must be removed before the Mantine UI is shipped from /ui/.
Testing
Use createRouterTransport for focused component and hook tests so requests still pass through generated protobuf schemas and Connect errors.
Retain real-server coverage for route prefixes, HTTP transport, headers, and browser behavior.
ui: Add tests for silences datasource #5128 has relevant datasource-testing intent, but its API-v2 fetch mocks should be adapted to generated Connect transports and real-server coverage.
Parent: #5451
Related API roadmap: #5450
Summary
Generate TypeScript clients from Alertmanager's public v3alpha protobuf contracts and establish the route-prefix-aware Connect/TanStack Query data layer for the Mantine UI.
Production Mantine code must not use API v2 fallbacks or handwritten wire models.
Code generation
@bufbuild/protobuf,@connectrpc/connect,@connectrpc/connect-web, and@connectrpc/connect-queryruntimes.proto/api/**bindings into a clearly generated directory underui/mantine-ui/src/.scripts/genproto.shandmake common-proto.Client infrastructure
routePrefix,uiBasePath, andapiBaseURLvalues from UI: build and serve the Mantine application at /ui/ #5486.<route-prefix>/apiwith same-origin browser credentials.ConnectErrorcodes and structured validation, required-feature, and partial-result details into reusable UI error models.The current handwritten
/api/v2fetch layer may coexist only while Status is being migrated in its child issue; no new screen may depend on it, and it must be removed before the Mantine UI is shipped from/ui/.Testing
createRouterTransportfor focused component and hook tests so requests still pass through generated protobuf schemas and Connect errors.Acceptance criteria
proto/api/**contracts.make common-protorun produces no diff.<route-prefix>/apiendpoint./api/v2call or arbitrary JSON cast to a handwritten wire type.Dependencies and related work
Likely code areas
buf.gen.yamlor a UI-specific Buf templatescripts/genproto.sh,Makefileui/mantine-ui/package.json,package-lock.json,tsconfig.jsonui/mantine-ui/src/gen/**ui/mantine-ui/src/