From 0ea9b769a38f87b26ad0c9886670b52df3107c2c Mon Sep 17 00:00:00 2001 From: Gronod Date: Sun, 17 May 2026 08:38:57 +0100 Subject: [PATCH] fix(ui): normalise status panel timing bars against slowest task not totalMs Tasks run in parallel so any individual task time can exceed the wall-clock total, causing all bars to render at 100%. Normalise against the maximum individual task time so bars correctly show relative response times. --- public/app.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/app.js b/public/app.js index 301dbac..f441acc 100644 --- a/public/app.js +++ b/public/app.js @@ -704,8 +704,9 @@ function renderStatusPanel(data, panel) {
Last Poll (${lp.totalMs}ms total, ${pollAge}s ago)
`; + const maxTaskMs = lp.tasks.reduce((max, t) => Math.max(max, t.ms), 1); for (const t of lp.tasks) { - const barWidth = lp.totalMs > 0 ? Math.max(2, (t.ms / lp.totalMs) * 100) : 0; + const barWidth = Math.max(2, (t.ms / maxTaskMs) * 100); html += `
${escapeHtml(t.label)}