Conversation
14 tasks
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.
Fix the false navigation timeout in #249 when a page has already reached the requested lifecycle phase but a successor navigation is still pending.
A reproducible case is a
loadhandler that starts a navigation to an endpoint returning HTTP 204 after 1.4 seconds, while the original document starts a long-running fetch. Chrome emits the original document'sload, thennetworkAlmostIdleandfirstMeaningfulPaint, before cancelling the successor request. Previously those later events overwrote the bufferedload. With no subsequentnetworkIdle, the handler timed out even though the original document had loaded and remained current.Preserve the buffered event once it satisfies this wait's target. A successor commit still clears the buffer, and cancellation still has to pass the existing document checks. The production change is confined to this buffering condition in
navigation.ts.The tests cover preservation of
DOMContentLoaded,load, andnetworkIdle, waiting while the successor remains pending, and rejection of predecessor readiness after a successor commits. They also check thatDOMContentLoadedcannot satisfyload, andloadcannot satisfynetworkidlein the cancellation path.Validation:
pnpm ext:test: 1808 passed, 99 skipped.pnpm lint: passed, including 240 plugin tests.pnpm --filter @browser-skill/extension compile: passed.pnpm ext:build: passed.loadafter about 1.4 seconds, including the case using the default 30-second timeout. A real successor-commit control waited for the successor's ownload. This verifies the handler/browser integration, not the full CLI and extension transport chain.This PR targets
fix/background-tab-executionso the fix can be incorporated into #249 before its final merge.