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.

Show unknown Patrol snapshot state inline

rcourtman01a0b2d01ad7
diff --git a/docs/release-control/v6/internal/subsystems/patrol-intelligence.md b/docs/release-control/v6/internal/subsystems/patrol-intelligence.md
index 69a6b145b9..ba729f0076 100644
--- a/docs/release-control/v6/internal/subsystems/patrol-intelligence.md
+++ b/docs/release-control/v6/internal/subsystems/patrol-intelligence.md
@@ -265,9 +265,10 @@ logic that returns the operator to `Active` when a bucket disappears must all
read from the same snapshot-aware count source rather than mixing
snapshot-scoped pills with global queue truth.
That same fail-closed snapshot rule applies to inline run-history findings as
-well. Expanded run cards may render inline findings only when the run carries
-an explicit `finding_ids` snapshot; legacy runs without snapshot ids must stay
-unknown rather than being coerced into an empty findings snapshot.
+well. Expanded run cards should route through the same snapshot-aware findings
+surface as the primary workspace, so legacy runs without `finding_ids` still
+show an explicit snapshot-unavailable state instead of disappearing or being
+coerced into an empty findings snapshot.
That same rule applies to the primary findings workspace when a run is
selected. A selected run without `finding_ids` must not borrow global Patrol
findings, filter buckets, or queue counts; the findings surface should enter an
diff --git a/frontend-modern/src/components/patrol/RunHistoryEntry.tsx b/frontend-modern/src/components/patrol/RunHistoryEntry.tsx
index 8442722601..819bac6246 100644
--- a/frontend-modern/src/components/patrol/RunHistoryEntry.tsx
+++ b/frontend-modern/src/components/patrol/RunHistoryEntry.tsx
@@ -430,19 +430,17 @@ export function RunHistoryEntry(props: RunHistoryEntryProps) {
<RunToolCallTrace runId={run.id} toolCallCount={run.tool_call_count} />
{/* Section 7: Inline Findings */}
- <Show when={run.finding_ids !== undefined}>
- <div class="mt-3 pt-3 border-t border-blue-200 dark:border-blue-800">
- <FindingsPanel
- filterFindingIds={run.finding_ids}
- filterOverride="all"
- scopeResourceIds={canonicalScopeResourceIds}
- scopeResourceTypes={run.scope_resource_types}
- showScopeWarnings={true}
- showControls={false}
- runSnapshot={run}
- />
- </div>
- </Show>
+ <div class="mt-3 pt-3 border-t border-blue-200 dark:border-blue-800">
+ <FindingsPanel
+ filterFindingIds={run.finding_ids}
+ filterOverride="all"
+ scopeResourceIds={canonicalScopeResourceIds}
+ scopeResourceTypes={run.scope_resource_types}
+ showScopeWarnings={true}
+ showControls={false}
+ runSnapshot={run}
+ />
+ </div>
</div>
</Show>
</div>
diff --git a/frontend-modern/src/components/patrol/__tests__/RunHistoryEntry.test.tsx b/frontend-modern/src/components/patrol/__tests__/RunHistoryEntry.test.tsx
index 8cd4c01b3d..4c3161fe72 100644
--- a/frontend-modern/src/components/patrol/__tests__/RunHistoryEntry.test.tsx
+++ b/frontend-modern/src/components/patrol/__tests__/RunHistoryEntry.test.tsx
@@ -116,7 +116,7 @@ describe('RunHistoryEntry', () => {
});
});
- it('fails closed for legacy runs without snapshot finding ids', () => {
+ it('renders the inline findings panel in snapshot-unavailable mode for legacy runs without finding ids', () => {
render(() => (
<RunHistoryEntry
run={{
@@ -131,8 +131,20 @@ describe('RunHistoryEntry', () => {
/>
));
- expect(screen.queryByTestId('findings-panel')).not.toBeInTheDocument();
- expect(findingsPanelState.latestProps).toBeNull();
+ expect(screen.getByTestId('findings-panel')).toBeInTheDocument();
+ expect(findingsPanelState.latestProps).toMatchObject({
+ filterFindingIds: undefined,
+ filterOverride: 'all',
+ scopeResourceIds: [],
+ scopeResourceTypes: ['vm'],
+ showControls: false,
+ showScopeWarnings: true,
+ runSnapshot: {
+ ...run,
+ id: 'run-missing-finding-ids',
+ finding_ids: undefined,
+ },
+ });
});
it('uses a shared coverage summary when a scoped run checked fewer resources than its scope', () => {