fix: surface full sitespeed.io error output + robust binary resolution

- runner.js: auto-detects sitespeed.io via which/candidates instead of
  hardcoded path; collects all stderr and appends last 20 lines to the
  error so the real failure is visible in the UI log
- running.pug: render multi-line error messages line-by-line

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-06 19:58:17 +02:00
parent 86a44e68bb
commit 8276f8896d
2 changed files with 67 additions and 28 deletions

View File

@@ -65,9 +65,14 @@ block content
badge.className = 'text-xs px-3 py-1 rounded-full bg-red-100 text-red-800 font-semibold';
try {
const d = JSON.parse(e.data);
const el = document.createElement('div');
el.className = 'text-red-400 log-line';
el.textContent = '[ERROR] ' + d.message;
logBox.appendChild(el);
// Render each line of the error message separately so multi-line errors are readable
const lines = d.message.split('\n');
for (const line of lines) {
const el = document.createElement('div');
el.className = 'text-red-400 log-line';
el.textContent = line;
logBox.appendChild(el);
}
logBox.scrollTop = logBox.scrollHeight;
} catch {}
});