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: handle socket hangup gracefully during PortOS self-build

Adam Eivy062c8fe6358c
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index 8afdab6cba..decde772c2 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -6,5 +6,6 @@
## Fixed
- Unblocking tasks from the banner now reactively updates both the banner and task list without requiring a page reload
+- PortOS self-build no longer causes socket hangup by ignoring package-lock.json in PM2 watch; UI shows graceful toast on self-build connection loss
## Removed
diff --git a/.gitignore b/.gitignore
index 9e811743ec..0f57c0cc72 100644
--- a/.gitignore
+++ b/.gitignore
@@ -39,6 +39,7 @@ Thumbs.db
# Claude worktrees
.claude/worktrees/
+.claude/settings.local.json
# Browser service node_modules (code is committed)
browser/node_modules/
diff --git a/client/src/components/apps/AppDetailView.jsx b/client/src/components/apps/AppDetailView.jsx
index 2615509935..34ab0f4ca1 100644
--- a/client/src/components/apps/AppDetailView.jsx
+++ b/client/src/components/apps/AppDetailView.jsx
@@ -73,10 +73,13 @@ export default function AppDetailView() {
const handleBuild = async () => {
setBuildLoading(true);
+ const isSelfBuild = appId === api.PORTOS_APP_ID;
const result = await api.buildApp(appId).catch(() => null);
setBuildLoading(false);
if (result?.success) {
toast.success(`${app.name} production build complete`);
+ } else if (isSelfBuild) {
+ toast.success(`${app.name} build triggered — server may restart`);
}
};
diff --git a/ecosystem.config.cjs b/ecosystem.config.cjs
index cc0bbffe9e..f3f3374316 100644
--- a/ecosystem.config.cjs
+++ b/ecosystem.config.cjs
@@ -42,7 +42,7 @@ module.exports = {
PATH: process.env.PATH // Inherit PATH for git/node access in child processes
},
watch: ['server'],
- ignore_watch: ['node_modules', '**/*.test.js'],
+ ignore_watch: ['node_modules', '**/*.test.js', '**/package-lock.json'],
max_memory_restart: '2G'
},
{