releases.sh

SPA web vitals fix: Soft Navigation option available

@posthog/types@1.401.0

August 4, 2026PostHog JSView original ↗
1 feature1 fixThis release1 featureNew capabilities1 fixBug fixesAI-tallied from the release notes
From the original release noteView original ↗

1.401.0

Minor Changes

  • #4266 43d1850 Thanks @posthog! - feat: add opt-in capture_performance.__preview_web_vitals_soft_navs to fix inflated web vitals on single-page apps

    Client-side route changes in SPAs previously left web vitals (LCP especially) accumulating against the original hard-navigation timestamp, inflating the top tail of Core Web Vitals. Setting capture_performance: { __preview_web_vitals_soft_navs: true } now scopes metrics to the browser's Soft Navigation entries so each route change starts a fresh measurement window. It's a preview option because it relies on Chrome's experimental Soft Navigation Detection API and loads pinned stable web-vitals 6.x callbacks; when disabled (the default), the existing web-vitals 5.x behavior remains unchanged. (2026-08-04)

Fetched August 4, 2026