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: auto-derive uiPort/apiPort from processes for Launch button

[._.]/ Adam Eivybfccaff1a4a9
diff --git a/.changelog/v1.12.x.md b/.changelog/v1.12.x.md
new file mode 100644
index 0000000000..34341ee27b
--- /dev/null
+++ b/.changelog/v1.12.x.md
@@ -0,0 +1,13 @@
+# Release v1.12.x - Changelog
+
+Released: YYYY-MM-DD
+
+## Overview
+
+Bug fixes for managed app UI.
+
+## Fixes
+
+### Missing Launch button on managed apps with UI process ports
+- Apps with `uiPort: null` but a process with a labeled `ui` port (e.g., `hdiff-ui:5571`) did not show the Launch button
+- Both list and single-app API endpoints now auto-derive `uiPort`/`apiPort` from the processes array when not explicitly set
diff --git a/package-lock.json b/package-lock.json
index 987bac939e..93a5d62c3a 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "portos",
- "version": "1.12.2",
+ "version": "1.12.3",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "portos",
- "version": "1.12.2",
+ "version": "1.12.3",
"license": "MIT",
"dependencies": {
"express": "^4.21.2",
diff --git a/package.json b/package.json
index 5a6e0e11fe..fefb6d2db3 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "portos",
- "version": "1.12.2",
+ "version": "1.12.3",
"private": true,
"description": "Local dev machine App OS portal",
"author": "Adam Eivy (@antic|@atomantic)",
diff --git a/server/routes/apps.js b/server/routes/apps.js
index 5e0f30890a..95b36dc45f 100644
--- a/server/routes/apps.js
+++ b/server/routes/apps.js
@@ -74,9 +74,22 @@ router.get('/', asyncHandler(async (req, res) => {
processes = parsed.processes;
}
+ // Auto-derive uiPort/apiPort from processes when not explicitly set
+ let { uiPort, apiPort } = app;
+ if (!uiPort && processes?.length) {
+ const uiProc = processes.find(p => p.ports?.ui);
+ if (uiProc) uiPort = uiProc.ports.ui;
+ }
+ if (!apiPort && processes?.length) {
+ const apiProc = processes.find(p => p.ports?.api);
+ if (apiProc) apiPort = apiProc.ports.api;
+ }
+
return {
...app,
processes,
+ uiPort,
+ apiPort,
pm2Status: statuses,
overallStatus
};
@@ -96,7 +109,19 @@ router.get('/:id', loadApp, asyncHandler(async (req, res) => {
statuses[processName] = status;
}
- res.json({ ...app, pm2Status: statuses });
+ // Auto-derive uiPort/apiPort from processes when not explicitly set
+ let { uiPort, apiPort } = app;
+ const processes = app.processes || [];
+ if (!uiPort && processes.length) {
+ const uiProc = processes.find(p => p.ports?.ui);
+ if (uiProc) uiPort = uiProc.ports.ui;
+ }
+ if (!apiPort && processes.length) {
+ const apiProc = processes.find(p => p.ports?.api);
+ if (apiProc) apiPort = apiProc.ports.api;
+ }
+
+ res.json({ ...app, uiPort, apiPort, pm2Status: statuses });
}));
// POST /api/apps - Create new app