test(perf): establish route-family performance baselines [Codex] - #1378
jderochervlk wants to merge 4 commits into
Conversation
Add deterministic route-family asset reports and profile evidence. Cover direct loads and client transitions, and retain Lighthouse comparisons.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c70121f9ee
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Lighthouse route profilesNo route-profile Lighthouse baseline is available for target branch
Download the full Lighthouse reports and baselines Commit |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
guide | 691e3ef | Commit Preview URL Branch Preview URL |
Sep 22 2026, 01:30 PM |
Keep /try out of static prerendering and source its profile HTML from the existing Pages request handler.
Treat assets referenced by multiple non-homepage profiles as layout-shared and cover the content-layout case.
Write the JSON artifact before printing it so report generation failures retain their nonzero status.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 691e3ef7a4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| path: "/__route-profile-not-found", | ||
| htmlSource: "prerendered", |
There was a problem hiding this comment.
Exclude the synthetic 404 profile from the sitemap
Because this control is marked prerendered, auditOnlyPaths causes the build to emit build/client/__route-profile-not-found/index.html; the subsequent build:generate-sitemap step recursively includes every index.html, so production publishes this synthetic test URL in sitemap.xml as a crawlable page. Keep the control out of sitemap discovery or explicitly filter this path.
Useful? React with 👍 / 👎.
| `direct ${name} load has styles and hydrates`, | ||
| () => { | ||
| visit(directLoadPath(path)) | ||
| get(`link[rel="stylesheet"]`)->should("exist")->ignore |
There was a problem hiding this comment.
Assert route styles actually load
Every profile already receives the shared stylesheet from DocsRoot, so this assertion succeeds even if the route-specific content.css, playground.css, or other layout stylesheet is omitted or returns 404; the prerendered headings and editor can remain visible with browser-default styling as well. Consequently the new suite can pass while an optimization leaves an entire route family unstyled, so assert a route-specific computed style or confirm the expected stylesheet loaded instead of accepting any link.
Useful? React with 👍 / 👎.
| uses: treosh/lighthouse-ci-action@v12 | ||
| with: | ||
| urls: ${{ env.DOCS_DEPLOYMENT_URL }} | ||
| urls: ${{ env.LIGHTHOUSE_URLS }} |
There was a problem hiding this comment.
Keep the legacy baseline scoped to the homepage
Once this step collects every profile URL, writeBaseline still passes the complete report set to createBaseline, so .lighthouseci/baseline.json now records 33 runs and medians across unrelated routes while its url still identifies the homepage. This corrupts the retained homepage baseline and gives older/fallback comparison consumers misleading scores; filter that legacy baseline to the homepage reports while writing the separate route baseline from the full set.
Useful? React with 👍 / 👎.
Closes #1371.
This establishes the post-homepage route-family performance baseline before later optimization work changes individual pages.
The built-site report now profiles representative routes and controls with HTML, JavaScript, CSS, media, DOM, and dimensions data. It records route ownership versus homepage/layout sharing and uploads the JSON evidence from PR CI.
A dedicated deployed Cypress suite covers direct loads, hydration and console health, styles, highlighting, and navigation across route families. Lighthouse now collects and compares each profile independently while retaining missing target profiles as N/A.