Claude/practical gates zezmx#20
Merged
Merged
Conversation
The README previously required users to manually run 'playwright install chromium' after pip install. This was easy to forget, especially in CI environments. Now: - Both CLI and web interface automatically install Chromium on first run if missing - Provides user-friendly message indicating the installation is in progress - Falls back to manual installation instruction if auto-install fails - Updated README to reflect this new automatic behavior - Removed manual playwright install step from CI/CD example This improves the developer experience by eliminating a common setup step while maintaining the ability to manually reinstall if needed. https://claude.ai/code/session_01GrAGQV1uySMF68GJxLwWFt
- Capture stderr from playwright install to detect permission errors - Provide specific guidance for permission-denied failures - Suggest PLAYWRIGHT_BROWSERS_PATH environment variable as workaround - Include full error output for other failure types - Helps users troubleshoot installation issues in restricted environments https://claude.ai/code/session_01GrAGQV1uySMF68GJxLwWFt
…ation Critical fixes: - Fix broken chromium detection logic that only checked API attribute existence rather than verifying browser binaries are actually installed - Verify chromium by attempting to launch it, catching real 'not found' errors - Extract duplicated installation code to shared playwright_utils module - Add comprehensive test coverage for all installation scenarios Changes: - Create qa_agent/playwright_utils.py with working ensure_chromium_installed() - Update cli.py and web/__init__.py to use shared utility (removes 72 lines of duplication) - Add tests/test_playwright_utils.py with 6 test cases covering: * Already installed (no-op) * Missing + install succeeds * Missing + permission denied * Missing + other install error * Non-browser exceptions are re-raised * Import errors trigger installation This fixes the critical issues identified in code review that prevented the auto-installation feature from working as intended.
…est suite - Add qa_agent/playwright_utils.py with ensure_chromium_installed() that auto-installs Chromium if the binary is missing; imports sync_playwright at module level so tests can patch it via the module namespace - Move ensure_chromium_installed() call in cli.py to after arg parsing so --help and --version work without touching the browser - Add tests/test_playwright_utils.py covering all installation scenarios - Patch ensure_chromium_installed in _cli_exit_helper.py so exit-code smoke tests run without a real browser - Add autouse conftest fixture that no-ops ensure_chromium_installed for all non-playwright-utils unit tests so the suite passes without Chromium https://claude.ai/code/session_018P7MGqvrRX1e9MmxgYqEAq
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.
No description provided.