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.

fix: prevent demo findings from being persisted to disk

rcourtmanc9115efeb8ac
diff --git a/internal/ai/findings.go b/internal/ai/findings.go
index 38d2e6eeb6..0fea4c4928 100644
--- a/internal/ai/findings.go
+++ b/internal/ai/findings.go
@@ -176,9 +176,13 @@ func (s *FindingsStore) scheduleSave() {
s.saveTimer = time.AfterFunc(s.saveDebounce, func() {
s.mu.Lock()
s.savePending = false
- // Make a copy for saving
+ // Make a copy for saving, excluding demo findings
findingsCopy := make(map[string]*Finding, len(s.findings))
for id, f := range s.findings {
+ // Skip demo findings - they should never be persisted
+ if strings.HasPrefix(id, "demo-") {
+ continue
+ }
copy := *f
findingsCopy[id] = &copy
}
@@ -204,6 +208,10 @@ func (s *FindingsStore) ForceSave() error {
findingsCopy := make(map[string]*Finding, len(s.findings))
for id, f := range s.findings {
+ // Skip demo findings - they should never be persisted
+ if strings.HasPrefix(id, "demo-") {
+ continue
+ }
copy := *f
findingsCopy[id] = &copy
}