Skip to content

ci: add lighthouse performance and accessibility gate - #507

Merged
devJaja merged 2 commits into
Epta-Node:mainfrom
zainabwahab-eth:feat/377-lighthouse-ci
Aug 31, 2026
Merged

ci: add lighthouse performance and accessibility gate#507
devJaja merged 2 commits into
Epta-Node:mainfrom
zainabwahab-eth:feat/377-lighthouse-ci

Conversation

@zainabwahab-eth

Copy link
Copy Markdown
Contributor

Summary

Add Lighthouse CI checks for key frontend routes with enforced performance and accessibility budgets, SEO budget configuration, PR comment with scores, and committed baseline configuration.

  • Add @lhci/cli and lighthouserc.cjs configuration
  • Add GitHub Actions workflow (.github/workflows/lighthouse.yml) running on PRs to main
  • Add preview script to frontend/package.json
  • Fix pre-existing build-blocking syntax errors in App.tsx, ToastContext.tsx, Hero.tsx, SendXLMForm.tsx, TransactionTable.tsx, Toast.css, TaskSubmissionForm.tsx, and global.css to enable the production build needed for Lighthouse auditing

Closes #377

Routes tested

Route Description
/ Landing page — primary entry point
/agents Agent registry browser — public browsing page

Thresholds

Category Threshold Enforcement
Performance ≥ 80 Hard gate — CI fails
Accessibility ≥ 95 Hard gate — CI fails
SEO ≥ 80 Budget / warning
Best Practices ≥ 70 Informational

How it works

  1. Build: npx vite build produces a production build in dist/
  2. Serve: npx vite preview --host 0.0.0.0 --port 4173 serves the production build
  3. Audit: Lighthouse CI runs 2 times per route against the served build
  4. Assert: lighthouserc.cjs enforces performance ≥ 0.80 and accessibility ≥ 0.95
  5. Report: Results are posted as a PR comment with a score table
  6. Storage: Lighthouse reports are uploaded to temporary public storage

Files changed

File Description
.github/workflows/lighthouse.yml GitHub Actions workflow for Lighthouse CI
frontend/lighthouserc.cjs Lighthouse CI configuration with budgets
frontend/package.json Added preview script and @lhci/cli devDependency
frontend/package-lock.json Updated lockfile
frontend/src/App.tsx Fixed broken JSX structure (pre-existing)
frontend/src/context/ToastContext.tsx Fixed duplicate declarations (pre-existing)
frontend/src/components/landing/Hero.tsx Added motion import, fixed closing tags (pre-existing)
frontend/src/components/wallet/SendXLMForm.tsx Fixed duplicate attributes and broken JSX (pre-existing)
frontend/src/components/wallet/TransactionTable.tsx Removed trailing junk code (pre-existing)
frontend/src/components/common/Toast.css Fixed duplicate CSS keyframes (pre-existing)
frontend/src/components/agents/TaskSubmissionForm.tsx Fixed duplicate declarations, added missing imports (pre-existing)
frontend/src/styles/global.css Fixed CSS @import order (pre-existing)

How to run locally

cd frontend
npm ci
npx vite build
npx lhci autorun

Add Lighthouse CI checks for key frontend routes with enforced
performance (≥80) and accessibility (≥95) budgets, SEO budget
configuration, PR comment with scores, and committed baseline config.

- Add @lhci/cli and lighthouserc.cjs configuration
- Add GitHub Actions workflow running on PRs to main
- Add preview script to frontend/package.json
- Fix pre-existing build-blocking syntax errors in App.tsx,
  ToastContext.tsx, Hero.tsx, SendXLMForm.tsx, TransactionTable.tsx,
  Toast.css, TaskSubmissionForm.tsx, and global.css

Closes Epta-Node#377

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@zainabwahab-eth Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@vercel

vercel Bot commented Aug 31, 2026

Copy link
Copy Markdown

@zainabwahab-eth is attempting to deploy a commit to the Jaja's projects Team on Vercel.

A member of the Team first needs to authorize it.

@devJaja
devJaja merged commit 845050b into Epta-Node:main Aug 31, 2026
1 check failed
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.

Add frontend Lighthouse CI gate with A11y and Performance budgets

2 participants