prometheus / prometheus/alertmanager

UI: consume v3alpha watch streams for live updates

Open
#5,492 0 comments 0 reactions 1 assignee View on GitHub

@siavashs is already working on this.

Since Aug 29, 2026.

component/api component/ui kind/enhancement
Dominant language
Go
Stars
8.6k
Forks
2.5k
Avg merge
2d 6h
Merged PRs (30d)
61

Description

Parent: #5451
API dependencies: #5478, #5480, #5481, #5482

Summary

Consume AlertService and SilenceService server-streaming watch RPCs so the Mantine UI updates from stored mutations without polling, while honoring the API's bounded, node-local, non-durable semantics.

Stream integration

  • Use generated direct Connect clients for WatchAlerts, WatchAlertGroups, and WatchSilences; do not route streams through unary-only Connect-Query abstractions.
  • Tie every stream to route, component, and filter lifecycle using AbortSignal cleanup.
  • Process initial snapshots, explicit snapshot-complete markers, entered/updated/exited transitions, and monotonic node-local sequence numbers.
  • Reconcile stream messages into bounded page/query caches without duplicating resources or corrupting deterministic ordering.
  • Show unobtrusive live, reconnecting, and stale/resynchronizing state.
  • Keep manual refresh and unary list behavior as a functional fallback.

Resynchronization

On queue overflow, ResourceExhausted, disconnect, cancellation not initiated by navigation, Alertmanager restart, invalid cursor, or reconnection to another HA peer:

  1. Mark the affected view stale/reconnecting.
  2. Stop applying messages from the old stream.
  3. Invalidate the relevant unary/query cache.
  4. Establish a new watch and consume a fresh initial snapshot.
  5. Resume live state only after the snapshot-complete marker.

Do not promise durable replay or cluster-wide cursor continuity. Do not synthesize UI mutation events for time-only status changes that the watch API explicitly omits; derive time state locally or resnapshot when required.

Browser client-streamed alert ingestion is out of scope. Browser alert submission, if added later, remains unary.

Acceptance criteria

  • Alerts, alert groups, and Silences update correctly after stored create/update/delete/expire/replacement events.
  • Snapshot-to-watch handoff does not visibly lose or duplicate accepted mutations in supported scenarios.
  • Entered, updated, and exited filter transitions modify the correct view.
  • Overflow, restart, peer change, invalid cursor, and disconnect always trigger a fresh snapshot rather than silently continuing stale state.
  • Live state is not shown until an explicit snapshot-complete marker is received.
  • Navigation, filter changes, and repeated reconnects release streams, observers, and cache references.
  • Manual refresh/unary operation remains usable when streaming is unavailable.
  • Component tests use controllable generated streams; real-server tests cover ordering, overflow, cancellation, reconnect, and route prefixes.

Dependencies and related work

  • Alerts UI: #5490.
  • Silence UI: #5491.
  • Connect request/stream controls and observability: #5478.
  • Stored-mutation broker and domain feeds: #5480.
  • Alert watch methods: #5481.
  • Silence watch method: #5482.
  • Automatic refresh request: #524.

Likely code areas

  • new stream hooks and cache reducers under ui/mantine-ui/src/data/
  • Alerts/Silences live-state integration and indicators
  • generated stream test helpers and real-server fixtures

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.