Repository navigation
Wait for the Browser pane's initial load before navigating - #1382
Merged
Merged
Conversation
The pane binds on did-attach while its initial about:blank is still loading. A loadURL issued then resolves on that load's did-finish-load, so preview navigate (UI Go, auto-load, MCP tool) reported about:blank and an immediate screenshot captured an empty page. Let the initial load stop (bounded to 2s) before calling loadURL. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
5 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.
Problem
The Browser pane binds its guest on
did-attach, while the guest's initialabout:blankis still loading. AloadURLissued in that window resolves on the initial load'sdid-finish-load, not ours. Sopreview.navigate(the pane's Go button, the suggested-URL auto-load and the MCPpreview navigatetool) returnedabout:blank, and an immediatescreenshotcaptured an empty page. The real page committed about 1 ms later.Event trace from a real Electron 35.7.5 guest:
Fix
In
navigate, if the guest is still on its initial load (isLoading()with an empty orabout:blankURL), wait fordid-stop-loading(bounded to 2 s) before callingloadURL. It's one guard in the shared path.Verification
navigate waits for the guest's initial about:blank load to stop: fails without the fix (6/7), passes with it (7/7).electron/preview.jsand a real<webview>bound ondid-attach(same as BrowserPane). It runs bind → info → navigate → click → type → screenshot, refuses an external URL, and returns PANE_CLOSED after the pane is removed. Before: immediate navigate reportedabout:blank3/3 times. After: 11/11 checks pass on 3/3 runs.Found while finishing the Browser→MCP verification for #1369.
🤖 Generated with Claude Code