From 957192cc5c9762a67c65e9c9cf0cf02f2ecefb54 Mon Sep 17 00:00:00 2001 From: 134 Date: Mon, 27 Jul 2026 19:33:41 +0800 Subject: [PATCH] feat: upgrade embedded HiCAD to latest official source --- scripts/vendor-zoo-modeling-app.mjs | 4 ++-- tests/routes/hicad-embedded-performance.test.ts | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/scripts/vendor-zoo-modeling-app.mjs b/scripts/vendor-zoo-modeling-app.mjs index bc596e1f6..ebd939eb8 100644 --- a/scripts/vendor-zoo-modeling-app.mjs +++ b/scripts/vendor-zoo-modeling-app.mjs @@ -18,7 +18,7 @@ import { cacheBustZooModelingAppAssets } from "./cache-bust-zoo-modeling-app-ass const repoUrl = "https://github.com/KittyCAD/modeling-app.git"; const repoRef = process.env.ZOO_MODELING_APP_REF || - "6f87f4e66c07c67f09d8f7db284496a3ae3332e7"; + "f2b345dbb56a851e10d8a742732ab73ee139f025"; const repoTarballUrls = [ `https://ghfast.top/https://github.com/KittyCAD/modeling-app/archive/${repoRef}.tar.gz`, `https://github.com/KittyCAD/modeling-app/archive/${repoRef}.tar.gz`, @@ -167,7 +167,7 @@ function patchOfficialSource() { ` ws.addEventListener('open', () => {\n if (token !== '${proxyToken}') {\n ws.send(\n JSON.stringify({\n type: 'headers',\n headers: {\n Authorization: 'Bearer ' + token,\n },\n })\n )\n }\n resolve(ws)\n })` ); replaceSource( - "src/network/websocketConnection.ts", + "src/lib/engineConnection/websocketConnection.ts", " if (token) {", ` if (token && token !== '${proxyToken}') {` ); diff --git a/tests/routes/hicad-embedded-performance.test.ts b/tests/routes/hicad-embedded-performance.test.ts index 32f56b122..184850ad8 100644 --- a/tests/routes/hicad-embedded-performance.test.ts +++ b/tests/routes/hicad-embedded-performance.test.ts @@ -3,8 +3,19 @@ import fs from "node:fs"; import path from "node:path"; const projectRoot = process.cwd(); +const latestReviewedOfficialCommit = + "f2b345dbb56a851e10d8a742732ab73ee139f025"; test.describe("HiCAD embedded startup", () => { + test("pins the latest reviewed official Zoo Design Studio source", () => { + const vendorScript = fs.readFileSync( + path.join(projectRoot, "scripts/vendor-zoo-modeling-app.mjs"), + "utf8" + ); + + expect(vendorScript).toContain(latestReviewedOfficialCommit); + }); + test("suppresses the upstream onboarding chooser in embedded mode", () => { const vendorScript = fs.readFileSync( path.join(projectRoot, "scripts/vendor-zoo-modeling-app.mjs"),