Commit Graph

13 Commits

Author SHA1 Message Date
7865252fa2 fix: add --plugins.add analysisstorer to sitespeed.io args
analysisstorer is not in the default plugin set, so pageSummary JSON
files were never written. This plugin writes all message data to disk
(browsertime.pageSummary.json, coach.pageSummary.json, etc.) which
our parser reads to extract metrics.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 11:29:41 +02:00
19923f4369 debug: log outputFolder + JSON files to docker logs; fix walker to use stat
- runner.js: console.log outputFolder, sitespeed INFO lines, and
  find output after test so everything appears in docker logs
- parser.js: switch walker from withFileTypes to stat (more reliable
  on Docker volumes); log every directory visited

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 11:05:05 +02:00
59c2403f43 fix: replace broken symlink with REPORTS_DIR env var
The ln -sf /data/reports /app/reports was creating the symlink INSIDE
/app/reports/ (since that dir already existed from COPY) instead of
replacing it. Result: sitespeed.io wrote to /app/reports/<id> and the
parser looked there too, but the volume was at /data/reports.

Fix: set REPORTS_DIR=/data/reports in Docker ENV and use it in both
runner.js (outputFolder) and app.js (static serving). No symlink needed.
Also add .dockerignore to exclude reports/, node_modules/, .git/.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 10:49:20 +02:00
dc8fed337f debug: add parser logging + enable url2green API
- parser.js: log found files, top-level JSON keys, and extracted
  metric values to stdout (visible via docker logs speedboard)
- runner.js: add --sustainable.useGreenWebHostingAPI flag

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 10:44:14 +02:00
500f69efcc fix: rewrite parser with correct sitespeed.io v39 JSON paths
All metric paths were wrong. Corrected based on browsertimeAggregator.js
and axeAggregator.js source:

- pageTimings (load, FE/BE, DOM) live at statistics.pageTimings.* not
  statistics.timings.pageTimings.*
- FCP is statistics.paintTiming['first-contentful-paint'].median
- CLS is statistics.pageinfo.cumulativeLayoutShift.median
- TBT/FID/tasks are under statistics.cpu.longTasks.*
- Axe data is in axe.pageSummary.json (violations.*.median), not
  in the browsertime file under accessibility.summary.*
- sustainable pageSummary has co2PerPageView/FirstParty/ThirdParty.median
  (no totalCO2 at per-URL level)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 10:23:48 +02:00
ea70d34d7f fix: don't start Xvfb in start.sh — sitespeed.io manages its own
Our start.sh was starting Xvfb on :99, then sitespeed.io tried to start
its own on :99, failed with exit code 1, and Chrome couldn't get a
working display. sitespeed.io is designed to manage Xvfb per test run.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 10:13:08 +02:00
ad5881302e fix: discover sitespeed.js path at build time, export via /sitespeed_env
sitespeed.io is not on PATH in the container -- the base image uses a
full absolute path for its ENTRYPOINT. We now run 'find' during the
Docker build, write the path to /sitespeed_env, and source it in
start.sh so SITESPEED_BIN is set before node app.js starts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 20:09:29 +02:00
54a83f5585 fix: use sh -c in Docker so sitespeed.io resolves via shell PATH
execSync/which inside Node.js doesn't see the full container PATH.
Switching to spawn('sh', ['-c', shellCmd]) so the shell resolves
sitespeed.io exactly as the original image entrypoint does.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 20:05:50 +02:00
68712b63fa fix: remove hardcoded SITESPEED_BIN, let which sitespeed.io resolve path
The path /usr/local/lib/node_modules/... does not exist in the image.
runner.js already falls back to `which sitespeed.io` automatically.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 20:01:36 +02:00
8276f8896d 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>
2026-04-06 19:58:17 +02:00
86a44e68bb fix: start Xvfb before Node so Chrome has a display
Without Xvfb running, Chrome exits immediately with code 1.
The base sitespeedio image normally handles this via its own
entrypoint script; we now replicate that with start.sh.
Also drop --headless (breaks visual metrics) and add --disable-gpu
for stable Chrome rendering inside Docker.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 19:54:19 +02:00
59aca88f24 fix: reset ENTRYPOINT so node app.js runs instead of sitespeed.io
Base image sitespeedio/sitespeed.io sets ENTRYPOINT=["sitespeed.io"],
causing our CMD ["node","app.js"] to be passed as args to sitespeed.io
which treated "node" as a URL to test.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 19:50:02 +02:00
280e5f133f feat: initial Speedboard implementation
sitespeed.io web UI with Express/Pug/SQLite — port 3132.
Includes job queue, SSE live log, full metrics dashboard,
site history, CO2/axe/CWV sections, and Docker support.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 19:36:13 +02:00