-
Notifications
You must be signed in to change notification settings - Fork 56
feat: Readiness gate in PercyDOM.serialize() — works for URL + SDK paths (PER-7348) #2184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Shivanshu-07
wants to merge
10
commits into
master
Choose a base branch
from
feat/PER-7348-readiness-in-serialize
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
93c44ff
feat: integrate readiness gate into PercyDOM.serialize() (PER-7348)
Shivanshu-07 5c30ecb
refactor: inline readiness into serializeDOM with try-catch, remove s…
Shivanshu-07 3886528
fix: add istanbul ignore for readiness catch block in serialize-dom.j…
Shivanshu-07 1627e32
fix: istanbul ignore for stringifyResponse branch in readiness path (…
Shivanshu-07 a7deaed
fix: include readiness in expected serialize options test (PER-7348)
Shivanshu-07 c879f34
fix: address PR #2184 review comments (PER-7348)
Shivanshu-07 b3f8bed
test: replace function-wide istanbul ignores with direct unit tests (…
Shivanshu-07 247c5c0
fix: address remaining PR #2184 review comments (PER-7348)
Shivanshu-07 3a381a2
fix: remove bare performance.now() calls that fail eslint no-undef
Shivanshu-07 3cc1453
feat: unblock SDK readiness rollout — schema fixes and sdk-utils help…
Shivanshu-07 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Naming convention inconsistency with the rest of the config schema
The readiness properties use camelCase (
stabilityWindowMs,networkIdleWindowMs,timeoutMs) but the internal readiness implementation uses snake_case, and other Percy config options likeenable_javascript,dom_transformation,reshuffle_invalid_tagsuse snake_case in the schema.Consider aligning to snake_case (
stability_window_ms,network_idle_window_ms,timeout_ms) for consistency with the rest of the Percy config, or add explicit camelCase to snake_case mapping inreadiness.js.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I verified this and I think the premise here might be inverted. Grepping the existing schema in
packages/core/src/config.js:Every existing snapshot option in the schema is already camelCase — there are no
enable_javascript/dom_transformation/reshuffle_invalid_tagsentries inconfig.js. So the readiness schema (stabilityWindowMs,timeoutMs, etc.) is actually consistent with the rest of the file.The snake_case you're seeing in
readiness.jsis the internal naming used after normalization (matches the diagnostic output keys likestability_window_ms,network_idle_window_ms, which are the payload contract with the backend). ThenormalizeOptions()helper bridges the two, and it accepts both forms so direct snake_case overrides still work if anyone is using them.Happy to rename if you'd still prefer snake_case for the user-facing schema, but the current naming was chosen specifically to match the surrounding camelCase conventions.