Skip to content

Docker: include A2UI sources for bundle#13114

Merged
Takhoffman merged 2 commits intomainfrom
fix/issue-12878-a2ui-docker-bundle
Feb 10, 2026
Merged

Docker: include A2UI sources for bundle#13114
Takhoffman merged 2 commits intomainfrom
fix/issue-12878-a2ui-docker-bundle

Conversation

@Takhoffman
Copy link
Copy Markdown
Contributor

@Takhoffman Takhoffman commented Feb 10, 2026

Fixes #12878.

Problem:

  • Docker builds were excluding apps/ and vendor/, so scripts/bundle-a2ui.sh skipped bundling.
  • Dockerfile set OPENCLAW_A2UI_SKIP_MISSING=1, so the build succeeded while silently shipping without a2ui.bundle.js.

Changes:

  • Update .dockerignore to re-include only the A2UI bundle inputs:
    • apps/shared/OpenClawKit/Tools/CanvasA2UI/**
    • vendor/a2ui/renderers/lit/**
  • Remove OPENCLAW_A2UI_SKIP_MISSING=1 from the Docker build step so regressions fail fast.

Testing:

  • pnpm build
  • pnpm check
  • pnpm test src/canvas-host/server.test.ts

Greptile Overview

Greptile Summary

This PR updates the Docker build context to include the Canvas A2UI bundle inputs (specific apps/shared/OpenClawKit/Tools/CanvasA2UI/** and vendor/a2ui/renderers/lit/** paths) and removes OPENCLAW_A2UI_SKIP_MISSING=1 from the pnpm build step to avoid silently shipping without the A2UI bundle.

However, as written, the .dockerignore negations likely don’t take effect because apps/ and vendor/ remain ignored, and the bundling script itself exits successfully when those sources are missing. As a result, Docker builds can still proceed without actually bundling A2UI, undermining the “fail fast” goal.

Confidence Score: 2/5

  • This PR is not safe to merge as-is because it likely does not achieve its stated Docker bundling guarantees.
  • The .dockerignore changes appear to still exclude the required A2UI source directories due to parent directory ignores, and scripts/bundle-a2ui.sh exits 0 when sources are missing, so removing OPENCLAW_A2UI_SKIP_MISSING=1 doesn’t enforce a fail-fast build.
  • .dockerignore, Dockerfile (and scripts/bundle-a2ui.sh behavior as it affects Docker builds)

@openclaw-barnacle openclaw-barnacle bot added docker Docker and sandbox tooling maintainer Maintainer-authored PR labels Feb 10, 2026
Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

Comment on lines 26 to 30
COPY . .
RUN OPENCLAW_A2UI_SKIP_MISSING=1 pnpm build
RUN pnpm build
# Force pnpm for UI build (Bun may fail on ARM/Synology architectures)
ENV OPENCLAW_PREFER_PNPM=1
RUN pnpm ui:build
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docker build still won’t fail

Removing OPENCLAW_A2UI_SKIP_MISSING=1 here doesn’t actually make Docker builds fail fast if the A2UI sources are missing: pnpm build runs scripts/bundle-a2ui.sh, and that script currently exits 0 when vendor/a2ui/renderers/lit or apps/shared/OpenClawKit/Tools/CanvasA2UI are absent (scripts/bundle-a2ui.sh:18-21). So with the current script behavior, the Docker image can still silently ship the prebuilt src/canvas-host/a2ui/a2ui.bundle.js even if bundling was skipped.

If the intent is to fail when sources are unexpectedly missing in Docker, the bundling script (or the build step) needs a way to enforce that.

Prompt To Fix With AI
This is a comment left during a code review.
Path: Dockerfile
Line: 26:30

Comment:
**Docker build still won’t fail**

Removing `OPENCLAW_A2UI_SKIP_MISSING=1` here doesn’t actually make Docker builds fail fast if the A2UI sources are missing: `pnpm build` runs `scripts/bundle-a2ui.sh`, and that script currently exits 0 when `vendor/a2ui/renderers/lit` or `apps/shared/OpenClawKit/Tools/CanvasA2UI` are absent (`scripts/bundle-a2ui.sh:18-21`). So with the current script behavior, the Docker image can still silently ship the prebuilt `src/canvas-host/a2ui/a2ui.bundle.js` even if bundling was skipped.

If the intent is to fail when sources are unexpectedly missing in Docker, the bundling script (or the build step) needs a way to enforce that.

How can I resolve this? If you propose a fix, please make it concise.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Feb 10, 2026

Additional Comments (1)

.dockerignore
Re-includes won’t apply

.dockerignore starts ignoring apps/ and vendor/ at lines 42 and 48, but the later !apps/shared/... and !vendor/a2ui/... negations won’t re-include those paths unless you also un-ignore the parent directories (!apps/ and !vendor/). In Docker ignore semantics, a negated pattern can’t bring back files from a directory that’s still excluded by an earlier pattern, so the A2UI sources may still be missing from the build context and scripts/bundle-a2ui.sh will keep skipping.

Consider adding !apps/ and !vendor/ (and any needed intermediate dirs) before the more specific negations.

Prompt To Fix With AI
This is a comment left during a code review.
Path: .dockerignore
Line: 42:48

Comment:
**Re-includes won’t apply**

`.dockerignore` starts ignoring `apps/` and `vendor/` at lines 42 and 48, but the later `!apps/shared/...` and `!vendor/a2ui/...` negations won’t re-include those paths unless you also un-ignore the parent directories (`!apps/` and `!vendor/`). In Docker ignore semantics, a negated pattern can’t bring back files from a directory that’s still excluded by an earlier pattern, so the A2UI sources may still be missing from the build context and `scripts/bundle-a2ui.sh` will keep skipping.

Consider adding `!apps/` and `!vendor/` (and any needed intermediate dirs) before the more specific negations.

How can I resolve this? If you propose a fix, please make it concise.

@Takhoffman
Copy link
Copy Markdown
Contributor Author

Good catch.

You're right that removing OPENCLAW_A2UI_SKIP_MISSING=1 doesn't by itself make scripts/bundle-a2ui.sh fail when sources are missing, since the script currently exits 0 in that case.

I pushed a follow-up commit that makes the bundling step fail if the sources are missing and there is no prebuilt src/canvas-host/a2ui/a2ui.bundle.js to keep. That way Docker builds fail fast on regressions (e.g. if .dockerignore changes again), while still allowing the "keep prebuilt" path when the bundle actually exists.

Commit: 4426382

@openclaw-barnacle openclaw-barnacle bot added the scripts Repository scripts label Feb 10, 2026
@Takhoffman Takhoffman force-pushed the fix/issue-12878-a2ui-docker-bundle branch from 4426382 to b5df929 Compare February 10, 2026 04:44
@Takhoffman Takhoffman merged commit 72f89b1 into main Feb 10, 2026
14 checks passed
@Takhoffman Takhoffman deleted the fix/issue-12878-a2ui-docker-bundle branch February 10, 2026 04:45
ProgramCaiCai pushed a commit to ProgramCaiCai/openclaw that referenced this pull request Feb 10, 2026
* Docker: include A2UI sources for bundle

* Build: fail bundling when sources missing and no prebuilt A2UI bundle
YanHaidao added a commit to YanHaidao/clawdbot that referenced this pull request Feb 10, 2026
* 'main' of github.com:YanHaidao/clawdbot: (94 commits)
  fix(auto-reply): prevent sender spoofing in group prompts
  Discord: add exec approval cleanup option (openclaw#13205)
  CI: extend stale timelines to be contributor-friendly (openclaw#13209)
  fix: enforce Discord agent component DM auth (openclaw#11254) (thanks @thedudeabidesai)
  refactor(security,config): split oversized files (openclaw#13182)
  Commands: add commands.allowFrom config
  CI: configure stale automation
  fix(signal): enforce mention gating for group messages (openclaw#13124)
  fix(ui): prioritize displayName over label in webchat session picker (openclaw#13108)
  Chore: add testflight auto-response
  Docker: include A2UI sources for bundle (openclaw#13114)
  fix: unify session maintenance and cron run pruning (openclaw#13083)
  docs: expand vulnerability reporting guidelines in SECURITY.md
  docs: add vulnerability reporting guidelines to CONTRIBUTING.md
  refactor: consolidate fetchWithTimeout into shared utility
  fix(memory): default batch embeddings to off
  Improve code analyzer for independent packages, CI: only run release-check on push to main
  fix(tools): correct Grok response parsing for xAI Responses API (openclaw#13049)
  chore(deps): update dependencies, remove hono pinning
  Update contributing, deduplicate more functions
  ...
Hansen1018 pushed a commit to Hansen1018/openclaw that referenced this pull request Feb 10, 2026
* Docker: include A2UI sources for bundle

* Build: fail bundling when sources missing and no prebuilt A2UI bundle
michaelleone pushed a commit to michaelleone/openclaw that referenced this pull request Feb 11, 2026
* Docker: include A2UI sources for bundle

* Build: fail bundling when sources missing and no prebuilt A2UI bundle
skyhawk14 pushed a commit to skyhawk14/openclaw that referenced this pull request Feb 13, 2026
* Docker: include A2UI sources for bundle

* Build: fail bundling when sources missing and no prebuilt A2UI bundle
zooqueen pushed a commit to hanzoai/bot that referenced this pull request Mar 6, 2026
* Docker: include A2UI sources for bundle

* Build: fail bundling when sources missing and no prebuilt A2UI bundle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docker Docker and sandbox tooling maintainer Maintainer-authored PR scripts Repository scripts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: A2UI bundle missing from Docker image — canvas/a2ui broken

1 participant