Reduce console noise: downgrade repetitive alert WebSocket log to debug

The backend broadcasts individual 'alert' WebSocket messages on every
poll cycle for recurring alerts. These are intentionally not processed
by the frontend (handled via state sync), but were logged at warn level,
producing 12+ console warnings per page load. Downgraded to debug.

Also wrapped global WebSocket store creation in createRoot to suppress
SolidJS 'computations created outside createRoot' disposal warning.
This commit is contained in:
rcourtman
2026-06-26 14:49:12 +01:00
parent 1a9dd508f3
commit 41fc15edee
2 changed files with 5 additions and 3 deletions
@@ -1,5 +1,5 @@
import { createWebSocketStore } from './websocket';
import { createSignal } from 'solid-js';
import { createSignal, createRoot } from 'solid-js';
import { createStore } from 'solid-js/store';
import { getPulseWebSocketUrl } from '@/utils/url';
import type { Alert, ResolvedAlert, State } from '@/types/api';
@@ -91,7 +91,9 @@ export function getGlobalWebSocketStore() {
const wsUrl = getPulseWebSocketUrl();
window.__pulseWsStore = createWebSocketStore(wsUrl);
createRoot(() => {
window.__pulseWsStore = createWebSocketStore(wsUrl);
});
bindGlobalShutdownHandler();
}
+1 -1
View File
@@ -572,7 +572,7 @@ export function createWebSocketStore(url: string) {
logger.info('WebSocket connection established');
} else if (message.type === 'alert') {
// Individual alerts now handled via state sync
logger.warn('New alert received (will sync with next state update)', message.data);
logger.debug('New alert received (will sync with next state update)', message.data);
} else if (message.type === 'alertResolved') {
// Individual alert resolution now handled via state sync
logger.info('Alert resolved (will sync with next state update)', {