Skip to content

Conversation

@illia1f
Copy link
Contributor

@illia1f illia1f commented Dec 20, 2025

Problem

The npm run dev script 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' to
stdio: 'inherit' in the browser install spawn options.

Testing

  • Run npm run dev on a fresh setup (or after clearing Playwright cache)
  • Verify download progress is now visible

Solution Result Image
image

The loading output appears only on a fresh setup.

Summary by CodeRabbit

  • Style

    • Formatting and readability improvements across startup and cleanup logic.
  • Chores

    • Improved output visibility and conditional success/failure messages during browser installation.
  • Bug Fixes

    • Added pre-start port cleanup and availability wait to prevent startup conflicts.
    • Installation failures now emit warnings instead of being silently ignored.

✏️ Tip: You can customize this high-level summary in your review settings.

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.
@coderabbitai
Copy link

coderabbitai bot commented Dec 20, 2025

Walkthrough

init.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

Cohort / File(s) Change Summary
Init script (behavior + formatting)
init.mjs
- Playwright install now runs with stdio: 'inherit' and resolves with exit code; logs success or warning on nonzero exit instead of silently ignoring failures.
- Added port cleanup step before interactive menu: kills processes on ports 3007 and 3008 and waits for availability.
- Minor formatting/whitespace and readability refactors (multi-line log stream creation, wrapped log messages, formatting around process cleanup handlers, trailing newlines).
- Execution/flow change: conditional branching after install attempt instead of unconditional continuation.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Single file but includes multiple behavioral changes (subprocess stdio/exit handling, port-kill sequencing, conditional flow) that require testing.
  • Areas to focus during review:
    • Playwright install subprocess invocation and exit-code handling/log messages.
    • Port cleanup implementation: correctness of kill logic and wait-for-availability.
    • Interaction of new cleanup step with existing startup/interactive menu flow.
    • Any subtle side effects from switching stdio to inherit (noise in logs, CI behavior).

Poem

🐰 I hopped in code at break of day,
I chased the ports and cleared the way,
Playwright now speaks loud and clear,
Logs that sing for any ear.
A little hop, a tidy start—joy near!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main functional change: making Playwright browser download progress visible by switching from stdio 'ignore' to 'inherit'.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a7c19f1 and f302402.

📒 Files selected for processing (1)
  • init.mjs (8 hunks)
⏰ 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)
  • GitHub Check: e2e
🔇 Additional comments (3)
init.mjs (3)

294-314: LGTM! Correctly streams Playwright install progress.

The change from stdio: 'ignore' to stdio: 'inherit' addresses the PR objective, and the exit code handling provides appropriate user feedback:

  • Success case logs confirmation
  • Non-zero exit logs a warning without blocking startup
  • Synchronous spawn failures (e.g., npx not found) are caught and logged

360-362: Formatting improvements look good.

Multi-line formatting for better readability with no functional impact.


62-66: Minor formatting changes noted.

These refactors improve consistency without changing behavior.


Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @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

  • Playwright Browser Download Progress: The npm run dev script now displays the download progress for Playwright browsers, preventing the appearance of the script hanging during initial setup or on slow connections.
  • Improved User Feedback: Users will now see real-time output during the Playwright Chromium installation, addressing the previous lack of visual feedback that could lead to confusion.

🧠 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 Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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.
@illia1f
Copy link
Contributor Author

illia1f commented Dec 20, 2025

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.

Addressed by properly capturing the exit code and providing user feedback:

  • Success (exit code 0): Shows "Playwright browsers ready"
  • Failure: Shows a warning that browser automation may not work, but doesn't block the startup

@Shironex Shironex added the Enhancement Improvements to existing functionality or UI. label Dec 20, 2025
@webdevcody webdevcody merged commit 823e42e into AutoMaker-Org:main Dec 20, 2025
4 of 6 checks passed
@illia1f illia1f deleted the fix/init-playwright-download branch December 20, 2025 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement Improvements to existing functionality or UI.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants