fix: count only live dashboard sessions

This commit is contained in:
William Valentin
2026-04-30 17:07:17 -07:00
parent fd17628e94
commit 476c0e347f
2 changed files with 53 additions and 19 deletions
+8 -1
View File
@@ -160,7 +160,14 @@ function renderSummaryCards() {
const fws = Object.keys(s.by_framework || {});
if (fws.length > 0) {
const sub = document.getElementById('dash-active-sub');
if (sub) sub.textContent = fws.map(f => `${f} ${(s.by_framework[f].runs || 0)}`).join(' · ');
if (sub) {
const activeByFramework = fws
.map(f => [f, s.by_framework[f].active_sessions || 0])
.filter(([, count]) => count > 0);
sub.textContent = activeByFramework.length > 0
? activeByFramework.map(([f, count]) => `${f} ${count}`).join(' · ')
: 'no live sessions';
}
}
const errEl = document.getElementById('dash-errors');