Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: update scripts now build UI assets before restarting PM2

Adam Eivy76277f404939
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
new file mode 100644
index 0000000000..58350f5fda
--- /dev/null
+++ b/.changelog/NEXT.md
@@ -0,0 +1,10 @@
+# Unreleased Changes
+
+## Added
+
+## Changed
+
+## Fixed
+- Update scripts (update.sh/update.ps1) now build UI assets before restarting PM2, ensuring production serves the latest client build
+
+## Removed
diff --git a/update.ps1 b/update.ps1
index 97e3626bd9..90bfa10b25 100644
--- a/update.ps1
+++ b/update.ps1
@@ -64,6 +64,12 @@ Write-Host ""
node scripts/setup-ghostty.js
Write-Host ""
+# Build UI assets for production serving
+Write-Host "Building UI assets..." -ForegroundColor Yellow
+npm run build
+if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
+Write-Host ""
+
# Restart PM2 apps
Write-Host "Restarting PortOS..." -ForegroundColor Yellow
npm run pm2:restart
diff --git a/update.sh b/update.sh
index 37f7e9a5b7..a844bfb689 100755
--- a/update.sh
+++ b/update.sh
@@ -61,6 +61,11 @@ echo ""
node scripts/setup-ghostty.js
echo ""
+# Build UI assets for production serving
+echo "Building UI assets..."
+npm run build
+echo ""
+
# Restart PM2 apps
echo "Restarting PortOS..."
npm run pm2:restart