Skip to content

Conversation

@jdchawla29
Copy link
Collaborator

@jdchawla29 jdchawla29 commented Oct 25, 2025

re-introducing a dedicated base image, improving local development workflows, and adding some build scripts.

  • Introduced a new browser-base image (hudevals/hud-browser-base:latest), moving all core system/browser dependencies and Playwright installation into environments/browser/browser-base/Dockerfile. The main environment Dockerfile now uses this base image, resulting in a cleaner and faster build process.

Bgu fixes for Browser Environment:

  • Improved the Playwright tool to reuse an existing browser page if available (for CDP connections), reducing unnecessary page creation.
  • Changed the app launch flow to wait for the browser page to reach a "network idle" state before proceeding, ensuring the page is fully loaded, used to default to None Field which errored out on playwright api

Local development improvements:

  • Added environments/browser/Dockerfile.local to support building the browser environment with a local version of hud-python, for development. This Dockerfile copies local sources and installs dependencies in editable mode.

Build scripts:

  • scripts/build-and-push-env.sh, - for building and pushing multi-architecture (arm64, amd64) Docker images and manifests for any HUD environment.
  • scripts/build_local.sh, - for building any HUD environment locally with support for Dockerfile.local and automatic lock file updates.

Note

Adds a reusable browser base image and refactors the browser environment to use it, improves Playwright page handling/navigation, and adds scripts for multi-arch builds and local development.

  • Docker/Environments:
    • Base Image: Introduce environments/browser/browser-base with Playwright/Chromium/VNC; publish as hudevals/hud-browser-base:latest.
    • Refactor: environments/browser/Dockerfile now builds from the new base image.
    • Local Dev: Add environments/browser/Dockerfile.local to build with local hud-python (editable install).
  • Playwright/Browser Behavior:
    • Page Reuse: hud/tools/playwright.py reuses existing page if present (esp. CDP), else creates a new one.
    • Navigation Stability: environments/browser/server/tools.py now navigates with wait_for_load_state="networkidle" after launching apps.
  • Scripts:
    • scripts/build-and-push-env.sh: build/push multi-arch images and manifests for any environment.
    • scripts/build_local.sh: build environments locally (supports Dockerfile.local) and updates hud.lock.yaml image reference.

Written by Cursor Bugbot for commit 91f9416. This will update automatically on new commits. Configure here.

@jdchawla29 jdchawla29 requested a review from lorenss-m October 25, 2025 10:58
@lorenss-m lorenss-m merged commit 99ab8b7 into main Oct 25, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants