-
Notifications
You must be signed in to change notification settings - Fork 56
refactor: enhance popup detection with intelligent polling mechanism #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors the popup detection mechanism in the browser initialization flow to use an intelligent polling approach instead of sequential checks with long hard-coded timeouts, significantly improving browser launch performance.
Changes:
- Replaced sequential popup detection (with up to 35s total timeout) with a unified polling loop that checks all popup types in parallel with a maximum 6-second duration
- Introduced early exit logic based on consecutive idle iterations to minimize wait time when no popups are present
- Consolidated popup configuration into a structured array for better maintainability
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
0753260 to
e225843
Compare
Launch browser faster.
启动浏览器更快。