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.

Simplify Patrol Assistant handoffs

rcourtman376b2f80fc30
diff --git a/docs/release-control/v6/internal/status.json b/docs/release-control/v6/internal/status.json
index 8945289fb2..7f8340cdc0 100644
--- a/docs/release-control/v6/internal/status.json
+++ b/docs/release-control/v6/internal/status.json
@@ -2741,6 +2741,122 @@
"kind": "file"
}
]
+ },
+ {
+ "id": "RA28",
+ "summary": "Pulse Patrol remains a simple scheduled LLM probe and governance surface: Pulse supplies observed infrastructure context, evidence, policy posture, approval state, and governed execution boundaries, while the configured LLM owns diagnosis and remediation reasoning. Patrol UI and Assistant handoffs must not present Patrol-authored remediation plans, internal step lists, command summaries, or suggested prompt chips as the answer.",
+ "kind": "invariant",
+ "blocking_level": "repo-ready",
+ "proof_type": "automated",
+ "lane_ids": [
+ "L6",
+ "L8",
+ "L20",
+ "L23"
+ ],
+ "subsystem_ids": [
+ "ai-runtime",
+ "api-contracts",
+ "frontend-primitives",
+ "patrol-intelligence"
+ ],
+ "release_gate_ids": [],
+ "proof_commands": [
+ {
+ "id": "patrol-assistant-compact-briefing-tests",
+ "run": [
+ "npm",
+ "--prefix",
+ "frontend-modern",
+ "test",
+ "--",
+ "--run",
+ "src/components/AI/Chat/__tests__/AIChat.test.tsx",
+ "src/features/patrol/__tests__/patrolInvestigationContextModel.test.ts",
+ "src/components/patrol/__tests__/ApprovalSection.test.tsx",
+ "src/components/AI/__tests__/FindingsPanel.test.ts",
+ "src/components/AI/__tests__/FindingsPanel.capacityForecast.test.tsx",
+ "src/utils/__tests__/patrolPagePresentation.test.ts"
+ ]
+ }
+ ],
+ "evidence": [
+ {
+ "repo": "pulse",
+ "path": "docs/release-control/v6/internal/status.json",
+ "kind": "file"
+ },
+ {
+ "repo": "pulse",
+ "path": "docs/release-control/v6/internal/subsystems/ai-runtime.md",
+ "kind": "file"
+ },
+ {
+ "repo": "pulse",
+ "path": "docs/release-control/v6/internal/subsystems/api-contracts.md",
+ "kind": "file"
+ },
+ {
+ "repo": "pulse",
+ "path": "docs/release-control/v6/internal/subsystems/frontend-primitives.md",
+ "kind": "file"
+ },
+ {
+ "repo": "pulse",
+ "path": "docs/release-control/v6/internal/subsystems/patrol-intelligence.md",
+ "kind": "file"
+ },
+ {
+ "repo": "pulse",
+ "path": "frontend-modern/src/components/AI/__tests__/FindingsPanel.capacityForecast.test.tsx",
+ "kind": "file"
+ },
+ {
+ "repo": "pulse",
+ "path": "frontend-modern/src/components/AI/__tests__/FindingsPanel.test.ts",
+ "kind": "file"
+ },
+ {
+ "repo": "pulse",
+ "path": "frontend-modern/src/components/AI/Chat/__tests__/AIChat.test.tsx",
+ "kind": "file"
+ },
+ {
+ "repo": "pulse",
+ "path": "frontend-modern/src/components/AI/Chat/index.tsx",
+ "kind": "file"
+ },
+ {
+ "repo": "pulse",
+ "path": "frontend-modern/src/components/AI/FindingsPanel.tsx",
+ "kind": "file"
+ },
+ {
+ "repo": "pulse",
+ "path": "frontend-modern/src/components/patrol/__tests__/ApprovalSection.test.tsx",
+ "kind": "file"
+ },
+ {
+ "repo": "pulse",
+ "path": "frontend-modern/src/features/patrol/__tests__/patrolInvestigationContextModel.test.ts",
+ "kind": "file"
+ },
+ {
+ "repo": "pulse",
+ "path": "frontend-modern/src/features/patrol/patrolInvestigationContextModel.ts",
+ "kind": "file"
+ },
+ {
+ "repo": "pulse",
+ "path": "frontend-modern/src/utils/__tests__/patrolPagePresentation.test.ts",
+ "kind": "file"
+ },
+ {
+ "repo": "pulse",
+ "path": "frontend-modern/src/utils/patrolPagePresentation.ts",
+ "kind": "file"
+ }
+ ]
}
],
"evidence_reference_policy": {
diff --git a/docs/release-control/v6/internal/subsystems/ai-runtime.md b/docs/release-control/v6/internal/subsystems/ai-runtime.md
index 9570112853..d336de283b 100644
--- a/docs/release-control/v6/internal/subsystems/ai-runtime.md
+++ b/docs/release-control/v6/internal/subsystems/ai-runtime.md
@@ -92,10 +92,12 @@ runtime cost control, and shared AI transport surfaces.
and meaningful badge text rather than icon title duplication. Scoped
approval handoffs sourced from Patrol, active alerts, or alert incident
timelines must render as source-named investigation handoffs in the drawer
- instead of generic dashboard briefs. Source-owned handoff helpers may attach
- bounded suggested prompts to that briefing, but those prompts are only input
- starters; they must not auto-submit, bypass approval mode, or carry raw
- command payloads. Patrol assessment handoffs must use the same
+ instead of generic dashboard briefs. Source-owned handoff helpers may retain
+ bounded prompt and action metadata for model/request context, but the drawer
+ presentation must stay compact: source, status, one primary subject, and an
+ optional safe route link. It must not render Patrol-authored remediation
+ steps, evidence chips, command summaries, or suggested-prompt chips as the
+ answer. Patrol assessment handoffs must use the same
`patrol-assessment` target identity for live opens and restored sessions
rather than inheriting retired dashboard context. While such a handoff is
attached, the Assistant empty
@@ -484,12 +486,16 @@ runtime cost control, and shared AI transport surfaces.
does not yet carry the latest approval ID. Those references are review
context only: they must not include raw command text, must not grant
approval or execution authority, and must route any operator decision back
- through the governed approval/remediation flow. The operator briefing's
- decision and action-posture text must derive from those same structured
- action references after live-approval recovery, including safe current
- status, request/expiry timestamps, approval policy, action plan identity,
- plan expiry, and dry-run posture, so Assistant does not tell the operator
- that no governed action is ready while a recovered approval is present.
+ through the governed approval/remediation flow. Patrol provides the
+ configured LLM with observed finding context, evidence, policy posture, and
+ governed action state; the LLM owns diagnosis and remediation reasoning.
+ Operator-visible handoffs must not describe Patrol as having already
+ authored the correct remediation. The operator briefing's decision and
+ action-posture text must derive from those same structured action
+ references after live-approval recovery, including safe current status,
+ request/expiry timestamps, approval policy, action plan identity, plan
+ expiry, and dry-run posture, so Assistant does not tell the operator that no
+ governed action is ready while a recovered approval is present.
When those references include an approval ID, Assistant runtime may refresh
a current status snapshot from the canonical approval store on each turn,
but it must enforce org scoping and still omit the approval command payload.
@@ -586,11 +592,10 @@ runtime cost control, and shared AI transport surfaces.
Safe route-owned briefing actions may render as app links when the handoff
includes an `actionHref`, but those links are navigation guidance only and
do not grant tool execution or approval authority.
- When the drawer renders a request-local approval-required banner for a
- scoped handoff, the banner must derive its subject from the attached
- briefing or structured finding context, so Patrol approval/finding handoffs
- and alert-investigation handoffs are named by their source rather than as
- generic dashboard briefs.
+ Request-local approval-required scoped handoffs must present that boundary
+ through compact source-named drawer state and the effective control label,
+ so Patrol approval/finding handoffs and alert-investigation handoffs are
+ named by their source rather than as generic dashboard briefs.
## Current State
diff --git a/docs/release-control/v6/internal/subsystems/api-contracts.md b/docs/release-control/v6/internal/subsystems/api-contracts.md
index c06d48499e..dff3ba8b6e 100644
--- a/docs/release-control/v6/internal/subsystems/api-contracts.md
+++ b/docs/release-control/v6/internal/subsystems/api-contracts.md
@@ -1143,9 +1143,10 @@ the canonical monitored-system blocked payload.
`PatrolIntelligenceHeader` shell on the Patrol API surface reads
the title, description, and title tooltip from
`getPatrolPageHeaderMeta()` rather than carrying inline copy, so the
- operator-facing framing of what Patrol does (proactive
- investigation, evidence capture, governed action) stays tied to the
- contract instead of drifting between hover and inline.
+ operator-facing framing of what Patrol owns (scheduled probing,
+ context assembly for the configured model, and approval-bound action)
+ stays tied to the contract instead of drifting between hover and
+ inline.
The Patrol page must not introduce header or workspace trust strips over
this payload. High-signal trust facts from
`state.patrolStatus()?.trust` (the `FindingsTrustSummary` block already
@@ -3828,13 +3829,15 @@ approval list payloads only as safe metadata for that visible briefing and any
Patrol approval-row Assistant prompts must use the same safe metadata boundary
and set `autonomousMode:false` for the request-local chat handoff; they must not
paste raw approval or proposed-fix command text into the authored chat prompt.
-Patrol remediation-plan Assistant prompts must also pass only safe plan metadata,
-step labels, risk/status, and command counts; raw plan command and rollback
-command payloads remain owned by the governed remediation/action APIs and panels.
-Frontend Assistant briefing suggested prompts for those finding and plan
-handoffs must stay bounded to safe operator questions about evidence,
+Patrol remediation-plan or action-artifact Assistant prompts must pass only safe
+status, risk, description, and command-count posture as non-authoritative context
+for the configured LLM to critique; raw plan command and rollback command
+payloads remain owned by the governed remediation/action APIs and panels. The
+frontend Assistant drawer must not turn those artifacts into visible Patrol step
+lists, suggested-prompt chips, or a "plan attached" answer. Evidence,
confidence, approval risk, prerequisites, recurrence, rollback, and verification
-rather than becoming another place to serialize executable action details.
+belong in model-only context or governed approval surfaces unless the operator
+explicitly asks the LLM for them.
Patrol run-history serialization and persistence must also preserve full field
parity across API responses and restart boundaries, including
`pmg_checked`, `rejected_findings`, `triage_flags`, `triage_skipped_llm`, and
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index 066b2a1fa0..592dfe829f 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -1074,15 +1074,13 @@ prompt explain the same operator-facing priority.
The
drawer may render a generic
context-briefing band from `frontend-modern/src/stores/aiChat.ts`, but
- feature-owned helpers must provide the source labels, attention reason,
- evidence summaries, operator-decision copy, action copy, safety note, and
- any bounded suggested prompts. Suggested prompts may fill the drawer input
- for the operator, but they must not submit automatically or change the
- request-local approval-required mode. Patrol finding and remediation-plan
- suggested prompts must be derived from safe briefing metadata such as
- evidence, confidence, approval risk, prerequisites, recurrence, rollback,
- and verification posture; they must not become another primitive path for
- raw approval, command, or rollback command payload text. Missing-detail
+ feature-owned helpers must provide compact source labels, primary subject,
+ status, and any safe route action while keeping attention reason, evidence
+ summaries, operator-decision copy, safety notes, and prompt suggestions in
+ model-only or governed action context unless the operator asks for them.
+ Patrol finding and action-artifact handoffs must not render suggested prompt
+ chips in the drawer and must not become another primitive path for raw
+ approval, command, or rollback command payload text. Missing-detail
queued-fix recovery actions must still provide the feature-owned Patrol
briefing and request-local approval-required posture rather than opening the
shared drawer as context-free generic Assistant chat. If a feature-owned
@@ -1102,12 +1100,12 @@ prompt explain the same operator-facing priority.
counts when available; raw approval commands remain owned by the governed
approval/remediation panels. If the generic finding-level helper hydrates
latest investigation detail to recover proposed-fix context, it may pass only
- safe summary fields and command counts into the drawer briefing. The shared
- approval-required drawer banner must derive its subject from that briefing or
- structured finding context, so
- Patrol handoffs render as Patrol handoffs or Patrol findings, and alert
- handoffs render as alert investigations, rather than generic dashboard
- briefs. Patrol approval-row Assistant prompts must route through the same
+ safe summary fields and command counts into the drawer briefing. Shared
+ approval-required posture must derive its subject from that briefing or
+ structured finding context, so Patrol handoffs render as Patrol handoffs or
+ Patrol findings, and alert handoffs render as alert investigations, rather
+ than generic dashboard briefs. Patrol approval-row Assistant prompts must
+ route through the same
feature-owned finding handoff helper rather than hand-written prompt-only
drawer opens: safe approval metadata, proposed-fix summaries, resource
references, and bounded `handoff_actions` may enter the prompt and context,
@@ -1339,8 +1337,8 @@ The Patrol page header copy lives in a single canonical helper at
tooltip on `PatrolIntelligenceHeader.tsx` must read from
`PATROL_PAGE_TITLE_TOOLTIP` exported alongside the description rather
than carrying an inline copy, so hover and inline never drift apart on
-what Patrol actually does (proactive investigation, evidence capture,
-governed action under operator approval).
+what Patrol actually owns: scheduled probing, context assembly for the
+configured model, and approval-bound action.
The same `PatrolIntelligenceHeader.tsx` shell also renders a compact
trust-at-a-glance summary directly under the page title (a
render-only consumer of `state.patrolStatus()?.trust`), gated on at
@@ -1369,15 +1367,18 @@ that mention the Infrastructure settings destination now consume
`frontend-modern/src/utils/infrastructureSettingsPresentation.ts` for the
canonical `Settings → Infrastructure` label and source-strategy copy. Shared
primitives must not fork that string or revive removed nested route labels.
-The shared Assistant drawer owns source-named approval banners for governed
-handoffs. Patrol handoffs render as Patrol, and alert plus alert incident
-timeline handoffs render as alert investigations rather than dashboard briefs.
-Those same drawer handoffs may carry model-only chat context and resource
-references to the backend, but the drawer remains a presentation and transport
-owner rather than the source of approval or execution truth. If a feature-owned
-briefing includes a safe route-owned `actionHref`, the drawer may render the
-briefing action label as a normal app link; that link is navigation guidance
-only and must not become approval or execution authority.
+The shared Assistant drawer owns compact source-named approval posture for
+governed handoffs. Patrol handoffs render as Patrol, and alert plus alert
+incident timeline handoffs render as alert investigations rather than dashboard
+briefs. Those same drawer handoffs may carry model-only chat context and
+resource references to the backend, but the drawer remains a presentation and
+transport owner rather than the source of approval or execution truth. Patrol
+briefings must stay simple: source, status, one primary subject, and an optional
+safe route link. They must not render remediation step lists, evidence chips,
+command summaries, or suggested-prompt chips as drawer chrome. If a
+feature-owned briefing includes a safe route-owned `actionHref`, the drawer may
+render the briefing action label as a normal app link; that link is navigation
+guidance only and must not become approval or execution authority.
`SettingsTab` no longer includes `infrastructure-connections` or
`infrastructure-install`. The single `infrastructure-systems` entry in
diff --git a/docs/release-control/v6/internal/subsystems/patrol-intelligence.md b/docs/release-control/v6/internal/subsystems/patrol-intelligence.md
index 79cb92cac3..becaf13d9e 100644
--- a/docs/release-control/v6/internal/subsystems/patrol-intelligence.md
+++ b/docs/release-control/v6/internal/subsystems/patrol-intelligence.md
@@ -178,16 +178,16 @@ Patrol-specific presentation helpers.
before the detailed finding context, so Assistant leads with the current risk,
attention reason, recency, evidence snapshot, verification summary,
conclusion, latest lifecycle event, recommended next step, explicit operator
- decision framing, and governed approval/proposed-fix posture instead of
- behaving like a generic chat over a pasted incident dump. The visible
- Assistant drawer briefing opened from a Patrol finding must mirror that same
- Patrol-owned operator frame, including current severity/status, recurrence or
- regression, loop state, approval/proposed-fix posture, and the explicit
- operator decision being requested. That visible briefing remains a summary
- surface only: proposed-fix commands stay summarized by count, safe suggested
- prompts must steer the operator toward evidence, approval risk, recurrence,
- and next-step review without carrying command text, and destructive action
- copy must point back to governed approval/remediation context. When a
+ decision framing, and governed approval/action posture instead of behaving
+ like a generic chat over a pasted incident dump. Patrol is the scheduled
+ probe, context assembler, and execution-governance owner; the configured LLM
+ is the diagnostic and remediation-reasoning owner. Visible Patrol Assistant
+ handoffs must not make the operator think Pulse has already produced the
+ correct fix. The visible Assistant drawer briefing opened from a Patrol
+ finding must be compact and source-named: current status/risk, one primary
+ subject, and any approval-required boundary, with richer evidence, action
+ artifacts, command counts, and prompt suggestions staying in model-only or
+ governed action context rather than drawer chrome. When a
structured investigation record is not available yet, the same Patrol-owned
helper must still brief the operator from current finding facts such as
active status, severity, recurrence, and loop state instead of opening a
@@ -198,10 +198,10 @@ Patrol-specific presentation helpers.
not copy the approval command payload into Assistant drawer prose. The
model-only runtime briefing must apply that same
recovered approval reference when framing the operator decision and action
- posture. The initial visible prompt for a Patrol finding must lead with that
- governed approval or proposed-fix review instruction when safe metadata is
- attached, so the operator starts from approval status, risk, dry-run posture,
- and safest-next-step review instead of generic incident discussion. Finding
+ posture. The initial prompt for a Patrol finding may include governed action
+ posture when safe metadata is attached, but it must frame that posture as
+ context for the LLM to evaluate rather than as a Patrol-authored remediation
+ answer. Finding
handoffs must be assembled through the Patrol-owned handoff model so the
prompt, visible briefing, model-only finding context, resource reference,
safe next-step action label/href, bounded action reference, and request-local
@@ -218,11 +218,12 @@ Patrol-specific presentation helpers.
proposed fixes when present, force the request-local approval-required mode,
attach the Patrol-owned visible drawer briefing for the pending approval or
queued-fix recovery state, and never paste the approval command or
- proposed-fix command text into the chat prompt. Remediation-plan Assistant
- handoffs follow the same boundary: step labels, plan status, risk, and command
- counts are allowed, safe suggested prompts may ask about plan risk,
- prerequisites, rollback, and verification, while command and rollback command
- text stays in the governed remediation or approval surface. Generic finding
+ proposed-fix command text into the chat prompt. Existing remediation-plan or
+ action-plan artifacts follow the same boundary: plan status, risk, and
+ command counts are allowed as non-authoritative governed action posture for
+ the LLM to critique, but visible handoffs must not render Patrol step lists
+ or suggested prompt chips, and command or rollback command text stays in the
+ governed remediation or approval surface. Generic finding
discussion handoffs must also force request-local approval-required mode for
any non-empty Patrol `finding_id`, including context-only findings and
findings that reference a live approval, proposed fix, fix outcome, or
@@ -1194,17 +1195,14 @@ than "auto-resolved" when the operator clicked Mark resolved
themselves. Patrol-driven fix outcomes keep their existing copy because
those describe Pulse's actual remediation, which is more specific than
mere auto-detection.
-The Patrol page header copy must also name the trust loop the surface
-owns end-to-end, not the runtime controls it happens to embed. The
-canonical `PATROL_PAGE_DESCRIPTION` (and the matching
-`PATROL_PAGE_TITLE_TOOLTIP`) state that "Pulse investigates your
-infrastructure, gathers evidence for every finding, and proposes safe
-fixes under your approval policy" — the proactive-intelligence framing
-described in the Pulse Intelligence vision (investigation +
-explanation + governed action). The tooltip on the page-header title
-must read the same string from the canonical helper rather than
-maintaining a parallel copy, so hover and inline never tell different
-stories about what Patrol does.
+The Patrol page header copy must also name the surface boundary, not
+the runtime controls it happens to embed. The canonical
+`PATROL_PAGE_DESCRIPTION` (and the matching `PATROL_PAGE_TITLE_TOOLTIP`)
+must frame Patrol as scheduled infrastructure probing and context
+assembly for the configured model, with fixes kept behind the approval
+policy. The tooltip on the page-header title must read the same string
+from the canonical helper rather than maintaining a parallel copy, so
+hover and inline never tell different stories about what Patrol does.
The Patrol page header must not add a second trust-at-a-glance line under
the page title. Current active/regressed/finding posture belongs to the
primary assessment readout and the finding rows, so the header remains
diff --git a/frontend-modern/src/components/AI/Chat/__tests__/AIChat.test.tsx b/frontend-modern/src/components/AI/Chat/__tests__/AIChat.test.tsx
index 804d108f67..b808ffd630 100644
--- a/frontend-modern/src/components/AI/Chat/__tests__/AIChat.test.tsx
+++ b/frontend-modern/src/components/AI/Chat/__tests__/AIChat.test.tsx
@@ -360,14 +360,11 @@ describe('AIChat', () => {
expect(screen.getByLabelText('Assistant context')).toBeInTheDocument();
expect(screen.getByText('Pulse Patrol')).toBeInTheDocument();
expect(screen.getByText('High CPU usage on web-server')).toBeInTheDocument();
- expect(screen.getByText('Backup job saturated CPU.')).toBeInTheDocument();
- expect(screen.getByText('1 command recorded for approval context')).toBeInTheDocument();
- fireEvent.click(
- screen.getByRole('button', { name: 'Explain recent changes and correlations' }),
- );
- expect(screen.getByPlaceholderText('Ask about your infrastructure...')).toHaveValue(
- 'Explain recent changes and correlations',
- );
+ expect(screen.queryByText('Backup job saturated CPU.')).not.toBeInTheDocument();
+ expect(screen.queryByText('1 command recorded for approval context')).not.toBeInTheDocument();
+ expect(
+ screen.queryByRole('button', { name: 'Explain recent changes and correlations' }),
+ ).not.toBeInTheDocument();
expect(screen.queryByText('systemctl restart workload.service')).not.toBeInTheDocument();
});
@@ -386,9 +383,89 @@ describe('AIChat', () => {
renderChat();
+ expect(screen.getByRole('link', { name: 'Open Patrol provider settings' })).toHaveAttribute(
+ 'href',
+ '/settings/system-ai',
+ );
+ });
+
+ it('keeps Patrol action-artifact briefings compact in the sidebar', () => {
+ mockAiChatStore.context = {
+ initialPrompt: undefined,
+ autonomousMode: false,
+ briefing: {
+ sourceLabel: 'Pulse Patrol',
+ title: 'Patrol finding attached',
+ subject: 'Backup failed on delly (backup)',
+ statusLabel: 'Pending · Medium risk',
+ detailLines: ['Existing action artifact: Fix: Backup failed'],
+ evidence: [
+ 'Review backup job logs for error details',
+ 'Check backup storage connectivity and space',
+ ],
+ commandSummary: '4 commands recorded for governed plan review',
+ safetyNote:
+ 'Assistant should decide remediation from evidence; command execution requires governed approval.',
+ },
+ };
+
+ renderChat();
+
+ expect(screen.getByText('Pulse Patrol')).toBeInTheDocument();
+ expect(screen.getByText('Pending · Medium risk')).toBeInTheDocument();
+ expect(screen.getByText('Backup failed on delly (backup)')).toBeInTheDocument();
+ expect(screen.getByText('Approval required before any action.')).toBeInTheDocument();
+ expect(
+ screen.queryByText('Existing action artifact: Fix: Backup failed'),
+ ).not.toBeInTheDocument();
+ expect(screen.queryByText('4 planned steps')).not.toBeInTheDocument();
expect(
- screen.getByRole('link', { name: 'Open Patrol provider settings' }),
- ).toHaveAttribute('href', '/settings/system-ai');
+ screen.queryByText('Review backup job logs for error details'),
+ ).not.toBeInTheDocument();
+ expect(screen.queryByRole('link', { name: 'Fix: Backup failed' })).not.toBeInTheDocument();
+ expect(
+ screen.queryByText('4 commands recorded for governed plan review'),
+ ).not.toBeInTheDocument();
+ });
+
+ it('does not expose legacy Patrol remediation-plan briefing internals', () => {
+ mockAiChatStore.context = {
+ initialPrompt: undefined,
+ autonomousMode: false,
+ briefing: {
+ sourceLabel: 'Pulse Patrol',
+ title: 'Remediation plan attached',
+ subject: 'Backup failed on delly (backup)',
+ statusLabel: 'Pending · Medium risk',
+ detailLines: ['Plan: Fix: Backup failed', '4 planned steps'],
+ evidence: ['Review backup job logs for error details'],
+ actionLabel: 'Fix: Backup failed',
+ commandSummary: '4 commands recorded for approval context',
+ safetyNote: 'Command details stay in governed remediation context.',
+ suggestedPrompts: [
+ 'Review plan risk and prerequisites',
+ 'Check rollback and verification steps',
+ ],
+ },
+ };
+
+ renderChat();
+
+ expect(screen.getByText('Pulse Patrol')).toBeInTheDocument();
+ expect(screen.getByText('Pending · Medium risk')).toBeInTheDocument();
+ expect(screen.getByText('Backup failed on delly (backup)')).toBeInTheDocument();
+ expect(screen.getByText('Approval required before any action.')).toBeInTheDocument();
+ expect(screen.queryByText('Plan: Fix: Backup failed')).not.toBeInTheDocument();
+ expect(screen.queryByText('4 planned steps')).not.toBeInTheDocument();
+ expect(
+ screen.queryByText('Review backup job logs for error details'),
+ ).not.toBeInTheDocument();
+ expect(
+ screen.queryByRole('button', { name: 'Review plan risk and prerequisites' }),
+ ).not.toBeInTheDocument();
+ expect(
+ screen.queryByText('4 commands recorded for approval context'),
+ ).not.toBeInTheDocument();
});
it('uses Patrol briefing context instead of generic empty-state suggestions', () => {
@@ -410,8 +487,8 @@ describe('AIChat', () => {
expect(screen.getByText('Review Pulse Patrol context')).toBeInTheDocument();
expect(
- screen.getByRole('button', { name: 'Explain why coverage is incomplete' }),
- ).toBeInTheDocument();
+ screen.queryByRole('button', { name: 'Explain why coverage is incomplete' }),
+ ).not.toBeInTheDocument();
expect(
screen.queryByRole('button', { name: 'Summarize cluster health' }),
).not.toBeInTheDocument();
@@ -1656,8 +1733,11 @@ describe('AIChat', () => {
renderChat();
await waitFor(() => {
- expect(screen.getByText(/Approval required for this dashboard brief/)).toBeInTheDocument();
+ expect(screen.getByText('Approval')).toBeInTheDocument();
});
+ expect(
+ screen.queryByText(/Approval required for this dashboard brief/),
+ ).not.toBeInTheDocument();
expect(screen.queryByText('Commands execute without approval.')).not.toBeInTheDocument();
const textarea = screen.getByPlaceholderText('Ask about your infrastructure...');
@@ -1672,7 +1752,7 @@ describe('AIChat', () => {
);
});
- it('names scoped Patrol handoffs in the approval banner', async () => {
+ it('shows scoped Patrol handoffs as approval-bound without a banner', async () => {
mockAIAPI.getSettings.mockResolvedValue({
model: 'gpt-4',
chat_model: '',
@@ -1693,14 +1773,18 @@ describe('AIChat', () => {
renderChat();
await waitFor(() => {
- expect(screen.getByText(/Approval required for this Patrol handoff/)).toBeInTheDocument();
+ expect(screen.getByText('Approval')).toBeInTheDocument();
});
+ expect(screen.getByText('Approval required before any action.')).toBeInTheDocument();
+ expect(
+ screen.queryByText(/Approval required for this Patrol handoff/),
+ ).not.toBeInTheDocument();
expect(
screen.queryByText(/Approval required for this dashboard brief/),
).not.toBeInTheDocument();
});
- it('names scoped alert handoffs in the approval banner', async () => {
+ it('shows scoped alert handoffs as approval-bound without a banner', async () => {
mockAIAPI.getSettings.mockResolvedValue({
model: 'gpt-4',
chat_model: '',
@@ -1723,10 +1807,12 @@ describe('AIChat', () => {
renderChat();
await waitFor(() => {
- expect(
- screen.getByText(/Approval required for this alert investigation/),
- ).toBeInTheDocument();
+ expect(screen.getByText('Approval')).toBeInTheDocument();
});
+ expect(screen.getByText('Approval required before any action.')).toBeInTheDocument();
+ expect(
+ screen.queryByText(/Approval required for this alert investigation/),
+ ).not.toBeInTheDocument();
expect(
screen.queryByText(/Approval required for this dashboard brief/),
).not.toBeInTheDocument();
diff --git a/frontend-modern/src/components/AI/Chat/index.tsx b/frontend-modern/src/components/AI/Chat/index.tsx
index 5051861295..e7c3ad2828 100644
--- a/frontend-modern/src/components/AI/Chat/index.tsx
+++ b/frontend-modern/src/components/AI/Chat/index.tsx
@@ -292,15 +292,15 @@ const buildSessionHandoffContext = (session?: ChatSession): AIChatContext | unde
actionLabel: summary.requires_approval
? 'Approval required'
: isPatrolConfigurationFailure
- ? 'Review Patrol configuration issue'
- : isPatrolAssessment
- ? recommendedNextStepAction
- ? `Recommended: ${recommendedNextStepAction}`
- : recommendedNextStep
- ? `Recommended: ${recommendedNextStep}`
- : 'Review Patrol assessment'
- : isPatrolRun && summary.runtime_failure
- ? 'Review Patrol runtime issue'
+ ? 'Review Patrol configuration issue'
+ : isPatrolAssessment
+ ? recommendedNextStepAction
+ ? `Recommended: ${recommendedNextStepAction}`
+ : recommendedNextStep
+ ? `Recommended: ${recommendedNextStep}`
+ : 'Review Patrol assessment'
+ : isPatrolRun && summary.runtime_failure
+ ? 'Review Patrol runtime issue'
: isPatrolRun
? 'Review Patrol run'
: isPatrolFinding && recommendedNextStepAction
@@ -312,8 +312,7 @@ const buildSessionHandoffContext = (session?: ChatSession): AIChatContext | unde
!summary.requires_approval &&
recommendedNextStepActionHref &&
(isPatrolFinding ||
- (isPatrolAssessment &&
- Boolean(recommendedNextStepAction || recommendedNextStep)))
+ (isPatrolAssessment && Boolean(recommendedNextStepAction || recommendedNextStep)))
? recommendedNextStepActionHref
: undefined,
commandSummary: statusLabel
@@ -471,7 +470,6 @@ export const AIChat: Component<AIChatProps> = (props) => {
return match ? match.name || match.id.split(':').pop() || match.id : override;
});
- const controlPresentation = createMemo(() => getAIChatControlLevelPresentation(controlLevel()));
const isOverlayLayout = createMemo(() => width() < AI_CHAT_MIN_DOCKED_VIEWPORT_WIDTH);
const rootClassName = createMemo(() => {
if (isOverlayLayout()) {
@@ -617,28 +615,38 @@ export const AIChat: Component<AIChatProps> = (props) => {
}
});
- const hasScopedApprovalHandoff = createMemo(() => aiChatStore.context.autonomousMode === false);
const contextBriefing = createMemo(() => aiChatStore.context.briefing);
- const contextBriefingEvidence = createMemo(() => contextBriefing()?.evidence ?? []);
- const contextBriefingDetails = createMemo(() => contextBriefing()?.detailLines ?? []);
- const contextBriefingSuggestedPrompts = createMemo(
- () => contextBriefing()?.suggestedPrompts ?? [],
+ const hasScopedApprovalHandoff = createMemo(() => aiChatStore.context.autonomousMode === false);
+ const controlPresentation = createMemo(() =>
+ getAIChatControlLevelPresentation(
+ hasScopedApprovalHandoff() && controlLevel() === 'autonomous' ? 'controlled' : controlLevel(),
+ ),
);
+ const contextBriefingTitle = createMemo(() => {
+ const briefing = contextBriefing();
+ if (!briefing) return '';
+
+ const title = briefing.title?.trim() ?? '';
+ const subject = briefing.subject?.trim() ?? '';
+ if (subject && /attached|briefing/i.test(title)) {
+ return subject;
+ }
+
+ return title || subject || 'Context attached';
+ });
+ const contextBriefingNote = createMemo(() => {
+ if (hasScopedApprovalHandoff()) {
+ return 'Approval required before any action.';
+ }
+
+ return '';
+ });
const emptyStatePresentation = createMemo(() =>
getAIChatEmptyStatePresentation({
briefing: contextBriefing(),
isCluster: isCluster(),
}),
);
- const scopedApprovalHandoffLabel = createMemo(() => {
- const source = contextBriefing()?.sourceLabel?.toLowerCase() || '';
- if (source.includes('patrol')) return 'this Patrol handoff';
- if (source.includes('alert') || aiChatStore.context.context?.alertIdentifier) {
- return 'this alert investigation';
- }
- if (aiChatStore.context.findingId) return 'this Patrol finding';
- return 'this dashboard brief';
- });
// Compute current status for display
const currentStatus = createMemo(() => {
@@ -664,13 +672,6 @@ export const AIChat: Component<AIChatProps> = (props) => {
return { type: 'thinking', text: 'Thinking...' };
});
- const handleContextBriefingPrompt = (prompt: string) => {
- setInput(prompt);
- setMentionActive(false);
- setMentionQuery('');
- queueMicrotask(() => textareaRef?.focus());
- };
-
createEffect(() => {
if (!isOpen()) {
return;
@@ -1455,7 +1456,9 @@ export const AIChat: Component<AIChatProps> = (props) => {
</span>
)}
</Show>
- <Show when={formatSessionHandoffRecommendationLabel(summary())}>
+ <Show
+ when={formatSessionHandoffRecommendationLabel(summary())}
+ >
{(recommendation) => (
<span class="max-w-full truncate rounded border border-emerald-200 bg-emerald-50 px-1.5 py-0.5 text-[10px] font-medium text-emerald-700 dark:border-emerald-800 dark:bg-emerald-950 dark:text-emerald-200">
{recommendation()}
@@ -1515,15 +1518,6 @@ export const AIChat: Component<AIChatProps> = (props) => {
</div>
</div>
- <Show when={hasScopedApprovalHandoff() && controlLevel() === 'autonomous'}>
- <div class="px-4 py-2 border-b border-blue-200 dark:border-blue-800 bg-blue-50 dark:bg-blue-950 flex items-center gap-2 text-[11px] text-blue-700 dark:text-blue-200">
- <span>
- Approval required for {scopedApprovalHandoffLabel()}. Commands will ask before
- running; your default Assistant mode is unchanged.
- </span>
- </div>
- </Show>
-
<Show
when={
controlLevel() === 'autonomous' &&
@@ -1599,7 +1593,7 @@ export const AIChat: Component<AIChatProps> = (props) => {
<Show when={contextBriefing()}>
<section
- class="border-b border-border bg-surface px-4 py-3"
+ class="border-b border-border bg-surface px-4 py-2.5"
aria-label="Assistant context"
>
<div class="flex flex-wrap items-center gap-2 text-[10px] font-medium uppercase text-muted">
@@ -1610,72 +1604,18 @@ export const AIChat: Component<AIChatProps> = (props) => {
</Show>
</div>
<div class="mt-1 text-sm font-semibold text-base-content">
- {contextBriefing()!.title}
+ {contextBriefingTitle()}
</div>
- <Show when={contextBriefing()!.subject}>
- <div class="mt-0.5 text-xs text-muted">{contextBriefing()!.subject}</div>
- </Show>
- <Show when={contextBriefingDetails().length > 0}>
- <div class="mt-2 space-y-1">
- <For each={contextBriefingDetails()}>
- {(line) => <div class="text-xs text-base-content leading-relaxed">{line}</div>}
- </For>
- </div>
- </Show>
- <Show when={contextBriefingEvidence().length > 0}>
- <div class="mt-2 flex flex-wrap gap-1.5">
- <For each={contextBriefingEvidence()}>
- {(item) => (
- <span class="rounded border border-border bg-surface-alt px-2 py-1 text-[11px] text-muted">
- {item}
- </span>
- )}
- </For>
- </div>
- </Show>
- <Show when={contextBriefingSuggestedPrompts().length > 0}>
- <div class="mt-2 flex flex-wrap gap-1.5">
- <For each={contextBriefingSuggestedPrompts()}>
- {(prompt) => (
- <button
- type="button"
- onClick={() => handleContextBriefingPrompt(prompt)}
- class="max-w-full rounded border border-border bg-surface px-2 py-1 text-left text-[11px] font-medium text-base-content transition-colors hover:bg-surface-alt focus:outline-none focus:ring-2 focus:ring-blue-500"
- >
- {prompt}
- </button>
- )}
- </For>
- </div>
+ <Show when={contextBriefingNote()}>
+ <div class="mt-0.5 text-xs text-muted">{contextBriefingNote()}</div>
</Show>
- <Show when={contextBriefing()!.actionLabel || contextBriefing()!.commandSummary}>
- <div class="mt-2 rounded border border-border bg-surface-alt px-2.5 py-2 text-[11px] text-muted">
- <Show when={contextBriefing()!.actionLabel}>
- <Show
- when={contextBriefing()!.actionHref}
- fallback={
- <div class="font-medium text-base-content">
- {contextBriefing()!.actionLabel}
- </div>
- }
- >
- {(href) => (
- <a
- href={href()}
- class="font-medium text-blue-600 hover:text-blue-700 dark:text-blue-300 dark:hover:text-blue-200"
- >
- {contextBriefing()!.actionLabel}
- </a>
- )}
- </Show>
- </Show>
- <Show when={contextBriefing()!.commandSummary}>
- <div>{contextBriefing()!.commandSummary}</div>
- </Show>
- <Show when={contextBriefing()!.safetyNote}>
- <div>{contextBriefing()!.safetyNote}</div>
- </Show>
- </div>
+ <Show when={contextBriefing()!.actionHref && contextBriefing()!.actionLabel}>
+ <a
+ href={contextBriefing()!.actionHref}
+ class="mt-2 inline-flex rounded border border-border bg-surface px-2 py-1 text-[11px] font-medium text-base-content hover:bg-surface-alt"
+ >
+ {contextBriefing()!.actionLabel}
+ </a>
</Show>
</section>
</Show>
diff --git a/frontend-modern/src/components/AI/FindingsPanel.tsx b/frontend-modern/src/components/AI/FindingsPanel.tsx
index 7302995b75..cd25397d07 100644
--- a/frontend-modern/src/components/AI/FindingsPanel.tsx
+++ b/frontend-modern/src/components/AI/FindingsPanel.tsx
@@ -22,6 +22,7 @@ import {
buildPatrolAssistantFindingHandoff,
buildPatrolAssistantProposedFixBriefingInput,
buildPatrolRemediationPlanAssistantBriefing,
+ buildPatrolRemediationPlanAssistantModelContext,
buildPatrolRemediationPlanAssistantPrompt,
patrolAssistantFindingHandoffRequiresApprovalMode,
type PatrolAssistantApprovalBriefingInput,
@@ -171,9 +172,7 @@ export const FindingsPanel: Component<FindingsPanelProps> = (props) => {
? aiIntelligenceStore.patrolFindingsLoading
: aiIntelligenceStore.findingsLoading,
);
- const shouldShowLoadingState = createMemo(
- () => sourceFindingsLoading() && !sourceHasFindings(),
- );
+ const shouldShowLoadingState = createMemo(() => sourceFindingsLoading() && !sourceHasFindings());
const sourceFindingsError = createMemo(() =>
isPatrolFindingsSource()
? aiIntelligenceStore.patrolFindingsError
@@ -860,11 +859,17 @@ export const FindingsPanel: Component<FindingsPanelProps> = (props) => {
const title = getFindingTitlePresentation(finding).label;
const prompt = buildPatrolRemediationPlanAssistantPrompt({ title, subject, plan });
const briefing = buildPatrolRemediationPlanAssistantBriefing({ title, subject, plan });
+ const handoffContext = buildPatrolRemediationPlanAssistantModelContext({
+ title,
+ subject,
+ plan,
+ });
aiChatStore.openWithPrompt(prompt, {
targetType: finding.resourceType,
targetId: finding.resourceId,
findingId: finding.id,
+ handoffContext,
briefing,
autonomousMode: false,
});
@@ -1754,18 +1759,16 @@ export const FindingsPanel: Component<FindingsPanelProps> = (props) => {
/>
</Show>
- {/* Remediation Plan artifact (generated by Patrol and/or an investigation) */}
+ {/* Existing action artifact: compact review entry, not a Patrol-authored fix answer. */}
<Show when={finding.status === 'active' && plansByFindingId().get(finding.id)}>
{(plan) => {
// Capacity-forecast proposal variant - rendered when patrol
// attached a deterministic forecast-driven ActionPlan via the
- // template registry in internal/ai/forecast. Falls back to the
- // generic remediation plan card when no proposal is attached
- // or when source/category don't match.
+ // template registry in internal/ai/forecast. Other plan artifacts
+ // collapse to a compact Assistant review entry.
const proposal = () => plan().proposed_action_plan;
const isCapacityForecastProposal = () =>
- finding.category === 'capacity' &&
- proposal()?.source === 'capacity_forecast';
+ finding.category === 'capacity' && proposal()?.source === 'capacity_forecast';
return (
<div class="mt-3 pt-3 border-t border-border-subtle">
<Show
@@ -1774,75 +1777,32 @@ export const FindingsPanel: Component<FindingsPanelProps> = (props) => {
const planRisk = getApprovalRiskPresentation(plan().risk_level);
return (
<>
- <div class="flex items-center gap-2 mb-2">
- <svg
- class="w-4 h-4 text-green-600 dark:text-green-400"
- fill="none"
- stroke="currentColor"
- viewBox="0 0 24 24"
- >
- <path
- stroke-linecap="round"
- stroke-linejoin="round"
- stroke-width="2"
- d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"
- />
- </svg>
- <span class="text-sm font-medium text-base-content">Remediation Plan</span>
- <span
- class={`px-1.5 py-0.5 text-[10px] font-medium rounded ${planRisk.badgeClass}`}
- >
- {planRisk.label} risk
- </span>
- </div>
- <div class="space-y-2">
- <For each={plan().steps}>
- {(step) => (
- <div class="flex items-start gap-2 text-sm">
- <span class="flex-shrink-0 w-5 h-5 flex items-center justify-center rounded-full bg-surface-hover text-xs font-medium text-muted">
- {step.order}
- </span>
- <div class="flex-1 min-w-0">
- <div class="text-base-content">{step.action}</div>
- <Show when={step.command}>
- <div class="mt-1 font-mono text-[11px] whitespace-pre-wrap break-words text-muted bg-surface-alt px-2 py-1 rounded">
- {step.command}
- </div>
- </Show>
- </div>
- </div>
- )}
- </For>
- </div>
-
- <div class="flex items-center gap-2 mt-3 pt-3 border-t border-border-subtle">
- <button
- type="button"
- onClick={(e) => handleOpenPlanInAssistant(finding, plan(), e)}
- class="flex-1 px-3 py-1.5 bg-blue-600 hover:bg-blue-700 text-white text-xs font-medium rounded flex items-center justify-center gap-1.5"
- >
- <svg
- class="w-3.5 h-3.5"
- fill="none"
- stroke="currentColor"
- viewBox="0 0 24 24"
+ <div class="flex flex-wrap items-center justify-between gap-3">
+ <div class="flex min-w-0 items-center gap-2">
+ <AlertCircleIcon class="h-4 w-4 flex-shrink-0 text-muted" />
+ <span class="text-sm font-medium text-base-content">Action review</span>
+ <span
+ class={`px-1.5 py-0.5 text-[10px] font-medium rounded ${planRisk.badgeClass}`}
>
- <path
- stroke-linecap="round"
- stroke-linejoin="round"
- stroke-width="2"
- d="M7 8h10M7 12h10M7 16h10"
- />
- </svg>
- Open In Assistant
- </button>
- <button
- type="button"
- onClick={(e) => handleDismissPlan(plan(), e)}
- class="px-3 py-1.5 hover:bg-surface-hover text-muted text-xs font-medium rounded"
- >
- Dismiss
- </button>
+ {planRisk.label} risk
+ </span>
+ </div>
+ <div class="flex items-center gap-2">
+ <button
+ type="button"
+ onClick={(e) => handleOpenPlanInAssistant(finding, plan(), e)}
+ class="px-3 py-1.5 bg-blue-600 hover:bg-blue-700 text-white text-xs font-medium rounded flex items-center justify-center gap-1.5"
+ >
+ Ask Assistant
+ </button>
+ <button
+ type="button"
+ onClick={(e) => handleDismissPlan(plan(), e)}
+ class="px-3 py-1.5 hover:bg-surface-hover text-muted text-xs font-medium rounded"
+ >
+ Dismiss
+ </button>
+ </div>
</div>
</>
);
@@ -1902,12 +1862,16 @@ export const FindingsPanel: Component<FindingsPanelProps> = (props) => {
</span>{' '}
projected
</Show>
- <Show when={typeof metric!.thresholdValue === 'number' && metric!.thresholdValue! > 0}>
- {' '}· threshold {metric!.thresholdValue!.toFixed(0)}%
- </Show>
- <Show when={ttbLabel}>
- {' '}· breach in {ttbLabel}
+ <Show
+ when={
+ typeof metric!.thresholdValue === 'number' &&
+ metric!.thresholdValue! > 0
+ }
+ >
+ {' '}
+ · threshold {metric!.thresholdValue!.toFixed(0)}%
</Show>
+ <Show when={ttbLabel}> · breach in {ttbLabel}</Show>
</div>
</Show>
@@ -1922,7 +1886,9 @@ export const FindingsPanel: Component<FindingsPanelProps> = (props) => {
{preflight!.intendedChange}
</div>
</Show>
- <Show when={preflight!.safetyChecks && preflight!.safetyChecks!.length > 0}>
+ <Show
+ when={preflight!.safetyChecks && preflight!.safetyChecks!.length > 0}
+ >
<ul class="text-[11px] text-muted list-disc list-inside space-y-0.5 mb-2">
<For each={preflight!.safetyChecks!}>
{(check) => <li>{check}</li>}
@@ -2029,9 +1995,7 @@ export const FindingsPanel: Component<FindingsPanelProps> = (props) => {
</Show>
<Show when={sourceFindingsError() && !sourceFindingsLoading()}>
- <div class="p-4 text-sm text-red-600 dark:text-red-400">
- {sourceFindingsError()}
- </div>
+ <div class="p-4 text-sm text-red-600 dark:text-red-400">{sourceFindingsError()}</div>
</Show>
<Show when={!shouldShowLoadingState()}>
diff --git a/frontend-modern/src/components/AI/__tests__/FindingsPanel.capacityForecast.test.tsx b/frontend-modern/src/components/AI/__tests__/FindingsPanel.capacityForecast.test.tsx
index ff30a9b150..faaac48f28 100644
--- a/frontend-modern/src/components/AI/__tests__/FindingsPanel.capacityForecast.test.tsx
+++ b/frontend-modern/src/components/AI/__tests__/FindingsPanel.capacityForecast.test.tsx
@@ -208,7 +208,10 @@ beforeEach(() => {
mockState.approveRemediationPlan.mockClear();
if (typeof window.requestAnimationFrame !== 'function') {
window.requestAnimationFrame = ((callback: FrameRequestCallback) =>
- window.setTimeout(() => callback(performance.now()), 0)) as typeof window.requestAnimationFrame;
+ window.setTimeout(
+ () => callback(performance.now()),
+ 0,
+ )) as typeof window.requestAnimationFrame;
}
});
@@ -243,12 +246,12 @@ describe('FindingsPanel capacity-forecast approval card', () => {
expect(within(card).getAllByText(/93\.5%/).length).toBeGreaterThanOrEqual(1);
expect(within(card).getByText(/threshold 75%/)).toBeInTheDocument();
expect(within(card).getByText(/breach in/i)).toBeInTheDocument();
- // The generic "Open In Assistant" affordance must NOT appear when the
+ // The generic "Ask Assistant" affordance must NOT appear when the
// forecast variant is active - the generic card is gated by fallback.
- expect(screen.queryByText('Open In Assistant')).not.toBeInTheDocument();
+ expect(screen.queryByText('Ask Assistant')).not.toBeInTheDocument();
});
- it('renders the generic remediation plan card when a capacity finding has no proposal attached', async () => {
+ it('renders compact action review when a capacity finding has no proposal attached', async () => {
const finding = makeFinding({ id: 'finding-cap-2' });
mockState.findings = [finding];
mockState.remediationPlans = [makePlan(finding.id, false)];
@@ -260,7 +263,9 @@ describe('FindingsPanel capacity-forecast approval card', () => {
fireEvent.click(screen.getByText('Storage pool tank at 87.3% usage'));
expect(screen.queryByTestId('capacity-forecast-approval-card')).not.toBeInTheDocument();
- expect(screen.getByText('Open In Assistant')).toBeInTheDocument();
+ expect(screen.getByText('Action review')).toBeInTheDocument();
+ expect(screen.getByText('Ask Assistant')).toBeInTheDocument();
+ expect(screen.queryByText('Remediation Plan')).not.toBeInTheDocument();
});
it('never renders the capacity-forecast card for a non-capacity finding even if a proposal somehow attaches', async () => {
@@ -283,7 +288,8 @@ describe('FindingsPanel capacity-forecast approval card', () => {
fireEvent.click(screen.getByText('High CPU on appserver: 92.0%'));
expect(screen.queryByTestId('capacity-forecast-approval-card')).not.toBeInTheDocument();
- expect(screen.getByText('Open In Assistant')).toBeInTheDocument();
+ expect(screen.getByText('Action review')).toBeInTheDocument();
+ expect(screen.getByText('Ask Assistant')).toBeInTheDocument();
});
it('routes Approve through AIAPI.approveRemediationPlan and Reject through dismiss without bypassing handlers', async () => {
@@ -299,6 +305,8 @@ describe('FindingsPanel capacity-forecast approval card', () => {
fireEvent.click(screen.getByTestId('capacity-forecast-approve'));
- await waitFor(() => expect(mockState.approveRemediationPlan).toHaveBeenCalledWith('plan-finding-cap-3'));
+ await waitFor(() =>
+ expect(mockState.approveRemediationPlan).toHaveBeenCalledWith('plan-finding-cap-3'),
+ );
});
});
diff --git a/frontend-modern/src/components/AI/__tests__/FindingsPanel.test.ts b/frontend-modern/src/components/AI/__tests__/FindingsPanel.test.ts
index 22a8ad6d01..3ff5717635 100644
--- a/frontend-modern/src/components/AI/__tests__/FindingsPanel.test.ts
+++ b/frontend-modern/src/components/AI/__tests__/FindingsPanel.test.ts
@@ -76,7 +76,9 @@ describe('FindingsPanel assistant handoff', () => {
it('routes remediation plan handoffs through the command-free Patrol handoff model', () => {
expect(findingsPanelSource).toContain('buildPatrolRemediationPlanAssistantPrompt');
+ expect(findingsPanelSource).toContain('buildPatrolRemediationPlanAssistantModelContext');
expect(findingsPanelSource).toContain('buildPatrolRemediationPlanAssistantBriefing');
+ expect(findingsPanelSource).toContain('handoffContext,');
expect(findingsPanelSource).toContain('autonomousMode: false');
expect(findingsPanelSource).not.toContain('Command: `');
expect(findingsPanelSource).not.toContain('Rollback: `');
@@ -263,12 +265,13 @@ describe('FindingsPanel assistant handoff', () => {
expect(findingsPanelSource).toContain('AIAPI.approveRemediationPlan(plan.id)');
expect(findingsPanelSource).toContain('data-testid="capacity-forecast-approve"');
expect(findingsPanelSource).toContain('data-testid="capacity-forecast-reject"');
- // The fallback path keeps the generic remediation plan card unchanged
- // for non-capacity findings or capacity findings without a proposal -
- // both must continue to read "Open In Assistant" / "Dismiss" as
- // before, with no capacity-forecast affordances bleeding through.
+ // The fallback path keeps non-capacity action artifacts compact for
+ // Assistant review rather than rendering Patrol-authored steps.
expect(findingsPanelSource).toContain('fallback={(()');
- expect(findingsPanelSource).toContain('Open In Assistant');
+ expect(findingsPanelSource).toContain('Action review');
+ expect(findingsPanelSource).toContain('Ask Assistant');
+ expect(findingsPanelSource).not.toContain('Remediation Plan');
+ expect(findingsPanelSource).not.toContain('<For each={plan().steps}>');
});
it('renders the operator-facing Impact line between Description and Recommendation', () => {
diff --git a/frontend-modern/src/components/patrol/__tests__/ApprovalSection.test.tsx b/frontend-modern/src/components/patrol/__tests__/ApprovalSection.test.tsx
index 142b6beaa7..78adef963a 100644
--- a/frontend-modern/src/components/patrol/__tests__/ApprovalSection.test.tsx
+++ b/frontend-modern/src/components/patrol/__tests__/ApprovalSection.test.tsx
@@ -125,9 +125,9 @@ describe('ApprovalSection', () => {
expect(openWithPromptMock).toHaveBeenCalledTimes(1);
const [prompt, context] = openWithPromptMock.mock.calls[0];
expect(prompt).toContain(
- "I'd like to discuss this Patrol finding: \"CPU saturation\" on node-1",
+ 'I\'d like to discuss this Patrol finding: "CPU saturation" on node-1',
);
- expect(prompt).toContain('Start by reviewing the governed proposed fix or action posture');
+ expect(prompt).toContain('Start by reviewing the governed action posture');
expect(prompt).toContain('Recover or regenerate the governed approval before execution');
expect(context).toEqual(
expect.objectContaining({
@@ -305,8 +305,8 @@ describe('ApprovalSection', () => {
expect(openWithPromptMock).toHaveBeenCalledTimes(1);
const [prompt, context] = openWithPromptMock.mock.calls[0];
- expect(prompt).toContain('Start by reviewing the governed proposed fix or action posture');
- expect(prompt).toContain('proposed fix Restart the workload service');
+ expect(prompt).toContain('Start by reviewing the governed action posture');
+ expect(prompt).toContain('recorded action artifact Restart the workload service');
expect(prompt).toContain('target node-1');
expect(prompt).toContain('high risk');
expect(prompt).not.toContain('systemctl restart nginx');
@@ -323,9 +323,7 @@ describe('ApprovalSection', () => {
detailLines: expect.arrayContaining([
expect.stringContaining('fix queued for governed review'),
expect.stringContaining('Proposed fix: Restart the workload service'),
- expect.stringContaining(
- 'Recover or regenerate the governed approval before execution',
- ),
+ expect.stringContaining('Recover or regenerate the governed approval before execution'),
]),
actionLabel: 'Restart the workload service',
commandSummary: '1 command recorded for approval context',
diff --git a/frontend-modern/src/features/patrol/__tests__/patrolInvestigationContextModel.test.ts b/frontend-modern/src/features/patrol/__tests__/patrolInvestigationContextModel.test.ts
index bd6b567e76..a4f58f8971 100644
--- a/frontend-modern/src/features/patrol/__tests__/patrolInvestigationContextModel.test.ts
+++ b/frontend-modern/src/features/patrol/__tests__/patrolInvestigationContextModel.test.ts
@@ -17,6 +17,7 @@ import {
buildPatrolRunAssistantHandoff,
buildPatrolInvestigationRecordPresentation,
buildPatrolRemediationPlanAssistantBriefing,
+ buildPatrolRemediationPlanAssistantModelContext,
buildPatrolRemediationPlanAssistantPrompt,
patrolAssistantFindingHandoffRequiresApprovalMode,
selectPatrolSupportingRecentChanges,
@@ -1306,7 +1307,7 @@ describe('patrolInvestigationContextModel', () => {
}),
});
- expect(prompt).toContain('Start by reviewing the governed proposed fix');
+ expect(prompt).toContain('Start by reviewing the governed action posture');
expect(prompt).toContain('medium risk');
expect(prompt).toContain('1 command recorded for approval context');
expect(prompt).toContain('destructive action');
@@ -1521,7 +1522,7 @@ describe('patrolInvestigationContextModel', () => {
'Attention: active critical finding; regressed 2 times; last regression 2 hours ago; loop awaiting approval; approval approval-1; live approval pending; destructive proposed fix; fix queued for governed review',
'Backup job saturated CPU.',
'Approve a controlled restart after the backup completes.',
- `Decision: review live governed approval approval-1 before execution; approval pending; target web-server; expires ${approvalExpiresAt}; requested ${approvalRequestedAt}; proposed fix fix-1; risk high; destructive true`,
+ `Decision: review live governed approval approval-1 before execution; approval pending; target web-server; expires ${approvalExpiresAt}; requested ${approvalRequestedAt}; action artifact fix-1; risk high; destructive true`,
],
evidence: ['CPU stayed above 95% for 10 minutes', 'Verified: CPU returned below 50%'],
actionLabel: 'Restart the workload service',
@@ -1538,7 +1539,7 @@ describe('patrolInvestigationContextModel', () => {
vi.useRealTimers();
});
- it('builds remediation plan Assistant handoff context without exposing raw commands', () => {
+ it('treats existing remediation artifacts as non-authoritative Assistant context', () => {
const plan: RemediationPlan = {
id: 'plan-1',
finding_id: 'finding-1',
@@ -1570,29 +1571,53 @@ describe('patrolInvestigationContextModel', () => {
subject: 'node-1',
plan,
});
+ const modelContext = buildPatrolRemediationPlanAssistantModelContext({
+ title: 'Nginx down',
+ subject: 'node-1',
+ plan,
+ });
const briefing = buildPatrolRemediationPlanAssistantBriefing({
title: 'Nginx down',
subject: 'node-1',
plan,
});
- expect(prompt).toContain('Pulse Patrol generated a governed remediation plan');
- expect(prompt).toContain('1. Restart web service (high risk; command recorded');
- expect(prompt).toContain('2 commands recorded for governed plan review');
- expect(prompt).not.toContain('systemctl restart nginx');
- expect(prompt).not.toContain('systemctl stop nginx');
- expect(prompt).not.toContain('systemctl status nginx');
+ expect(prompt).toBe(
+ 'Review this Patrol finding and decide the safest next step: "Nginx down" on node-1.',
+ );
+ expect(modelContext).toContain('[Patrol Finding Action Context]');
+ expect(modelContext).toContain(
+ 'Pulse is attaching observed finding context and any existing governed action artifact',
+ );
+ expect(modelContext).toContain(
+ 'The selected language model should decide whether remediation is appropriate',
+ );
+ expect(modelContext).toContain('Existing Action Artifact: Restore web service');
+ expect(modelContext).toContain(
+ '2 commands recorded for governed plan review; 1 rollback command recorded',
+ );
+ expect(modelContext).toContain('Treat this as approval state, not remediation guidance.');
+ expect(modelContext).toContain('Do not assume any Patrol-authored action is correct.');
+ expect(modelContext).not.toContain('1. Restart web service');
+ expect(modelContext).not.toContain('2. Check service health');
+ expect(modelContext).not.toContain('systemctl restart nginx');
+ expect(modelContext).not.toContain('systemctl stop nginx');
+ expect(modelContext).not.toContain('systemctl status nginx');
+ expect(briefing.title).toBe('Patrol finding attached');
+ expect(briefing.subject).toBe('Nginx down on node-1');
+ expect(briefing.detailLines).toEqual([
+ 'Existing action artifact: Restore web service',
+ 'Restart the service and verify health.',
+ ]);
+ expect(briefing.evidence).toBeUndefined();
+ expect(briefing.actionLabel).toBeUndefined();
expect(briefing.commandSummary).toBe(
'2 commands recorded for governed plan review; 1 rollback command recorded',
);
expect(briefing.safetyNote).toBe(
- 'Command details stay in governed remediation context; execution requires the approval flow.',
+ 'Assistant should decide remediation from evidence; command execution requires governed approval.',
);
- expect(briefing.suggestedPrompts).toEqual([
- 'Review plan risk and prerequisites',
- 'Explain commands without command text',
- 'Check rollback and verification steps',
- ]);
+ expect(briefing.suggestedPrompts).toBeUndefined();
expect(JSON.stringify(briefing)).not.toContain('systemctl');
});
@@ -1883,17 +1908,14 @@ describe('Patrol page header IA framing', () => {
it('names the proactive trust loop on the canonical Patrol surface', async () => {
// The Patrol page header is the most visible piece of operator-facing
- // copy on the canonical Patrol surface. The IA reframe replaces the
- // prior passive "verify, review, control" framing with one that names
- // the loop the page actually owns: investigate, capture evidence,
- // propose safe fixes under approval. Pin the wording on the canonical
- // helper from the patrol-intelligence subsystem so a refactor cannot
- // silently drop the framing or split the tooltip from the description.
+ // copy on the canonical Patrol surface. The IA framing must keep the
+ // product boundary clear: Pulse probes and assembles evidence, the
+ // configured model reasons over it, and action stays approval-bound.
const { getPatrolPageHeaderMeta, PATROL_PAGE_DESCRIPTION, PATROL_PAGE_TITLE_TOOLTIP } =
await import('@/utils/patrolPagePresentation');
- expect(PATROL_PAGE_DESCRIPTION).toContain('Pulse investigates your infrastructure');
- expect(PATROL_PAGE_DESCRIPTION).toContain('gathers evidence');
- expect(PATROL_PAGE_DESCRIPTION).toContain('proposes safe fixes');
+ expect(PATROL_PAGE_DESCRIPTION).toContain('Pulse checks your infrastructure');
+ expect(PATROL_PAGE_DESCRIPTION).toContain('configured model');
+ expect(PATROL_PAGE_DESCRIPTION).toContain('right evidence');
expect(PATROL_PAGE_DESCRIPTION).toContain('approval policy');
expect(PATROL_PAGE_TITLE_TOOLTIP).toBe(PATROL_PAGE_DESCRIPTION);
expect(getPatrolPageHeaderMeta()).toMatchObject({
diff --git a/frontend-modern/src/features/patrol/patrolInvestigationContextModel.ts b/frontend-modern/src/features/patrol/patrolInvestigationContextModel.ts
index 9f07e0d099..a87aa26221 100644
--- a/frontend-modern/src/features/patrol/patrolInvestigationContextModel.ts
+++ b/frontend-modern/src/features/patrol/patrolInvestigationContextModel.ts
@@ -462,10 +462,7 @@ export function buildPatrolInvestigationRecordPresentation(
.map(normalizeText)
.filter(Boolean)
.slice(0, 3),
- rollbackSummaries: (record.rollback || [])
- .map(normalizeText)
- .filter(Boolean)
- .slice(0, 3),
+ rollbackSummaries: (record.rollback || []).map(normalizeText).filter(Boolean).slice(0, 3),
toolsUsed: (record.tools_used || []).map(formatToolLabel).filter(Boolean).slice(0, 4),
proposedFix:
proposedFix && proposedFix.description
@@ -643,7 +640,7 @@ function buildPatrolAssistantFindingActionPromptInstruction(
const contextParts = [
proposedFix?.description
- ? `proposed fix ${truncateContextText(proposedFix.description, 120)}`
+ ? `recorded action artifact ${truncateContextText(proposedFix.description, 120)}`
: undefined,
proposedFix?.riskLabel ? `${proposedFix.riskLabel.toLowerCase()} risk` : undefined,
proposedFix?.targetHost
@@ -655,7 +652,7 @@ function buildPatrolAssistantFindingActionPromptInstruction(
outcome ? `outcome ${formatIdentifierLabel(outcome)?.toLowerCase() || outcome}` : undefined,
].filter(isNonEmptyString);
- return `Start by reviewing the governed proposed fix or action posture${
+ return `Start by reviewing the governed action posture${
contextParts.length > 0 ? ` (${contextParts.join('; ')})` : ''
}. Use the attached Patrol context to explain risk, prerequisites, and the safest next step without repeating command text.`;
}
@@ -2110,9 +2107,7 @@ function formatAssessmentRecentChangeContextLine(change: ResourceChange, index:
return `Recent Change ${index}: ${parts.join('; ')}`;
}
-function formatAssessmentRecentChangeRelatedResources(
- change: ResourceChange,
-): string | undefined {
+function formatAssessmentRecentChangeRelatedResources(change: ResourceChange): string | undefined {
const labels: string[] = [];
for (const relatedResource of change.relatedResources ?? []) {
const label = truncateContextText(
@@ -2476,43 +2471,37 @@ export function buildPatrolRemediationPlanAssistantPrompt(
): string {
const title = normalizeText(input.title) || 'Patrol finding';
const subject = normalizeText(input.subject) || 'the affected resource';
+
+ return `Review this Patrol finding and decide the safest next step: "${title}" on ${subject}.`;
+}
+
+export function buildPatrolRemediationPlanAssistantModelContext(
+ input: PatrolRemediationPlanAssistantInput,
+): string {
+ const title = normalizeText(input.title) || 'Patrol finding';
+ const subject = normalizeText(input.subject) || 'the affected resource';
const plan = input.plan;
const planTitle = normalizeText(plan.title);
const planDescription = normalizeText(plan.description);
const riskLabel = formatIdentifierLabel(plan.risk_level)?.toLowerCase();
const statusLabel = formatIdentifierLabel(plan.status)?.toLowerCase();
-
- let prompt =
- 'Pulse Patrol generated a governed remediation plan for a finding. Review it from the attached plan context before suggesting next actions.\n\n';
- prompt += `**Finding:** ${title} on ${subject}\n`;
- if (planTitle) prompt += `**Plan:** ${planTitle}\n`;
- if (statusLabel) prompt += `**Plan status:** ${statusLabel}\n`;
- if (riskLabel) prompt += `**Risk level:** ${riskLabel}\n`;
- if (planDescription) prompt += `\n**Plan context:** ${planDescription}\n`;
-
- const steps = Array.isArray(plan.steps) ? plan.steps : [];
- if (steps.length > 0) {
- prompt += '\n**Steps:**\n';
- for (const step of steps) {
- const action = normalizeText(step.action) || `Step ${step.order}`;
- const qualifiers = [
- formatIdentifierLabel(step.risk_level)?.toLowerCase()
- ? `${formatIdentifierLabel(step.risk_level)?.toLowerCase()} risk`
- : undefined,
- step.command ? 'command recorded in governed plan' : undefined,
- step.rollback_command ? 'rollback command recorded in governed plan' : undefined,
- ].filter(isNonEmptyString);
- prompt += `${step.order}. ${action}${qualifiers.length > 0 ? ` (${qualifiers.join('; ')})` : ''}\n`;
- }
- }
-
const commandSummary = formatPlanCommandSummary(plan);
- if (commandSummary) {
- prompt += `\n**Governed action details:** ${commandSummary}.\n`;
- }
- prompt +=
- '\nCommand details stay in the remediation or approval surface. Do not infer, repeat, or execute raw command text from this chat handoff. If any step is risky or ambiguous, ask before proceeding.';
- return prompt;
+
+ return [
+ '[Patrol Finding Action Context]',
+ 'Pulse is attaching observed finding context and any existing governed action artifact. The selected language model should decide whether remediation is appropriate and propose the safest next step.',
+ formatContextLine('Finding', `${title} on ${subject}`),
+ formatContextLine('Existing Action Artifact', planTitle),
+ formatContextLine('Artifact Status', statusLabel),
+ formatContextLine('Recorded Risk', riskLabel),
+ formatContextLine('Attached Action Context', planDescription),
+ commandSummary
+ ? `Governed Action Posture: ${commandSummary}. Treat this as approval state, not remediation guidance.`
+ : undefined,
+ 'Operator Boundary: Do not assume any Patrol-authored action is correct. Use the finding evidence, available tools, and current operational state to decide the remediation. Any state-changing command must go through governed approval; do not infer, repeat, or execute raw command text from this chat handoff.',
+ ]
+ .filter(isNonEmptyString)
+ .join('\n');
}
export function buildPatrolRemediationPlanAssistantBriefing(
@@ -2521,7 +2510,6 @@ export function buildPatrolRemediationPlanAssistantBriefing(
const title = normalizeText(input.title) || 'Patrol finding';
const subject = normalizeText(input.subject) || 'affected resource';
const plan = input.plan;
- const steps = Array.isArray(plan.steps) ? plan.steps : [];
const statusParts = [
formatIdentifierLabel(plan.status),
formatIdentifierLabel(plan.risk_level)
@@ -2531,33 +2519,20 @@ export function buildPatrolRemediationPlanAssistantBriefing(
const planTitle = normalizeText(plan.title);
const planDescription = normalizeText(plan.description);
const commandSummary = formatPlanCommandSummary(plan);
- const stepSummaries = steps
- .map((step) => {
- const action = normalizeText(step.action);
- if (!action) return undefined;
- const risk = formatIdentifierLabel(step.risk_level);
- return risk ? `${action} (${risk} risk)` : action;
- })
- .filter(isNonEmptyString)
- .slice(0, 4);
return {
sourceLabel: 'Pulse Patrol',
- title: 'Remediation plan attached',
+ title: 'Patrol finding attached',
subject: `${title} on ${subject}`,
statusLabel: statusParts.join(' · ') || undefined,
detailLines: [
- planTitle ? `Plan: ${planTitle}` : undefined,
+ planTitle ? `Existing action artifact: ${planTitle}` : undefined,
planDescription,
- steps.length > 0 ? `${steps.length} planned step${steps.length === 1 ? '' : 's'}` : undefined,
].filter(isNonEmptyString),
- evidence: stepSummaries,
- actionLabel: planTitle || undefined,
commandSummary,
safetyNote: commandSummary
- ? 'Command details stay in governed remediation context; execution requires the approval flow.'
- : 'Review the governed remediation context before execution.',
- suggestedPrompts: buildPatrolRemediationPlanSuggestedPrompts(plan, steps, commandSummary),
+ ? 'Assistant should decide remediation from evidence; command execution requires governed approval.'
+ : 'Assistant should decide remediation from evidence before any governed action.',
};
}
@@ -2629,32 +2604,6 @@ export function buildPatrolAssistantFindingBriefing(
};
}
-function buildPatrolRemediationPlanSuggestedPrompts(
- plan: RemediationPlan,
- steps: RemediationPlan['steps'],
- commandSummary?: string,
-): string[] {
- const prompts = ['Review plan risk and prerequisites'];
- const hasSteps = Array.isArray(steps) && steps.length > 0;
- const riskLevel = normalizeText(plan.risk_level).toLowerCase();
-
- if (commandSummary) {
- prompts.push('Explain commands without command text');
- }
-
- if (hasSteps) {
- prompts.push('Check rollback and verification steps');
- } else {
- prompts.push('Identify missing plan details');
- }
-
- if (!commandSummary && (riskLevel === 'high' || riskLevel === 'critical')) {
- prompts.push('Check rollback and failure handling');
- }
-
- return formatPatrolSuggestedPrompts(prompts);
-}
-
function buildPatrolFindingSuggestedPrompts(
input: PatrolAssistantFindingBriefingInput,
record: PatrolInvestigationRecordPresentation,
@@ -2841,9 +2790,9 @@ function buildPatrolAssistantOperatorDecision(
if (record.proposed_fix) {
const fixId = normalizeText(record.proposed_fix.id);
if (fixId) {
- parts.push(`proposed fix ${fixId}`);
+ parts.push(`action artifact ${fixId}`);
} else if (normalizeText(record.proposed_fix.description)) {
- parts.push('proposed fix recorded');
+ parts.push('action artifact recorded');
}
const risk = pendingApproval.riskLevel || normalizeText(record.proposed_fix.risk_level);
if (risk) {
@@ -2858,7 +2807,7 @@ function buildPatrolAssistantOperatorDecision(
switch (normalizeText(record.outcome)) {
case 'fix_queued':
- return 'Review the proposed fix in the governed approval or remediation flow before execution.';
+ return 'Review the recorded action posture in the governed approval or remediation flow before execution.';
case 'fix_executed':
return 'Verify the execution result before closing or resolving the finding.';
case 'fix_failed':
diff --git a/frontend-modern/src/utils/__tests__/patrolPagePresentation.test.ts b/frontend-modern/src/utils/__tests__/patrolPagePresentation.test.ts
index eccf7d037b..6731b8dc43 100644
--- a/frontend-modern/src/utils/__tests__/patrolPagePresentation.test.ts
+++ b/frontend-modern/src/utils/__tests__/patrolPagePresentation.test.ts
@@ -9,13 +9,12 @@ import {
describe('patrolPagePresentation', () => {
it('returns canonical Patrol page header metadata that names the proactive trust loop', () => {
// The page header is the most visible piece of operator-facing copy on
- // the Patrol surface. It must name the loop the page actually owns —
- // investigation, evidence capture, governed action — instead of the
- // prior passive "verify, review, control" framing. Pin the exact
- // wording so the IA reframe doesn't silently regress.
+ // the Patrol surface. It must keep the product boundary clear: Pulse
+ // probes and assembles evidence, the configured model reasons over it,
+ // and action stays approval-bound.
expect(PATROL_PAGE_TITLE).toBe('Patrol');
expect(PATROL_PAGE_DESCRIPTION).toBe(
- 'Pulse investigates your infrastructure, gathers evidence for every finding, and proposes safe fixes under your approval policy.',
+ 'Pulse checks your infrastructure on a schedule, gives your configured model the right evidence, and keeps fixes behind your approval policy.',
);
// Tooltip must share the same framing so hover and inline don't tell
// different stories about what Patrol does.
@@ -23,9 +22,9 @@ describe('patrolPagePresentation', () => {
expect(getPatrolPageHeaderMeta()).toEqual({
title: 'Patrol',
description:
- 'Pulse investigates your infrastructure, gathers evidence for every finding, and proposes safe fixes under your approval policy.',
+ 'Pulse checks your infrastructure on a schedule, gives your configured model the right evidence, and keeps fixes behind your approval policy.',
titleTooltip:
- 'Pulse investigates your infrastructure, gathers evidence for every finding, and proposes safe fixes under your approval policy.',
+ 'Pulse checks your infrastructure on a schedule, gives your configured model the right evidence, and keeps fixes behind your approval policy.',
});
});
});
diff --git a/frontend-modern/src/utils/patrolPagePresentation.ts b/frontend-modern/src/utils/patrolPagePresentation.ts
index a6d4e133c5..a03a93c0df 100644
--- a/frontend-modern/src/utils/patrolPagePresentation.ts
+++ b/frontend-modern/src/utils/patrolPagePresentation.ts
@@ -1,13 +1,8 @@
export const PATROL_PAGE_TITLE = 'Patrol';
-// Page description names the trust loop the surface owns end-to-end:
-// investigate the infrastructure, capture evidence, propose safe fixes
-// under operator approval. Replaces the prior "verify health, review
-// findings, control runtime" copy, which framed the page as a passive
-// monitoring console rather than the proactive-intelligence engine
-// described in the Pulse Intelligence vision (investigation +
-// explanation + governed action).
+// Page description names the Patrol ownership boundary: scheduled probing,
+// context assembly, model-assisted investigation, and governed action.
export const PATROL_PAGE_DESCRIPTION =
- 'Pulse investigates your infrastructure, gathers evidence for every finding, and proposes safe fixes under your approval policy.';
+ 'Pulse checks your infrastructure on a schedule, gives your configured model the right evidence, and keeps fixes behind your approval policy.';
// Tooltip on the page title; shares the same framing as the description so
// hover and inline copy don't tell different stories about what Patrol does.
export const PATROL_PAGE_TITLE_TOOLTIP = PATROL_PAGE_DESCRIPTION;