From fcebcb017414b0923ee4b03335bd37026e2fcd12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pascal=20Andr=C3=A9?= Date: Sun, 15 Mar 2026 20:28:32 +0100 Subject: [PATCH] fix(tauri): sync server UI bundle during prebuild Ensure the Tauri prebuild step refreshes packages/server/public from the current UI renderer bundle so the packaged desktop app does not serve a stale folder-selection UI. --- packages/tauri-app/scripts/prebuild.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/tauri-app/scripts/prebuild.js b/packages/tauri-app/scripts/prebuild.js index fbf0a4a1..a382a8d2 100644 --- a/packages/tauri-app/scripts/prebuild.js +++ b/packages/tauri-app/scripts/prebuild.js @@ -20,6 +20,7 @@ const serverDevInstallCommand = "npm install --workspace @neuralnomads/codenomad --include-workspace-root=false --install-strategy=nested --fund=false --audit=false" const uiDevInstallCommand = "npm install --workspace @codenomad/ui --include-workspace-root=false --install-strategy=nested --fund=false --audit=false" +const serverPrepareUiCommand = "npm run prepare-ui --workspace @neuralnomads/codenomad" const envWithRootBin = { ...process.env, @@ -91,6 +92,15 @@ function ensureUiBuild() { } } +function syncServerUiBundle() { + console.log("[prebuild] syncing server public UI bundle...") + execSync(serverPrepareUiCommand, { + cwd: workspaceRoot, + stdio: "inherit", + env: envWithRootBin, + }) +} + function ensureServerDevDependencies() { if (fs.existsSync(braceExpansionPath)) { return @@ -246,6 +256,7 @@ function copyUiLoadingAssets() { ensureServerDependencies() ensureServerBuild() ensureUiBuild() + syncServerUiBundle() copyServerArtifacts() stripNodeModuleBins() copyUiLoadingAssets()