@@ -48,6 +48,16 @@ RUN /workspace/depot_tools/ensure_bootstrap
4848# Build standard DevTools first (cached)
4949RUN npm run build
5050
51+ # Add Browser Operator fork and checkout main branch
52+ # This ensures the base has all Browser Operator customizations (ai_chat panel, etc.)
53+ RUN git remote add upstream https://github.com/BrowserOperator/browser-operator-core.git
54+ RUN git fetch upstream
55+ RUN git checkout upstream/main
56+
57+ # Build Browser Operator version to ensure everything works
58+ # This catches any build issues in the base layer
59+ RUN npm run build
60+
5161# Create marker file to indicate base is built
5262RUN touch /workspace/.devtools-base-built
5363
@@ -56,21 +66,18 @@ RUN touch /workspace/.devtools-base-built
5666# ==============================================================================
5767FROM devtools-base AS devtools-local
5868
59- WORKDIR /workspace/devtools/devtools-frontend
60-
61- # Add Browser Operator fork
62- RUN git remote add upstream https://github.com/BrowserOperator/browser-operator-core.git
63- RUN git fetch upstream
64- RUN git checkout upstream/main
69+ # Copy local changes from browser-operator-core submodule FIRST
70+ # This happens before checking out upstream, so we copy over the upstream code
71+ COPY browser-operator-core/front_end /workspace/devtools/devtools-frontend/front_end
72+ COPY browser-operator-core/eval-server /workspace/devtools/devtools-frontend/eval-server
6573
66- # This is where local changes would be copied in development mode
67- # When building from submodule, copy local changes here:
68- # COPY will be added by build script if browser-operator-core/ exists locally
74+ WORKDIR /workspace/devtools/devtools-frontend
6975
7076# Force automated mode
7177RUN sed -i 's/AUTOMATED_MODE: false/AUTOMATED_MODE: true/' front_end/panels/ai_chat/core/BuildConfig.ts || true
7278
73- # Build Browser Operator version with current changes
79+ # Build Browser Operator version with local changes
80+ # This build is much faster since we're only building the changed files
7481RUN npm run build
7582
7683# Create marker file
0 commit comments