Skip to content

Add bundle size and performance regression CI checks #262

Description

@silvertakana

Summary

We have no performance regression detection in CI. Bundle size can bloat, Lighthouse scores can drop, and API latency can regress without anyone noticing until production.

Proposed Change

Add two layers of performance CI:

Layer 1 — Bundle size gate (PR-blocking):

  • Add @size-limit to the main app
  • Set a bundle budget (e.g., 1024 KB for JS chunks)
  • Use andresz1/size-limit-action to comment on PRs with size diffs
  • Fails the PR if budget exceeded
  • Zero flakiness by design (pure static analysis)

Layer 2 — Lighthouse CI (nightly, not PR-blocking):

  • Run lhci autorun on the production build
  • Assert performance >= 0.9, accessibility >= 0.9
  • Upload to temporary-public-storage for trend tracking
  • Run nightly or on merge to main (too noisy for per-PR)

Acceptance Criteria

  • Bundle size check runs on every PR and comments with diff
  • PR fails if bundle exceeds budget
  • Lighthouse CI runs nightly
  • Performance trends visible (LHCI server or public storage)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementPlatform feature request / capability

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions