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
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
Warm the Goals Tree and Shell browser fixtures before their tests
Claudef570341c3bca
diff --git a/client/src/components/goals/GoalsTreeView.browser.test.js b/client/src/components/goals/GoalsTreeView.browser.test.jsindex f6633ae622..e7f1bdd082 100644--- a/client/src/components/goals/GoalsTreeView.browser.test.js+++ b/client/src/components/goals/GoalsTreeView.browser.test.js@@ -20,6 +20,13 @@ const chrome = [process.env.CHROME_PATH, chromium.executablePath(),'/usr/bin/google-chrome', '/usr/bin/chromium', '/usr/bin/chromium-browser',].find(path => path && existsSync(path));+// No live API or external service is reachable from this fixture.+const isolateFixture = origin => route => {+ const url = new URL(route.request().url());+ return url.origin === new URL(origin).origin && !url.pathname.startsWith('/api/')+ ? route.continue() : route.fulfill({ contentType: 'application/json', body: '{}' });+};+// This fixture exercises the real toolbar and Tailwind CSS with synthetic goals.// Only WebGL is replaced: the canvas stub retains the production sizing props.describe.skipIf(!chrome)('Goals Tree touch targets', () => {@@ -76,7 +83,15 @@ describe.skipIf(!chrome)('Goals Tree touch targets', () => {},}],server: { host: '127.0.0.1', port: 0 },- }) });+ }),+ // Compile the cold module graph inside the bounded warmup phase, not the+ // first test's navigation (#10638). The phase's own deadline bounds the+ // navigation.+ warmup: async (page, url) => {+ await page.route('**/*', isolateFixture(url));+ await page.goto(`${url}goals-test`);+ await page.getByRole('button', { name: 'Organize', exact: true }).waitFor({ timeout: 5000 });+ } });({ browser, origin } = fixture);}, BROWSER_FIXTURE_STARTUP_MS);afterAll(() => fixture?.close());@@ -84,12 +99,7 @@ describe.skipIf(!chrome)('Goals Tree touch targets', () => {it.each([[360, 800], [768, 1024], [1440, 900]])('keeps targets usable at %sx%s', async (width, height) => {const page = await browser.newPage({ viewport: { width, height } });try {- // No live API or external service is reachable from this fixture.- await page.route('**/*', route => {- const url = new URL(route.request().url());- return url.origin === new URL(origin).origin && !url.pathname.startsWith('/api/')- ? route.continue() : route.fulfill({ contentType: 'application/json', body: '{}' });- });+ await page.route('**/*', isolateFixture(origin));await page.goto(origin + 'goals-test');const names = ['Creative', 'Family', 'Health', 'Financial', 'Legacy', 'Mastery', 'Labels', 'Add', 'Organize'];const boxes = [];diff --git a/client/src/pages/Shell.browser.test.js b/client/src/pages/Shell.browser.test.jsindex 1d2ed0967e..1f081dd900 100644--- a/client/src/pages/Shell.browser.test.js+++ b/client/src/pages/Shell.browser.test.js@@ -13,6 +13,11 @@ const chrome = [process.env.CHROME_PATH, chromium.executablePath(),'/usr/bin/google-chrome', '/usr/bin/chromium', '/usr/bin/chromium-browser',].find(path => path && existsSync(path));+const isFixtureRequest = (origin, route) => {+ const url = new URL(route.request().url());+ return url.origin === new URL(origin).origin && !/^\/(api|socket\.io)(\/|$)/.test(url.pathname);+};+// Render the actual page, toolbars and Tailwind stylesheet inside Layout's// clipped full-width main. Only transport/session hooks and APIs are replaced:// this fixture cannot connect to a real shell or invoke a host-control action.@@ -87,7 +92,15 @@ describe.skipIf(!chrome)('Shell header reachability (#9710)', () => {},}],server: { host: '127.0.0.1', port: 0 },- }) });+ }),+ // Compile the cold module graph inside the bounded warmup phase, not the+ // first test's navigation (#10638). The phase's own deadline bounds the+ // navigation. API and socket requests are refused.+ warmup: async (page, url) => {+ await page.route('**/*', route => (isFixtureRequest(url, route) ? route.continue() : route.abort()));+ await page.goto(`${url}shell-test`);+ await page.getByRole('group', { name: 'Session controls' }).waitFor({ timeout: 5000 });+ } });({ browser, origin } = fixture);}, BROWSER_FIXTURE_STARTUP_MS);afterAll(() => fixture?.close());@@ -109,12 +122,9 @@ describe.skipIf(!chrome)('Shell header reachability (#9710)', () => {const unexpectedRequests = [];page.on('pageerror', error => errors.push(error.message));await page.route('**/*', route => {- const url = new URL(route.request().url());- if (url.origin !== new URL(origin).origin || /^\/(api|socket\.io)(\/|$)/.test(url.pathname)) {- unexpectedRequests.push(url.pathname);- return route.abort();- }- return route.continue();+ if (isFixtureRequest(origin, route)) return route.continue();+ unexpectedRequests.push(new URL(route.request().url()).pathname);+ return route.abort();});for (const state of states) {await page.goto(`${origin}shell-test?${new URLSearchParams(state)}`);