@nockdev/hsa 1.2.1 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dashboard.html +13 -3
  2. package/logs.html +1018 -480
  3. package/package.json +1 -1
package/dashboard.html CHANGED
@@ -1490,6 +1490,7 @@
1490
1490
  let selectedSessionId = "";
1491
1491
  let selectedIde = "";
1492
1492
  let selectedProject = "";
1493
+ let sessionSSERetryMs = 1000;
1493
1494
 
1494
1495
  document.getElementById("endpointInput").value = endpoint;
1495
1496
 
@@ -2127,8 +2128,8 @@
2127
2128
  const deltas = [];
2128
2129
  for (let i = 1; i < cacheHistory.length; i++) {
2129
2130
  deltas.push({
2130
- hits: cacheHistory[i].hits - cacheHistory[i - 1].hits,
2131
- misses: cacheHistory[i].misses - cacheHistory[i - 1].misses,
2131
+ hits: Math.max(0, cacheHistory[i].hits - cacheHistory[i - 1].hits),
2132
+ misses: Math.max(0, cacheHistory[i].misses - cacheHistory[i - 1].misses),
2132
2133
  });
2133
2134
  }
2134
2135
  const maxVal = Math.max(
@@ -2229,9 +2230,17 @@
2229
2230
  }
2230
2231
  } catch {}
2231
2232
  };
2233
+ // FE-02: Auto-reconnect with exponential backoff
2232
2234
  sessionSSE.onerror = () => {
2233
2235
  sessionSSE.close();
2234
2236
  sessionSSE = null;
2237
+ setTimeout(() => {
2238
+ connectSessionSSE();
2239
+ sessionSSERetryMs = Math.min(sessionSSERetryMs * 2, 30000);
2240
+ }, sessionSSERetryMs);
2241
+ };
2242
+ sessionSSE.onopen = () => {
2243
+ sessionSSERetryMs = 1000;
2235
2244
  };
2236
2245
  } catch {}
2237
2246
  }
@@ -2331,7 +2340,8 @@
2331
2340
  .replace(/&/g, "&amp;")
2332
2341
  .replace(/</g, "&lt;")
2333
2342
  .replace(/>/g, "&gt;")
2334
- .replace(/"/g, "&quot;");
2343
+ .replace(/"/g, "&quot;")
2344
+ .replace(/'/g, "&#39;");
2335
2345
  }
2336
2346
  function fmtUptime(ms) {
2337
2347
  const s = Math.floor(ms / 1000);