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: reconcile PortOS baseline fields on load, hide Standardize PM2 for PortOS

Adam Eivy71cd5f9dadbc
diff --git a/client/src/pages/Apps.jsx b/client/src/pages/Apps.jsx
index 84a06ed718..fb53ab2f59 100644
--- a/client/src/pages/Apps.jsx
+++ b/client/src/pages/Apps.jsx
@@ -629,15 +629,17 @@ export default function Apps() {
<RefreshCw size={14} aria-hidden="true" className={refreshingConfig[app.id] ? 'animate-spin' : ''} />
Refresh Config
</button>
- <button
- onClick={() => handleStandardize(app)}
- disabled={standardizing[app.id]}
- className="px-3 py-1.5 bg-port-accent/20 text-port-accent hover:bg-port-accent/30 rounded-lg text-xs flex items-center gap-1 disabled:opacity-50"
- aria-label="Standardize PM2 config: move all ports to ecosystem.config.cjs"
- >
- <Wrench size={14} aria-hidden="true" className={standardizing[app.id] ? 'animate-spin' : ''} />
- {standardizing[app.id] ? 'Standardizing...' : 'Standardize PM2'}
- </button>
+ {app.id !== api.PORTOS_APP_ID && (
+ <button
+ onClick={() => handleStandardize(app)}
+ disabled={standardizing[app.id]}
+ className="px-3 py-1.5 bg-port-accent/20 text-port-accent hover:bg-port-accent/30 rounded-lg text-xs flex items-center gap-1 disabled:opacity-50"
+ aria-label="Standardize PM2 config: move all ports to ecosystem.config.cjs"
+ >
+ <Wrench size={14} aria-hidden="true" className={standardizing[app.id] ? 'animate-spin' : ''} />
+ {standardizing[app.id] ? 'Standardizing...' : 'Standardize PM2'}
+ </button>
+ )}
</div>
</div>
</div>
diff --git a/package-lock.json b/package-lock.json
index 39968beaf7..22a8dbd11d 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "portos",
- "version": "1.22.0",
+ "version": "1.22.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "portos",
- "version": "1.22.0",
+ "version": "1.22.1",
"license": "MIT",
"dependencies": {
"express": "^4.21.2",
diff --git a/package.json b/package.json
index 7bc166f848..edfac4d91b 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "portos",
- "version": "1.22.0",
+ "version": "1.22.1",
"private": true,
"description": "Local dev machine App OS portal",
"author": "Adam Eivy (@antic|@atomantic)",
diff --git a/server/services/apps.js b/server/services/apps.js
index c2566f9120..09bb45b046 100644
--- a/server/services/apps.js
+++ b/server/services/apps.js
@@ -86,11 +86,33 @@ async function loadApps() {
data.apps = {};
}
- // Ensure PortOS baseline app is always present
+ // Ensure PortOS baseline app is always present and up-to-date
+ const baseline = buildPortosApp();
if (!data.apps[PORTOS_APP_ID]) {
- data.apps[PORTOS_APP_ID] = buildPortosApp();
+ data.apps[PORTOS_APP_ID] = baseline;
await writeFile(APPS_FILE, JSON.stringify(data, null, 2));
console.log('📦 Seeded baseline PortOS app into apps registry');
+ } else {
+ // Reconcile: merge new baseline fields into existing entry (preserves user overrides)
+ let dirty = false;
+ for (const [key, value] of Object.entries(baseline)) {
+ if (!(key in data.apps[PORTOS_APP_ID])) {
+ data.apps[PORTOS_APP_ID][key] = value;
+ dirty = true;
+ }
+ }
+ // Force-sync specific fields that should always match the code definition
+ const forceSync = ['uiPort', 'devUiPort', 'apiPort', 'buildCommand', 'startCommands', 'processes', 'pm2ProcessNames'];
+ for (const key of forceSync) {
+ if (JSON.stringify(data.apps[PORTOS_APP_ID][key]) !== JSON.stringify(baseline[key])) {
+ data.apps[PORTOS_APP_ID][key] = baseline[key];
+ dirty = true;
+ }
+ }
+ if (dirty) {
+ await writeFile(APPS_FILE, JSON.stringify(data, null, 2));
+ console.log('📦 Reconciled PortOS baseline app with latest fields');
+ }
}
appsCache = data;