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.

Warn operators before silently dismissing a recurring finding

rcourtman014c36ca022b
diff --git a/docs/release-control/v6/internal/subsystems/patrol-intelligence.md b/docs/release-control/v6/internal/subsystems/patrol-intelligence.md
index 207864e432..a02fd65ed0 100644
--- a/docs/release-control/v6/internal/subsystems/patrol-intelligence.md
+++ b/docs/release-control/v6/internal/subsystems/patrol-intelligence.md
@@ -1099,3 +1099,12 @@ own commitment without expanding the row. The store-level
surfaces; render code reads it from the store, the store normalizer
promotes it from `remind_at` on both the unified and patrol-direct
fetch paths.
+That same dismiss confirmation must also surface a non-blocking
+recurrence hint when the operator is about to dismiss a finding with
+`regressionCount > 1` as `not_an_issue` or `expected_behavior` (the two
+"stay quiet forever" reasons). The hint must nudge the operator toward
+the reminder-bearing `will_fix_later` path without blocking the dismiss,
+and must NOT appear for `will_fix_later` itself or for findings with no
+prior regression. This is the operator-facing half of "Pulse learns from
+operator dismissal patterns" — a recurring issue should not be silently
+buried just because the operator is moving fast on triage.
diff --git a/frontend-modern/src/components/AI/FindingsPanel.tsx b/frontend-modern/src/components/AI/FindingsPanel.tsx
index e1b59fcefa..be64ce7225 100644
--- a/frontend-modern/src/components/AI/FindingsPanel.tsx
+++ b/frontend-modern/src/components/AI/FindingsPanel.tsx
@@ -1192,6 +1192,24 @@ export const FindingsPanel: Component<FindingsPanelProps> = (props) => {
Use "Expected" or "Later" if the detection itself is correct.
</p>
</Show>
+ {/* Recurrence hint: if a finding has regressed multiple times, the
+ operator may be silently dismissing something that keeps coming
+ back. Surface that fact for not_an_issue and expected_behavior
+ (the two "stay quiet forever" paths) so they can reconsider
+ 'will_fix_later' as a reminder-bearing alternative. */}
+ <Show
+ when={
+ (finding.regressionCount || 0) > 1 &&
+ (dismissReason() === 'not_an_issue' ||
+ dismissReason() === 'expected_behavior')
+ }
+ >
+ <p class="text-[11px] text-amber-700 dark:text-amber-300 mb-1.5 italic">
+ Heads up: this finding has regressed {finding.regressionCount} times
+ before. If you intend to fix it eventually, "Later" sets a
+ 7-day reminder instead of going silent permanently.
+ </p>
+ </Show>
<textarea
class="w-full text-xs px-2 py-1.5 rounded border border-border bg-surface text-base-content resize-none focus:outline-none focus:ring-1 focus:ring-red-400"
rows={2}
diff --git a/frontend-modern/src/components/AI/__tests__/FindingsPanel.test.ts b/frontend-modern/src/components/AI/__tests__/FindingsPanel.test.ts
index 1a97c32bd5..2361c3adef 100644
--- a/frontend-modern/src/components/AI/__tests__/FindingsPanel.test.ts
+++ b/frontend-modern/src/components/AI/__tests__/FindingsPanel.test.ts
@@ -124,6 +124,21 @@ describe('FindingsPanel assistant handoff', () => {
expect(findingsPanelSource).toContain('Pulse will permanently suppress');
});
+ it('warns the operator before dismissing a recurrent finding as not_an_issue or expected_behavior', () => {
+ // not_an_issue and expected_behavior both stay quiet forever after dismiss.
+ // If the finding has already regressed before, the operator may be
+ // silently dismissing a recurring issue. The dismiss confirmation panel
+ // must surface that recurrence as a non-blocking hint and nudge them
+ // toward the reminder-bearing 'will_fix_later' path. The hint must NOT
+ // appear for will_fix_later itself (already commitment-tracking) or for
+ // findings with no prior regression.
+ expect(findingsPanelSource).toContain('(finding.regressionCount || 0) > 1');
+ expect(findingsPanelSource).toContain("dismissReason() === 'not_an_issue'");
+ expect(findingsPanelSource).toContain("dismissReason() === 'expected_behavior'");
+ expect(findingsPanelSource).toContain('this finding has regressed');
+ expect(findingsPanelSource).toContain('"Later" sets a');
+ });
+
it("badges dismissed-as-will_fix_later rows with their pending remind-at deadline", () => {
// Once a finding is dismissed as will_fix_later, the row must surface the
// pending reminder so the operator knows the commitment exists; otherwise