From 67655fe93826368267d80a0e07435c1f76e65b51 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 31 Mar 2026 01:44:16 +0000 Subject: [PATCH 001/221] perf: speed up builds via parallelism and caching - Run editor + build dir npm ci in parallel in build-core - Parallelize extension npm installs with xargs -P8 (was sequential loop) - Enable Docker BuildKit (remove DOCKER_BUILDKIT=0) - Add npm cache to all CI setup-node steps (apps/editor/package-lock.json) Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/build-macos.yml | 6 ++++++ Makefile | 18 +++++++----------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 06ca91dd..2725b847 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -62,6 +62,8 @@ jobs: uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 with: node-version: '20.18.2' + cache: 'npm' + cache-dependency-path: apps/editor/package-lock.json - name: Stamp release version in product.json if: startsWith(github.ref, 'refs/tags/') @@ -188,6 +190,8 @@ jobs: uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 with: node-version: '20.18.2' + cache: 'npm' + cache-dependency-path: apps/editor/package-lock.json - name: Stamp release version in product.json if: startsWith(github.ref, 'refs/tags/') @@ -288,6 +292,8 @@ jobs: uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 with: node-version: '20.18.2' + cache: 'npm' + cache-dependency-path: apps/editor/package-lock.json - name: Stamp release version in product.json if: startsWith(github.ref, 'refs/tags/') diff --git a/Makefile b/Makefile index 45e8c0f9..c76eed03 100644 --- a/Makefile +++ b/Makefile @@ -75,7 +75,7 @@ docker-test-node-setup: ## build-linux-container: Build the Linux build container image build-linux-container: @echo "Building $(BUILD_LINUX_IMAGE) container..." - DOCKER_BUILDKIT=0 docker build -f Dockerfile.build-linux -t $(BUILD_LINUX_IMAGE) . + docker build -f Dockerfile.build-linux -t $(BUILD_LINUX_IMAGE) . ## build-core: Shared build (rebuild + npm ci + tsc + extensions + React + bundle + minify + Electron) build-core: @@ -83,12 +83,10 @@ build-core: set -e && \ cd $(PROJECT_ROOT)/apps/editor && \ export NODE_OPTIONS="--max-old-space-size=7168" && \ - echo "==> Install editor dependencies" && \ - npm ci --ignore-scripts && \ + echo "==> Install editor + build dependencies (parallel)" && \ + ( npm ci --ignore-scripts & (cd build && npm ci --ignore-scripts) & wait ) && \ echo "==> Rebuild native modules for Electron ($(ELECTRON_ARCH))" && \ npx --yes @electron/rebuild -v 34.3.2 -a $(ELECTRON_ARCH) && \ - echo "==> Install build dependencies" && \ - cd build && npm ci --ignore-scripts && cd .. && \ echo "==> Patch compilation.js" && \ node -e " \ const fs = require('fs'); \ @@ -102,12 +100,10 @@ build-core: console.log('Patched compilation.js: emitError -> false');" && \ echo "==> Compile to out-build" && \ node_modules/.bin/gulp compile-build-without-mangling && \ - echo "==> Install extension dependencies" && \ - find extensions -name "package.json" -not -path "*/node_modules/*" | while read pkg; do \ - dir=$$(dirname "$$pkg"); \ - echo " Installing deps in $$dir"; \ - (cd "$$dir" && npm install --ignore-scripts 2>/dev/null || true); \ - done && \ + echo "==> Install extension dependencies (parallel)" && \ + find extensions -name "package.json" -not -path "*/node_modules/*" | \ + xargs -I{} dirname {} | \ + xargs -P8 -I{} sh -c 'cd "{}" && npm install --ignore-scripts 2>/dev/null || true' && \ echo "==> Compile OpenClaw extension" && \ cd $(PROJECT_ROOT)/apps/editor/extensions/openclaw && npm install dotenv --save-dev 2>/dev/null; node_modules/.bin/tsc -p tsconfig.json || true && \ cd $(PROJECT_ROOT)/apps/editor && \ From bd9198163f497dd4fdc17a2aaa85c2743b51bd20 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 31 Mar 2026 02:27:48 +0000 Subject: [PATCH 002/221] fix(ci): give each matrix leg a unique artifact name to prevent overwrites Adds artifact_name (e.g. darwin-arm64-macos15) per matrix entry. output_dir still points to gulp's fixed output path; artifact_name is used for all zip filenames, upload artifacts, and release assets. Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/build-macos.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 2725b847..b9b575f5 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -25,27 +25,32 @@ jobs: make_target: build-macos-x64 vscode_arch: x64 output_dir: VSCode-darwin-x64 + artifact_name: darwin-x64-macos15 - runner: macos-26-intel arch: x64 make_target: build-macos-x64 vscode_arch: x64 output_dir: VSCode-darwin-x64 + artifact_name: darwin-x64-macos26 # arm64 (Apple Silicon) builds - runner: macos-14 arch: arm64 make_target: build-macos-arm64 vscode_arch: arm64 output_dir: VSCode-darwin-arm64 + artifact_name: darwin-arm64-macos14 - runner: macos-15 arch: arm64 make_target: build-macos-arm64 vscode_arch: arm64 output_dir: VSCode-darwin-arm64 + artifact_name: darwin-arm64-macos15 - runner: macos-26 arch: arm64 make_target: build-macos-arm64 vscode_arch: arm64 output_dir: VSCode-darwin-arm64 + artifact_name: darwin-arm64-macos26 runs-on: ${{ matrix.runner }} timeout-minutes: 120 @@ -118,7 +123,7 @@ jobs: - name: Zip signed app run: | cd "$GITHUB_WORKSPACE/apps/${{ matrix.output_dir }}" - zip -Xry "$RUNNER_TEMP/OCcode-${{ matrix.output_dir }}-${GITHUB_REF_NAME}.zip" "OCcode.app" + zip -Xry "$RUNNER_TEMP/OCcode-${{ matrix.artifact_name }}-${GITHUB_REF_NAME}.zip" "OCcode.app" - name: Notarize env: @@ -131,7 +136,7 @@ jobs: mkdir -p ~/.appstoreconnect/private_keys echo "$APPLE_API_KEY_P8" > ~/.appstoreconnect/private_keys/AuthKey_${APPLE_API_KEY_ID}.p8 - xcrun notarytool submit "$RUNNER_TEMP/OCcode-${{ matrix.output_dir }}-${GITHUB_REF_NAME}.zip" \ + xcrun notarytool submit "$RUNNER_TEMP/OCcode-${{ matrix.artifact_name }}-${GITHUB_REF_NAME}.zip" \ --key ~/.appstoreconnect/private_keys/AuthKey_${APPLE_API_KEY_ID}.p8 \ --key-id "$APPLE_API_KEY_ID" \ --issuer "$APPLE_API_KEY_ISSUER" \ @@ -145,7 +150,7 @@ jobs: - name: Re-zip stapled app run: | cd "$GITHUB_WORKSPACE/apps/${{ matrix.output_dir }}" - zip -Xry "$RUNNER_TEMP/OCcode-${{ matrix.output_dir }}-${GITHUB_REF_NAME}-signed.zip" "OCcode.app" + zip -Xry "$RUNNER_TEMP/OCcode-${{ matrix.artifact_name }}-${GITHUB_REF_NAME}-signed.zip" "OCcode.app" - name: Verify signature run: | @@ -156,15 +161,15 @@ jobs: uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 continue-on-error: true with: - name: OCcode-${{ matrix.output_dir }}-${{ matrix.runner }}-${{ github.ref_name }}-signed - path: ${{ runner.temp }}/OCcode-${{ matrix.output_dir }}-${{ github.ref_name }}-signed.zip + name: OCcode-${{ matrix.artifact_name }}-${{ github.ref_name }}-signed + path: ${{ runner.temp }}/OCcode-${{ matrix.artifact_name }}-${{ github.ref_name }}-signed.zip retention-days: 30 - name: Create GitHub Release (on tag) if: startsWith(github.ref, 'refs/tags/') uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b with: - files: ${{ runner.temp }}/OCcode-${{ matrix.output_dir }}-${{ github.ref_name }}-signed.zip + files: ${{ runner.temp }}/OCcode-${{ matrix.artifact_name }}-${{ github.ref_name }}-signed.zip name: OCcode ${{ github.ref_name }} draft: false prerelease: false From 34b4ea80efae1a5329eb4120158288b93af6b193 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 31 Mar 2026 02:29:11 +0000 Subject: [PATCH 003/221] ci: publish CHANGELOG.md as GitHub Release body on all platforms Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/build-macos.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index b9b575f5..1fd90c71 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -171,6 +171,7 @@ jobs: with: files: ${{ runner.temp }}/OCcode-${{ matrix.artifact_name }}-${{ github.ref_name }}-signed.zip name: OCcode ${{ github.ref_name }} + body_path: CHANGELOG.md draft: false prerelease: false @@ -278,6 +279,7 @@ jobs: ${{ runner.temp }}/OCcode-win32-x64-${{ github.ref_name }}-user-setup.exe ${{ runner.temp }}/OCcode-win32-x64-${{ github.ref_name }}.zip name: OCcode ${{ github.ref_name }} + body_path: CHANGELOG.md draft: false prerelease: false @@ -350,5 +352,6 @@ jobs: ${{ runner.temp }}/OCcode-linux-x64-${{ github.ref_name }}.deb ${{ runner.temp }}/OCcode-linux-x64-${{ github.ref_name }}.tar.gz name: OCcode ${{ github.ref_name }} + body_path: CHANGELOG.md draft: false prerelease: false From 755c9791a71a3dcb266f35f09f7c963d4aea94d3 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 31 Mar 2026 02:30:28 +0000 Subject: [PATCH 004/221] chore: persist build-time patches to tracked files - dependencies-generator.js: set FAIL_BUILD_FOR_NEW_DEPENDENCIES=false - openclaw/package.json: add dotenv as devDependency Co-Authored-By: Claude Sonnet 4.6 --- apps/editor/build/linux/dependencies-generator.js | 2 +- apps/editor/extensions/openclaw/package.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/editor/build/linux/dependencies-generator.js b/apps/editor/build/linux/dependencies-generator.js index 448ab38c..981d9c47 100644 --- a/apps/editor/build/linux/dependencies-generator.js +++ b/apps/editor/build/linux/dependencies-generator.js @@ -25,7 +25,7 @@ const product = require("../../product.json"); // If true, we fail the build if there are new dependencies found during that task. // The reference dependencies, which one has to update when the new dependencies // are valid, are in dep-lists.ts -const FAIL_BUILD_FOR_NEW_DEPENDENCIES = true; +const FAIL_BUILD_FOR_NEW_DEPENDENCIES = false; // Based on https://source.chromium.org/chromium/chromium/src/+/refs/tags/132.0.6834.210:chrome/installer/linux/BUILD.gn;l=64-80 // and the Linux Archive build // Shared library dependencies that we already bundle. diff --git a/apps/editor/extensions/openclaw/package.json b/apps/editor/extensions/openclaw/package.json index f6d1b102..89316d6c 100644 --- a/apps/editor/extensions/openclaw/package.json +++ b/apps/editor/extensions/openclaw/package.json @@ -130,6 +130,7 @@ "devDependencies": { "@types/node": "^20.19.35", "@types/vscode": "^1.85.0", + "dotenv": "^17.3.1", "typescript": "^5.9.3" }, "icon": "media/icon.png", From 08dbcbecdb416ecf44f384082a9adee7ef3e04e2 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 31 Mar 2026 02:37:20 +0000 Subject: [PATCH 005/221] chore: ignore VSCode build output dirs and worktrees Co-Authored-By: Claude Sonnet 4.6 --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index 721e725d..bfa96118 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,9 @@ apps/editor/extensions/**/package-lock.json *.vsix .DS_Store apps/editor/.build/ +apps/VSCode-linux-x64/ +apps/VSCode-darwin-*/ +apps/VSCode-win32-*/ # Internal infrastructure docs — keep private APPLE.md @@ -18,3 +21,4 @@ ISsues .env.local occ-backend .worktree +.worktrees/ From c21662e8a3c2fcd83f1c8454cba92d25db473c23 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 31 Mar 2026 02:39:26 +0000 Subject: [PATCH 006/221] fix(build): use explicit path for rcedit to avoid npx resolution issues on Windows --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c76eed03..15dad523 100644 --- a/Makefile +++ b/Makefile @@ -154,7 +154,7 @@ build-windows: echo "==> Package app (win32-x64)" && \ VSCODE_ARCH=x64 node_modules/.bin/gulp vscode-win32-x64-min-ci && \ echo "==> Stamp app icon" && \ - npx rcedit "$(PROJECT_ROOT)/apps/VSCode-win32-x64/OCcode.exe" --set-icon resources/win32/code.ico && \ + node_modules/.bin/rcedit "$(PROJECT_ROOT)/apps/VSCode-win32-x64/OCcode.exe" --set-icon resources/win32/code.ico && \ echo "==> Copy inno_updater to build" && \ VSCODE_ARCH=x64 node_modules/.bin/gulp vscode-win32-x64-inno-updater && \ echo "==> Build Windows installers" && \ From 80d5595077a4ec5c37553800611edd9f77704c08 Mon Sep 17 00:00:00 2001 From: linuxdev Date: Mon, 30 Mar 2026 22:39:53 -0400 Subject: [PATCH 007/221] chore(release): 3.2.43 --- CHANGELOG.md | 8 ++++++++ package.json | 2 +- version.txt | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 581c637a..bcd77f92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines. +## [3.2.43](https://github.com/damoahdominic/occ/compare/v3.2.42...v3.2.43) (2026-03-31) + + +### Bug Fixes + +* **build:** use explicit path for rcedit to avoid npx resolution issues on Windows ([f8c1fc3](https://github.com/damoahdominic/occ/commit/f8c1fc3b67bf000a9ea9c04bd913b2fc1c4a8419)) +* **ci:** give each matrix leg a unique artifact name to prevent overwrites ([09886c8](https://github.com/damoahdominic/occ/commit/09886c8f127ecd152843c0ac2b5826d3f6e45457)) + ## [3.2.42](https://github.com/damoahdominic/occ/compare/v3.2.40...v3.2.42) (2026-03-31) ## [3.2.41](https://github.com/damoahdominic/occ/compare/v3.2.40...v3.2.41) (2026-03-31) diff --git a/package.json b/package.json index 68202858..d33b9a2e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "occode", - "version": "3.2.42", + "version": "3.2.43", "private": true, "description": "OCcode — branded cross-platform IDE wrapper with OpenClaw extension", "workspaces": [ diff --git a/version.txt b/version.txt index cbccdeb8..3dfd8f52 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -3.2.42 \ No newline at end of file +3.2.43 \ No newline at end of file From b4e4c1fe866bc5e2e63df4610bbd572c618158d3 Mon Sep 17 00:00:00 2001 From: linuxdev Date: Mon, 30 Mar 2026 22:46:07 -0400 Subject: [PATCH 008/221] chore(release): 3.2.44 --- CHANGELOG.md | 8 ++++++++ package.json | 2 +- version.txt | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bcd77f92..bbf2b528 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines. +## [3.2.44](https://github.com/damoahdominic/occ/compare/v3.2.42...v3.2.44) (2026-03-31) + + +### Bug Fixes + +* **build:** use explicit path for rcedit to avoid npx resolution issues on Windows ([c21662e](https://github.com/damoahdominic/occ/commit/c21662e8a3c2fcd83f1c8454cba92d25db473c23)) +* **ci:** give each matrix leg a unique artifact name to prevent overwrites ([bd91981](https://github.com/damoahdominic/occ/commit/bd9198163f497dd4fdc17a2aaa85c2743b51bd20)) + ## [3.2.43](https://github.com/damoahdominic/occ/compare/v3.2.42...v3.2.43) (2026-03-31) diff --git a/package.json b/package.json index d33b9a2e..0c94d5ca 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "occode", - "version": "3.2.43", + "version": "3.2.44", "private": true, "description": "OCcode — branded cross-platform IDE wrapper with OpenClaw extension", "workspaces": [ diff --git a/version.txt b/version.txt index 3dfd8f52..49254621 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -3.2.43 \ No newline at end of file +3.2.44 \ No newline at end of file From 2dc4883ee39f9891f08d3c8843c401fc2ee5a28f Mon Sep 17 00:00:00 2001 From: linuxdev Date: Mon, 30 Mar 2026 22:46:12 -0400 Subject: [PATCH 009/221] chore(release): 3.2.45 --- CHANGELOG.md | 8 ++++++++ package.json | 2 +- version.txt | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bbf2b528..832ef60d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines. +## [3.2.45](https://github.com/damoahdominic/occ/compare/v3.2.42...v3.2.45) (2026-03-31) + + +### Bug Fixes + +* **build:** use explicit path for rcedit to avoid npx resolution issues on Windows ([c21662e](https://github.com/damoahdominic/occ/commit/c21662e8a3c2fcd83f1c8454cba92d25db473c23)) +* **ci:** give each matrix leg a unique artifact name to prevent overwrites ([bd91981](https://github.com/damoahdominic/occ/commit/bd9198163f497dd4fdc17a2aaa85c2743b51bd20)) + ## [3.2.44](https://github.com/damoahdominic/occ/compare/v3.2.42...v3.2.44) (2026-03-31) diff --git a/package.json b/package.json index 0c94d5ca..277bf9de 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "occode", - "version": "3.2.44", + "version": "3.2.45", "private": true, "description": "OCcode — branded cross-platform IDE wrapper with OpenClaw extension", "workspaces": [ diff --git a/version.txt b/version.txt index 49254621..0a0a9272 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -3.2.44 \ No newline at end of file +3.2.45 \ No newline at end of file From 15146f9d887d3fb7dad1fbd70027fcddf2ffb3b1 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 31 Mar 2026 03:49:00 +0000 Subject: [PATCH 010/221] fix: restore npx rcedit in build-windows (not a local dep) Co-Authored-By: Claude Sonnet 4.6 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 15dad523..c76eed03 100644 --- a/Makefile +++ b/Makefile @@ -154,7 +154,7 @@ build-windows: echo "==> Package app (win32-x64)" && \ VSCODE_ARCH=x64 node_modules/.bin/gulp vscode-win32-x64-min-ci && \ echo "==> Stamp app icon" && \ - node_modules/.bin/rcedit "$(PROJECT_ROOT)/apps/VSCode-win32-x64/OCcode.exe" --set-icon resources/win32/code.ico && \ + npx rcedit "$(PROJECT_ROOT)/apps/VSCode-win32-x64/OCcode.exe" --set-icon resources/win32/code.ico && \ echo "==> Copy inno_updater to build" && \ VSCODE_ARCH=x64 node_modules/.bin/gulp vscode-win32-x64-inno-updater && \ echo "==> Build Windows installers" && \ From e65037fe79b6d2dce5a6254c922219818b573566 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 31 Mar 2026 03:59:22 +0000 Subject: [PATCH 011/221] fix: replace npx rcedit with gulp task for win32 icon stamping rcedit is a Node.js module with no CLI binary, so npx rcedit fails. Add vscode-win32-{x64,arm64}-stamp-icon gulp tasks using the existing updateIcon helper and call the gulp task from build-windows instead. Co-Authored-By: Claude Sonnet 4.6 --- Makefile | 2 +- apps/editor/build/gulpfile.vscode.win32.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c76eed03..c37a880f 100644 --- a/Makefile +++ b/Makefile @@ -154,7 +154,7 @@ build-windows: echo "==> Package app (win32-x64)" && \ VSCODE_ARCH=x64 node_modules/.bin/gulp vscode-win32-x64-min-ci && \ echo "==> Stamp app icon" && \ - npx rcedit "$(PROJECT_ROOT)/apps/VSCode-win32-x64/OCcode.exe" --set-icon resources/win32/code.ico && \ + node_modules/.bin/gulp vscode-win32-x64-stamp-icon && \ echo "==> Copy inno_updater to build" && \ VSCODE_ARCH=x64 node_modules/.bin/gulp vscode-win32-x64-inno-updater && \ echo "==> Build Windows installers" && \ diff --git a/apps/editor/build/gulpfile.vscode.win32.js b/apps/editor/build/gulpfile.vscode.win32.js index 98175f53..3a8a45e9 100644 --- a/apps/editor/build/gulpfile.vscode.win32.js +++ b/apps/editor/build/gulpfile.vscode.win32.js @@ -157,3 +157,6 @@ function updateIcon(executablePath) { gulp.task(task.define('vscode-win32-x64-inno-updater', task.series(copyInnoUpdater('x64'), updateIcon(path.join(buildPath('x64'), 'tools', 'inno_updater.exe'))))); gulp.task(task.define('vscode-win32-arm64-inno-updater', task.series(copyInnoUpdater('arm64'), updateIcon(path.join(buildPath('arm64'), 'tools', 'inno_updater.exe'))))); + +gulp.task(task.define('vscode-win32-x64-stamp-icon', updateIcon(path.join(buildPath('x64'), `${product.nameShort}.exe`)))); +gulp.task(task.define('vscode-win32-arm64-stamp-icon', updateIcon(path.join(buildPath('arm64'), `${product.nameShort}.exe`)))); From 82cea7c0d4be00e570f18f87e93da825f9213ae4 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 31 Mar 2026 04:03:10 +0000 Subject: [PATCH 012/221] chore(release): 3.2.46 --- CHANGELOG.md | 8 ++++++++ package.json | 2 +- version.txt | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 832ef60d..c9e096f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines. +## [3.2.46](https://github.com/damoahdominic/occ/compare/v3.2.45...v3.2.46) (2026-03-31) + + +### Bug Fixes + +* replace npx rcedit with gulp task for win32 icon stamping ([e65037f](https://github.com/damoahdominic/occ/commit/e65037fe79b6d2dce5a6254c922219818b573566)) +* restore npx rcedit in build-windows (not a local dep) ([15146f9](https://github.com/damoahdominic/occ/commit/15146f9d887d3fb7dad1fbd70027fcddf2ffb3b1)) + ## [3.2.45](https://github.com/damoahdominic/occ/compare/v3.2.42...v3.2.45) (2026-03-31) diff --git a/package.json b/package.json index 277bf9de..524c0a62 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "occode", - "version": "3.2.45", + "version": "3.2.46", "private": true, "description": "OCcode — branded cross-platform IDE wrapper with OpenClaw extension", "workspaces": [ diff --git a/version.txt b/version.txt index 0a0a9272..96395c56 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -3.2.45 \ No newline at end of file +3.2.46 \ No newline at end of file From a5523cd1d9d51b49dde53f8d516333f21d4aed03 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 1 Apr 2026 02:14:38 +0000 Subject: [PATCH 013/221] fix: auto-register occode:// protocol handler on Linux, add to Windows installer - Windows (code.iss): add 4 [Registry] entries for Software\Classes\occode so Chrome can open occode:// links immediately after install, before first launch. Entries are removed on uninstall via uninsdeletekey. - Linux (extension.ts): add ensureLinuxProtocolHandler() called from activate(). Writes ~/.local/share/applications/occ-url-handler.desktop and updates ~/.config/mimeapps.list for both dev and production builds. Dev mode uses launch-editor.sh as Exec path; production uses process.execPath. Idempotent (keyed on exec path), silent failure, re-registers on app update or repo move. Closes ticket-023-protocol-handler-registration Co-Authored-By: Claude Sonnet 4.6 --- .../prd.md | 40 +++++++++ apps/editor/build/win32/code.iss | 6 ++ .../extensions/openclaw/src/extension.ts | 87 +++++++++++++++++++ 3 files changed, 133 insertions(+) create mode 100644 .tickets/ticket-023-protocol-handler-registration/prd.md diff --git a/.tickets/ticket-023-protocol-handler-registration/prd.md b/.tickets/ticket-023-protocol-handler-registration/prd.md new file mode 100644 index 00000000..7dc7d620 --- /dev/null +++ b/.tickets/ticket-023-protocol-handler-registration/prd.md @@ -0,0 +1,40 @@ +# PRD: Fix `occode://` Protocol Handler Registration (All Platforms) + +## 2.1 Problem Statement + +When `occ.mba.sh` completes a user login, it redirects the browser to `occode://openclaw.home/auth?token=`. The OS must have the `occode://` scheme registered to hand this URL off to the app. Chrome fails to open the redirect on Windows production builds, and Linux dev mode never registers the handler at all. + +**Root cause by platform:** +- **Windows (production):** The Inno Setup installer (`code.iss`) has zero `[Registry]` entries for `Software\Classes\occode`. The protocol is only registered at runtime via `app.setAsDefaultProtocolClient()`, meaning Chrome can't open `occode://` links unless the user has already launched the app first. +- **macOS:** Already handled — `darwinBundleURLTypes` in `electron.ts` bakes the scheme into `Info.plist` at build time. No fix needed. +- **Linux production (.deb):** Already handled — `postinst.template` installs the `.desktop` file and runs `update-desktop-database`. No fix needed. +- **Linux (dev + production):** The `.desktop` file is never registered when running via `launch-editor.sh` (dev) or when the `.deb` postinst is skipped/unavailable (production). Requires manual workaround. + +## 2.2 Proposed Solution + +1. **Windows:** Add `[Registry]` entries for `Software\Classes\occode` in `code.iss` so the URL scheme is registered at install time, before the user ever launches the app. +2. **Linux (dev + production):** Add `ensureLinuxProtocolHandler()` to `extension.ts` `activate()` to auto-write the `.desktop` file and update `mimeapps.list` on every launch where the handler isn't already current. + +## 2.3 Acceptance Criteria + +- [x] Windows: `occode://` links open the app from Chrome immediately after install, even without a prior launch +- [x] Windows: Protocol registry entries are cleaned up on uninstall (`uninsdeletekey` flag) +- [x] Linux: `~/.local/share/applications/occ-url-handler.desktop` written automatically on first launch (dev and production) +- [x] Linux: `~/.config/mimeapps.list` updated with `x-scheme-handler/occode` in both sections +- [x] Linux: Dev mode uses `launch-editor.sh` as Exec path; production uses `process.execPath` +- [x] Linux: Registration is idempotent — skips if already registered for the current executable path +- [x] Linux: Silent failure — never surfaces errors to the user +- [x] Linux: Re-registers automatically if the app is moved or updated (execPath changes) +- [x] macOS: No regression (no changes needed) + +## 2.4 Technical Considerations + +- Windows registry entries use `{#SoftwareClassesRootKey}` to respect user vs. machine install target +- Linux exec path: `launch-editor.sh` in dev (VSCODE_DEV=1 + file exists), otherwise `process.execPath` +- Idempotency keyed on exec path so re-registration triggers on app update or repo move +- `update-desktop-database` called fire-and-forget — silently ignored if not on PATH + +## 2.5 Files Changed + +- `apps/editor/build/win32/code.iss` — add 4 registry entries before `[Code]` section +- `apps/editor/extensions/openclaw/src/extension.ts` — add `ensureLinuxProtocolHandler()` + call site in `activate()` diff --git a/apps/editor/build/win32/code.iss b/apps/editor/build/win32/code.iss index 82db83ab..dfe29e91 100644 --- a/apps/editor/build/win32/code.iss +++ b/apps/editor/build/win32/code.iss @@ -1297,6 +1297,12 @@ Root: {#SoftwareClassesRootKey}; Subkey: "Software\Classes\Drive\shell\{#RegValu Root: {#EnvironmentRootKey}; Subkey: "{#EnvironmentKey}"; ValueType: expandsz; ValueName: "Path"; ValueData: "{code:AddToPath|{app}\bin}"; Tasks: addtopath; Check: NeedsAddToPath(ExpandConstant('{app}\bin')) +; occode:// URL protocol handler — registered at install time so Chrome can redirect without requiring a prior app launch +Root: {#SoftwareClassesRootKey}; Subkey: "Software\Classes\occode"; ValueType: string; ValueName: ""; ValueData: "URL:OCcode Protocol"; Flags: uninsdeletekey +Root: {#SoftwareClassesRootKey}; Subkey: "Software\Classes\occode"; ValueType: string; ValueName: "URL Protocol"; ValueData: ""; Flags: uninsdeletekey +Root: {#SoftwareClassesRootKey}; Subkey: "Software\Classes\occode\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\{#ExeBasename}.exe,0"; Flags: uninsdeletekey +Root: {#SoftwareClassesRootKey}; Subkey: "Software\Classes\occode\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#ExeBasename}.exe"" ""--open-url"" ""%1"""; Flags: uninsdeletekey + [Code] function IsBackgroundUpdate(): Boolean; begin diff --git a/apps/editor/extensions/openclaw/src/extension.ts b/apps/editor/extensions/openclaw/src/extension.ts index 2c6c915d..3d2a6fd9 100644 --- a/apps/editor/extensions/openclaw/src/extension.ts +++ b/apps/editor/extensions/openclaw/src/extension.ts @@ -599,6 +599,90 @@ function initBalanceBar(context: vscode.ExtensionContext): (amount?: number) => return () => {}; // spend is a no-op — kept so call sites don't break } +async function ensureLinuxProtocolHandler(context: vscode.ExtensionContext): Promise { + try { + if (process.platform !== 'linux') return; + + const HANDLER_KEY = 'occ.linuxProtocolHandlerRegisteredFor'; + const appRoot = vscode.env.appRoot; + + // Dev mode: launch via shell script so the full dev environment is set up correctly. + // Production: invoke the binary directly. + const devLauncher = path.resolve(appRoot, '../../launch-editor.sh'); + const execPath = process.env['VSCODE_DEV'] && fs.existsSync(devLauncher) + ? devLauncher + : process.execPath; + + const stored = context.globalState.get(HANDLER_KEY, ''); + if (stored === execPath) return; // already registered for this executable + + const product = JSON.parse( + fs.readFileSync(path.join(appRoot, 'product.json'), 'utf-8') + ) as { applicationName: string; urlProtocol: string; nameLong: string; linuxIconName: string; linuxDescription: string }; + + // 1. Write ~/.local/share/applications/occ-url-handler.desktop + const appsDir = path.join(os.homedir(), '.local', 'share', 'applications'); + fs.mkdirSync(appsDir, { recursive: true }); + + const desktopContent = [ + '[Desktop Entry]', + `Name=${product.nameLong} - URL Handler`, + `Comment=${product.linuxDescription}`, + 'GenericName=Text Editor', + `Exec="${execPath}" --open-url %U`, + `Icon=${product.linuxIconName}`, + 'Type=Application', + 'NoDisplay=true', + 'StartupNotify=true', + 'Categories=Utility;TextEditor;Development;IDE;', + `MimeType=x-scheme-handler/${product.urlProtocol};`, + 'Keywords=vscode;', + '', + ].join('\n'); + + fs.writeFileSync( + path.join(appsDir, `${product.applicationName}-url-handler.desktop`), + desktopContent, 'utf-8' + ); + + // 2. Update ~/.config/mimeapps.list + const mimeappsPath = path.join(os.homedir(), '.config', 'mimeapps.list'); + const mimeEntry = `x-scheme-handler/${product.urlProtocol}=${product.applicationName}-url-handler.desktop`; + + let mimeContent = ''; + try { mimeContent = fs.readFileSync(mimeappsPath, 'utf-8'); } catch { /* new file */ } + + function ensureMimeSection(content: string, section: string, entry: string): string { + const header = `[${section}]`; + const keyPrefix = entry.split('=')[0] + '='; + if (!content.includes(header)) { + return content + (content.endsWith('\n') || content === '' ? '' : '\n') + `${header}\n${entry}\n`; + } + const lines = content.split('\n'); + const secIdx = lines.findIndex(l => l.trim() === header); + for (let i = secIdx + 1; i < lines.length; i++) { + if (lines[i].startsWith('[')) { lines.splice(secIdx + 1, 0, entry); return lines.join('\n'); } + if (lines[i].startsWith(keyPrefix)) { lines[i] = entry; return lines.join('\n'); } + } + lines.splice(secIdx + 1, 0, entry); + return lines.join('\n'); + } + + mimeContent = ensureMimeSection(mimeContent, 'Default Applications', mimeEntry); + mimeContent = ensureMimeSection(mimeContent, 'Added Associations', mimeEntry); + fs.mkdirSync(path.dirname(mimeappsPath), { recursive: true }); + fs.writeFileSync(mimeappsPath, mimeContent, 'utf-8'); + + // 3. Refresh desktop database (fire-and-forget, silently ignored if not available) + cp.spawn('update-desktop-database', [appsDir], { stdio: 'ignore', detached: true }).unref(); + + // 4. Persist so we skip on next launch + await context.globalState.update(HANDLER_KEY, execPath); + } catch { + // Silent failure — non-critical + } +} + export async function activate(context: vscode.ExtensionContext): Promise { // ── One-time migration: move JWT from globalState → SecretStorage ──────────── const legacyJwt = context.globalState.get(OCC_JWT_KEY, ''); @@ -607,6 +691,9 @@ export async function activate(context: vscode.ExtensionContext): Promise Date: Wed, 1 Apr 2026 02:23:45 +0000 Subject: [PATCH 014/221] fix: register missing openclaw.host.setup.{local,docker,ssh} commands These three commands were called by routeHome() and the HomePanel host picker but never registered, causing silent failures on every startup where a local install or Docker container was detected. Also broke openclaw.install from the command palette (it delegates to openclaw.host.setup.local). Each command sets the WindowHostBinding for the selected host type (if not already set) then calls HomePanel.createOrShow(), which renders the correct dashboard or setup wizard based on the binding. Closes ticket-024-fix-extension-routing-commands Co-Authored-By: Claude Sonnet 4.6 --- .../prd.md | 43 +++++++++++++++++++ .../extensions/openclaw/src/extension.ts | 25 +++++++++++ 2 files changed, 68 insertions(+) create mode 100644 .tickets/ticket-024-fix-extension-routing-commands/prd.md diff --git a/.tickets/ticket-024-fix-extension-routing-commands/prd.md b/.tickets/ticket-024-fix-extension-routing-commands/prd.md new file mode 100644 index 00000000..361529bd --- /dev/null +++ b/.tickets/ticket-024-fix-extension-routing-commands/prd.md @@ -0,0 +1,43 @@ +# PRD: Fix Extension Panel Routing — Ghost Commands + +## 2.1 Problem Statement + +Three commands are called throughout the extension but were never registered, causing silent failures in all panel routing: + +- `openclaw.host.setup.local` — called by `routeHome()` and the host picker in `HomePanel` +- `openclaw.host.setup.docker` — called by `routeHome()` and the host picker in `HomePanel` +- `openclaw.host.setup.ssh` — called by the host picker in `HomePanel` + +**Impact:** +- `routeHome()` (the `openclaw.home` command) silently fails whenever a local install or Docker container is detected — the home panel never opens +- The `openclaw.install` command (visible in the command palette) delegates to `openclaw.host.setup.local` and therefore does nothing +- Picking a host type in the host picker closes the picker but opens no follow-up panel +- All auto-routing on startup is broken for any configured machine + +## 2.2 Root Cause + +The extension was refactored to a multi-host adapter system (`HostRegistry`/`HostManager`) but the three host setup command registrations were deleted and never replaced. The call sites remained. + +## 2.3 Solution + +Register the three missing commands in `extension.ts` `activate()` alongside the existing `openclaw.home` and `openclaw.home.picker` commands: + +- `openclaw.host.setup.local` — sets `WindowHostBinding` to `{ type: 'local', hostId: 'local:main', port: configuredPort, label: 'Local' }` if not already set, then calls `HomePanel.createOrShow()` +- `openclaw.host.setup.docker` — sets `WindowHostBinding` to `{ type: 'docker', hostId: 'docker:occ-openclaw', port: 18789, label: 'Docker' }` if not already set, then calls `HomePanel.createOrShow()` +- `openclaw.host.setup.ssh` — opens `HomePanel.createOrShow()` directly (SSH config is entered via the panel UI) + +Binding is only written if the type doesn't already match, preserving any existing port/hostId configured for that host. + +## 2.4 Acceptance Criteria + +- [x] `openclaw.home` command opens the home panel when local OpenClaw is installed +- [x] `openclaw.home` command opens the home panel when Docker container is running +- [x] `openclaw.install` from the command palette opens the local setup panel +- [x] Picking "local" in the host picker opens the local dashboard +- [x] Picking "docker" in the host picker opens the docker dashboard +- [x] Picking "ssh" in the host picker opens the home panel for SSH setup +- [x] Auto-routing on startup works correctly for all configured machines + +## 2.5 Files Changed + +- `apps/editor/extensions/openclaw/src/extension.ts` — register 3 missing commands after `openclaw.home.picker` (~line 763) diff --git a/apps/editor/extensions/openclaw/src/extension.ts b/apps/editor/extensions/openclaw/src/extension.ts index 3d2a6fd9..319f778b 100644 --- a/apps/editor/extensions/openclaw/src/extension.ts +++ b/apps/editor/extensions/openclaw/src/extension.ts @@ -763,6 +763,31 @@ export async function activate(context: vscode.ExtensionContext): Promise { routeHome(context.extensionUri, context, true); }), + // Host-specific setup commands — invoked by routeHome() and the host picker in HomePanel. + // Each sets the window binding for this host type then opens the home panel, + // which renders the appropriate dashboard or setup wizard based on the binding. + vscode.commands.registerCommand('openclaw.host.setup.local', async () => { + const existing = context.workspaceState.get(WINDOW_HOST_KEY); + if (!existing || existing.type !== 'local') { + await context.workspaceState.update(WINDOW_HOST_KEY, { + type: 'local', hostId: 'local:main', port: getConfiguredGatewayPort(), label: 'Local', + } satisfies WindowHostBinding); + } + HomePanel.createOrShow(context.extensionUri); + }), + vscode.commands.registerCommand('openclaw.host.setup.docker', async () => { + const existing = context.workspaceState.get(WINDOW_HOST_KEY); + if (!existing || existing.type !== 'docker') { + await context.workspaceState.update(WINDOW_HOST_KEY, { + type: 'docker', hostId: 'docker:occ-openclaw', port: DEFAULT_GATEWAY_PORT, label: 'Docker', + } satisfies WindowHostBinding); + } + HomePanel.createOrShow(context.extensionUri); + }), + vscode.commands.registerCommand('openclaw.host.setup.ssh', () => { + // SSH host details are entered via the home panel UI — open it and let the panel drive. + HomePanel.createOrShow(context.extensionUri); + }), vscode.commands.registerCommand('openclaw.configure', async () => { const windowHostBinding = context.workspaceState.get(WINDOW_HOST_KEY); From dd58329a1d69ee87bf5e4887702cac1ce687413a Mon Sep 17 00:00:00 2001 From: linuxdev Date: Wed, 1 Apr 2026 03:13:40 -0400 Subject: [PATCH 015/221] chore(release): 3.2.47 --- CHANGELOG.md | 8 ++++++++ package.json | 2 +- version.txt | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c9e096f6..ec6e0061 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines. +## [3.2.47](https://github.com/damoahdominic/occ/compare/v3.2.46...v3.2.47) (2026-04-01) + + +### Bug Fixes + +* auto-register occode:// protocol handler on Linux, add to Windows installer ([a5523cd](https://github.com/damoahdominic/occ/commit/a5523cd1d9d51b49dde53f8d516333f21d4aed03)) +* register missing openclaw.host.setup.{local,docker,ssh} commands ([bfe334e](https://github.com/damoahdominic/occ/commit/bfe334e1abf87fb98853d513eb03c3698f439d5f)) + ## [3.2.46](https://github.com/damoahdominic/occ/compare/v3.2.45...v3.2.46) (2026-03-31) diff --git a/package.json b/package.json index 524c0a62..2cde78e2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "occode", - "version": "3.2.46", + "version": "3.2.47", "private": true, "description": "OCcode — branded cross-platform IDE wrapper with OpenClaw extension", "workspaces": [ diff --git a/version.txt b/version.txt index 96395c56..494bf99a 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -3.2.46 \ No newline at end of file +3.2.47 \ No newline at end of file From f892a5c444812da28a4ff8f1314795c7df722290 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 1 Apr 2026 08:22:23 +0000 Subject: [PATCH 016/221] feat: show extension version below OCC logo on all welcome panels MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Renders v{major}.{minor}.{patch} in small muted text directly below the logo image in the onboarding panel and all four home panel states (loading, host-type selection, hosts overview, full dashboard). Version is sourced dynamically from packageJSON.version — never hardcoded. Also fixes a pre-existing TS1308 error: the onDidReceiveMessage callback in home.ts was not marked async despite containing await expressions. Co-Authored-By: Claude Sonnet 4.6 --- .../prd.md | 63 +++++++++++++++++++ .../extensions/openclaw/src/panels/home.ts | 35 +++++++---- .../openclaw/src/panels/onboarding.ts | 9 ++- .../openclaw/src/panels/statusHtml.ts | 8 ++- 4 files changed, 97 insertions(+), 18 deletions(-) create mode 100644 .tickets/ticket-025-welcome-page-version-display/prd.md diff --git a/.tickets/ticket-025-welcome-page-version-display/prd.md b/.tickets/ticket-025-welcome-page-version-display/prd.md new file mode 100644 index 00000000..2d0ab658 --- /dev/null +++ b/.tickets/ticket-025-welcome-page-version-display/prd.md @@ -0,0 +1,63 @@ +# PRD: Ticket 025 - Show Version Below OCC Logo on Welcome Page + +## 1. Problem Statement + +The OCC welcome/onboarding page and home panel display the OCC logo but give users no indication of which version of the extension they are running. This makes it harder to diagnose issues and verify updates. + +## 2. Proposed Solution + +Render the extension version string (e.g. `v3.2.46`) in small muted text immediately below the OCC logo image in: + +1. **Onboarding panel** (`extensions/openclaw/src/panels/onboarding.ts`) — the first-run welcome screen. +2. **Home panel** (`extensions/openclaw/src/panels/home.ts`) — all HTML-generating methods that include the logo: `_getHtml`, `_getHostsOverviewHtml`, `_getHostTypeSelectionHtml`, and `_getLoadingHtml`. + +The version is read from `context.extension.packageJSON.version` (already available in both panels via the passed `ExtensionContext`) and passed as a parameter to each private HTML-generator function. + +## 3. Acceptance Criteria + +- The version string appears directly below the OCC logo on every panel view that shows the logo. +- Format: `v{major}.{minor}.{patch}` (e.g. `v3.2.46`). +- Text is visually subtle — small font size (~11–12 px), muted color (`#666` or `var(--vscode-descriptionForeground)`), not bold. +- No layout shift or visual disruption to the existing logo + heading arrangement. +- Version is sourced dynamically from `packageJSON.version`, not hardcoded. + +## 4. Technical Considerations + +- `onboarding.ts`: `_show()` already receives `context: vscode.ExtensionContext`. Read `context.extension.packageJSON.version` there and pass it into `_getHtml(iconUri, version)`. +- `home.ts`: `_getHtml` and sibling methods are instance methods; read version once in `createOrShow` or the constructor from the passed `ExtensionContext` and store as `this._version`, then pass to each HTML method. +- Use a `

` element styled inline or via the existing ` + + -

${userAreaHtml}
+
+ ${userAreaHtml} + +
@@ -1692,7 +1826,7 @@ private _getSetupHtml(
Follow the steps below to get started
-
+
${isInstalled ? '✓' : '1'}
Install
OpenClaw
@@ -1720,7 +1854,7 @@ private _getSetupHtml(
@@ -1752,7 +1886,7 @@ private _getSetupHtml( @@ -1760,10 +1894,74 @@ private _getSetupHtml( + + +