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.

Keep attention visible beside blocked Patrol setup

pulse-triage[bot]3829d91456fe
diff --git a/docs/release-control/v6/internal/subsystems/api-contracts.md b/docs/release-control/v6/internal/subsystems/api-contracts.md
index 14b2c0078b..6fc7313fb2 100644
--- a/docs/release-control/v6/internal/subsystems/api-contracts.md
+++ b/docs/release-control/v6/internal/subsystems/api-contracts.md
@@ -319,6 +319,11 @@ collapse evidence, protection posture, and lifecycle history, but it must not
drop those typed fields or replace their server-authored trust state. Decision,
finding, and approval counts remain distinct API projections and must not be
presented as interchangeable totals.
+The attention list's authenticated read contract is independent of Patrol's
+model-readiness and on/off state. `PatrolIntelligenceSurface.tsx` must not gate
+the attention transport or its canonical list on `shouldShowPatrolSetupOnly`;
+the setup task remains a separate runtime projection above it. This changes no
+attention route, response shape, token scope, or mutation authority.
Physical-disk payloads preserve optional SMART counter presence, including
explicit zero values, and expose provider vendor metadata without converting
missing data into health. Unified-resource clients may request bounded server
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index 2cf20966f1..6c18bd3f05 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -3335,6 +3335,11 @@ confirmation note or rule reason is a `FormTextarea`, and the alert-only
guidance link is a `ButtonLink`. `PatrolIntelligenceSurface.tsx` passes the
Patrol findings accessor into the workbench; the workbench does not fetch or
poll findings itself.
+The feature shell keeps the independent attention workbench mounted when
+Patrol is off or its model needs setup, while retaining the existing setup task
+above it. Desktop and narrow browser checks must show the task and attention
+list together, then allow a selected decision to open and return without
+changing the disabled Patrol controls or overflowing the viewport.
The objective brief and optional-context fields in `PatrolObjectivesPanel`
share the same `FormTextarea` ownership contract.
diff --git a/docs/release-control/v6/internal/subsystems/patrol-intelligence.md b/docs/release-control/v6/internal/subsystems/patrol-intelligence.md
index 4d9ff34dab..d624549692 100644
--- a/docs/release-control/v6/internal/subsystems/patrol-intelligence.md
+++ b/docs/release-control/v6/internal/subsystems/patrol-intelligence.md
@@ -375,6 +375,11 @@ or historical proof/counting for resolved-only work.
chips, loop-state chips, recurrence badges, expand chevrons, or finding
filters in this state because those controls do not help the operator fix
Patrol setup.
+ The operational attention Inbox is independent of Patrol model readiness and
+ its on/off switch. Keep that attention workbench available below the focused
+ setup task when Patrol is off or its model needs setup; do not discard the
+ setup task, turn a runtime finding into an infrastructure decision, or
+ enable disabled Patrol controls merely to expose the independent queue.
The Patrol page must not expose a generic Details/supporting-context evidence
panel for nearby activity, learned correlations, or policy buckets. Those
payloads may still feed Assistant context, backend investigation, and explicit
diff --git a/frontend-modern/browser-tests/patrol-off-attention-2257.cjs b/frontend-modern/browser-tests/patrol-off-attention-2257.cjs
new file mode 100644
index 0000000000..360e79bea2
--- /dev/null
+++ b/frontend-modern/browser-tests/patrol-off-attention-2257.cjs
@@ -0,0 +1,111 @@
+// #2257: the real Patrol page must retain its setup task and independent
+// attention inbox when Patrol is off. Only API responses are synthetic.
+const assert = require('node:assert/strict');
+const path = require('node:path');
+const { chromium } = require('playwright');
+
+(async () => {
+ const root = '/workspace/frontend-modern';
+ process.chdir(root);
+ const { createServer } = await import(path.join(root, 'node_modules/vite/dist/node/index.js'));
+ const server = await createServer({
+ root,
+ configFile: path.join(root, 'vite.config.ts'),
+ server: { host: '127.0.0.1', port: 5207, strictPort: true },
+ });
+ let browser;
+ try {
+ await server.listen();
+ browser = await chromium.launch({ headless: true, channel: 'chromium', args: ['--no-sandbox'] });
+ const seen = [];
+ const item = {
+ id: 'record-1', operationalRecordId: 'record-1', subjectResourceId: 'pve:vm:101',
+ subjectResourceName: 'Database VM', subjectResourceType: 'vm', kind: 'disk',
+ title: 'Disk pressure on Database VM',
+ plainLanguageSummary: 'The database disk is nearly full.', severity: 'critical',
+ state: 'open', firstObservedAt: '2026-09-26T18:00:00Z',
+ lastObservedAt: '2026-09-26T18:00:00Z', evidenceFreshness: 'fresh',
+ evidenceCompleteness: 'complete', impact: 'Writes may fail.',
+ relatedResources: [], recommendedNextStep: 'Free disk space or expand the volume.',
+ availableActions: [], verificationState: 'not_available',
+ };
+ const summary = { activeCount: 1, openCount: 1, acknowledgedCount: 0,
+ suppressedCount: 0, uncertainCount: 0, resolvedCount: 0,
+ calm: false, coverageState: 'current', evaluatedAt: '2026-09-26T18:00:00Z' };
+ for (const width of [1440, 390]) {
+ const pageErrors = [];
+ const page = await browser.newPage({ viewport: { width, height: width === 390 ? 844 : 900 } });
+ page.on('pageerror', (error) => pageErrors.push(error.message));
+ await page.routeWebSocket(/\/ws(?:\?|$)/, () => {});
+ await page.route('**/*', (route) => {
+ const url = new URL(route.request().url());
+ if (url.origin !== 'http://127.0.0.1:5207') return route.abort();
+ const p = url.pathname;
+ if (!p.startsWith('/api/')) return route.continue();
+ seen.push(p);
+ let json = {};
+ if (p === '/api/settings/ai') json = { patrol_enabled: false,
+ patrol_readiness: { status: 'not_ready', ready: false,
+ summary: 'The selected Patrol model cannot run tools.', cause: 'model_tool_check' } };
+ else if (p === '/api/ai/patrol/status') json = { enabled: false,
+ runtime_state: 'disabled', running: false, readiness: { status: 'not_ready', ready: false,
+ summary: 'The selected Patrol model cannot run tools.', cause: 'model_tool_check' },
+ summary: { active: 0, critical: 0, warning: 0, info: 0 } };
+ else if (p === '/api/ai/patrol/attention') json = { data: [item], summary,
+ meta: { page: 1, limit: 50, total: 1, totalPages: 1 } };
+ else if (p === '/api/ai/patrol/attention/summary') json = summary;
+ else if (p === '/api/ai/patrol/attention/record-1') json = {
+ item, operationalRecord: { id: item.id, kind: item.kind, state: item.state,
+ severity: item.severity, title: item.title, subjectResourceId: item.subjectResourceId,
+ subjectResourceName: item.subjectResourceName, createdAt: item.firstObservedAt,
+ updatedAt: item.lastObservedAt }, timeline: [], evidence: [] };
+ else if (p === '/api/ai/patrol/autonomy') json = {
+ autonomy_level: 'monitor', full_mode_unlocked: false };
+ else if (p === '/api/ai/patrol/findings' || p === '/api/ai/patrol/runs') json = [];
+ else if (p === '/api/ai/unified/findings') json = { findings: [] };
+ else if (p === '/api/ai/approvals') json = { approvals: [] };
+ else if (p === '/api/ai/models') json = { models: [] };
+ else if (p === '/api/license/runtime-capabilities') json = { capabilities: ['ai_patrol'],
+ limits: [], hosted_mode: false, max_history_days: 7,
+ runtime: { build: 'community', label: 'Pulse Community runtime' }, blocked_capabilities: [] };
+ return route.fulfill({ json });
+ });
+ await page.goto('http://127.0.0.1:5207/browser-tests/patrol-off-attention-2257.html', {
+ waitUntil: 'domcontentloaded', timeout: 120_000,
+ });
+ await page.getByRole('heading', { name: 'Patrol needs setup' }).waitFor();
+ await page.getByRole('region', { name: 'Patrol decision inbox' }).waitFor();
+ await page.getByText('Database VM · Disk pressure').waitFor();
+ assert.equal(await page.getByRole('button', { name: 'Toggle Patrol' }).getAttribute('aria-pressed'), 'false');
+ await page.waitForTimeout(350);
+ await page.screenshot({ path: path.join(root, 'browser-tests', `patrol-off-attention-2257-list-${width}.png`),
+ fullPage: true });
+ await page.getByRole('button', { name: 'Start review' }).click();
+ await page.getByRole('heading', { name: 'Database VM · Disk pressure' }).waitFor();
+ await page.getByText('Writes may fail.').waitFor();
+ await page.screenshot({ path: path.join(root, 'browser-tests', `patrol-off-attention-2257-${width}.png`),
+ fullPage: true });
+ const dimensions = await page.evaluate(() => ({ scroll: document.documentElement.scrollWidth,
+ inner: window.innerWidth }));
+ assert.ok(dimensions.scroll <= dimensions.inner + 1,
+ `${width}px horizontal overflow: ${JSON.stringify(dimensions)}`);
+ assert.deepEqual(pageErrors, [], `browser errors at ${width}px`);
+ await page.getByRole('button', {
+ name: width === 390 ? 'Back to attention list' : 'Close attention detail',
+ }).click();
+ await page.getByRole('button', { name: 'Start review' }).waitFor();
+ await page.goto('http://127.0.0.1:5207/browser-tests/patrol-off-attention-2257.html', {
+ waitUntil: 'domcontentloaded',
+ });
+ await page.getByRole('heading', { name: 'Patrol needs setup' }).waitFor();
+ await page.getByText('Database VM · Disk pressure').waitFor();
+ await page.close();
+ }
+ assert.ok(seen.includes('/api/ai/patrol/status'));
+ assert.ok(seen.includes('/api/ai/patrol/attention'));
+ console.log(JSON.stringify({ result: 'passed', browser: browser.version(), viewports: [1440, 390] }));
+ } finally {
+ if (browser) await browser.close();
+ await server.close();
+ }
+})().catch((error) => { console.error(error); process.exitCode = 1; });
diff --git a/frontend-modern/browser-tests/patrol-off-attention-2257.html b/frontend-modern/browser-tests/patrol-off-attention-2257.html
new file mode 100644
index 0000000000..b4d3b34b51
--- /dev/null
+++ b/frontend-modern/browser-tests/patrol-off-attention-2257.html
@@ -0,0 +1,8 @@
+<!doctype html>
+<html lang="en">
+ <head><meta charset="UTF-8" /><meta name="viewport" content="width=device-width, initial-scale=1" /></head>
+ <body>
+ <div id="root"></div>
+ <script type="module" src="/browser-tests/patrol-off-attention-2257.tsx"></script>
+ </body>
+</html>
diff --git a/frontend-modern/browser-tests/patrol-off-attention-2257.tsx b/frontend-modern/browser-tests/patrol-off-attention-2257.tsx
new file mode 100644
index 0000000000..dd1bd006e4
--- /dev/null
+++ b/frontend-modern/browser-tests/patrol-off-attention-2257.tsx
@@ -0,0 +1,16 @@
+// Mount the production Patrol surface under a local Router; the browser script
+// supplies bounded API responses for the off/setup and attention states.
+import { Route, Router } from '@solidjs/router';
+import { render } from 'solid-js/web';
+import { PatrolIntelligenceSurface } from '../src/features/patrol/PatrolIntelligenceSurface';
+import '../src/index.css';
+
+render(() => (
+ <Router>
+ <Route path="*" component={() => (
+ <main class="mx-auto max-w-6xl p-4">
+ <PatrolIntelligenceSurface />
+ </main>
+ )} />
+ </Router>
+), document.getElementById('root')!);
diff --git a/frontend-modern/browser-verification.json b/frontend-modern/browser-verification.json
index e5e7e94fc1..b252c21f8b 100644
--- a/frontend-modern/browser-verification.json
+++ b/frontend-modern/browser-verification.json
@@ -1,18 +1,16 @@
{
"version": 1,
- "base_sha": "e3b1e80c9329bb897d37f82c1ff190a4c95dc9b3",
- "verified_at": "2026-09-26T19:03:18Z",
+ "base_sha": "c6bc5704395d6cdf10505ef89103278eb43a785c",
+ "verified_at": "2026-09-26T19:16:44Z",
"result": "passed",
"changed_paths": [
- "frontend-modern/src/components/Settings/SSOProvidersPanel.tsx",
- "frontend-modern/src/components/Settings/ssoProvidersModel.ts"
+ "frontend-modern/src/features/patrol/PatrolIntelligenceSurface.tsx"
],
"content_sha256": {
- "frontend-modern/src/components/Settings/SSOProvidersPanel.tsx": "781cbb8913f42008456afa7701351c4828aabc140c9e35595c47fd2330bca0cf",
- "frontend-modern/src/components/Settings/ssoProvidersModel.ts": "9f10845e553633d73bff7ac5fb295d4ce5cc0c4250d0eef1bac2ce18bb31ef2c"
+ "frontend-modern/src/features/patrol/PatrolIntelligenceSurface.tsx": "83dfb9eefe57064111244b2fef8e059b02000e5b07844335c0577516b599bf44"
},
"routes": [
- "/browser-tests/sso-mappings-2266.html"
+ "/browser-tests/patrol-off-attention-2257.html"
],
"viewports": [
{
@@ -25,15 +23,16 @@
}
],
"states": [
- "Existing OIDC provider loaded with Server Access=admin from provider detail; edit dialog access restrictions opened",
- "Mapping edited to add Everyone=viewer on a new line, saved by PUT, reopened from provider detail as Server Access=admin, Everyone=viewer",
- "Desktop and phone screenshots inspected with the mapping field focused and visible; no clipping or horizontal overflow"
+ "Patrol off with model setup blocked: focused setup task and one independent active attention decision both visible",
+ "Attention list and selected Database VM disk-pressure detail on desktop and phone, then return to list",
+ "Fixture page remounted after closing detail: setup task and attention decision remain visible",
+ "Desktop and phone list/detail screenshots inspected after toggle settled off; no clipping or horizontal overflow"
],
"interactions": [
- "Open production SSOProvidersPanel edit dialog and expand access restrictions at both widths",
- "Edit the deepest Group Role Mappings textarea, save, and reopen to verify persisted multi-word group; assert unchanged OIDC scope list",
- "Scroll and focus the mapping field within the dialog; inspect its bounding box and rendered pixels, then close with Escape"
+ "Load production PatrolIntelligenceSurface in Chromium with a bounded synthetic API and assert the off toggle is aria-pressed=false",
+ "Open Start review, inspect affected resource, consequence and next step, then close detail with the desktop close button or phone Back to list",
+ "Remount the fixture and verify the setup task and independent attention queue persist; inspect four responsive screenshots"
],
- "command": "pulse-worker-browser frontend-modern/browser-tests/sso-mappings-2266.cjs (Playwright 1.56.1, Chromium 141.0.7390.37)",
- "notes": "Synthetic API fixture around the production panel; no live Cloudflare/Google Workspace sign-in, installed instance, containing release or reporter confirmation is claimed. Screenshots and browser log are retained in the lane output directory."
+ "command": "pulse-worker-browser frontend-modern/browser-tests/patrol-off-attention-2257.cjs (Playwright 1.56.1, Chromium 141.0.7390.37)",
+ "notes": "The production Patrol surface uses fixture API responses, not a live Patrol install. No provider acceptance, source integration, containing release or field retest is claimed. Screenshots and log are retained in this lane output directory."
}
diff --git a/frontend-modern/src/features/patrol/PatrolIntelligenceSurface.tsx b/frontend-modern/src/features/patrol/PatrolIntelligenceSurface.tsx
index 6edec6a1e8..b889640323 100644
--- a/frontend-modern/src/features/patrol/PatrolIntelligenceSurface.tsx
+++ b/frontend-modern/src/features/patrol/PatrolIntelligenceSurface.tsx
@@ -97,25 +97,21 @@ export function PatrolIntelligenceSurface() {
</div>
<Show when={activeView() === 'inbox'}>
- <div id="patrol-inbox-panel" role="tabpanel" aria-labelledby="patrol-inbox-tab">
- <Show
- when={!state.shouldShowPatrolSetupOnly()}
- fallback={
- <div
- class={`rounded-lg border border-border bg-surface p-4 sm:p-5 ${!state.patrolEnabledLocal() ? 'pointer-events-none opacity-50' : ''}`}
- >
- <PatrolIntelligenceWorkspace state={state} />
- </div>
- }
- >
- <PatrolAttentionWorkbench
- autonomyLevel={state.autonomyLevel()}
- autonomyLocked={state.autoFixLocked()}
- pendingActionCount={actionInboxStore.pendingActionCount}
- onOpenFindings={openFindings}
- findings={() => aiIntelligenceStore.patrolFindings}
- />
+ <div id="patrol-inbox-panel" role="tabpanel" aria-labelledby="patrol-inbox-tab" class="space-y-4">
+ <Show when={state.shouldShowPatrolSetupOnly()}>
+ <div
+ class={`rounded-lg border border-border bg-surface p-4 sm:p-5 ${!state.patrolEnabledLocal() ? 'pointer-events-none opacity-50' : ''}`}
+ >
+ <PatrolIntelligenceWorkspace state={state} />
+ </div>
</Show>
+ <PatrolAttentionWorkbench
+ autonomyLevel={state.autonomyLevel()}
+ autonomyLocked={state.autoFixLocked()}
+ pendingActionCount={actionInboxStore.pendingActionCount}
+ onOpenFindings={openFindings}
+ findings={() => aiIntelligenceStore.patrolFindings}
+ />
</div>
</Show>
diff --git a/frontend-modern/src/features/patrol/__tests__/PatrolIntelligenceSurface.test.tsx b/frontend-modern/src/features/patrol/__tests__/PatrolIntelligenceSurface.test.tsx
index 07696612ec..52b80b17d5 100644
--- a/frontend-modern/src/features/patrol/__tests__/PatrolIntelligenceSurface.test.tsx
+++ b/frontend-modern/src/features/patrol/__tests__/PatrolIntelligenceSurface.test.tsx
@@ -4,10 +4,12 @@ import { afterEach, describe, expect, it, vi } from 'vitest';
import { PatrolIntelligenceSurface } from '../PatrolIntelligenceSurface';
+const patrolState = vi.hoisted(() => ({ setupOnly: false, enabled: true }));
+
vi.mock('../usePatrolIntelligenceState', () => ({
usePatrolIntelligenceState: () => ({
- shouldShowPatrolSetupOnly: () => false,
- patrolEnabledLocal: () => true,
+ shouldShowPatrolSetupOnly: () => patrolState.setupOnly,
+ patrolEnabledLocal: () => patrolState.enabled,
setActiveTab: vi.fn(),
setSelectedRun: vi.fn(),
setFindingsFilterOverride: vi.fn(),
@@ -73,7 +75,23 @@ vi.mock('@/components/shared/MetadataBadge', () => ({
}));
describe('PatrolIntelligenceSurface finding handoff', () => {
- afterEach(() => cleanup());
+ afterEach(() => {
+ cleanup();
+ patrolState.setupOnly = false;
+ patrolState.enabled = true;
+ });
+
+ it('keeps the independent attention inbox beside the setup task when Patrol is off', () => {
+ patrolState.setupOnly = true;
+ patrolState.enabled = false;
+
+ render(() => <PatrolIntelligenceSurface />);
+
+ expect(screen.getByRole('tab', { name: 'Inbox' })).toHaveAttribute('aria-selected', 'true');
+ expect(screen.getByRole('button', { name: 'Open scoped finding options' })).toBeInTheDocument();
+ expect(screen.getByTestId('patrol-workspace')).toBeInTheDocument();
+ expect(screen.getByTestId('patrol-workspace').parentElement).toHaveClass('pointer-events-none');
+ });
it('keeps the selected decision resource in context and lets the operator broaden the list', () => {
render(() => <PatrolIntelligenceSurface />);
diff --git a/frontend-modern/src/pages/__tests__/AIIntelligence.test.tsx b/frontend-modern/src/pages/__tests__/AIIntelligence.test.tsx
index 2e0add29d8..2b59fa2098 100644
--- a/frontend-modern/src/pages/__tests__/AIIntelligence.test.tsx
+++ b/frontend-modern/src/pages/__tests__/AIIntelligence.test.tsx
@@ -2066,7 +2066,7 @@ describe('AIIntelligence entitlement gating', () => {
expect(screen.queryByTestId('patrol-status-bar')).not.toBeInTheDocument();
expect(screen.queryByRole('heading', { name: 'Open work' })).not.toBeInTheDocument();
- expect(screen.queryByRole('region', { name: 'Patrol decision inbox' })).not.toBeInTheDocument();
+ expect(screen.getByRole('region', { name: 'Patrol decision inbox' })).toBeInTheDocument();
expect(screen.queryByRole('button', { name: 'Active' })).not.toBeInTheDocument();
expect(screen.queryByRole('button', { name: 'All' })).not.toBeInTheDocument();
expect(screen.queryByRole('button', { name: 'Resolved' })).not.toBeInTheDocument();