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.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
fix(tests): stop alerts manager leak and settle frontend guardrails
rcourtmanf962fe83b113
diff --git a/frontend-modern/browser-verification.json b/frontend-modern/browser-verification.jsonindex ee15006fe1..758a49db05 100644--- a/frontend-modern/browser-verification.json+++ b/frontend-modern/browser-verification.json@@ -1,27 +1,21 @@{"version": 1,- "base_sha": "c94ed3906e1290eefe2332e5b9807d5fb012a0dc",- "verified_at": "2026-08-09T09:26:15Z",+ "base_sha": "e9904157e718d6233d6d8bfe292a3f820ec2e123",+ "verified_at": "2026-08-09T09:53:20Z","result": "passed","changed_paths": [- "frontend-modern/src/components/Settings/AIModelSelectionSection.tsx",- "frontend-modern/src/components/Settings/AIProviderConfigurationSection.tsx",- "frontend-modern/src/components/Settings/AISettings.tsx",- "frontend-modern/src/index.css"+ "frontend-modern/src/components/Settings/InfrastructureAgentDoctorPage.tsx"],"content_sha256": {- "frontend-modern/src/components/Settings/AIModelSelectionSection.tsx": "8591b74410989224fc62460ac0db612d922bc4d5288c2728a4f19a9eb0c77877",- "frontend-modern/src/components/Settings/AIProviderConfigurationSection.tsx": "177ac200d4f3b4dcb64b792f746bd17cc1259d1dafb66c5900bad5eb17936f14",- "frontend-modern/src/components/Settings/AISettings.tsx": "2e8bab6f7bbca5c4a7dbd772f3325fd89763b1c384ee30c2d0b0ea3b97266a6e",- "frontend-modern/src/index.css": "87f4ab4ec40b8042cf33eb407ca849acd285dbe9ce650c0014596aa39752852b"+ "frontend-modern/src/components/Settings/InfrastructureAgentDoctorPage.tsx": "3391790f60fe53f5d2c353cfd71d388e2e46e2e949bafd35d60a5732cb8f4dd0"},"routes": [- "/settings/pulse-intelligence/provider"+ "/settings/infrastructure/agent-doctor"],"viewports": [{"width": 1440,- "height": 1000+ "height": 900},{"width": 390,@@ -29,15 +23,15 @@}],"states": [- "Dark-mode shared model and Anthropic API-key controls rendered on the semantic slate surface with light text at desktop and narrow widths, including empty, filled, focused, open-provider, and closed-provider states.",- "After reloading the persisted Provider & Models route, both controls remained empty instead of receiving the local admin credential, retained autocomplete=off and autocomplete=new-password respectively, and kept the dark semantic surface.",- "The 390x844 layout kept both controls within the viewport with document scrollWidth equal to innerWidth, and the focused API-key control remained visible above the mobile navigation without clipping.",- "The verified route produced no browser console errors."+ "Isolated worktree backend with two genuinely enrolled agents (macOS host agent plus a colima Linux VM agent) whose API tokens were then revoked over the real settings API, producing a real two-installation credential-repair state with both connections reporting credentialStatus invalid.",+ "The Generate update token section rendered the multiple-repair guidance and the installation selector as the shared labelled FormSelect primitive: a visible 'Agent installation to repair' label associated to the select via label[for] matching the select id, replacing the previous aria-label-only raw select.",+ "After minting a token for the selected installation, the selected agent's detail exposed its host-local repair command with the fresh scoped credential embedded while the unselected installation stayed locked with the select-this-installation-above guidance.",+ "At 390x844 the Agent Doctor document scroll width measured exactly 390 pixels with the labelled selector rendered full-width inside the token section."],"interactions": [- "Signed in to the managed local development runtime, opened Settings > Provider & Models, and expanded the Anthropic provider configuration.",- "Focused and edited the shared model and API-key controls without saving, verified their computed background, text, border, autocomplete, and password-type properties, then cleared both temporary values.",- "Collapsed and reopened the Anthropic provider, reloaded the Provider & Models route, and confirmed browser credential autofill did not repopulate either field.",- "Repeated the visual and focus checks at 1440x1000 and 390x844, including horizontal-overflow and console-error inspection."+ "Logged in and opened the Agent Doctor at 1440x900 with two critical credential-repair targets present.",+ "Changed the installation selector from triage-mac-01 to triage-vm-01 and confirmed the select value, selected option text, and visible associated label via DOM inspection.",+ "Clicked Generate token for the selected installation, then expanded both agent rows and verified the per-installation unlock: triage-vm-01's command carried the embedded token and triage-mac-01 remained gated.",+ "Resized to 390x844, reloaded, and re-verified the labelled selector rendering and a 390-pixel document scroll width against the 390-pixel viewport."]}diff --git a/frontend-modern/src/components/Settings/InfrastructureAgentDoctorPage.tsx b/frontend-modern/src/components/Settings/InfrastructureAgentDoctorPage.tsxindex 3b741367bb..b8755a1365 100644--- a/frontend-modern/src/components/Settings/InfrastructureAgentDoctorPage.tsx+++ b/frontend-modern/src/components/Settings/InfrastructureAgentDoctorPage.tsx@@ -1,6 +1,7 @@import { For, Show, createEffect, createMemo, createSignal, type Component } from 'solid-js';import { ChevronDown, ChevronLeft, ChevronRight, RefreshCw } from 'lucide-solid';import { Button, CommandCopyButton } from '@/components/shared/Button';+import { FormSelect } from '@/components/shared/FormSelect';import {Table,TableBody,@@ -316,11 +317,13 @@ export const InfrastructureAgentDoctorPage: Component<InfrastructureAgentDoctorP</div><div class="flex flex-col gap-2 sm:flex-row"><Show when={tokenGatedTargetCount() > 1}>- <select+ <FormSelect+ label="Agent installation to repair"+ fieldClass="flex-1"+ labelClass="text-xs font-medium text-blue-900 dark:text-blue-100"value={selectedTokenTarget()?.key}onChange={(event) => setSelectedTokenTargetKey(event.currentTarget.value)}- aria-label="Agent installation to repair"- class="min-h-10 flex-1 rounded-md border border-blue-200 bg-surface px-3 py-2 text-sm text-base-content shadow-sm focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-200 dark:border-blue-700 dark:bg-blue-950 dark:focus:ring-blue-900"+ selectBaseClass="min-h-10 w-full rounded-md border border-blue-200 bg-surface px-3 py-2 text-sm text-base-content shadow-sm focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-200 dark:border-blue-700 dark:bg-blue-950 dark:focus:ring-blue-900"><For each={tokenGatedTargets()}>{(target) => (@@ -330,7 +333,7 @@ export const InfrastructureAgentDoctorPage: Component<InfrastructureAgentDoctorP</option>)}</For>- </select>+ </FormSelect></Show><inputtype="text"diff --git a/frontend-modern/src/utils/__tests__/alertResourceTablePresentation.branchcov0718.test.ts b/frontend-modern/src/utils/__tests__/alertResourceTablePresentation.branchcov0718.test.tsindex 3bf9207f28..eaf578b9ac 100644--- a/frontend-modern/src/utils/__tests__/alertResourceTablePresentation.branchcov0718.test.ts+++ b/frontend-modern/src/utils/__tests__/alertResourceTablePresentation.branchcov0718.test.ts@@ -122,7 +122,7 @@ describe('alertResourceTablePresentation.branchcov0718', () => {it('exposes the enable/disable metric-input title constants', () => {expect(ALERT_RESOURCE_TABLE_ENABLE_METRIC_TITLE).toBe('Click to enable this metric');expect(ALERT_RESOURCE_TABLE_DISABLE_METRIC_TITLE).toBe(- 'Set to -1 or use the Off toggle to disable alerts for this metric',+ 'Use the Off control to disable alerts for this metric',);});diff --git a/internal/api/config_handlers_auto_register_test.go b/internal/api/config_handlers_auto_register_test.goindex df3296f399..ea5f7729c0 100644--- a/internal/api/config_handlers_auto_register_test.go+++ b/internal/api/config_handlers_auto_register_test.go@@ -31,7 +31,13 @@ func newTestConfigHandlers(t *testing.T, cfg *config.Config) *ConfigHandlers {h.defaultConfig = cfgh.defaultPersistence = config.NewConfigPersistence(cfg.DataPath)monitor, _, _ := newTestMonitor(t)- setUnexportedField(t, monitor, "alertManager", alerts.NewManager())+ // Stop the manager's background workers on cleanup: a leaked+ // periodicSaveAlerts goroutine logs through the global zerolog logger and+ // races with tests that swap it (e.g. the authorization-refusal contract+ // test under -race).+ alertManager := alerts.NewManager()+ t.Cleanup(alertManager.Stop)+ setUnexportedField(t, monitor, "alertManager", alertManager)h.defaultMonitor = monitorreturn h