A score for every route change
A click that only changes the route is a navigation step with FCP, LCP, Speed Index, TBT and a Performance score, instead of a NO_FCP error.
Stock Lighthouse fails on a route change that never loads a document. One config turns it into a navigation step with FCP, LCP and a Performance score.
# install and run a flow with a soft navigation
$ npm i @push-based/lighthouse-soft-navigation
$ node flow.mjs
running the flow✔ shop.example/ · page load · performance 88
✔ shop.example/products · soft navigation · performance 97
→ flow.report.html
$ How it works
npm i @push-based/lighthouse-soft-navigationNext to Lighthouse 13.6, with Chrome 149 or newer.softNavigationConfig()Give it to startFlow. Every other step runs exactly as before.flow.navigate(() => page.click(…))A navigation step that stays in the document is a soft navigation.FCP · LCP · PerformanceStock metrics and scoring, measured from the click.What you get
Lighthouse user flow report
Browse the shop
Why this package
A click that only changes the route is a navigation step with FCP, LCP, Speed Index, TBT and a Performance score, instead of a NO_FCP error.
Pass softNavigationConfig() to startFlow. The package recognises a soft navigation from what the browser does, so your steps stay as they are.
The metrics come from Lighthouse's own audits and scoring curves. The package only supplies the events they need, with the click as time origin.
Audits of the document response do not apply to a route change and report notApplicable, so no audit errors and no missing scores.
Page loads, timespans and snapshots run exactly as before. Measure the route change, then the interactions on the new page, in one flow.
Each override maps to a change in Lighthouse itself, and the result has the shape upstream support will produce. Swapping later is mechanical.
Documentation
One config turns the soft navigations of your app into navigation steps with a Performance score.