Skip to content

Conversation

@logaretm
Copy link
Collaborator

Adjusted the condition for reporting web vitals previously it would short circuit and prevent them from being reported, I included a test.

similar to what we did in #18463

closes #18540

@linear
Copy link

linear bot commented Dec 17, 2025

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes an issue where web vitals were not being sent on pageload in the Solid TanStack Router integration. The problem was caused by a conditional check that would short-circuit during initial pageload, preventing the pageload transaction from completing and sending web vitals measurements.

  • Updated the navigation span filtering logic to explicitly check for absence of fromLocation before comparing location states
  • Added comprehensive test coverage to verify web vitals are sent on pageload

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/solid/src/tanstackrouter.ts Fixed the condition in onBeforeNavigate callback to properly detect initial pageload by checking for absence of fromLocation before comparing location states
dev-packages/e2e-tests/test-applications/solid-tanstack-router/tests/routing-instrumentation.test.ts Added test case to verify pageload transactions include web vitals measurements (ttfb, lcp, fp, fcp)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@andreiborza andreiborza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking care of this 🙏

Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@logaretm logaretm merged commit ad28c4d into develop Dec 17, 2025
47 checks passed
@logaretm logaretm deleted the awad/js-1323-solid-core-web-vitals-arent-reported-with-tanstack-router branch December 17, 2025 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Solid] Core Web Vitals aren't reported with Tanstack Router integration

4 participants