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: remove stale PortOS dev UI link

Adam Eivy7c84ccd1c596
diff --git a/client/src/services/appUrls.js b/client/src/services/appUrls.js
index f64d0a2a80..9ae047848e 100644
--- a/client/src/services/appUrls.js
+++ b/client/src/services/appUrls.js
@@ -5,9 +5,9 @@ import { PORTOS_APP_ID } from './apiCore';
* Returns `{ https, http, dev }` — any may be null. Callers pick whichever
* fits (tile uses the first non-null; detail view renders buttons for each).
*
- * Self-app (`portos-default`) returns `{ http: origin }` only: the active
- * session's URL already has the correct scheme and port, so rewriting would
- * point at the wrong listener (HTTPS-only 5555 vs loopback-HTTP 5553).
+ * Self-app (`portos-default`) returns `{ http: origin, dev: null }`: the active
+ * session's URL already has the correct scheme and port, and production does
+ * not serve a separate Vite UI for the management entry.
*/
export function getLaunchUrls(app) {
if (!app) return { https: null, http: null, dev: null };
@@ -24,12 +24,11 @@ export function getLaunchUrls(app) {
// that is guaranteed to fail — the https one already covers that port.
const tlsPort = app.tlsPort || null;
const httpPort = (port) => (port && port !== tlsPort ? port : null);
- const devPort = httpPort(app.devUiPort);
+ const devPort = app.id === PORTOS_APP_ID ? null : httpPort(app.devUiPort);
const dev = devPort ? `http://${hostname}:${devPort}` : null;
- // Self-app: primary URL is the active origin (right scheme + port); dev still
- // reflects the Vite dev server on a separate port.
+ // Self-app: primary URL is the active origin (right scheme + port).
if (app.id === PORTOS_APP_ID) {
- return { https: null, http: window.location.origin, dev };
+ return { https: null, http: window.location.origin, dev: null };
}
const uiPort = httpPort(app.uiPort);
return {
diff --git a/client/src/services/appUrls.test.js b/client/src/services/appUrls.test.js
index 8115adcc4c..44a7d4084a 100644
--- a/client/src/services/appUrls.test.js
+++ b/client/src/services/appUrls.test.js
@@ -1,5 +1,6 @@
import { describe, it, expect } from 'vitest';
import { getLaunchUrls, getPrimaryLaunchUrl } from './appUrls';
+import { PORTOS_APP_ID } from './apiCore';
// The "Open UI" affordance in AppDetailView renders a button per non-null launch
// URL and hides entirely when there are none. A portless desktop app (a game
@@ -31,6 +32,11 @@ describe('getLaunchUrls — portless vs port-bearing (#2991)', () => {
const urls = getLaunchUrls({ id: 'web-app', type: 'express', uiPort: 3000, tlsPort: 8443 });
expect(urls.http).toBe(`http://${window.location.hostname}:3000`);
});
+
+ it('does not advertise a Dev UI for the PortOS management entry', () => {
+ const urls = getLaunchUrls({ id: PORTOS_APP_ID, type: 'express', uiPort: 5555, devUiPort: 5554 });
+ expect(urls).toEqual({ https: null, http: window.location.origin, dev: null });
+ });
});
// A single-listener dev server that terminates TLS itself (a Vite app reading the
diff --git a/data.reference/apps.json b/data.reference/apps.json
index 81fef619e7..c0af8e138e 100644
--- a/data.reference/apps.json
+++ b/data.reference/apps.json
@@ -8,7 +8,7 @@
"type": "express",
"uiPort": 5555,
"apiPort": 5555,
- "devUiPort": 5554,
+ "devUiPort": null,
"buildCommand": "npm run build",
"startCommands": [
"npm start"
diff --git a/server/services/apps.js b/server/services/apps.js
index e80a4ac58e..2b7cd29f2e 100644
--- a/server/services/apps.js
+++ b/server/services/apps.js
@@ -38,7 +38,9 @@ function buildPortosApp() {
repoPath: PATHS.root,
type: 'express',
uiPort: PORTS.API,
- devUiPort: PORTS.UI,
+ // Production serves the built client from the API process; no Vite dev UI
+ // is available for the PortOS management entry.
+ devUiPort: null,
apiPort: PORTS.API,
tlsPort: certPresent ? PORTS.API : null,
buildCommand: 'npm run build',
diff --git a/server/services/apps.test.js b/server/services/apps.test.js
index 397994a7fd..c2e9db8152 100644
--- a/server/services/apps.test.js
+++ b/server/services/apps.test.js
@@ -465,7 +465,7 @@ describe('PortOS production process manifest', () => {
const app = (await getAllApps()).find(({ id }) => id === PORTOS_APP_ID);
expect(app.pm2ProcessNames).toEqual(expectedNames);
expect(app.processes.map(({ name }) => name)).toEqual(expectedNames);
- expect(app).toMatchObject({ uiPort: 5555, apiPort: 5555, devUiPort: 5554, startCommands: ['npm start'] });
+ expect(app).toMatchObject({ uiPort: 5555, apiPort: 5555, devUiPort: null, startCommands: ['npm start'] });
expect(app.processes[0]).toMatchObject({ name: 'portos-server', port: 5555, ports: { api: 5555 } });
expect(seed.pm2ProcessNames).toEqual(expectedNames);
expect(seed.processes.map(({ name }) => name)).toEqual(expectedNames);