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

move the desktop-type parity test to the server, where the import resolves

[._.]/ Adam Eivy95045693f79b
diff --git a/client/src/components/apps/DesktopLaunchProgress.test.jsx b/client/src/components/apps/DesktopLaunchProgress.test.jsx
index 68c98170ba..5db60393cb 100644
--- a/client/src/components/apps/DesktopLaunchProgress.test.jsx
+++ b/client/src/components/apps/DesktopLaunchProgress.test.jsx
@@ -102,12 +102,14 @@ describe('DesktopLaunchProgress', () => {
});
describe('desktop type mirror', () => {
- // The client mirrors DESKTOP_TYPES from server/services/streamingDetect.js.
- // A server-side addition that never reaches this set silently regresses the
- // portless UI branches (Open UI hidden, launch panel) back to the web-app path.
- it('matches the server set', async () => {
- const server = await import('../../../../server/services/streamingDetect.js');
- expect([...DESKTOP_TYPES].sort()).toEqual([...server.DESKTOP_TYPES].sort());
+ // The set/server parity assertion lives in
+ // server/services/streamingDetect.test.js, NOT here: streamingDetect.js reaches
+ // `pm2.js` → the `pm2` package, which resolves from the client workspace only
+ // via root hoisting on a dev machine and NOT in CI (`npm ci --prefix client`).
+ // A client-side import of it therefore passes locally and fails in CI. The
+ // client module is dependency-free, so the server test imports this direction.
+ it('exposes the mirrored set', () => {
+ expect([...DESKTOP_TYPES]).toEqual(['desktop']);
});
it('classifies desktop apps and not web apps', () => {
diff --git a/server/services/streamingDetect.test.js b/server/services/streamingDetect.test.js
index 0a1a27ff4e..2263a753ca 100644
--- a/server/services/streamingDetect.test.js
+++ b/server/services/streamingDetect.test.js
@@ -2,7 +2,7 @@ import { describe, it, expect, afterEach } from 'vitest';
import { mkdtempSync, writeFileSync, readFileSync, rmSync } from 'fs';
import { tmpdir } from 'os';
import { join } from 'path';
-import { parseEcosystemConfig, rewriteEcosystemPorts, rewriteEcosystemPortsByProcess, writeEcosystemPorts, writeEcosystemPortsByProcess, writeEcosystemPortEdits } from './streamingDetect.js';
+import { parseEcosystemConfig, rewriteEcosystemPorts, rewriteEcosystemPortsByProcess, writeEcosystemPorts, writeEcosystemPortsByProcess, writeEcosystemPortEdits, DESKTOP_TYPES, NON_PM2_TYPES } from './streamingDetect.js';
describe('parseEcosystemConfig', () => {
it('captures arbitrary *_PORT env vars and labels them by camelCased stem', () => {
@@ -917,3 +917,27 @@ module.exports = { apps: [
expect(readFileSync(join(dir, 'ecosystem.config.cjs'), 'utf-8')).toBe(original);
});
});
+
+// The client mirrors these two Sets by hand in
+// client/src/components/apps/constants.js, and drives its portless UI branches
+// (Open UI hidden, the desktop launch panel) off the copy. A server-side
+// addition that never reaches the mirror silently regresses those branches back
+// to the web-app path.
+//
+// The assertion lives HERE, not in a client test, and the direction matters: the
+// client module is dependency-free so a server test can import it, whereas
+// streamingDetect.js reaches `pm2.js` → the `pm2` package, which does not
+// resolve from the client workspace in CI (only via root hoisting locally). A
+// client-side version of this test therefore passes on a dev machine and fails
+// in CI. Keep the import one-way.
+describe('client mirror of the app-type sets', () => {
+ it('matches DESKTOP_TYPES', async () => {
+ const client = await import('../../client/src/components/apps/constants.js');
+ expect([...client.DESKTOP_TYPES].sort()).toEqual([...DESKTOP_TYPES].sort());
+ });
+
+ it('matches NON_PM2_TYPES', async () => {
+ const client = await import('../../client/src/components/apps/constants.js');
+ expect([...client.NON_PM2_TYPES].sort()).toEqual([...NON_PM2_TYPES].sort());
+ });
+});