Skip to content

docs: fix build order in install guide (pnpm build before pnpm ui:build) - #45063

Closed
yoyo837 wants to merge 3 commits into
openclaw:mainfrom
yoyo837:fix/install-build-order
Closed

yoyo837 wants to merge 3 commits into
openclaw:mainfrom
yoyo837:fix/install-build-order

Conversation

@yoyo837

@yoyo837 yoyo837 commented Mar 13, 2026 •

Copy link
Copy Markdown

Problem

The install guides list pnpm ui:build before pnpm build, but this order causes pnpm ui:build output to be silently deleted.

pnpm build uses tsdown, which by default cleans the entire dist/ directory before building. Since pnpm ui:build writes its output to dist/control-ui/, running it first means tsdown will wipe it out when pnpm build runs next.

Fix

Swap the order to:

pnpm install
pnpm build
pnpm ui:build

This ensures the Control UI assets are built after tsdown has finished (and cleaned) dist/, so nothing gets lost.

Verified by the user during a fresh source install and confirmed by inspecting tsdown.config.ts and scripts/ui.js.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: XS labels Mar 13, 2026
@greptile-apps

greptile-apps Bot commented Mar 13, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes a build-order bug in the installation documentation across 7 files (both English and Chinese variants), swapping pnpm build to run before pnpm ui:build. The fix is correct and well-reasoned: since tsdown (used by pnpm build) cleans the entire dist/ directory by default, running pnpm ui:build first would have its output in dist/control-ui/ silently wiped.

Key changes:

  • Swapped build command order in docs/install/index.md, docs/platforms/windows.md, and all 5 affected Chinese docs (zh-CN/install/index.md, zh-CN/platforms/windows.md, zh-CN/start/getting-started.md, zh-CN/start/openclaw.md, zh-CN/start/quickstart.md)
  • Other docs files that include pnpm ui:build (e.g., docs/install/updating.md, docs/help/faq.md, Dockerfile examples) already had the correct order or use the command in a standalone context, so they were correctly left untouched

Confidence Score: 5/5

  • This PR is safe to merge — it is a pure documentation fix with no code changes and the correction is accurate and complete.
  • All 7 changed files contain the same simple two-line swap (moving pnpm build before pnpm ui:build). The underlying technical reasoning is valid (tsdown cleans dist/ by default). All remaining documentation files that include both build commands already had the correct order or are not affected by this issue.
  • No files require special attention

Last reviewed commit: af435a9

@yoyo837

yoyo837 commented Mar 13, 2026

Copy link
Copy Markdown
Author

@greptile-apps Review again please.

yoyo837 and others added 3 commits March 17, 2026 11:20
…pm ui:build)

Fix incorrect build order in 6 additional files:
- docs/platforms/windows.md
- docs/zh-CN/install/index.md
- docs/zh-CN/platforms/windows.md
- docs/zh-CN/start/getting-started.md
- docs/zh-CN/start/openclaw.md
- docs/zh-CN/start/quickstart.md
@yoyo837
yoyo837 force-pushed the fix/install-build-order branch from af435a9 to f93d868 Compare March 17, 2026 03:22
Copilot AI review requested due to automatic review settings March 17, 2026 03:22

Copilot AI left a comment

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.

Pull request overview

Updates the install documentation to ensure the Control UI build artifacts aren’t removed by the main pnpm build step (which cleans dist/), by placing pnpm build before pnpm ui:build.

Changes:

  • Reorders the source-install commands to run pnpm build before pnpm ui:build in English and Chinese docs.
  • Adds/keeps inline notes clarifying that pnpm ui:build auto-installs UI deps on first run (where applicable).

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
docs/zh-CN/start/quickstart.md Swaps build order in the “from source” snippet to preserve Control UI output.
docs/zh-CN/start/openclaw.md Swaps build order in the “from source” snippet to preserve Control UI output.
docs/zh-CN/platforms/windows.md Swaps build order in the WSL install snippet to preserve Control UI output.
docs/zh-CN/install/index.md Swaps build order in the “From source” steps to preserve Control UI output (adds inline note).
docs/platforms/windows.md Swaps build order in the WSL install snippet to preserve Control UI output.
docs/install/index.md Swaps build order in the “From source” steps to preserve Control UI output.

You can also share your feedback on Copilot code review. Take the survey.

@steipete

Copy link
Copy Markdown
Contributor

Closing this as implemented after Codex review.

Current main already carries the requested docs fix: source-install docs use pnpm build before pnpm ui:build, matching the build system's dist/ cleaning behavior, and the localized docs targeted by the PR are no longer maintained in this repo.

What I checked:

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

Review notes: reviewed against 40be5ad58187; fix evidence: commit bcea5e75ebc7.

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

Labels

docs Improvements or additions to documentation size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants