feat(alerts): DS alignment + AGENT_LIFECYCLE + single-inbox redesign #146

Merged
hsiegeln merged 49 commits from feat/alerts-ds-alignment into main 2026-04-21 19:53:12 +02:00
Showing only changes of commit 35fea645b6 - Show all commits

View File

@@ -34,9 +34,9 @@ const SEVERITY_ITEMS: ButtonGroupItem[] = [
];
const STATE_ITEMS: ButtonGroupItem[] = [
{ value: 'PENDING', label: 'Pending' },
{ value: 'FIRING', label: 'Firing' },
{ value: 'RESOLVED', label: 'Resolved' },
{ value: 'PENDING', label: 'Pending', color: 'var(--text-muted)' },
{ value: 'FIRING', label: 'Firing', color: 'var(--error)' },
{ value: 'RESOLVED', label: 'Resolved', color: 'var(--success)' },
];
// ── Bulk silence helper ─────────────────────────────────────────────────────
@@ -90,12 +90,6 @@ function SilenceRulesForSelection({ selected, rows }: SilenceRulesForSelectionPr
const handleCustom = () => navigate('/alerts/silences');
// Render ONE SilenceRuleMenu that uses the first ruleId as its anchor but
// overrides the click handlers to fire against all selected rule IDs.
// We use a Dropdown-equivalent by wiring SilenceRuleMenu with the first
// ruleId; for bulk we drive our own mutation loop above.
// Since SilenceRuleMenu is self-contained, we render a parallel Button set
// for the bulk path to keep it clean.
return (
<div style={{ display: 'flex', gap: 'var(--space-xs)' }}>
{SILENCE_PRESETS.map(({ label, hours }) => (
@@ -200,6 +194,12 @@ export default function InboxPage() {
const onDeleteOne = async (id: string) => {
try {
await del.mutateAsync(id);
setSelected((prev) => {
if (!prev.has(id)) return prev;
const next = new Set(prev);
next.delete(id);
return next;
});
// No built-in action slot in DS toast — render Undo as a Button node
const undoNode = (
<Button