personal memory agent
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

health: resolve stalled skeletons after connection timeout

+28
+28
apps/health/workspace.html
··· 1367 1367 logExportBtn: document.getElementById('logExportBtn'), 1368 1368 }; 1369 1369 1370 + let timeoutFired = false; 1371 + 1370 1372 // Human-readable service names 1371 1373 const SERVICE_NAMES = { 1372 1374 supervisor: 'System Manager', ··· 1382 1384 1383 1385 function serviceName(internal) { 1384 1386 return SERVICE_NAMES[internal] || internal; 1387 + } 1388 + 1389 + function sweepUnresolvedSkeletons() { 1390 + if (timeoutFired) return; 1391 + timeoutFired = true; 1392 + const targets = [ 1393 + elements.vitalsStatus, 1394 + elements.serviceDots, 1395 + elements.healthValue, 1396 + elements.statusSummaryText, 1397 + ]; 1398 + for (const el of targets) { 1399 + if (el && el.querySelector('.skeleton, .skeleton-dark')) { 1400 + el.textContent = 'unavailable'; 1401 + } 1402 + } 1403 + } 1404 + 1405 + function armSkeletonTimeout() { 1406 + setTimeout(sweepUnresolvedSkeletons, 7000); 1385 1407 } 1386 1408 1387 1409 // Utility functions ··· 2989 3011 // Listen to all Callosum events 2990 3012 if (window.appEvents) { 2991 3013 window.appEvents.listen('*', handleEvent); 3014 + } 3015 + 3016 + if (document.readyState === 'loading') { 3017 + document.addEventListener('DOMContentLoaded', armSkeletonTimeout, {once: true}); 3018 + } else { 3019 + armSkeletonTimeout(); 2992 3020 } 2993 3021 2994 3022 function sweepStale() {