-
Notifications
You must be signed in to change notification settings - Fork 397
fix(init): show Playwright browser download progress #196
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
fix(init): show Playwright browser download progress #196
Conversation
The Playwright chromium installation was running silently, causing the script to appear frozen at "Checking Playwright browsers..." for several minutes during first-time setup. Change stdio from 'ignore' to 'inherit' so users can see download progress and understand what's happening.
Walkthroughinit.mjs: Adjusts Playwright install to stream subprocess output and handle its exit code with conditional logging; adds pre-start port cleanup (kills processes on ports 3007/3008 and waits), plus various minor formatting and readability refactors and logging tweaks. (50 words) Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (3)
Comment |
Summary of ChangesHello @illia1f, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the user experience during the initial setup of the development environment by making the Playwright browser installation process transparent. Previously, the script would appear to freeze while downloading necessary browser binaries, but now it provides clear progress updates, ensuring users understand that the process is active and not stalled. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request improves the developer experience by showing the download progress for Playwright browsers, which prevents the script from appearing to hang. The change to use stdio: 'inherit' is correct for this purpose. I've added one comment regarding error handling for the Playwright installation process. While it's marked as optional, the current implementation can be confusing if an error occurs, as it will be displayed to the user but the script will proceed without acknowledging it. Improving this would make the script more robust. The other changes are minor formatting improvements that enhance code readability.
Updated the Playwright browser installation process to capture and log the exit code, providing feedback on success or failure. If the installation fails, a warning message is displayed, enhancing user awareness during setup.
Addressed by properly capturing the exit code and providing user feedback:
|
Problem
The
npm run devscript appeared to hang at "Checking Playwright browsers..."with no visible feedback, especially on first run when Chromium needs to be
downloaded (~150-200MB). On slow internet connections, this could take
several minutes with no indication of progress, making users think the
script had frozen.
Solution
Display Playwright installation output by changing
stdio: 'ignore'tostdio: 'inherit'in the browser install spawn options.Testing
npm run devon a fresh setup (or after clearing Playwright cache)Solution Result Image

The loading output appears only on a fresh setup.
Summary by CodeRabbit
Style
Chores
Bug Fixes
✏️ Tip: You can customize this high-level summary in your review settings.