feat: add --wait-until flag and change default to domcontentloaded#662
Open
juliobrasa wants to merge 1 commit intovercel-labs:mainfrom
Open
feat: add --wait-until flag and change default to domcontentloaded#662juliobrasa wants to merge 1 commit intovercel-labs:mainfrom
juliobrasa wants to merge 1 commit intovercel-labs:mainfrom
Conversation
The `open` command previously defaulted to `waitUntil: 'load'`, which waits for all resources (images, analytics, third-party scripts) to finish loading. This frequently causes timeouts on modern SPAs. Changes: - Add `--wait-until` CLI flag accepting `load`, `domcontentloaded`, or `networkidle` - Change default from `load` to `domcontentloaded` for both `handleNavigate` and `handleDiffUrl` - Aligns with `tab new` which already used `domcontentloaded` - Flag can also be set via AGENT_BROWSER_WAIT_UNTIL env var Usage: agent-browser open https://example.com --wait-until load agent-browser open https://example.com --wait-until networkidle Closes vercel-labs#479 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
|
Someone is attempting to deploy a commit to the Vercel Labs Team on Vercel. A member of the Team first needs to authorize it. |
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
The
opencommand defaulted towaitUntil: 'load', which waits for all resources (analytics, third-party scripts, etc.) and frequently causes timeouts on modern SPAs.Changes
--wait-untilCLI flag — acceptsload,domcontentloaded, ornetworkidledomcontentloaded— for bothhandleNavigateandhandleDiffUrltab new— which already useddomcontentloadedAGENT_BROWSER_WAIT_UNTILUsage
Files changed
cli/src/flags.rs— addwait_untilfield +--wait-untilparsingcli/src/commands.rs— passwaitUntilin navigate JSON commandsrc/actions.ts— change default fromloadtodomcontentloadedTest plan
open <url>completes faster on SPA sitesopen <url> --wait-until loadpreserves old behaviorCloses #479
🤖 Generated with Claude Code