Repository navigation
fix(extension): send offscreen heartbeat every 20 seconds - #3319
Open
Ethereal49 wants to merge 1 commit into
Open
Ethereal49 wants to merge 1 commit into
Ethereal49 wants to merge 1 commit into
Conversation
Leave a 10-second margin below Chrome's 30-second idle timeout while preserving the existing port reconnect behavior. Fixes browserbase#3241
🦋 Changeset detectedLatest commit: 8edf306 The changes in this PR will be included in the next version bump. This PR includes changesets to release 23 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
|
This PR is from an external contributor and must be approved by a stagehand team member with write access before CI can run. |
This branch has not been deployed
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.
why
The offscreen heartbeat currently posts every second, producing about 60 service-worker messages per
minute while idle. Stagehand's extension requires Chrome 116, where sending a message over the
long-lived port resets Chrome's 30-second idle timer.
Fixes #3241.
what changed
below Chrome's idle shutdown timeout.
Offscreen document creation remains serialized, and port reconnect behavior is unchanged.
test plan
20-second cadence and 250 ms reconnect behavior.
interval test failed with 20 messages sent at 19,999 ms instead of 1.
passed.
git diff --check: passed.NOT_RUN: canonicalpnpmVitest, extension typecheck/build/test, oxfmt/oxlint, and the repositorychangeset script. The workspace dependency install could not complete because the local pnpm store
lacked
openai@6.48.0; the final online attempt was stopped after remaining incomplete.NOT_RUN: real-Chrome 70-second idle validation with the debugger detached, cross-version Chromevalidation, and repository CI at the time this PR was opened.
AI assistance: Codex implemented the change and ran the checks above.