Skip to content

UI: implement the full Silence lifecycle with SilenceService #5491

Description

@siavashs

Parent: #5451
API dependencies: #5479, #5481, #5482

Summary

Implement Silence list, detail, create, update, affected-alert preview, expire/delete, and feature-gated multi-matcher-set behavior using generated silence.v3alpha.SilenceService clients.

No API v2 fallback or handwritten Silence wire model is permitted.

List and detail views

State-count contract requirement

The Elm UI shows active, pending, and expired tab counts. Fetching every page solely to compute those counts is unbounded.

Before the SilenceService proto freezes, resolve one of the following:

  1. Add bounded state counts/facets to ListSilences; or
  2. Obtain an explicit maintainer-approved parity exception and document the removed counts.

Form and mutations

  • Build create/update forms supporting one or more OR-of-AND matcher sets and all matcher operators.
  • Preserve UTF-8 label names and correct escaping for quotes, backslashes, and regex values.
  • Support optional creator/comment, start/end/duration inputs, local/UTC display, first-day-of-week preference, and annotations.
  • Validate incomplete matchers, duplicate annotation keys, IDs, timestamps, and end boundaries before submission.
  • Pre-populate forms from Alert labels and existing Silences.
  • Navigate to the resulting/replacement ID after successful create or history-changing update.
  • Require an explicit confirmation before expire/delete.

Feature-gated multi-set behavior

  • Single-set CRUD remains available without the multi-set capability.
  • Multi-set requests are sent faithfully and never flattened.
  • When disabled, structured FailedPrecondition details identify the required feature and are rendered as an actionable message.
  • When enabled, list/detail/edit must preserve every matcher set even though API v2 cannot represent the resource faithfully.

Acceptance criteria

  • List/detail/create/update/expire/delete workflows use generated v3alpha messages and methods.
  • Active/pending/expired filtering, sorting, pagination, and agreed count behavior are deterministic.
  • Creator/comment, matcher sets, annotations, timestamps, state, IDs, and affected alerts are visible and accessible.
  • Form validation and URL pre-population handle every matcher operator, UTF-8 names, and escaping correctly.
  • Empty creator and comment remain valid.
  • Replacement updates navigate to the resulting ID.
  • Expire/delete always requires confirmation and handles NotFound/Aborted races.
  • Multi-set feature-disabled and feature-enabled behavior is covered without flattening.
  • No API v2 calls or handwritten Silence wire models remain.
  • Component and real-server tests cover route prefixes, pagination, filters, previews, forms, mutations, errors, and feature gating.

Dependencies and related work

Likely code areas

  • ui/mantine-ui/src/pages/Silences.page.tsx and new detail/form pages
  • matcher-set, date/time, annotation, preview, confirmation, and pagination components
  • generated Silence/Alert query and mutation adapters
  • replacement/removal of ui/mantine-ui/src/data/silences.ts

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions