Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
feat(patrol): guide operators through the decision queue
rcourtman0da709299189
diff --git a/docs/release-control/v6/internal/status.json b/docs/release-control/v6/internal/status.jsonindex 381a951c2d..69e8478a0d 100644--- a/docs/release-control/v6/internal/status.json+++ b/docs/release-control/v6/internal/status.json@@ -7467,7 +7467,7 @@"status": "target-met","completion": {"state": "complete",- "summary": "Monitor-first Patrol operations now has a decision-first, responsive governed floor: authenticated launch stays on infrastructure monitoring; a compact control toolbar gives way to a daily briefing with current decision, critical, and separately canonical approval posture plus one recommended start; Patrol owns a persistent desktop inbox-and-context workspace and a true mobile master/detail flow over canonical lifecycle, evidence, protection, availability, approval, action, and verification truth; objective setup and verified receipts remain compact supporting context; calm states stay honest; and Assistant remains contextual explanation for the selected thing rather than the operations front door.",+ "summary": "Monitor-first Patrol operations now has a decision-first, responsive governed floor: authenticated launch stays on infrastructure monitoring; a compact control toolbar gives way to a daily briefing with current decision, critical, and separately canonical approval posture plus one recommended start; Patrol owns a persistent desktop inbox-and-context workspace and a true mobile master/detail flow with identity-stable review progress, previous/next navigation, automatic advancement after reviewed or temporarily suppressed occurrences, and explicit remaining-work feedback over canonical lifecycle, evidence, protection, availability, approval, action, and verification truth; objective setup and verified receipts remain compact supporting context; calm states stay honest; and Assistant remains contextual explanation for the selected thing rather than the operations front door.","tracking": []},"blockers": [],diff --git a/docs/release-control/v6/internal/subsystems/api-contracts.md b/docs/release-control/v6/internal/subsystems/api-contracts.mdindex e2faf1de14..0f438a4c23 100644--- a/docs/release-control/v6/internal/subsystems/api-contracts.md+++ b/docs/release-control/v6/internal/subsystems/api-contracts.md@@ -3902,6 +3902,15 @@ Likewise, the frontend may reduce typed evidence freshness/completeness andprotection state into plain scan-row language or omit unavailable row metadata,provided selected detail continues to expose the typed facts. Presentationcopy must not rewrite transport values or synthesize a stronger trust state.+The frontend review loop may retain the current returned item identities as a+session order for previous/next navigation. After a successful acknowledge or+bounded suppression mutation it must reload the canonical `active` list,+remove only items absent from that response, and derive the remaining count and+next selection from the refreshed typed membership. It must not optimistically+author lifecycle state, keep acknowledged/suppressed records in the active+inbox, or turn review progress into a second queue API. Newly returned active+items may be appended to the in-progress review session without changing their+server-authored identity or trust fields.Lifecycle read failure returns a typed unavailable response and never asynthetic zero or calm state. Protection lookup failure may return lifecyclediff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.mdindex 29c5104fe1..c14553efd8 100644--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md@@ -2629,6 +2629,14 @@ to the source row. Empty preview space must contain the recommended decision andan explicit review action near the top of the pane rather than verticallycentering content below the initial viewport. The Patrol enabled/mode/checktoolbar stays compact and does not repeat the page-level value sentence.+Once review starts, the same master/detail primitive exposes a live queue+position plus previous/next controls at both breakpoints. Its order stays+identity-stable for the selected session, successful acknowledge or suppression+announces the remaining count and advances to the next current item, and the+final settled item returns to the calm inbox. Lifecycle copy must explain that+review removes one occurrence from today's inbox while suppression is bounded;+generic backend verbs must not leave the user guessing whether the alert was+resolved, hidden permanently, or merely recorded as seen.The selected attention detail may compose the shared Actions review for aneligible backend-authored offer. The detail owns only the expecteddiff --git a/docs/release-control/v6/internal/subsystems/patrol-intelligence.md b/docs/release-control/v6/internal/subsystems/patrol-intelligence.mdindex 7b258557e8..979a5a3ac0 100644--- a/docs/release-control/v6/internal/subsystems/patrol-intelligence.md+++ b/docs/release-control/v6/internal/subsystems/patrol-intelligence.md@@ -1236,6 +1236,18 @@ Patrol a true master/detail workflow instead of stacking the detail above asecond full queue. The command header remains compact so the briefing and firstdecision enter the initial viewport.+Selecting the first item starts a bounded review session over the loaded+decision order. The selected context shows its current position and exposes+previous/next navigation on desktop and mobile; deterministic identity breaks+otherwise equal priority ties so polling cannot reshuffle equal decisions+arbitrarily. The session retains its review order while fresh list responses+remove settled items and append genuinely new work. Acknowledging an occurrence+is presented as `Mark reviewed`: on success the item leaves the active inbox,+Patrol announces the remaining decision count, and advances to the next current+item. Temporary suppression uses the same advancement loop and explicitly says+that the occurrence will return at the chosen time. Clearing the final item+returns to the calm inbox with an honest completion announcement.+The attention queue orders genuine operator decisions by severity, actionableapproval/review state, and latest observation time. Rows expose the severityword, lifecycle state, bounded consequence, affected resource, decision label,diff --git a/frontend-modern/browser-verification.json b/frontend-modern/browser-verification.jsonindex 9f5206dcb3..eacf02b38c 100644--- a/frontend-modern/browser-verification.json+++ b/frontend-modern/browser-verification.json@@ -1,29 +1,21 @@{"version": 1,- "base_sha": "ebba3c493bb4713c0954a620ed4b247c84b8d1ba",- "verified_at": "2026-08-18T09:22:00Z",+ "base_sha": "4606b3183657cdf2d7265cc693783c5ea78a2e93",+ "verified_at": "2026-08-18T08:26:52Z","result": "passed","changed_paths": [- "frontend-modern/src/App.tsx",- "frontend-modern/src/useAppRuntimeState.ts"+ "frontend-modern/src/features/patrol/PatrolAttentionWorkbench.tsx"],"content_sha256": {- "frontend-modern/src/App.tsx": "15989cbf87c43fac8fe0701fe29adda0ff8a3642e1a8eff7925102c61a1ca8dd",- "frontend-modern/src/useAppRuntimeState.ts": "cbed5848e77a1b0b01c82c59e651bc8e7598b74d95dcdc308ff4974d437aca68"+ "frontend-modern/src/features/patrol/PatrolAttentionWorkbench.tsx": "1799240120152766ef46fd16dabf1f8ac1fbccb8118d1d550a1f9b2df4a766c5"},"routes": [- "/login",- "/",- "/proxmox/overview",- "/docker/overview",- "/kubernetes/overview",- "/truenas/overview",- "/vsphere/overview"+ "/patrol"],"viewports": [{- "width": 1440,- "height": 900+ "width": 1280,+ "height": 720},{"width": 390,@@ -31,23 +23,17 @@}],"states": [- "signed-out login form",- "authenticated shell against a backend that reports the platformAdmission facet",- "platform navigation resolved with all six primary tabs present (Proxmox, Docker, Kubernetes, TrueNAS, vSphere, Machines)",- "Proxmox overview populated from a 658-resource estate",- "Docker, Kubernetes, TrueNAS and vSphere platform pages populated",- "shell at 390x844 with the Proxmox table rendered"+ "Live Watch only daily briefing with 12 current decisions, one critical item, and one governed approval waiting",+ "Desktop guided-review state with the persistent inbox, current queue position, previous/next controls, and selected governed context",+ "Narrow guided-review state with Back to list, current queue position, touch-sized previous/next controls, and the inbox hidden",+ "Reviewed and temporarily suppressed completion paths with automatic next-decision selection and explicit remaining-work feedback",+ "Current-coverage calm state, transport failure state, and attached availability failure without synthetic health"],"interactions": [- "signed in and confirmed navigation resolves with every platform tab the estate admits, against a backend built from the commit that publishes the facet",- "confirmed the shell reads admission from a 2172-byte /api/resources?page=1&limit=1 response rather than the 314KB /api/state payload",- "confirmed the shipped facet equals the client classifier over the same 658-resource estate, so the handover between the two sources is not visible",- "switched to the Docker tab and confirmed 80 rows",- "switched to the Kubernetes tab and confirmed 180 rows",- "switched to the TrueNAS tab and confirmed 3 rows",- "switched to the vSphere tab and confirmed 32 rows",- "returned to the Proxmox tab and confirmed 79 rows",- "resized to 390x844 and confirmed the Proxmox table still renders 79 rows",- "confirmed zero console or page errors across the whole pass"+ "Used the live in-app Browser to inspect the selected desktop review context and exercise identity-stable previous/next navigation without mutating live lifecycle data",+ "Verified the 390x844 selected-detail layout with a visible queue position, Back to list, and touch-sized previous/next controls above lifecycle actions",+ "Passed all 18 attention-workbench scenarios across Chromium, mobile Chrome, and mobile Safari",+ "Verified automatic advancement after Mark reviewed, bounded suppression completion feedback, inbox focus restoration, deep-link reload, and no horizontal overflow",+ "Passed the seven monitor-first and attached-availability browser scenarios in Chromium"]-}\ No newline at end of file+}diff --git a/frontend-modern/src/features/patrol/PatrolAttentionWorkbench.tsx b/frontend-modern/src/features/patrol/PatrolAttentionWorkbench.tsxindex 88b47c60d9..a0e2d7b169 100644--- a/frontend-modern/src/features/patrol/PatrolAttentionWorkbench.tsx+++ b/frontend-modern/src/features/patrol/PatrolAttentionWorkbench.tsx@@ -1,5 +1,6 @@import { A, useLocation } from '@solidjs/router';import {+ type Accessor,createEffect,createMemo,createSignal,@@ -12,6 +13,7 @@ import {import AlertTriangleIcon from 'lucide-solid/icons/triangle-alert';import ArrowLeftIcon from 'lucide-solid/icons/arrow-left';import CheckCircleIcon from 'lucide-solid/icons/circle-check';+import ChevronLeftIcon from 'lucide-solid/icons/chevron-left';import ChevronRightIcon from 'lucide-solid/icons/chevron-right';import ClipboardCheckIcon from 'lucide-solid/icons/clipboard-check';import ClockIcon from 'lucide-solid/icons/clock';@@ -89,9 +91,11 @@ export function sortPatrolAttentionDecisions();if (leftActionable !== rightActionable) return leftActionable ? -1 : 1;- return (- new Date(right.item.lastObservedAt).getTime() - new Date(left.item.lastObservedAt).getTime()- );+ const recencyDelta =+ new Date(right.item.lastObservedAt).getTime() - new Date(left.item.lastObservedAt).getTime();+ if (recencyDelta !== 0) return recencyDelta;++ return left.item.id.localeCompare(right.item.id);});}@@ -110,6 +114,8 @@ export function PatrolAttentionWorkbench(const [actionError, setActionError] = createSignal('');const [lifecycleBusy, setLifecycleBusy] = createSignal(false);const [lifecycleError, setLifecycleError] = createSignal('');+ const [reviewNotice, setReviewNotice] = createSignal('');+ const [reviewOrder, setReviewOrder] = createSignal<string[]>([]);const [showAllDecisions, setShowAllDecisions] = createSignal(false);const itemButtons = new Map<string, HTMLButtonElement>();let detailPanel: HTMLDivElement | undefined;@@ -129,10 +135,36 @@ export function PatrolAttentionWorkbench(),);const sortedDecisions = createMemo(() => sortPatrolAttentionDecisions(attention().needsUser));+ const orderedDecisions = createMemo(() => {+ const current = sortedDecisions();+ const order = reviewOrder();+ if (order.length === 0) return current;++ const byId = new Map(current.map((decision) => [decision.item.id, decision]));+ const knownIds = new Set(order);+ return [+ ...order.flatMap((itemId) => {+ const decision = byId.get(itemId);+ return decision ? [decision] : [];+ }),+ ...current.filter((decision) => !knownIds.has(decision.item.id)),+ ];+ });const visibleDecisions = createMemo(() =>- showAllDecisions() ? sortedDecisions() : sortedDecisions().slice(0, PRIMARY_DECISION_LIMIT),+ showAllDecisions() ? orderedDecisions() : orderedDecisions().slice(0, PRIMARY_DECISION_LIMIT),+ );+ const highestPriorityDecision = createMemo(() => orderedDecisions()[0]);+ const selectedDecisionIndex = createMemo(() =>+ orderedDecisions().findIndex((decision) => decision.item.id === selectedItemId()),);- const highestPriorityDecision = createMemo(() => sortedDecisions()[0]);+ const previousDecision = createMemo(() => {+ const index = selectedDecisionIndex();+ return index > 0 ? orderedDecisions()[index - 1] : undefined;+ });+ const nextDecision = createMemo(() => {+ const index = selectedDecisionIndex();+ return index >= 0 ? orderedDecisions()[index + 1] : undefined;+ });const criticalDecisionCount = createMemo(() => attention().needsUser.filter((decision) => decision.item.severity === 'critical').length,);@@ -146,13 +178,18 @@ export function PatrolAttentionWorkbench(const loadCurrentFilter = () => patrolAttentionStore.load(patrolAttentionStore.filter());const scrollDetailIntoView = () => {queueMicrotask(() => {+ detailPanel?.scrollTo?.({ top: 0 });if (window.matchMedia?.('(max-width: 1023px)').matches) {detailPanel?.scrollIntoView?.({ block: 'start' });detailPanel?.focus?.({ preventScroll: true });}});};- const selectItem = (itemId: string) => {+ const selectItem = (itemId: string, preserveNotice = false) => {+ if (!preserveNotice) setReviewNotice('');+ if (reviewOrder().length === 0) {+ setReviewOrder(sortedDecisions().map((decision) => decision.item.id));+ }setSelectedItemId(itemId);replaceAttentionLocation(itemId);void patrolAttentionStore.select(itemId);@@ -160,6 +197,7 @@ export function PatrolAttentionWorkbench(};const closeDetail = () => {const previous = selectedItemId();+ setReviewOrder([]);setSelectedItemId('');replaceAttentionLocation('');void patrolAttentionStore.select(null);@@ -203,17 +241,39 @@ export function PatrolAttentionWorkbench(patrolAttentionStore.load(patrolAttentionStore.filter()),]);};- const changeLifecycle = async (operation: () => Promise<unknown>) => {+ const changeLifecycle = async (+ operation: () => Promise<unknown>,+ options: { advanceAfter?: boolean; successLabel?: string } = {},+ ) => {if (lifecycleBusy()) return;+ const selected = selectedItemId();+ const queueBefore = orderedDecisions();+ const selectedIndex = queueBefore.findIndex((decision) => decision.item.id === selected);+ const nextCandidateId =+ queueBefore[selectedIndex + 1]?.item.id ?? queueBefore[selectedIndex - 1]?.item.id ?? '';setLifecycleBusy(true);setLifecycleError('');try {await operation();- const selected = selectedItemId();- await Promise.all([- selected ? patrolAttentionStore.select(selected) : Promise.resolve(),- patrolAttentionStore.load(patrolAttentionStore.filter()),- ]);+ await patrolAttentionStore.load(patrolAttentionStore.filter());+ if (options.advanceAfter) {+ const remaining = orderedDecisions();+ const next =+ remaining.find((decision) => decision.item.id === nextCandidateId) ?? remaining[0];+ const successLabel = options.successLabel ?? 'Decision updated';+ setReviewNotice(+ remaining.length > 0+ ? `${successLabel}. ${remaining.length} ${remaining.length === 1 ? 'decision remains' : 'decisions remain'}.`+ : `${successLabel}. Your decision inbox is clear.`,+ );+ if (next) {+ selectItem(next.item.id, true);+ } else {+ closeDetail();+ }+ } else if (selected) {+ await patrolAttentionStore.select(selected);+ }} catch (cause) {setLifecycleError(cause instanceof Error ? cause.message : 'The lifecycle change could not be saved.',@@ -238,11 +298,18 @@ export function PatrolAttentionWorkbench(void patrolAttentionStore.select(deepLinkedItem);scrollDetailIntoView();} else if (!deepLinkedItem && currentItem) {+ setReviewOrder([]);setSelectedItemId('');void patrolAttentionStore.select(null);}});+ createEffect(() => {+ if (selectedItemId() && sortedDecisions().length > 0 && reviewOrder().length === 0) {+ setReviewOrder(sortedDecisions().map((decision) => decision.item.id));+ }+ });+const decisionCountLabel = createMemo(() => {const count = attention().needsUser.length;return `${count} ${count === 1 ? 'item requires' : 'items require'} review`;@@ -353,6 +420,18 @@ export function PatrolAttentionWorkbench(</Show></div>+ <Show when={reviewNotice()}>+ {(notice) => (+ <div+ role="status"+ class="flex items-center gap-2 border-b border-emerald-200 bg-emerald-50 px-4 py-3 text-sm font-medium text-emerald-800 dark:border-emerald-900 dark:bg-emerald-950/30 dark:text-emerald-200 sm:px-6"+ >+ <CheckCircleIcon class="h-4 w-4 shrink-0" aria-hidden="true" />+ {notice()}+ </div>+ )}+ </Show>+<divclass={`grid min-w-0 ${attention().needsUser.length > 0 ? 'lg:grid-cols-[minmax(20rem,0.78fr)_minmax(0,1.22fr)]' : ''}`}>@@ -440,12 +519,34 @@ export function PatrolAttentionWorkbench(onReviewAction={reviewAction}lifecycleBusy={lifecycleBusy()}lifecycleError={lifecycleError()}- onAcknowledge={(itemId) => changeLifecycle(() => acknowledgePatrolAttention(itemId))}+ queuePosition={() =>+ selectedDecisionIndex() >= 0 ? selectedDecisionIndex() + 1 : undefined+ }+ queueCount={() => orderedDecisions().length}+ canPrevious={() => Boolean(previousDecision())}+ canNext={() => Boolean(nextDecision())}+ onPrevious={() => {+ const previous = previousDecision();+ if (previous) selectItem(previous.item.id);+ }}+ onNext={() => {+ const next = nextDecision();+ if (next) selectItem(next.item.id);+ }}+ onAcknowledge={(itemId) =>+ changeLifecycle(() => acknowledgePatrolAttention(itemId), {+ advanceAfter: true,+ successLabel: 'Marked reviewed',+ })+ }onUnacknowledge={(itemId) =>changeLifecycle(() => unacknowledgePatrolAttention(itemId))}onSuppress={(itemId, reason, expiresAt) =>- changeLifecycle(() => suppressPatrolAttention(itemId, reason, expiresAt))+ changeLifecycle(() => suppressPatrolAttention(itemId, reason, expiresAt), {+ advanceAfter: true,+ successLabel: 'Suppressed temporarily',+ })}onUnsuppress={(itemId) => changeLifecycle(() => unsuppressPatrolAttention(itemId))}onOpenFindings={props.onOpenFindings}@@ -635,6 +736,12 @@ function AttentionDetail(props: {) => void;lifecycleBusy: boolean;lifecycleError: string;+ queuePosition: Accessor<number | undefined>;+ queueCount: Accessor<number>;+ canPrevious: Accessor<boolean>;+ canNext: Accessor<boolean>;+ onPrevious: () => void;+ onNext: () => void;onAcknowledge: (itemId: string) => Promise<void>;onUnacknowledge: (itemId: string) => Promise<void>;onSuppress: (itemId: string, reason: string, expiresAt: string) => Promise<void>;@@ -722,32 +829,81 @@ function AttentionDetail(props: {aria-labelledby="attention-detail-title"aria-busy={props.loading}>- <div class="flex items-start justify-between gap-3 border-b border-border px-4 py-3 sm:px-5">- <div class="min-w-0">+ <div class="sticky top-0 z-20 border-b border-border bg-surface/95 px-4 py-3 backdrop-blur sm:px-5">+ <div class="flex items-center justify-between gap-3">+ <button+ type="button"+ class="inline-flex min-h-11 shrink-0 items-center justify-center gap-2 rounded px-2 text-sm font-medium text-muted hover:bg-surface-hover hover:text-base-content focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 lg:hidden"+ aria-label="Back to attention list"+ onClick={props.onClose}+ >+ <ArrowLeftIcon class="h-4 w-4" aria-hidden="true" />+ Back to list+ </button><p class="text-[11px] font-semibold uppercase tracking-wider text-muted">- Decision context+ <Show when={props.queuePosition()} fallback="Decision context">+ {(position) => `Decision ${position()} of ${props.queueCount()}`}+ </Show></p>- <h3 id="attention-detail-title" class="mt-1 text-sm font-semibold text-base-content">- {item()?.title ?? 'Loading attention item'}- </h3>+ <div class="hidden items-center gap-1 lg:flex">+ <button+ type="button"+ class="inline-flex h-8 w-8 items-center justify-center rounded text-muted hover:bg-surface-hover hover:text-base-content focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 disabled:cursor-not-allowed disabled:opacity-35"+ aria-label="Previous decision"+ title="Previous decision"+ disabled={!props.canPrevious()}+ onClick={props.onPrevious}+ >+ <ChevronLeftIcon class="h-4 w-4" aria-hidden="true" />+ </button>+ <button+ type="button"+ class="inline-flex h-8 w-8 items-center justify-center rounded text-muted hover:bg-surface-hover hover:text-base-content focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 disabled:cursor-not-allowed disabled:opacity-35"+ aria-label="Next decision"+ title="Next decision"+ disabled={!props.canNext()}+ onClick={props.onNext}+ >+ <ChevronRightIcon class="h-4 w-4" aria-hidden="true" />+ </button>+ <span class="mx-1 h-4 w-px bg-border" aria-hidden="true" />+ <button+ type="button"+ class="inline-flex h-8 w-8 items-center justify-center rounded text-muted hover:bg-surface-hover hover:text-base-content focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500"+ aria-label="Close attention detail"+ onClick={props.onClose}+ >+ <XIcon class="h-4 w-4" aria-hidden="true" />+ </button>+ </div></div>- <button- type="button"- class="inline-flex h-11 shrink-0 items-center justify-center gap-2 rounded px-3 text-sm font-medium text-muted hover:bg-surface-hover hover:text-base-content focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 lg:hidden"- aria-label="Back to attention list"- onClick={props.onClose}- >- <ArrowLeftIcon class="h-4 w-4" aria-hidden="true" />- Back to list- </button>- <button- type="button"- class="hidden h-6 w-6 shrink-0 items-center justify-center rounded text-muted hover:bg-surface-hover hover:text-base-content focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 lg:inline-flex"- aria-label="Close attention detail"- onClick={props.onClose}- >- <XIcon class="h-4 w-4" aria-hidden="true" />- </button>+ <h3 id="attention-detail-title" class="mt-1 text-sm font-semibold text-base-content">+ {item()?.title ?? 'Loading attention item'}+ </h3>+ <Show when={props.queuePosition() && props.queueCount() > 1}>+ <div class="mt-3 grid grid-cols-2 gap-2 lg:hidden" aria-label="Review queue navigation">+ <Button+ variant="secondary"+ size="sm"+ class="min-h-11 gap-1.5"+ disabled={!props.canPrevious()}+ onClick={props.onPrevious}+ >+ <ChevronLeftIcon class="h-4 w-4" aria-hidden="true" />+ Previous+ </Button>+ <Button+ variant="secondary"+ size="sm"+ class="min-h-11 gap-1.5"+ disabled={!props.canNext()}+ onClick={props.onNext}+ >+ Next decision+ <ChevronRightIcon class="h-4 w-4" aria-hidden="true" />+ </Button>+ </div>+ </Show></div><Show@@ -1053,7 +1209,7 @@ function AttentionLifecycleControls(props: {isLoading={props.busy}onClick={() => void props.onAcknowledge(props.detail.item.id)}>- Acknowledge+ Mark reviewed</Button></Show><Show when={state() === 'acknowledged'}>@@ -1064,7 +1220,7 @@ function AttentionLifecycleControls(props: {isLoading={props.busy}onClick={() => void props.onUnacknowledge(props.detail.item.id)}>- Return to open+ Return to decision inbox</Button></Show><Show when={state() === 'suppressed'}>@@ -1161,7 +1317,10 @@ function AttentionLifecycleControls(props: {</p></Show><div class="mt-3 border-t border-border-subtle pt-3 text-xs leading-5 text-muted">- <p>These controls cover only this occurrence, and suppression always expires.</p>+ <p>+ Mark reviewed removes this occurrence from today's decision inbox while keeping its+ record. Suppression hides it only until the selected return time.+ </p><p class="mt-1">For a permanent change,{' '}<Adiff --git a/frontend-modern/src/features/patrol/__tests__/PatrolAttentionWorkbench.test.tsx b/frontend-modern/src/features/patrol/__tests__/PatrolAttentionWorkbench.test.tsxindex 5ae1bf3a57..14af374354 100644--- a/frontend-modern/src/features/patrol/__tests__/PatrolAttentionWorkbench.test.tsx+++ b/frontend-modern/src/features/patrol/__tests__/PatrolAttentionWorkbench.test.tsx@@ -391,8 +391,8 @@ describe('PatrolAttentionWorkbench', () => {).toHaveTextContent('Back to list');expect(within(detailRegion).getByRole('button', { name: 'Close attention detail' }),- ).toHaveClass('hidden', 'lg:inline-flex');- expect(within(detailRegion).getByRole('button', { name: 'Acknowledge' })).toHaveClass(+ ).toHaveClass('h-8', 'w-8');+ expect(within(detailRegion).getByRole('button', { name: 'Mark reviewed' })).toHaveClass('min-h-11','sm:min-h-0',);@@ -496,25 +496,20 @@ describe('PatrolAttentionWorkbench', () => {).not.toBeInTheDocument();});- it('acknowledges an operational item and refreshes the shared lifecycle projection', async () => {+ it('marks an item reviewed and advances through the decision queue', async () => {const active = item();- const acknowledged = item({ state: 'acknowledged' });- const acknowledgedDetail = detail(acknowledged);- acknowledgedDetail.operationalRecord.acknowledgement = {- at: evaluatedAt,- by: 'operator',- };+ const next = item({ id: 'record-2', title: 'Database replication is delayed' });apiMocks.getList.mockResolvedValueOnce(- listResponse([active], summary({ activeCount: 1, openCount: 1, calm: false })),+ listResponse([active, next], summary({ activeCount: 2, openCount: 2, calm: false })),).mockResolvedValue(listResponse(- [acknowledged],- summary({ activeCount: 1, acknowledgedCount: 1, calm: false }),+ [next],+ summary({ activeCount: 1, openCount: 1, acknowledgedCount: 1, calm: false }),),);- apiMocks.getDetail.mockResolvedValueOnce(detail(active)).mockResolvedValue(acknowledgedDetail);+ apiMocks.getDetail.mockResolvedValueOnce(detail(active)).mockResolvedValue(detail(next));apiMocks.acknowledge.mockResolvedValue({ success: true });renderWorkbench();@@ -523,11 +518,19 @@ describe('PatrolAttentionWorkbench', () => {name: 'Open Disk pressure on Database VM',}),);- fireEvent.click(await screen.findByRole('button', { name: 'Acknowledge' }));+ expect(await screen.findByText('Decision 1 of 2')).toBeInTheDocument();+ expect(screen.getByTitle('Previous decision')).toBeDisabled();+ expect(screen.getByTitle('Next decision')).toBeEnabled();+ fireEvent.click(await screen.findByRole('button', { name: 'Mark reviewed' }));await waitFor(() => expect(apiMocks.acknowledge).toHaveBeenCalledWith('record-1'));- expect(await screen.findByText(/Acknowledged by operator/i)).toBeInTheDocument();- expect(screen.getByRole('button', { name: 'Return to open' })).toBeInTheDocument();+ expect(await screen.findByRole('status')).toHaveTextContent(+ 'Marked reviewed. 1 decision remains.',+ );+ expect(+ await screen.findByRole('complementary', { name: 'Database replication is delayed' }),+ ).toBeInTheDocument();+ expect(window.location.search).toBe('?attention=record-2');});it('requires an explicit reason and bounded duration before temporary suppression', async () => {@@ -545,7 +548,7 @@ describe('PatrolAttentionWorkbench', () => {listResponse([active], summary({ activeCount: 1, openCount: 1, calm: false })),).mockResolvedValue(- listResponse([suppressed], summary({ activeCount: 0, suppressedCount: 1, calm: true })),+ listResponse([], summary({ activeCount: 0, suppressedCount: 1, calm: true })),);apiMocks.getDetail.mockResolvedValueOnce(detail(active)).mockResolvedValue(suppressedDetail);apiMocks.suppress.mockResolvedValue({ success: true });@@ -588,8 +591,12 @@ describe('PatrolAttentionWorkbench', () => {expect.any(String),);});- expect(await screen.findByText(/Suppressed by operator/i)).toBeInTheDocument();- expect(screen.getByRole('button', { name: 'Return to active attention' })).toBeInTheDocument();+ expect(await screen.findByRole('status')).toHaveTextContent(+ 'Suppressed temporarily. Your decision inbox is clear.',+ );+ expect(+ await screen.findByRole('heading', { name: 'Nothing needs you right now' }),+ ).toBeInTheDocument();});it('points lifecycle users at the durable threshold and finding controls', async () => {@@ -614,9 +621,7 @@ describe('PatrolAttentionWorkbench', () => {}),);- expect(- await screen.findByText(/These controls cover only this occurrence/i),- ).toBeInTheDocument();+ expect(await screen.findByText(/Mark reviewed removes this occurrence/i)).toBeInTheDocument();expect(screen.getByRole('link', { name: 'adjust alert thresholds' })).toHaveAttribute('href','/alerts/thresholds',@@ -639,9 +644,7 @@ describe('PatrolAttentionWorkbench', () => {}),);- expect(- await screen.findByText(/These controls cover only this occurrence/i),- ).toBeInTheDocument();+ expect(await screen.findByText(/Mark reviewed removes this occurrence/i)).toBeInTheDocument();expect(screen.queryByRole('button', { name: 'review Patrol findings' }),).not.toBeInTheDocument();diff --git a/tests/integration/tests/91-operational-trust-attention-workbench.spec.ts b/tests/integration/tests/91-operational-trust-attention-workbench.spec.tsindex 89ad15ba68..31a110af08 100644--- a/tests/integration/tests/91-operational-trust-attention-workbench.spec.ts+++ b/tests/integration/tests/91-operational-trust-attention-workbench.spec.ts@@ -355,7 +355,7 @@ async function mockAttention(});const currentSummary = () => ({...activeSummary,- activeCount: primaryState === "suppressed" ? 1 : 2,+ activeCount: primaryState === "open" ? 2 : 1,openCount: primaryState === "open" ? 1 : 0,acknowledgedCount: primaryState === "acknowledged" ? 2 : 1,suppressedCount: primaryState === "suppressed" ? 2 : 1,@@ -606,10 +606,28 @@ async function mockAttention(}if (!url.pathname.endsWith("/attention")) {+ const isUncertainDetail =+ url.pathname.includes(encodeURIComponent(uncertainAttentionItem.id)) ||+ url.pathname.includes(uncertainAttentionItem.id);await route.fulfill({status: 200,contentType: "application/json",- body: JSON.stringify(primaryDetail()),+ body: JSON.stringify(+ isUncertainDetail+ ? {+ ...detail,+ item: uncertainAttentionItem,+ operationalRecord: {+ ...detail.operationalRecord,+ id: uncertainAttentionItem.operationalRecordId,+ subjectResourceId: uncertainAttentionItem.subjectResourceId,+ state: "unknown",+ severity: "warning",+ },+ evidence: [],+ }+ : primaryDetail(),+ ),});return;}@@ -628,9 +646,9 @@ async function mockAttention(? [suppressedAttentionItem]: filter === "resolved"? [resolvedAttentionItem]- : primaryState === "suppressed"- ? [uncertainAttentionItem]- : [primaryItem(), uncertainAttentionItem];+ : primaryState === "open"+ ? [primaryItem(), uncertainAttentionItem]+ : [uncertainAttentionItem];await route.fulfill({status: 200,contentType: "application/json",@@ -720,7 +738,9 @@ test("makes active operational work primary and preserves the evidence boundary"),).toBeVisible();await expect(attentionList.getByText("Evidence current")).toHaveCount(0);- await expect(attentionList.getByText("Protection needs attention")).toHaveCount(0);+ await expect(+ attentionList.getByText("Protection needs attention"),+ ).toHaveCount(0);await expect(page.getByRole("button", { name: "Explain with Assistant" }),).toHaveCount(0);@@ -761,46 +781,35 @@ test("makes active operational work primary and preserves the evidence boundary"new RegExp(`attention=${encodeURIComponent(attentionID)}`),);- await detailPanel.getByRole("button", { name: "Acknowledge" }).click();- await expect(- detailPanel.getByText(/Acknowledged by operator/i),- ).toBeVisible();- await expect(- detailPanel.getByRole("button", { name: "Return to open" }),- ).toBeVisible();-- await detailPanel- .getByRole("button", { name: "Suppress temporarily" })- .click();- await detailPanel- .getByRole("textbox", {- name: "Why is this safe to hide from active attention?",- })- .fill("Planned host maintenance");- await detailPanel- .getByRole("combobox", {- name: "Return it to active attention after",- })- .selectOption(String(60 * 60 * 1000));- await detailPanel- .getByRole("button", { name: "Suppress temporarily" })- .click();+ await expect(detailPanel.getByText("Decision 1 of 2")).toBeVisible();+ await detailPanel.getByRole("button", { name: "Mark reviewed" }).click();+ await expect(queue.getByRole("status")).toContainText(+ "Marked reviewed. 1 decision remains.",+ );await expect(- detailPanel.getByText(/Suppressed by operator: Planned host maintenance/i),+ queue.getByRole("complementary", {+ name: "Connection state unknown for pve-edge",+ }),).toBeVisible();- await detailPanel- .getByRole("button", { name: "Return to active attention" })- .click();await expect(- detailPanel.getByRole("button", { name: "Acknowledge" }),- ).toBeVisible();+ attentionList.getByRole("button", {+ name: "Open CPU pressure on pve-main",+ }),+ ).toHaveCount(0);+ const advancedDetail = queue.getByRole("complementary", {+ name: "Connection state unknown for pve-edge",+ });const closeDetailButton =(page.viewportSize()?.width ?? 1280) < 1024- ? detailPanel.getByRole("button", { name: "Back to attention list" })- : detailPanel.getByRole("button", { name: "Close attention detail" });+ ? advancedDetail.getByRole("button", { name: "Back to attention list" })+ : advancedDetail.getByRole("button", { name: "Close attention detail" });await closeDetailButton.click();- await expect(itemButton).toBeFocused();+ await expect(+ attentionList.getByRole("button", {+ name: "Open Connection state unknown for pve-edge",+ }),+ ).toBeFocused();await expect(page).not.toHaveURL(/attention=/);});@@ -831,6 +840,16 @@ test("puts the selected detail in view on a phone without page overflow", asyncname: "Back to attention list",});await expect(backToList).toBeVisible();+ await expect(detailPanel.getByText("Decision 1 of 2")).toBeVisible();+ const mobileReviewNavigation = detailPanel.locator(+ '[aria-label="Review queue navigation"]',+ );+ await expect(+ mobileReviewNavigation.getByRole("button", { name: "Previous" }),+ ).toBeDisabled();+ await expect(+ mobileReviewNavigation.getByRole("button", { name: "Next decision" }),+ ).toBeVisible();const overflows = await page.evaluate(() =>document.documentElement.scrollWidth >@@ -859,12 +878,9 @@ test("shows calm only with current coverage and never converts failure into healawait expect(page.getByText("Nothing needs you right now")).toBeVisible();await expect(- page.getByText(- "The current operational evaluation has no active items.",- {- exact: false,- },- ),+ page.getByText("The current operational evaluation has no active items.", {+ exact: false,+ }),).toBeVisible();fixture.setMode("failed");