← Back to Pull requests

frontend: add a Lighthouse check #1664

Closed
unknown closed this pull request without merging on Nov 06, 2026 21:35 UTC
View on GitHub
unknown unknown commented on Nov 06, 2026 15:38 UTC
Author

This PR adds a Lighthouse check for the frontend, and changes the markup and styles so that the check passes. Close #1643.

Check

nix run .#lighthouse builds the frontend and audits 6 pages for accessibility, best practices and SEO. It audits each page in the light and dark color schemes, on the mobile and desktop form factors. This gives 24 runs, which take approximately 2.5 minutes on a local machine.

  • The Frontend: Lighthouse workflow does this check on pull requests that change the frontend, and on manual dispatch. It writes a summary to the run and attaches the HTML reports.

  • A local server gives the build and sends /backend requests to the production backend, as the Netlify _redirects do.

  • All audits must pass. There is no baseline.

  • Each page has a selector that must match, because an error page or an empty page can pass all audits.

  • The check does not include the performance category, because the local server and a shared runner do not give stable values.
  • Accessibility fixes

  • landmark-one-main: the content is now in main.

  • select-name: the sort label is now a label for sort-select.

  • heading-order: the package detail headings are now h3, with the same style as before.

  • list, listitem: the link to mail all maintainers is now in an li.

  • target-size: the links of the platform and maintainer lists have a height of 24px.

  • link-in-text-block: the footer links and option name links have an underline.

  • color-contrast: the placeholder color is now #666, because #999 gave 2.84:1 in the light color scheme.

  • color-contrast: the option name links on the dark code block now use --light-blue, because #0078b4 gave 2.61:1.
  • Visible changes

  • Footer links and option name links have an underline.

  • Option name links on the details view have a lighter color.

  • Placeholders are darker.

  • The platform and maintainer rows are slightly taller.
  • Limits

  • The check does not audit error pages. The error alerts in Search.elm use h4, and they fail heading-order.

  • The check needs the production backend. If the backend has an outage, or if a version.nix change comes before the index for that version, the check fails.
  • How to check

    Run nix run .#lighthouse. It stops with exit code 0, and the reports go to lighthouse-report.

    Two changes made the check fail, as expected:

  • With a backend address that does not respond, all 20 runs of the pages with results fail with no match for ....

  • With the old option link color, the 4 options-details runs fail color-contrast.
  • Assisted-by: Claude:claude-opus-5-5

    https://claude.ai/code/session_01RbKyH3w9GzRcJFnP87c7Xo

    Diff: 334 lines (+250 / -84) across 4 files Reviewer: Sigmanificient Review duration: 357m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.42) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.42 · 334 lines diff across 4 files
    0.42
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.348
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #1664"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 42.2% (MEDIUM) · Higher = larger blast radius
    42.2%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 16.7% · Safe to merge
    16.7%