Fix critical frontend issues: race conditions, memory leaks, silent failures
- Add loading guard to loadPictureSources to prevent concurrent fetches - Pause perf chart polling and uptime timer when browser tab is hidden - Disconnect KC and LED preview WebSockets when leaving targets tab - Add error toasts to loadCaptureTemplates and saveKCBrightness - Skip auto-refresh polling when document is hidden - Widen auto-start dashboard cards for better text display Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1003,6 +1003,10 @@ function disconnectLedPreviewWS(targetId) {
|
||||
if (panel) panel.style.display = 'none';
|
||||
}
|
||||
|
||||
export function disconnectAllLedPreviewWS() {
|
||||
Object.keys(ledPreviewWebSockets).forEach(id => disconnectLedPreviewWS(id));
|
||||
}
|
||||
|
||||
export function toggleLedPreview(targetId) {
|
||||
const panel = document.getElementById(`led-preview-panel-${targetId}`);
|
||||
if (!panel) return;
|
||||
|
||||
Reference in New Issue
Block a user