Repository navigation
test(browser): Keep whitespace text out of the handlers-lcp page - #25280
Merged
JPeer264 merged 1 commit intoOct 14, 2026
Merged
Conversation
JPeer264
added this pull request to stack #25283
October 12, 2026 12:19
JPeer264
marked this pull request as ready for review
October 12, 2026 12:33
JPeer264
requested review from
logaretm and
msonnb
and removed request for
a team
October 12, 2026 12:33
JPeer264
force-pushed
the
jp/flaky-handlers-lcp-whitespace
branch
from
October 12, 2026 12:33
9b361b1 to
aa72f30
Compare
Lms24
approved these changes
Oct 12, 2026
Lms24
left a comment
Member
There was a problem hiding this comment.
Nice find! Tbh, not fully sure if asserting on the exact size is a good idea but if it differed by so much (68 vs. 107400) any "is in range" check would have failed here.
JPeer264
removed this pull request from stack #25283
October 13, 2026 15:29
JPeer264
added this pull request to stack #25335
October 13, 2026 15:29
The space between the inline <img> and <button> was painted as a text run in <body> (68px²). When it painted in the same frame as the image, Chromium emitted both LCP entries with the same startTime. web-vitals only calls its callback when the LCP value changes, so the handlers never got the image entry and window._LCP stayed at 68. Put the button into its own block, so the image is the only LCP candidate. On Linux (Playwright v1.63.0 image) the test failed 3 of 60 and 3 of 120 runs before, and passed 120 of 120 after. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
JPeer264
force-pushed
the
jp/flaky-handlers-lcp-whitespace
branch
from
October 13, 2026 15:36
aa72f30 to
0b2aabe
Compare
51 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This moves the button of the
handlers-lcptest page into its own block, so the image is the only LCP candidate.Why
The space between the inline
<img>and<button>was painted as a text run in<body>(68 px²). When it painted in the same frame as the image, Chromium gave both LCP entries the samestartTime. web-vitals calls its callback only when the LCP value changes, so the handlers never got the image entry, andwindow._LCPstayed at 68.On Linux (Playwright v1.63.0 image, 8 workers), 3 of 60 and 3 of 120 runs failed before this change. After it, 120 of 120 passed.
Failed on CI: https://github.com/getsentry/sentry-javascript/actions/runs/38217884500/job/114713949461