Repository navigation
Explain incomplete Chrome trace recordings - #15
Merged
jackfranklin merged 5 commits intoNov 19, 2026
Merged
jackfranklin merged 5 commits into
jackfranklin merged 5 commits into
Conversation
jackfranklin
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for putting this stack together! Overall this looks solid and very close to mergeable. A few small points to check before marking ready for review:
- Possible false positive in
hasLayoutShiftData()on mid-session traces: Checking forLayoutShiftorloading-category events works well for page-load traces, but on a legitimate DevTools recording of an already-loaded page (e.g., an interaction-only trace with no navigations, network requests, or layout shifts), there may be noloading-category events at all. In that caseoverviewwould reportcls: nulland emit a recapture warning even though CLS is genuinely0. It might be worth softening the warning wording (or scoping the check to traces with navigations / checking trace config if available). - Avoid per-event array allocations in
hasLayoutShiftData():event.cat.split(',').includes('loading')allocates an array for every event inrawEventswhen noloadingevents are present, which can be expensive on large traces (hundreds of thousands of events). A regex or substring check withoutsplit(',')would avoid that overhead. - Formatting / checks: CI doesn't currently run
npm run check/npm teston fork PRs—could you double-check thatnpm run check(Biome formatting/linting) andnpm testpass cleanly? A couple of spots (e.g.,hasLayoutShiftDatainsrc/engine/helpers.tsand theJSON.stringify([{ ... }])calls in the tests) look like Biome might want to reformat them.
kurtextrem
marked this pull request as ready for review
November 19, 2026 13:14
jackfranklin
approved these changes
Nov 19, 2026
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.
The agent skill explains how to record a trace. The CLI gives recapture guidance when parsing fails for missing frames or when an overview finds no main page frame. Use
scanto search raw events from an existing recording. The overview explains how to capture missing CPU samples. For navigation recordings with no layout shifts or loading-category events, it reports CLS as unavailable and suggests checking the CDP capture categories. A recording with no navigation or shifts can report zero CLS.Synthetic regression tests cover the missing-frame error, capture warnings, and zero CLS in a recording without navigation.
Part 1 of 5 for #14. Papercuts 1 and 3.
Fixes the missing DevTools and CDP recording guidance requested in #9.