Skip to content

Commit 200960e

Browse files
Merge pull request #56 from DMontgomery40/codex/stability-20260309-2343
fix: avoid hidden system-status startup load on dashboard monitoring deep-link
2 parents d64a154 + 226bd74 commit 200960e

2 files changed

Lines changed: 24 additions & 1 deletion

File tree

web/src/pages/Dashboard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export function Dashboard() {
3434

3535
{/* System Status Subtab */}
3636
<div style={{ display: activeSubtab === 'system' ? 'block' : 'none' }}>
37-
<SystemStatusSubtab />
37+
{activeSubtab === 'system' ? <SystemStatusSubtab /> : null}
3838
</div>
3939

4040
{/* Monitoring Subtab */}

web/tests/e2e/exhaustive/dashboard_startup_load.spec.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,26 @@ test('Dashboard default subtab does not trigger storage startup requests', async
2020
const storageRequests = [...observedApiPaths].filter((path) => path.includes('/api/index/stats'));
2121
expect(storageRequests).toEqual([]);
2222
});
23+
24+
test('Dashboard monitoring deep-link does not trigger system status startup requests', async ({ page, baseURL }) => {
25+
const observedApiPaths = new Set<string>();
26+
27+
page.on('request', (request) => {
28+
const url = request.url();
29+
if (!url.includes('/api/')) return;
30+
try {
31+
observedApiPaths.add(new URL(url).pathname);
32+
} catch {
33+
// Ignore malformed URLs in diagnostics.
34+
}
35+
});
36+
37+
await page.goto(new URL('dashboard?subtab=monitoring', baseURL).toString());
38+
await page.waitForURL(/\/dashboard\?subtab=monitoring(?:&|$)/);
39+
await page.waitForTimeout(1500);
40+
41+
const systemStatusRequests = [...observedApiPaths].filter((path) =>
42+
['/api/mcp/status', '/api/docker/status'].includes(path),
43+
);
44+
expect(systemStatusRequests).toEqual([]);
45+
});

0 commit comments

Comments
 (0)