Skip to content

Conversation

@michiosw
Copy link
Contributor

No description provided.

- Create isolated browser contexts for each task to prevent conflicts
- Replace global browser context with task-specific instances
- Add proper resource cleanup in finally blocks to prevent memory leaks
- Extract hardcoded values as constants for better maintainability
- Add comprehensive type hints throughout the codebase
- Improve error handling and logging
- Reorganize imports and improve code structure
- Update Dockerfile to use Playwright's bundled browser instead of custom Chrome
- Ensure each task runs in its own isolated environment with unique debugging ports
- Fix potential race conditions when multiple tasks access the same context
@michiosw
Copy link
Contributor Author

feat: Improve browser task isolation and resource management

  • Create isolated browser contexts for each task to prevent conflicts
  • Replace global browser context with task-specific instances
  • Add proper resource cleanup in finally blocks to prevent memory leaks
  • Extract hardcoded values as constants for better maintainability
  • Add comprehensive type hints throughout the codebase
  • Improve error handling and logging
  • Reorganize imports and improve code structure
  • Update Dockerfile to use Playwright's bundled browser instead of custom Chrome
  • Ensure each task runs in its own isolated environment with unique debugging ports
  • Fix potential race conditions when multiple tasks access the same context

@michiosw michiosw requested a review from maceip March 15, 2025 21:51
@michiosw michiosw self-assigned this Mar 15, 2025
@michiosw michiosw added the enhancement New feature or request label Mar 15, 2025
@michiosw michiosw requested review from hashkode and removed request for maceip March 17, 2025 12:05
- Removed extra empty lines in Dockerfile (lines 16, 69, 72)
- Implemented Docker secrets for VNC password with fallback mechanism
- Created centralized environment variable handling with init_configuration()
- Fixed import errors by updating to langchain_core
- Kept Any type annotations where browser-use specific types weren't accessible
- Added server startup sanity checks for port, dimensions, expiry time
- Removed redundant src directory
- Updated README with Docker secrets instructions
@hashkode hashkode merged commit c998de8 into main Mar 18, 2025
3 checks passed
@michiosw michiosw deleted the fix/browser-context-reset branch March 19, 2025 21:36
@michiosw
Copy link
Contributor Author

michiosw commented Apr 9, 2025

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants