← Back to PRs

#10292: Build: migrate A2UI packaging script from bash to TypeScript

by JAVA-LW open 2026-02-06 09:27 View on GitHub →
scripts size: S
-Added 'scripts/bundle-a2ui. ts' script to provide more reliable build caching and error handling -Update the 'canvas: a2ui: bundle' command in 'package. json' to call the new TypeScript script -The new script implements a caching mechanism based on file content hashing to avoid unnecessary duplicate constructions https://github.com/openclaw/openclaw/issues/10070 <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> - Replaces the A2UI bundling step (`canvas:a2ui:bundle`) from a bash script to a TypeScript script run via `node --import tsx`. - New `scripts/bundle-a2ui.ts` computes a content hash over key inputs (lockfile, package.json, vendor/app sources) and skips bundling when unchanged. - Bundling invokes `tsc` for the renderer and `rolldown` for the app, then records the computed hash in `src/canvas-host/a2ui/.bundle.hash` to support build caching. <h3>Confidence Score: 4/5</h3> - Mostly safe to merge once the remaining bundling-script reliability issues are addressed. - The change is localized (package script + new bundling script) and the intent is clear, but there are two concrete failure modes: (1) spawn failures can hang indefinitely due to missing 'error' handling, and (2) the cache hash can become incorrect because filesystem errors beyond ENOENT are silently ignored. Fixing these makes the build step deterministic and easier to debug across environments. - scripts/bundle-a2ui.ts <!-- greptile_other_comments_section --> <!-- /greptile_comment -->

Most Similar PRs