Repository navigation
feat: background auto-update for openclaw package - #12
Merged
Merged
Conversation
Detect new openclaw versions in the background (30s after launch, then every 6h), install silently, and restart the gateway if it was running. Progress and errors surface in the DoneStep banner with explicit success/failure states. - Extract installOpenClawMacCore / installOpenClawWslCore shared by the interactive install flow and the new background updater - Add runInWslStreaming for line-by-line progress from WSL installs - Stop gateway before npm install so the supervisor does not race the binary swap (avoids spurious gave_up cascades) - Mutex manual install vs background update via isOpenclawUpdating - Error banner + manual retry path when auto-update fails - Wire stopOpenclawAutoUpdate into app quit cleanup
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
openclawnpm versions in the background and installs them silently (30s after app launch, then every 6h)Implementation Notes
src/main/services/openclaw-updater.tsorchestrates the check/install/restart loop with an in-flight mutex (isOpenclawUpdating)installer.ts:installOpenClawMacCore(chown + npm prefix + install) andinstallOpenClawWslCore. Manual install IPC and auto-update both go through theserunInWslStreamingadded towsl-utils.tsso WSL install logs flow line-by-line to the renderer (otherwise the user would see no progress for 1–3 minutes)install:openclaw) now refuses withauto-update-in-progressif the background check is running, so two concurrentnpm install -gcannot collide on npm's lockfilestopOpenclawAutoUpdate()wired intorunQuitCleanupso the 6h timer doesn't outlive the appCode Review
Self-review run by the
code-revieweragent before merging found 3 Critical and 5 Important issues — all addressed in this branch:before-quitrunInWslStreaming!==comparison (npmlatestreturns stable only)isOpenclawUpdatinginstaller.tsTest plan
FIRST_CHECK_DELAY_MSto 5000 andnpm i -g openclaw@2026.5.12, thennpm run dev. Verify silent install + Gateway restart + success bannernettopwatch then disconnect Wi-Fi) → red error banner shows with retry buttonpgrep -f openclawafter app quit returns nothing (no zombie npm)auto-update-in-progress, no double npm installnpm run typecheckandnpm run lintpass