From 37b2447562ffe69391ed982aa4ecbba9ea4908a1 Mon Sep 17 00:00:00 2001 From: igneum-labs <337424239+igneum-labs@users.noreply.github.com> Date: Wed, 7 Oct 2026 10:43:01 +0000 Subject: [PATCH] Worker dashboard: the slots gauge counts build-* slots only (the box's measure lock is not a build slot) Co-Authored-By: Claude Fable 5.1 --- tools/workers/page/workers.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/workers/page/workers.html b/tools/workers/page/workers.html index ae026e32f..4d1037948 100644 --- a/tools/workers/page/workers.html +++ b/tools/workers/page/workers.html @@ -192,6 +192,7 @@ function arc(pct, cls) { const tone = (pct, warn = 70, bad = 90) => pct >= bad ? 'bad' : pct >= warn ? 'warn' : ''; const FEEDS = { 'igneum-build-1': 'https://build.igneum.network/workers.json', 'igneum-build-2': 'https://build-2.igneum.network/workers.json', 'igneum-build-3': 'https://build-3.igneum.network/workers.json' }; +const buildHeld = b => (b.slots && b.slots.held || []).filter(h => /^build-\d+$/.test(h.slot)).length; const boxesOf = d => (Array.isArray(d.boxes) && d.boxes.length ? d.boxes : d.box ? [{ ...d.box, source: d.sources && d.sources.box, headline: d.headline }] : []); function serverSection(b, i) { const id = `srv${i}`; @@ -211,7 +212,7 @@ function serverSection(b, i) {
${arc(m.used_pct, tone(m.used_pct))}
Memory
${m.used_pct ?? '?'}%
${esc(fmtBytes((m.used_kb || 0) * 1024))} of ${esc(fmtBytes((m.total_kb || 0) * 1024))}
${arc(d.used_pct, tone(d.used_pct, 80, 92))}
Disk ${esc(d.mount || '/srv')}
${d.used_pct ?? '?'}%
${esc(fmtBytes(d.used_bytes))} used, ${esc(fmtBytes(d.avail_bytes))} free
${arc(hit ?? 0, 'cool')}
sccache hits
${hit === null ? '–' : hit + '%'}
${sc ? `${sc.hits ?? 0} hit, ${sc.misses ?? 0} miss, ${esc(sc.cache_size || '?')} of ${esc(sc.max_size || '?')}` : 'sccache not answering'}
-
${arc(b.slots ? (b.slots.held.length / Math.max(1, b.slots.count)) * 100 : 0, 'good')}
Build slots
${b.slots ? `${b.slots.held.length}/${b.slots.count}` : '–'}
${b.queue && b.queue.length ? `${b.queue.length} waiting${b.queue.some(q => q.priority === 'gate') ? ', a gate first' : ''}` : 'nobody waiting'}
+
${arc(b.slots ? (buildHeld(b) / Math.max(1, b.slots.count)) * 100 : 0, 'good')}
Build slots
${b.slots ? `${buildHeld(b)}/${b.slots.count}` : '–'}
${b.queue && b.queue.length ? `${b.queue.length} waiting${b.queue.some(q => q.priority === 'gate') ? ', a gate first' : ''}` : 'nobody waiting'}
`; } function renderServers() { const bx = boxesOf(D); $('servers').innerHTML = bx.length ? bx.map(serverSection).join('') : serverSection(null, 0); }