Skip to content

scripts: include ui:build in build-all pipeline - #69050

Closed
chrisabad wants to merge 1 commit into
openclaw:mainfrom
chrisabad:fix/ui-build-in-build-all
Closed

chrisabad wants to merge 1 commit into
openclaw:mainfrom
chrisabad:fix/ui-build-in-build-all

Conversation

@chrisabad

Copy link
Copy Markdown

Summary

  • Add ui:build step to BUILD_ALL_STEPS in scripts/build-all.mjs
  • Add ui:build to the ciArtifacts profile

Without this step, pnpm build rebuilds dist/ but never produces dist/control-ui/, so the gateway serves a 503 "Control UI assets not found" error after any build or restart that cleans the dist directory.

Test plan

  • Run pnpm build and verify dist/control-ui/ exists afterward
  • Restart gateway and confirm Control UI loads at /

Without this step, `pnpm build` rebuilds `dist/` but never produces
`dist/control-ui/`, so the gateway serves a 503 "Control UI assets not
found" error after any build or restart that cleans the dist directory.

Adding `ui:build` to both BUILD_ALL_STEPS and the ciArtifacts profile
ensures the Control UI is always rebuilt alongside the rest of the
distribution output.
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: XS labels Apr 19, 2026
@greptile-apps

greptile-apps Bot commented Apr 19, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds the missing ui:build step to the BUILD_ALL_STEPS array and the ciArtifacts profile in scripts/build-all.mjs. The step is inserted in the correct position (after copy-export-html-templates, before write-build-info), and resolveBuildAllSteps will validate at runtime that the label resolves to a defined step.

Confidence Score: 5/5

Safe to merge — small, targeted fix with no logic regressions.

The change is a one-liner addition of a missing build step in both the ordered step list and the ciArtifacts profile. The positioning is consistent with the surrounding steps, and the existing runtime validation in resolveBuildAllSteps will catch any label mismatch. No P0/P1 findings.

No files require special attention.

Reviews (1): Last reviewed commit: "scripts: include ui:build in build-all p..." | Re-trigger Greptile

@vincentkoc vincentkoc added the triage: risky-infra Candidate: infra/CI/release change needs maintainer review. label Apr 26, 2026
@clawsweeper

clawsweeper Bot commented Apr 26, 2026

Copy link
Copy Markdown
Contributor

Closing this as implemented after Codex automated review.

PR #69050 is redundant on current main. The exact build-all one-liner was not merged, but the user-visible failure it targeted is already covered: gateway startup now rebuilds missing Control UI assets before serving, update/onboarding paths explicitly run ui:build, and the release/local-dist contract still documents pnpm build && pnpm ui:build rather than folding UI bundling into every build-all profile.

Best possible solution:

Close this PR rather than merge the build-all change. Keep the current main behavior: build/pack/release paths require an explicit Control UI bundle, while gateway startup, setup, and update flows repair missing dist/control-ui assets so the original 503 symptom is covered without expanding every build-all profile.

What I checked:

  • Gateway startup repairs missing Control UI assets: When Control UI is enabled and no root resolves, gateway startup calls ensureControlUiAssetsBuilt(...) and resolves the root again before returning a missing-assets state. (src/gateway/server-control-ui-root.ts:39, 6cd047e7c270)
  • UI repair helper builds and verifies dist/control-ui: ensureControlUiAssetsBuilt locates the repo root, runs scripts/ui.js build, then verifies dist/control-ui/index.html exists before reporting success. (src/infra/control-ui-assets.ts:292, 6cd047e7c270)
  • Fix is present in latest release tag: v2026.4.24 peels to cbcfdf62c7297bda66009ea7476f053c3e9addab, and git show v2026.4.24 contains the same startup repair and UI build helper implementation. (src/infra/control-ui-assets.ts:292, cbcfdf62c729)
  • Update path already runs ui:build after build: The package update flow runs a ui:build step after the normal build, then checks the Control UI index and runs a post-doctor ui:build repair if the bundle disappeared. (src/infra/update-runner.ts:1140, 6cd047e7c270)
  • Build-all still intentionally excludes ui:build: Current BUILD_ALL_STEPS and ciArtifacts do not include ui:build, matching the documented two-command full local dist flow instead of the PR's proposed build-all change. (scripts/build-all.mjs:13, 6cd047e7c270)
  • Docs and prepack keep the explicit UI bundle contract: Install docs tell local checkout users to run pnpm build && pnpm ui:build, and prepack errors with the same instruction when the prepared Control UI bundle is absent. Public docs: docs/install/index.md. (docs/install/index.md:120, 6cd047e7c270)

So I’m closing this as already implemented rather than keeping a duplicate issue open.

Codex Review notes: model gpt-5.5, reasoning high; reviewed against 6cd047e7c270; fix evidence: release v2026.4.24, commit cbcfdf62c729.

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

Labels

scripts Repository scripts size: XS triage: risky-infra Candidate: infra/CI/release change needs maintainer review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants