From 8ec370dcee294f0eacacb22e40eca500d80ff843 Mon Sep 17 00:00:00 2001 From: John Coffey Date: Sun, 16 Aug 2026 12:36:10 -0700 Subject: [PATCH] Redesign alerting UI: severity-colored state and a delivery timeline AlertStatePill reuses the log-severity color tiers instead of a second color vocabulary: ok -> quiet, pending -> warn, firing -> critical. DeliveryTimeline reframes the existing delivery_log data (no new backend fields) as a vertical timeline -- "why didn't I get paged" is a chronological question a flat table answered less directly. Rules list sorts firing-first. The list table's trailing actions column had a bare empty , which axe-core flags (empty-table-header) -- fixed with visually-hidden text via app.css's shared .sr-only utility. --- web/src/lib/components/AlertStatePill.svelte | 62 +++++++++ .../lib/components/DeliveryTimeline.svelte | 126 ++++++++++++++++++ web/src/routes/alerts/+page.svelte | 114 ++++++++-------- web/src/routes/alerts/[id]/+page.svelte | 115 +++------------- web/src/routes/alerts/new/+page.svelte | 35 +++-- 5 files changed, 280 insertions(+), 172 deletions(-) create mode 100644 web/src/lib/components/AlertStatePill.svelte create mode 100644 web/src/lib/components/DeliveryTimeline.svelte diff --git a/web/src/lib/components/AlertStatePill.svelte b/web/src/lib/components/AlertStatePill.svelte new file mode 100644 index 0000000..78646e5 --- /dev/null +++ b/web/src/lib/components/AlertStatePill.svelte @@ -0,0 +1,62 @@ + + + + + {state} + + + diff --git a/web/src/lib/components/DeliveryTimeline.svelte b/web/src/lib/components/DeliveryTimeline.svelte new file mode 100644 index 0000000..03454fd --- /dev/null +++ b/web/src/lib/components/DeliveryTimeline.svelte @@ -0,0 +1,126 @@ + + +{#if deliveries.length === 0} +

No deliveries yet.

+{:else} +
    + {#each deliveries as d (d.id)} +
  1. + + + +
    +
    + {d.event_type} + +
    +
    + {statusLabel(d)} + {#if d.last_error}— {d.last_error}{/if} +
    +
    +
  2. + {/each} +
+{/if} + + diff --git a/web/src/routes/alerts/+page.svelte b/web/src/routes/alerts/+page.svelte index b1f5798..87af7a2 100644 --- a/web/src/routes/alerts/+page.svelte +++ b/web/src/routes/alerts/+page.svelte @@ -1,5 +1,7 @@
-

Alerts

+
+

Alerts

+ +
{#if error}

Error: {error}

{/if} - + New rule - {#if loading} -

Loading…

+
+ {#each Array(3) as _, i (i)} + + {/each} +
{:else if rules.length === 0} -

No alert rules yet.

+ + {#snippet action()} + + {/snippet} + {:else} - +
+ - - + - {#each rules as r (r.id)} + {#each sortedRules as r (r.id)} - - + + - + {/each} -
State Name ConditionState EnabledActions
{r.name}{conditionSummary(r)} - - {r.state.state} - + {#if r.state.last_eval_status === 'error'} eval error {/if} {r.name}{conditionSummary(r)} {r.enabled ? 'yes' : 'no'}
+ {/if}
diff --git a/web/src/routes/alerts/[id]/+page.svelte b/web/src/routes/alerts/[id]/+page.svelte index 3b997b2..27e5fed 100644 --- a/web/src/routes/alerts/[id]/+page.svelte +++ b/web/src/routes/alerts/[id]/+page.svelte @@ -1,6 +1,9 @@