fix: forward waitUntil through navigate so adapters can skip the load-event wait#107
Open
ngaurav wants to merge 1 commit into
Open
fix: forward waitUntil through navigate so adapters can skip the load-event wait#107ngaurav wants to merge 1 commit into
ngaurav wants to merge 1 commit into
Conversation
…-event wait Never-idle sites (e.g. zillow.com streaming analytics) never fire the load event, so every page.goto() timed out at 30s even though the document had rendered. Page.goto now forwards its waitUntil option in the navigate command, and the local-cloak runtime maps 'none' to Playwright's 'commit' instead of always hard-coding 'load'. Fixes #106 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
🟠 Maintainer review suggested — medium confidenceThe automated review could not reach a fully supported conclusion. Findings
This review is advisory and does not block merging. |
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.
Summary
Fixes #106.
Never-idle sites (e.g. zillow.com, which streams analytics requests indefinitely) never fire the browser
loadevent, so everypage.goto()timed out after 30s even though the document had rendered —zillow/rentalsfailed on every run.protocol.ts: addwaitUntil?: 'load' | 'none'toBrowserRuntimeCommandpage.ts:Page.gotoforwardswaitUntilin thenavigatecommand (primary and stale-identity-retry paths)local-cloak/actions.ts: map'none'to Playwright's'commit'; default remains'load', so behavior is unchanged unless an adapter opts inBackward compatible in both directions: old daemons ignore the extra field; old CLIs never send it.
Testing
npx tsc --noEmitcleannpx vitest run src/browser/: 34 files, 460 tests pass (new provider test for the'none'→'commit'mapping; forwarding assertion added to the existingPage.gototest){ waitUntil: 'none' },webcmd zillow rentals "San Francisco, CA" --max-rent 5000 --min-beds 2 --pets --parkingcompletes in ~11s; previously it burned two 30s load-event stalls and exceeded the 60s command budget🤖 Generated with Claude Code