Skip to content

armgit / Pulse

Public Imported from GitHub
0

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.

feat(patrol): surface pending operator decisions

rcourtmanc6cafa6e2588
diff --git a/docs/release-control/v6/internal/status.json b/docs/release-control/v6/internal/status.json
index 80f52956aa..5b956d567f 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; current work outranks configuration; Patrol owns one severity-ordered attention and explain-act-verify workbench 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; current findings and separately canonical pending approvals are both visible in the primary decision area; Patrol owns one severity-ordered attention and explain-act-verify workbench over canonical lifecycle, evidence, protection, availability, approval, action, and verification truth; mobile detail has explicit list return and focus restoration; 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.md
index 4d3355fcef..2597fd7355 100644
--- a/docs/release-control/v6/internal/subsystems/api-contracts.md
+++ b/docs/release-control/v6/internal/subsystems/api-contracts.md
@@ -3886,6 +3886,12 @@ The Patrol workbench may project the summary counts into its fixed lifecycle
filter labels at either desktop or narrow widths, but changing presentation
does not create a parallel count or filter vocabulary: every selection still
uses the canonical `AttentionFilter` request and the returned list summary.
+The frontend may also place the separately loaded canonical
+`GET /api/actions/pending` count beside the attention header as a direct handoff
+to `/actions`. That count remains governed-action inbox metadata: it must not be
+added to the attention summary, used to manufacture an attention row, or imply
+that a specific attention record owns the pending action without a typed action
+reference.
Likewise, the frontend may reduce typed evidence freshness/completeness and
protection state into plain scan-row language or omit unavailable row metadata,
provided selected detail continues to expose the typed facts. Presentation
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index 74b1e6a484..69e286bc13 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -2612,7 +2612,13 @@ legacy Patrol analytics belong in collapsed supporting context. Unavailable and
partial states must use explicit copy rather than success styling. Selected
detail keeps the typed facts with named fields and plain unavailable-state
labels rather than raw token pairs. On narrow viewports, selecting a row moves
-and focuses that decision context without horizontal page overflow.
+and focuses that decision context without horizontal page overflow. The narrow
+detail header uses a visible `Back to list` button, while the compact close-icon
+button is wide-layout-only; either path clears the attention deep link and
+restores focus to the source row. When the shared action inbox reports pending
+governed work, the attention header may render a primary `/actions` handoff
+beside its secondary refresh action. That handoff displays the action count but
+does not combine it with the attention badge or list membership.
The selected attention detail may compose the shared Actions review for an
eligible backend-authored offer. The detail owns only the expected
diff --git a/docs/release-control/v6/internal/subsystems/patrol-intelligence.md b/docs/release-control/v6/internal/subsystems/patrol-intelligence.md
index 21647d119a..1c6236e84e 100644
--- a/docs/release-control/v6/internal/subsystems/patrol-intelligence.md
+++ b/docs/release-control/v6/internal/subsystems/patrol-intelligence.md
@@ -1214,6 +1214,16 @@ compact instead of consuming the prime viewport. Universal governed actions
and Patrol-specific finding/run records are exposed together through the
subordinate `Review and history` handoff area.
+The page introduction states the operator job—find the decision, choose the
+next step, and retain a verified record—rather than repeating the command
+header's monitoring posture. A non-zero canonical pending-action count is
+current operator work, so the attention header must expose a direct
+`/actions` approval-review handoff beside refresh instead of requiring the
+operator to discover it only in history or navigation chrome. That handoff
+does not merge governed action records into the attention list or invent an
+attention count; the queue and approval inbox retain their separate canonical
+projections.
+
The attention queue orders genuine operator decisions by severity, actionable
approval/review state, and latest observation time. Rows expose the severity
word, lifecycle state, bounded consequence, affected resource, decision label,
@@ -1224,7 +1234,10 @@ occurrence acknowledgement/suppression, evidence, protection posture, timeline,
resource navigation, and contextual Assistant explanation remain available
without displacing the primary decision. Narrow selection scrolls and focuses
that context before the queue so keyboard and screen-reader users do not have
-to traverse the list again.
+to traverse the list again. At widths where the detail replaces the queue's
+reading position, its visible close affordance is an explicit `Back to list`
+control; wide layouts retain the compact close icon. Both controls clear the
+deep link and restore focus to the originating queue row.
The active Patrol queue now uses compact severity-accented rows for
prioritisation and a single focused review panel for the selected issue. The
diff --git a/frontend-modern/browser-verification.json b/frontend-modern/browser-verification.json
index cce098059a..1c4c67f0c5 100644
--- a/frontend-modern/browser-verification.json
+++ b/frontend-modern/browser-verification.json
@@ -1,21 +1,25 @@
{
"version": 1,
- "base_sha": "316657b5e859850e98b0db15ec5c42fa5696f561",
- "verified_at": "2026-08-18T05:59:05Z",
+ "base_sha": "6372b28862022ecb7e94968fa6fa7c3292160ed4",
+ "verified_at": "2026-08-18T06:29:12Z",
"result": "passed",
"changed_paths": [
- "frontend-modern/src/features/alerts/ResourceMonitoringPolicyAction.tsx"
+ "frontend-modern/src/features/patrol/PatrolAttentionWorkbench.tsx",
+ "frontend-modern/src/features/patrol/PatrolIntelligenceSurface.tsx",
+ "frontend-modern/src/utils/patrolPagePresentation.ts"
],
"content_sha256": {
- "frontend-modern/src/features/alerts/ResourceMonitoringPolicyAction.tsx": "14082de06f6135b3442a941b1edc3768f6d2f42ae71ff3c9810cd7b6f18b3cdb"
+ "frontend-modern/src/features/patrol/PatrolAttentionWorkbench.tsx": "2e50d9c6ca55c62f326c07b243e5682fda8da8af1b88a3077583e6478d4499bc",
+ "frontend-modern/src/features/patrol/PatrolIntelligenceSurface.tsx": "32d7dcb618987e5843175a4870a5e5a7ac1aba8442f2dfff881d4e0fcea1e886",
+ "frontend-modern/src/utils/patrolPagePresentation.ts": "f8a011a2348b78cb837a5d92fb65bad1ffb6aab837cbbccc84927ec69d0cea29"
},
"routes": [
- "/alerts"
+ "/patrol"
],
"viewports": [
{
"width": 1280,
- "height": 720
+ "height": 800
},
{
"width": 390,
@@ -23,15 +27,15 @@
}
],
"states": [
- "Active Alerts list on the Alerts overview with 12 mock alerts",
- "Monitoring policy menu open on the last visible alert card, previously the clipped case",
- "Menu measured fully on-screen at both viewports via getBoundingClientRect against window.innerWidth/innerHeight",
- "Menu closed after outside pointerdown"
+ "Live Watch only Patrol page with 12 attention decisions and one governed approval waiting",
+ "Selected critical attention item with typed decision context, lifecycle, evidence, protection, timeline, resource, and Assistant handoff",
+ "Narrow selected-detail layout with explicit Back to list navigation and no horizontal overflow",
+ "Current-coverage calm state and attention transport failure state without synthetic health"
],
"interactions": [
- "Clicked the last alert card's Monitoring trigger at 1280x720, menu portaled to body, rect top 427 bottom 712 fully on-screen, screenshot shows all four choices incl. Retire from monitoring floating over subsequent cards",
- "Clicked the last alert card's Monitoring trigger at 390x844, rect top 551 bottom 836 fully on-screen",
- "Dispatched outside pointerdown, menu closed",
- "vitest ResourceMonitoringPolicyAction 3 tests pass incl. new body-portal assertion, tsc --noEmit clean"
+ "Used the live in-app Browser to confirm the operator-job introduction and Review 1 approval handoff beside Refresh",
+ "Opened a critical Docker decision and inspected the responsive master-detail hierarchy and governed controls",
+ "Ran the Patrol attention workbench journey across Chromium, mobile Chrome, and mobile Safari; 18 checks passed after updating the breakpoint-specific close selector",
+ "Verified the 390x844 Back to list path clears the deep link, restores focus to the originating row, survives reload, and does not overflow"
]
-}
\ No newline at end of file
+}
diff --git a/frontend-modern/src/features/patrol/PatrolAttentionWorkbench.tsx b/frontend-modern/src/features/patrol/PatrolAttentionWorkbench.tsx
index 27702ea681..96b6e02ad4 100644
--- a/frontend-modern/src/features/patrol/PatrolAttentionWorkbench.tsx
+++ b/frontend-modern/src/features/patrol/PatrolAttentionWorkbench.tsx
@@ -10,8 +10,10 @@ import {
untrack,
} from 'solid-js';
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 ChevronRightIcon from 'lucide-solid/icons/chevron-right';
+import ClipboardCheckIcon from 'lucide-solid/icons/clipboard-check';
import ClockIcon from 'lucide-solid/icons/clock';
import ExternalLinkIcon from 'lucide-solid/icons/external-link';
import RefreshIcon from 'lucide-solid/icons/refresh-cw';
@@ -97,6 +99,7 @@ export function PatrolAttentionWorkbench(
props: {
autonomyLevel?: PatrolAutonomyLevel;
autonomyLocked?: boolean;
+ pendingActionCount?: number;
onOpenFindings?: () => void;
} = {},
) {
@@ -263,20 +266,29 @@ export function PatrolAttentionWorkbench(
{autonomyExperience().needsYouDescription}
</p>
</div>
- <Button
- variant="secondary"
- size="sm"
- class="gap-1.5"
- onClick={() => void loadCurrentFilter()}
- disabled={patrolAttentionStore.loading()}
- aria-label="Refresh Patrol attention"
- >
- <RefreshIcon
- class={`h-4 w-4 ${patrolAttentionStore.loading() ? 'motion-safe:animate-spin' : ''}`}
- aria-hidden="true"
- />
- Refresh
- </Button>
+ <div class="flex flex-wrap items-center gap-2">
+ <Show when={(props.pendingActionCount ?? 0) > 0}>
+ <ButtonLink href="/actions" variant="primary" size="sm" class="gap-1.5">
+ <ClipboardCheckIcon class="h-4 w-4" aria-hidden="true" />
+ Review {props.pendingActionCount}{' '}
+ {props.pendingActionCount === 1 ? 'approval' : 'approvals'}
+ </ButtonLink>
+ </Show>
+ <Button
+ variant="secondary"
+ size="sm"
+ class="gap-1.5"
+ onClick={() => void loadCurrentFilter()}
+ disabled={patrolAttentionStore.loading()}
+ aria-label="Refresh Patrol attention"
+ >
+ <RefreshIcon
+ class={`h-4 w-4 ${patrolAttentionStore.loading() ? 'motion-safe:animate-spin' : ''}`}
+ aria-hidden="true"
+ />
+ Refresh
+ </Button>
+ </div>
</div>
<Show when={attention().quiet.length > 0}>
<p class="mt-3 rounded-md border border-border-subtle bg-surface-alt/40 px-3 py-2 text-xs leading-5 text-muted">
@@ -621,7 +633,16 @@ function AttentionDetail(props: {
</div>
<button
type="button"
- class="inline-flex h-11 w-11 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 sm:h-6 sm:w-6"
+ 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}
>
diff --git a/frontend-modern/src/features/patrol/PatrolIntelligenceSurface.tsx b/frontend-modern/src/features/patrol/PatrolIntelligenceSurface.tsx
index 7451ad265a..1ddbcea09d 100644
--- a/frontend-modern/src/features/patrol/PatrolIntelligenceSurface.tsx
+++ b/frontend-modern/src/features/patrol/PatrolIntelligenceSurface.tsx
@@ -34,6 +34,7 @@ export function PatrolIntelligenceSurface() {
<PatrolAttentionWorkbench
autonomyLevel={state.autonomyLevel()}
autonomyLocked={state.autoFixLocked()}
+ pendingActionCount={actionInboxStore.pendingActionCount}
onOpenFindings={openFindings}
/>
diff --git a/frontend-modern/src/features/patrol/__tests__/PatrolAttentionWorkbench.test.tsx b/frontend-modern/src/features/patrol/__tests__/PatrolAttentionWorkbench.test.tsx
index 78ea1bc1e2..3119295ab1 100644
--- a/frontend-modern/src/features/patrol/__tests__/PatrolAttentionWorkbench.test.tsx
+++ b/frontend-modern/src/features/patrol/__tests__/PatrolAttentionWorkbench.test.tsx
@@ -240,6 +240,26 @@ describe('PatrolAttentionWorkbench', () => {
expect(apiMocks.getList).toHaveBeenCalledWith('active');
});
+ it('surfaces pending governed approvals beside current Patrol decisions', async () => {
+ const attentionSummary = summary({ activeCount: 1, openCount: 1, calm: false });
+ apiMocks.getList.mockResolvedValue(listResponse([item()], attentionSummary));
+
+ render(() => (
+ <Router>
+ <Route
+ path="/patrol"
+ component={() => <PatrolAttentionWorkbench pendingActionCount={2} />}
+ />
+ </Router>
+ ));
+
+ expect(await screen.findByRole('link', { name: 'Review 2 approvals' })).toHaveAttribute(
+ 'href',
+ '/actions',
+ );
+ expect(screen.getByRole('button', { name: 'Refresh Patrol attention' })).toBeInTheDocument();
+ });
+
it('does not interrupt assisted mode for safe eligible work', async () => {
const safeWork = item({
availableActions: [
@@ -359,9 +379,12 @@ describe('PatrolAttentionWorkbench', () => {
).toBeInTheDocument();
expect(within(detailRegion).getByText('Proxmox VE')).toBeInTheDocument();
expect(within(detailRegion).getByText('Observing to Open')).toBeInTheDocument();
+ expect(
+ within(detailRegion).getByRole('button', { name: 'Back to attention list' }),
+ ).toHaveTextContent('Back to list');
expect(
within(detailRegion).getByRole('button', { name: 'Close attention detail' }),
- ).toHaveClass('h-11', 'w-11', 'sm:h-6', 'sm:w-6');
+ ).toHaveClass('hidden', 'lg:inline-flex');
expect(within(detailRegion).getByRole('button', { name: 'Acknowledge' })).toHaveClass(
'min-h-11',
'sm:min-h-0',
diff --git a/frontend-modern/src/features/patrol/__tests__/patrolInvestigationContextModel.test.ts b/frontend-modern/src/features/patrol/__tests__/patrolInvestigationContextModel.test.ts
index 7277a524ce..cfc2bf2f5f 100644
--- a/frontend-modern/src/features/patrol/__tests__/patrolInvestigationContextModel.test.ts
+++ b/frontend-modern/src/features/patrol/__tests__/patrolInvestigationContextModel.test.ts
@@ -1517,7 +1517,7 @@ describe('Patrol page header IA framing', () => {
expect(workspaceSource).not.toContain('aria-label="Patrol trust summary"');
});
- it('names the proactive trust loop on the canonical Patrol surface when control is available', async () => {
+ it('names the operator job on the canonical Patrol surface when control is available', async () => {
// The Patrol page header is the most visible piece of operator-facing
// copy on the canonical Patrol surface. The IA framing must keep the
// product boundary clear without turning the page header into a
@@ -1525,9 +1525,9 @@ describe('Patrol page header IA framing', () => {
const { getPatrolPageHeaderMeta, PATROL_PAGE_DESCRIPTION, PATROL_PAGE_TITLE_TOOLTIP } =
await import('@/utils/patrolPagePresentation');
expect(PATROL_PAGE_DESCRIPTION).toBe(
- 'Patrol detects operational issues, brings forward the next decision, and records only verified outcomes.',
+ 'See what needs a decision, choose the next step, and keep a verified record.',
);
- expect(PATROL_PAGE_DESCRIPTION).toContain('verified outcomes');
+ expect(PATROL_PAGE_DESCRIPTION).toContain('verified record');
expect(PATROL_PAGE_TITLE_TOOLTIP).toBe(PATROL_PAGE_DESCRIPTION);
expect(getPatrolPageHeaderMeta()).toMatchObject({
title: 'Patrol',
@@ -1536,8 +1536,8 @@ describe('Patrol page header IA framing', () => {
});
expect(getPatrolPageHeaderMeta({ autonomyLocked: true })).toMatchObject({
title: 'Patrol',
- description: 'Continuous infrastructure checks, with every decision kept in your hands.',
- titleTooltip: 'Continuous infrastructure checks, with every decision kept in your hands.',
+ description: PATROL_PAGE_DESCRIPTION,
+ titleTooltip: PATROL_PAGE_DESCRIPTION,
});
});
});
diff --git a/frontend-modern/src/pages/__tests__/AIIntelligence.test.tsx b/frontend-modern/src/pages/__tests__/AIIntelligence.test.tsx
index 6ce5ee3f19..f896c74247 100644
--- a/frontend-modern/src/pages/__tests__/AIIntelligence.test.tsx
+++ b/frontend-modern/src/pages/__tests__/AIIntelligence.test.tsx
@@ -692,7 +692,9 @@ describe('AIIntelligence entitlement gating', () => {
});
expect(
- screen.getByText('Continuous infrastructure checks, with every decision kept in your hands.'),
+ screen.getByText(
+ 'See what needs a decision, choose the next step, and keep a verified record.',
+ ),
).toBeInTheDocument();
expect(
screen.queryByText(
diff --git a/frontend-modern/src/utils/__tests__/patrolPagePresentation.test.ts b/frontend-modern/src/utils/__tests__/patrolPagePresentation.test.ts
index 53b1dfa65d..2722fae0d8 100644
--- a/frontend-modern/src/utils/__tests__/patrolPagePresentation.test.ts
+++ b/frontend-modern/src/utils/__tests__/patrolPagePresentation.test.ts
@@ -15,21 +15,19 @@ describe('patrolPagePresentation', () => {
// users learn the full operations-loop model.
expect(PATROL_PAGE_TITLE).toBe('Patrol');
expect(PATROL_PAGE_DESCRIPTION).toBe(
- 'Patrol detects operational issues, brings forward the next decision, and records only verified outcomes.',
+ 'See what needs a decision, choose the next step, and keep a verified record.',
);
expect(PATROL_PAGE_TITLE_TOOLTIP).toBe(PATROL_PAGE_DESCRIPTION);
expect(getPatrolPageHeaderMeta()).toEqual({
title: 'Patrol',
- description:
- 'Patrol detects operational issues, brings forward the next decision, and records only verified outcomes.',
- titleTooltip:
- 'Patrol detects operational issues, brings forward the next decision, and records only verified outcomes.',
+ description: 'See what needs a decision, choose the next step, and keep a verified record.',
+ titleTooltip: 'See what needs a decision, choose the next step, and keep a verified record.',
});
});
it('separates locked watch-only capability from Pro Watch only mode', () => {
expect(PATROL_PAGE_WATCH_ONLY_DESCRIPTION).toBe(
- 'Continuous infrastructure checks, with every decision kept in your hands.',
+ 'See what needs a decision, choose the next step, and keep a verified record.',
);
expect(PATROL_PAGE_MONITOR_DESCRIPTION).toBe(
'Watch only: Patrol checks your estate and brings every current issue to you.',
diff --git a/frontend-modern/src/utils/patrolPagePresentation.ts b/frontend-modern/src/utils/patrolPagePresentation.ts
index 38fd8cd6ba..015c9d1972 100644
--- a/frontend-modern/src/utils/patrolPagePresentation.ts
+++ b/frontend-modern/src/utils/patrolPagePresentation.ts
@@ -3,13 +3,13 @@ import type { PatrolAutonomyLevel } from '@/api/patrol';
export const PATROL_PAGE_TITLE = 'Patrol';
export const PATROL_PAGE_WATCH_ONLY_DESCRIPTION =
- 'Continuous infrastructure checks, with every decision kept in your hands.';
+ 'See what needs a decision, choose the next step, and keep a verified record.';
export const PATROL_PAGE_MONITOR_DESCRIPTION =
'Watch only: Patrol checks your estate and brings every current issue to you.';
export const PATROL_PAGE_DESCRIPTION =
- 'Patrol detects operational issues, brings forward the next decision, and records only verified outcomes.';
+ 'See what needs a decision, choose the next step, and keep a verified record.';
export const PATROL_PAGE_TITLE_TOOLTIP = PATROL_PAGE_DESCRIPTION;
export interface PatrolPageHeaderMetaInput {
diff --git a/tests/integration/tests/91-operational-trust-attention-workbench.spec.ts b/tests/integration/tests/91-operational-trust-attention-workbench.spec.ts
index d01351d5af..18a351560e 100644
--- a/tests/integration/tests/91-operational-trust-attention-workbench.spec.ts
+++ b/tests/integration/tests/91-operational-trust-attention-workbench.spec.ts
@@ -787,9 +787,11 @@ test("makes active operational work primary and preserves the evidence boundary"
detailPanel.getByRole("button", { name: "Acknowledge" }),
).toBeVisible();
- await detailPanel
- .getByRole("button", { name: "Close attention detail" })
- .click();
+ const closeDetailButton =
+ (page.viewportSize()?.width ?? 1280) < 1024
+ ? detailPanel.getByRole("button", { name: "Back to attention list" })
+ : detailPanel.getByRole("button", { name: "Close attention detail" });
+ await closeDetailButton.click();
await expect(itemButton).toBeFocused();
await expect(page).not.toHaveURL(/attention=/);
});
@@ -816,6 +818,10 @@ test("puts the selected detail in view on a phone without page overflow", async
"Open the node and verify which workload is consuming CPU before making changes.",
),
).toBeVisible();
+ const backToList = detailPanel.getByRole("button", {
+ name: "Back to attention list",
+ });
+ await expect(backToList).toBeVisible();
const overflows = await page.evaluate(
() =>
document.documentElement.scrollWidth >
@@ -823,6 +829,12 @@ test("puts the selected detail in view on a phone without page overflow", async
);
expect(overflows).toBeFalsy();
+ await backToList.click();
+ await expect(itemButton).toBeFocused();
+ await expect(page).not.toHaveURL(/attention=/);
+
+ await itemButton.click();
+
await page.reload({ waitUntil: "domcontentloaded" });
await expect(
page.getByRole("complementary", { name: "CPU pressure on pve-main" }),