SIGN IN SIGN UP

Add Soft Navigation support (#308)

* Initial LCP support

* Add FCP support

* Comments

* Support buffered entries

* Simplify LCP using performance.getEntriesByType() instead

* Bug fix

* Fix FCP too

* Linting

* Add TTFB support

* README updates

* Clean up Metric

* Add FID support

* Tidy up

* Add CLS

* Allow FID to show after hiding for soft navs

* Implement CLS

* Move from pageUrl to navigationId

* Cleanup and fixes

* Fix attribution

* Initial INP support

* Finalize LCP on softnav change

* Switch LCP to process all entries so reportAllChanges works

* Bug fixes

* Update package

* Bump version number

* Fix onLCP for multiple callbacks

* Update version

* Fix FID and FCP navigation type

* Add support includeSoftNavigationObservations

* Update version

* Fix includeSoftNavigationObservations bug

* Support navigationIds that are UUIDs

* UUID cleanup

* More clean up

* Avoid repeated soft nav lookups

* More cleanup

* Cleanup and comments

* Even more cleanup and comments

* Fix comments

* No INP unless supported by that browser

* Restore comment

* Remove unnecessary ?

* Remove optional chaining

* Fix attribution for TTFB and LCP

* Fix FCP and LCP attributions

* Fix attribution of reused resource

* Reset visibilitywatcher on soft nav

* Bump version number

* Linting

* Fix unit tests

* Fix LCP on inputs for soft navs

* Bump version for npm publish

* Add navigationURL

* Fix TTFB attribution for soft navs

* Allow old LCPs for softnavs

* Remove mention of FID

* Handle non-INP events and late entries better

* takerecords when finalising

* Fix bugs

* Upgrade to latest InteractionContentfulPaint implementation

* Fix bug

* Fix background tab bug

* Upgrade to the latest soft nav implementation

* Better types

* Fix softLCP logic for Chrome bug

* Simplify logic

* Refactor to handle buffered values better

* Cleanup

* Fix onCLS bug

* onINP fix

* Bump package number

* Remove includeSoftNavigationObservations

* Handle empty LICP

* Report small INP for soft navs since no first-input

* Bump version number

* Merge main and bump version

* Bump version

* fix: correct INP navigationURL after bfcache restore on soft-nav pages (#735)

* fix: correct INP navigationURL after bfcache restore on soft-nav pages

* fix: remove no-op doubleRAF

Co-authored-by: Barry Pollard <barrypollard@google.com>

* Remove doubleRAF

---------

Co-authored-by: Barry Pollard <barrypollard@google.com>

* Bump version numbers

* Update to latest API shape and also fix bug with > 50 interactions

* Fix type error

* Update README

* Replace filter() with find()/some() for early termination (#739)

Co-authored-by: Barry Pollard <barrypollard@google.com>

* LCP is now always LCP

* Bump version number

* Update check to getLargestInteractionContentfulPaint

* Update to PerformanceSoftNavigation

* Add NavigationURL to beacons

* Add basic test cases

* Bump version number to publish new package

* Handle no first-input on bfcache restore as well as soft navs

* Cleanup

* Fix CLS tests

* More tests

* Review feedback

* Revert incorrect commit

* Change back from Canary

* Review feedback

* Remove two unnecessary po!.takeRecords()

* Disable soft nav flag as 149 does not support the new necessary changes

* Add soft nav entry to attribution objects

* Fix flakey test

* Update README

* Review feedback

* Fix attribution and navigationId issues (#759)

* More review feedback

* Alternative fix for #760

* Fix INP

* Revert WDIO config

* Clean up performance observer opts

* Clean up soft navigations implementation (#761)

* Clean up soft navigations implementation

* Update src/onLCP.ts

---------

Co-authored-by: Barry Pollard <barrypollard@google.com>

* CLS Retries

* Better renderTime handling

* Make more INP attribution values optional

* Fix optional values

* Comments on optional types

* Rename interactionId to navigationInteractionId

* Update navigationInteractionId description

* Enable experimental soft navs support

* Revert experimental flag

* Add some more tests

* Update README

* Another README update

* Library is now 3k

* Change minimum click to 8ms to prevent rounding down

* Report CLS before soft nav

* refactor: remove unnecessary non-null assertions (#768)

* Fix CLS tests

* Add attribution tests

* Add tests for mixing soft navs and not

* Fix flakey tests

* Test with soft navs in 150

* Fix test

* Add readyState

* Soft nav userlike click

* Test with h1 click

* Add wait

* Add debugging

* User like click

* More debugging

* Try fix

* Remove blocking time

* useCapture

* Log console errors

* Add more debugging

* More debugging

* Minimum reproduce

* t push

* Enable full logging

* Remove more code

* Restore code

* Remove script

* Remove form

* Remove text area

* Larger screen size

* Revert all the testing changes

* Clean up INP tests

* Use user clicks for soft navs

* Add TODO to remove enable soft navs flag

* Make tests less flakey

* Comment out flakey Safari test

* Fix FCP flakiness

* Remove needless wait

* Only support the final API shape

* Remove soft nav version number

* Soft Nav doesn't need a user click

---------

Co-authored-by: Mimori <mimorimori256@gmail.com>
Co-authored-by: Philip Walton <philipwalton@users.noreply.github.com>
B
Barry Pollard committed
9c279a9656c2829fb7b38f787a06dd934078fffe
Parent: ec84422
Committed by GitHub <noreply@github.com> on 7/21/2026, 2:21:14 PM