Skip to content

ci: run Lighthouse during pull requests - #435

Open
chrstph-dvx wants to merge 1 commit into
masterfrom
perf/1-lighthouse-setup
Open

ci: run Lighthouse during pull requests#435
chrstph-dvx wants to merge 1 commit into
masterfrom
perf/1-lighthouse-setup

Conversation

@chrstph-dvx

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings July 31, 2026 13:14
@vercel

vercel Bot commented Jul 31, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
arbitrum-portal Ready Ready Preview Jul 31, 2026 4:06pm

Request Review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds an automated Lighthouse “user-flow” run to pull requests, producing a summarized report (JSON + Markdown) and posting/updating a PR comment with the results. It integrates the new reporting script into the existing monorepo tooling and CI workflow.

Changes:

  • Added a generateLighthouseReport script (Puppeteer + Lighthouse) that runs multiple flows, parses/averages results, diffs against a committed baseline, and formats a PR-ready Markdown report.
  • Introduced a new GitHub Actions workflow to run Lighthouse on PRs, publish results to the job summary, and upsert a PR comment.
  • Improved bridge token selection automation by adding an aria-label to token rows; updated repo scripts and ignore rules for generated Lighthouse artifacts.

Reviewed changes

Copilot reviewed 13 out of 15 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pnpm-lock.yaml Adds Lighthouse/Puppeteer/tsx dependency resolution updates.
packages/scripts/src/generateLighthouseReport/types.ts Defines lightweight Lighthouse flow/result types used by parsing/reporting code.
packages/scripts/src/generateLighthouseReport/parseLighthouseReports.ts Parses flow JSON, averages scores/metrics across runs, and produces a summary.
packages/scripts/src/generateLighthouseReport/parseLighthouseReports.test.ts Adds unit tests for parsing/compare/format behavior.
packages/scripts/src/generateLighthouseReport/lighthouseBaseline.json Adds a baseline summary used for result diffs.
packages/scripts/src/generateLighthouseReport/index.ts Implements report generation orchestration, file outputs, and optional baseline updates.
packages/scripts/src/generateLighthouseReport/formatLighthouseReport.ts Formats summary + baseline + diff into a Markdown report for CI/PR comments.
packages/scripts/src/generateLighthouseReport/executeLighthouse.ts Runs a Lighthouse user flow via Puppeteer and writes per-run reports.
packages/scripts/src/generateLighthouseReport/compareLighthouseReports.ts Computes numeric deltas between current summary and baseline.
packages/scripts/src/generateLighthouseReport/cli.ts Adds a CLI entrypoint for running the report generator (and updating baseline).
packages/scripts/package.json Adds generate-lighthouse-report script and Lighthouse/Puppeteer/tsx dependencies.
packages/arb-token-bridge-ui/src/components/TransferPanel/TokenRow.tsx Adds an aria-label to token selection buttons to support automation/accessibility.
package.json Adds a root lighthouse:ci script to invoke the scripts package generator.
.gitignore Ignores generated lighthouse-reports/ output directory.
.github/workflows/lighthouse.yml Adds a PR workflow that runs Lighthouse, publishes a summary, and updates a PR comment.
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

'<details open>',
'<summary>🗼 Lighthouse user-flow results</summary>',
'',
'Results are the mean of three sequential desktop runs. Δ is result minus baseline.',
@github-actions

Copy link
Copy Markdown
Contributor
🗼 Lighthouse user-flow results

Results are the mean of three sequential desktop runs. Δ is result minus baseline.

Navigation Result Baseline Δ
Performance 49.67 59.33 -9.66 ⚠️
Accessibility 99 99 0
Best Practices 74 74 0
SEO 100 100 0
First Contentful Paint 100 (305.835 ms) 100 (290.153 ms) 0 (+15.682 ⚠️ ms)
Largest Contentful Paint 11.33 (4537.861 ms) 14.33 (4216.369 ms) -3 ⚠️ (+321.492 ⚠️ ms)
Total Blocking Time 6.67 (934.629 ms) 36.67 (443.29 ms) -30 ⚠️ (+491.339 ⚠️ ms)
Cumulative Layout Shift 100 (0) 100 (0) 0 (0)
Speed Index 98 (918.875 ms) 100 (375.308 ms) -2 ⚠️ (+543.567 ⚠️ ms)
Total Byte Weight 50 (3543326 bytes) 50 (3619288.667 bytes) 0 (-75962.667 ✅ bytes)
Interaction timespan Result Baseline Δ
Performance 45 45 0
Best Practices 63 63 0
Total Blocking Time 0 (5791.331 ms) 0 (3183.219 ms) 0 (+2608.112 ⚠️ ms)
Cumulative Layout Shift 100 (0.009) 100 (0.003) 0 (+0.006 ⚠️)
Interaction to Next Paint 56 (448 ms) 79 (274.667 ms) -23 ⚠️ (+173.333 ⚠️ ms)
Long tasks 20 (6594.654 ms) 20 (4181.92 ms) 0 (+2412.734 ⚠️ ms)
Final snapshot Result Baseline Δ
Accessibility 95 95 0
Best Practices 100 100 0
SEO 100 100 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants