@sleep2agi/agent-network-dashboard 0.4.6-preview.8 → 0.4.6-preview.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +1 -0
- package/.next/build-manifest.json +3 -3
- package/.next/diagnostics/route-bundle-stats.json +69 -55
- package/.next/fallback-build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/routes-manifest.json +6 -0
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +2 -2
- package/.next/server/app/_not-found.rsc +12 -12
- package/.next/server/app/_not-found.segments/_full.segment.rsc +12 -12
- package/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
- package/.next/server/app/_not-found.segments/_index.segment.rsc +7 -7
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/admin/page_client-reference-manifest.js +1 -1
- package/.next/server/app/admin.html +2 -2
- package/.next/server/app/admin.rsc +14 -14
- package/.next/server/app/admin.segments/_full.segment.rsc +14 -14
- package/.next/server/app/admin.segments/_head.segment.rsc +4 -4
- package/.next/server/app/admin.segments/_index.segment.rsc +7 -7
- package/.next/server/app/admin.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/admin.segments/admin/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/admin.segments/admin.segment.rsc +3 -3
- package/.next/server/app/api/hub/servers/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/hub/servers/route/build-manifest.json +9 -0
- package/.next/server/app/api/hub/servers/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/hub/servers/route.js +7 -0
- package/.next/server/app/api/hub/servers/route.js.map +5 -0
- package/.next/server/app/api/hub/servers/route.js.nft.json +1 -0
- package/.next/server/app/api/hub/servers/route_client-reference-manifest.js +3 -0
- package/.next/server/app/index.html +2 -2
- package/.next/server/app/index.rsc +14 -14
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/index.segments/_full.segment.rsc +14 -14
- package/.next/server/app/index.segments/_head.segment.rsc +4 -4
- package/.next/server/app/index.segments/_index.segment.rsc +7 -7
- package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/login.html +2 -2
- package/.next/server/app/login.rsc +14 -14
- package/.next/server/app/login.segments/_full.segment.rsc +14 -14
- package/.next/server/app/login.segments/_head.segment.rsc +4 -4
- package/.next/server/app/login.segments/_index.segment.rsc +7 -7
- package/.next/server/app/login.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/login.segments/login.segment.rsc +3 -3
- package/.next/server/app/logs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/logs.html +2 -2
- package/.next/server/app/logs.rsc +14 -14
- package/.next/server/app/logs.segments/_full.segment.rsc +14 -14
- package/.next/server/app/logs.segments/_head.segment.rsc +4 -4
- package/.next/server/app/logs.segments/_index.segment.rsc +7 -7
- package/.next/server/app/logs.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/logs.segments/logs/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/logs.segments/logs.segment.rsc +3 -3
- package/.next/server/app/messages/page_client-reference-manifest.js +1 -1
- package/.next/server/app/messages.html +2 -2
- package/.next/server/app/messages.rsc +14 -14
- package/.next/server/app/messages.segments/_full.segment.rsc +14 -14
- package/.next/server/app/messages.segments/_head.segment.rsc +4 -4
- package/.next/server/app/messages.segments/_index.segment.rsc +7 -7
- package/.next/server/app/messages.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/messages.segments/messages/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/messages.segments/messages.segment.rsc +3 -3
- package/.next/server/app/node/page_client-reference-manifest.js +1 -1
- package/.next/server/app/node.html +2 -2
- package/.next/server/app/node.rsc +14 -14
- package/.next/server/app/node.segments/_full.segment.rsc +14 -14
- package/.next/server/app/node.segments/_head.segment.rsc +4 -4
- package/.next/server/app/node.segments/_index.segment.rsc +7 -7
- package/.next/server/app/node.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/node.segments/node/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/node.segments/node.segment.rsc +3 -3
- package/.next/server/app/nodes/page_client-reference-manifest.js +1 -1
- package/.next/server/app/nodes.html +2 -2
- package/.next/server/app/nodes.rsc +14 -14
- package/.next/server/app/nodes.segments/_full.segment.rsc +14 -14
- package/.next/server/app/nodes.segments/_head.segment.rsc +4 -4
- package/.next/server/app/nodes.segments/_index.segment.rsc +7 -7
- package/.next/server/app/nodes.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/nodes.segments/nodes/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/nodes.segments/nodes.segment.rsc +3 -3
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/server-logs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/server-logs.html +2 -2
- package/.next/server/app/server-logs.rsc +14 -14
- package/.next/server/app/server-logs.segments/_full.segment.rsc +14 -14
- package/.next/server/app/server-logs.segments/_head.segment.rsc +4 -4
- package/.next/server/app/server-logs.segments/_index.segment.rsc +7 -7
- package/.next/server/app/server-logs.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/server-logs.segments/server-logs/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/server-logs.segments/server-logs.segment.rsc +3 -3
- package/.next/server/app/settings/networks/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/networks.html +2 -2
- package/.next/server/app/settings/networks.rsc +14 -14
- package/.next/server/app/settings/networks.segments/_full.segment.rsc +14 -14
- package/.next/server/app/settings/networks.segments/_head.segment.rsc +4 -4
- package/.next/server/app/settings/networks.segments/_index.segment.rsc +7 -7
- package/.next/server/app/settings/networks.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings/networks.segments/settings/networks/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/settings/networks.segments/settings/networks.segment.rsc +3 -3
- package/.next/server/app/settings/networks.segments/settings.segment.rsc +3 -3
- package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/tokens/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/tokens.html +2 -2
- package/.next/server/app/settings/tokens.rsc +14 -14
- package/.next/server/app/settings/tokens.segments/_full.segment.rsc +14 -14
- package/.next/server/app/settings/tokens.segments/_head.segment.rsc +4 -4
- package/.next/server/app/settings/tokens.segments/_index.segment.rsc +7 -7
- package/.next/server/app/settings/tokens.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings/tokens.segments/settings/tokens/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/settings/tokens.segments/settings/tokens.segment.rsc +3 -3
- package/.next/server/app/settings/tokens.segments/settings.segment.rsc +3 -3
- package/.next/server/app/settings.html +2 -2
- package/.next/server/app/settings.rsc +14 -14
- package/.next/server/app/settings.segments/_full.segment.rsc +14 -14
- package/.next/server/app/settings.segments/_head.segment.rsc +4 -4
- package/.next/server/app/settings.segments/_index.segment.rsc +7 -7
- package/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/settings.segments/settings.segment.rsc +3 -3
- package/.next/server/app/tasks/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/tasks/page_client-reference-manifest.js +1 -1
- package/.next/server/app/tasks.html +2 -2
- package/.next/server/app/tasks.rsc +14 -14
- package/.next/server/app/tasks.segments/_full.segment.rsc +14 -14
- package/.next/server/app/tasks.segments/_head.segment.rsc +4 -4
- package/.next/server/app/tasks.segments/_index.segment.rsc +7 -7
- package/.next/server/app/tasks.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/tasks.segments/tasks/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/tasks.segments/tasks.segment.rsc +3 -3
- package/.next/server/app-paths-manifest.json +1 -0
- package/.next/server/chunks/0ykm__next-internal_server_app_api_hub_servers_route_actions_08-m-cs.js +3 -0
- package/.next/server/chunks/0ykm__next-internal_server_app_api_hub_servers_route_actions_08-m-cs.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__0tx8s8i._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0tx8s8i._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__03b.f76._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__03b.f76._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0fhoq8i._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0fhoq8i._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0nw~zhp._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0nw~zhp._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_09kk21a._.js +2 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_09kk21a._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_01jhlxz._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_01jhlxz._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_057q.ne._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_057q.ne._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_09d29my._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_09d29my._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_0_d45-d._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_0_d45-d._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_0i3759l._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_0i3759l._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_0xgney8._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_0xgney8._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_10hjgv4._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_10hjgv4._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_1153xeb._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_1153xeb._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_12l4oto._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_12l4oto._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_components_0mvyi-4._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_components_0mvyi-4._.js.map +1 -1
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/pages/404.html +2 -2
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/0-mpa_947ipeq.js +1 -0
- package/.next/static/chunks/01lmbsd37fybu.js +1 -0
- package/.next/static/chunks/03o.h6kvmw4l_.js +1 -0
- package/.next/static/chunks/03~~oirxz7~vc.js +1 -0
- package/.next/static/chunks/04eilowxyfm3z.js +1 -0
- package/.next/static/chunks/05uk96gc~9mni.js +1 -0
- package/.next/static/chunks/08kf-.bgs10ze.js +1 -0
- package/.next/static/chunks/0glmrdj9112tc.js +7 -0
- package/.next/static/chunks/0rxrez_cjn.eh.js +1 -0
- package/.next/static/chunks/0s5km_6ow6jzv.js +7 -0
- package/.next/static/chunks/0tvn2l1pc.h65.js +1 -0
- package/.next/static/chunks/0w2-uz~4phw2f.css +2 -0
- package/.next/static/chunks/0x8x.29hkju5a.js +1 -0
- package/.next/static/chunks/0zyef0ov9aijd.js +1 -0
- package/.next/static/chunks/13_ce6isvlsqf.js +2 -0
- package/.next/static/chunks/174re5ar~kxne.js +1 -0
- package/.next/trace +2 -2
- package/.next/trace-build +1 -1
- package/.next/types/routes.d.ts +2 -1
- package/.next/types/validator.ts +9 -0
- package/app/api/hub/servers/route.ts +39 -0
- package/app/components/AppShell.tsx +2 -0
- package/app/components/ChatPopover.tsx +38 -2
- package/app/components/CommandPalette.tsx +33 -0
- package/app/components/HelpOverlay.tsx +40 -0
- package/app/components/ServersDrawer.tsx +206 -0
- package/app/components/TopoGraph.tsx +1454 -166
- package/app/components/utils.ts +8 -7
- package/app/lib/time.ts +36 -0
- package/package.json +1 -1
- package/scripts/help-overlay-topo-test.mjs +44 -0
- package/scripts/servers-drawer-live-test.mjs +96 -0
- package/scripts/topo-active-filter-pill-test.mjs +101 -0
- package/scripts/topo-active-links-chip-test.mjs +73 -0
- package/scripts/topo-arrow-tier-test.mjs +61 -0
- package/scripts/topo-auto-fit-test.mjs +73 -0
- package/scripts/topo-chat-focus-ring-test.mjs +77 -0
- package/scripts/topo-click-ripple-test.mjs +66 -0
- package/scripts/topo-cmdk-pin-test.mjs +123 -0
- package/scripts/topo-cwd-tooltip-test.mjs +64 -0
- package/scripts/topo-dblclick-reset-test.mjs +74 -0
- package/scripts/topo-edge-endpoint-highlight-test.mjs +111 -0
- package/scripts/topo-edge-focus-test.mjs +113 -0
- package/scripts/topo-edge-hover-test.mjs +93 -0
- package/scripts/topo-edge-tooltip-test.mjs +70 -0
- package/scripts/topo-esc-clears-pin-test.mjs +98 -0
- package/scripts/topo-filter-pill-body-click-test.mjs +112 -0
- package/scripts/topo-filter-pill-count-test.mjs +110 -0
- package/scripts/topo-filter-pill-mobile-test.mjs +90 -0
- package/scripts/topo-fit-key-test.mjs +106 -0
- package/scripts/topo-freshness-chip-test.mjs +74 -0
- package/scripts/topo-group-box-pinned-state-test.mjs +95 -0
- package/scripts/topo-group-count-test.mjs +68 -0
- package/scripts/topo-group-hover-test.mjs +82 -0
- package/scripts/topo-group-pin-test.mjs +119 -0
- package/scripts/topo-group-status-pips-test.mjs +103 -0
- package/scripts/topo-groupbox-test.mjs +4 -2
- package/scripts/topo-help-overlay-r59-test.mjs +67 -0
- package/scripts/topo-help-overlay-r65-test.mjs +64 -0
- package/scripts/topo-help-overlay-r70-test.mjs +63 -0
- package/scripts/topo-hub-click-fit-test.mjs +137 -0
- package/scripts/topo-hub-title-test.mjs +93 -0
- package/scripts/topo-ingroup-edge-test.mjs +103 -0
- package/scripts/topo-label-lift-test.mjs +119 -0
- package/scripts/topo-label-scale-test.mjs +78 -0
- package/scripts/topo-lastseen-tooltip-test.mjs +59 -0
- package/scripts/topo-layout-key-test.mjs +91 -0
- package/scripts/topo-legend-hover-test.mjs +113 -0
- package/scripts/topo-legend-pin-test.mjs +128 -0
- package/scripts/topo-minimap-test.mjs +68 -0
- package/scripts/topo-mobile-chips-test.mjs +103 -0
- package/scripts/topo-node-hover-lift-test.mjs +85 -0
- package/scripts/topo-offline-dim-test.mjs +70 -0
- package/scripts/topo-overlap-test.mjs +164 -0
- package/scripts/topo-p0round-test.mjs +2 -2
- package/scripts/topo-pan-cursor-test.mjs +62 -0
- package/scripts/topo-panel-elevation-test.mjs +76 -0
- package/scripts/topo-pin-persistence-test.mjs +105 -0
- package/scripts/topo-popover-meta-test.mjs +78 -0
- package/scripts/topo-pressure-bar-test.mjs +69 -0
- package/scripts/topo-pressure-pin-test.mjs +112 -0
- package/scripts/topo-pulse-rate-test.mjs +71 -0
- package/scripts/topo-recent-row-hover-test.mjs +122 -0
- package/scripts/topo-recent-signal-empty-test.mjs +63 -0
- package/scripts/topo-reduced-motion-test.mjs +77 -0
- package/scripts/topo-tier-ring-test.mjs +69 -0
- package/scripts/topo-tier-stagger-test.mjs +89 -0
- package/scripts/topo-tz-ghost-test.mjs +69 -0
- package/scripts/topo-wheel-zoom-test.mjs +79 -0
- package/scripts/topo-zoom-keys-test.mjs +89 -0
- package/.next/static/chunks/0-7iowzu4.798.js +0 -1
- package/.next/static/chunks/02t5jr4shh.hy.js +0 -1
- package/.next/static/chunks/0_qfg5s5uzs7..js +0 -7
- package/.next/static/chunks/0_rmxom9~1lmk.css +0 -2
- package/.next/static/chunks/0cbezu61m-e~z.js +0 -1
- package/.next/static/chunks/0cj5qr_a8dzky.js +0 -7
- package/.next/static/chunks/0elalb9n_.~di.js +0 -1
- package/.next/static/chunks/0j_q__o8p6g83.js +0 -1
- package/.next/static/chunks/0jl6_w50zh4l5.js +0 -1
- package/.next/static/chunks/0mn0ruf0g4op5.js +0 -1
- package/.next/static/chunks/0r4q73.-1bkyl.js +0 -1
- package/.next/static/chunks/0r_c8eccg3z2o.js +0 -1
- package/.next/static/chunks/0y9subfnntv1s.js +0 -1
- package/.next/static/chunks/10oi7l-tycgl9.js +0 -1
- package/.next/static/chunks/11uk1izuv3~0t.js +0 -1
- /package/.next/static/{7xem03-473G3qw-fC160p → b35iGYnW-KxCMXl7VYDhg}/_buildManifest.js +0 -0
- /package/.next/static/{7xem03-473G3qw-fC160p → b35iGYnW-KxCMXl7VYDhg}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{7xem03-473G3qw-fC160p → b35iGYnW-KxCMXl7VYDhg}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/* Round 70 verification: HelpOverlay topology section surfaces the R69
|
|
2
|
+
* Cmd+K palette pin actions. The 1 new entry sits alongside R65's R63
|
|
3
|
+
* + R64 entries; this test re-verifies the full chain so a future edit
|
|
4
|
+
* accidentally dropping any rung gets caught here.
|
|
5
|
+
*/
|
|
6
|
+
import { chromium } from 'playwright';
|
|
7
|
+
import { readFileSync } from 'node:fs';
|
|
8
|
+
|
|
9
|
+
const TOKEN = JSON.parse(readFileSync('/home/vansin/.anet/config.json', 'utf8')).token;
|
|
10
|
+
const browser = await chromium.launch({ headless: true });
|
|
11
|
+
|
|
12
|
+
const ctx = await browser.newContext({ viewport: { width: 1280, height: 900 } });
|
|
13
|
+
await ctx.addCookies([{ name: 'anet_dashboard_session', value: `v3:${TOKEN}`, domain: '127.0.0.1', path: '/' }]);
|
|
14
|
+
await ctx.addInitScript(() => {
|
|
15
|
+
try {
|
|
16
|
+
localStorage.setItem('anet-theme', 'cyber');
|
|
17
|
+
sessionStorage.setItem('anet_v3_auth', '1');
|
|
18
|
+
} catch {}
|
|
19
|
+
});
|
|
20
|
+
await ctx.route('**/api/hub/messages*', (route) => route.fulfill({ json: { messages: [] } }));
|
|
21
|
+
await ctx.route('**/api/hub/tasks*', (route) => route.fulfill({ json: { tasks: [] } }));
|
|
22
|
+
const page = await ctx.newPage();
|
|
23
|
+
await page.goto('http://127.0.0.1:3000/', { waitUntil: 'domcontentloaded' });
|
|
24
|
+
await page.waitForTimeout(800);
|
|
25
|
+
|
|
26
|
+
await page.keyboard.press('?');
|
|
27
|
+
await page.waitForSelector('[role="dialog"][aria-label="Keyboard shortcuts"]', { timeout: 5000 });
|
|
28
|
+
|
|
29
|
+
const items = await page.evaluate(() => {
|
|
30
|
+
const dialog = document.querySelector('[role="dialog"][aria-label="Keyboard shortcuts"]');
|
|
31
|
+
if (!dialog) return [];
|
|
32
|
+
const groups = [...dialog.querySelectorAll('div')];
|
|
33
|
+
let active = null;
|
|
34
|
+
for (const g of groups) {
|
|
35
|
+
if (g.textContent && /^Topology canvas$/i.test(g.textContent.trim())) {
|
|
36
|
+
active = g.parentElement;
|
|
37
|
+
break;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return active ? [...active.querySelectorAll('li')].map(li => (li.textContent || '').trim()) : [];
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
await browser.close();
|
|
44
|
+
if (items.length === 0) { console.log('❌ topology section not found'); process.exit(1); }
|
|
45
|
+
|
|
46
|
+
const has = (s) => items.some(t => t.includes(s));
|
|
47
|
+
const results = {
|
|
48
|
+
r70_cmdkPin: has('Pin / clear filters via palette') && has('(R69)'),
|
|
49
|
+
// R65 priors
|
|
50
|
+
r63_groupPin: has('Pin a team focus (R63)'),
|
|
51
|
+
r64_clearOne: has('Clear one filter (R64)'),
|
|
52
|
+
// R62 priors
|
|
53
|
+
r60_pinChip: has('Pin a status filter (R60/R61)'),
|
|
54
|
+
r62_esc: has('Clear pinned filter (R62)'),
|
|
55
|
+
// R59 priors
|
|
56
|
+
r52_clickHub: has('Fit topology to canvas (R52)'),
|
|
57
|
+
r55_legendHover: has('Highlight nodes of a status (R55)'),
|
|
58
|
+
r56_signalHover: has('Highlight one flow edge (R56)'),
|
|
59
|
+
};
|
|
60
|
+
const ok = Object.values(results).every(Boolean);
|
|
61
|
+
console.log(`${ok ? '✅' : '❌'} help overlay R70:`, JSON.stringify(results),
|
|
62
|
+
`\n items=`, items);
|
|
63
|
+
process.exit(ok ? 0 : 1);
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/* Round 52 verification: clicking the central hub triggers fitView() and
|
|
2
|
+
* shows a click-ripple. The hub was previously decoration; now it's the
|
|
3
|
+
* "re-center" affordance for users who don't know the `f` shortcut.
|
|
4
|
+
*
|
|
5
|
+
* Steps:
|
|
6
|
+
* - Zoom + pan the topology to a non-default view (Cmd+= twice + drag).
|
|
7
|
+
* Confirm the zoom group's transform shifted off identity.
|
|
8
|
+
* - Click the hub. Assert:
|
|
9
|
+
* 1. the zoom group's transform returns to a fitted state (zoom and
|
|
10
|
+
* translate change), i.e. the view changed back toward identity-
|
|
11
|
+
* or-fit;
|
|
12
|
+
* 2. a transient ripple <circle> shows up at the hub center, then
|
|
13
|
+
* vanishes within ~800ms.
|
|
14
|
+
* - Confirm the hub's <title> mentions "click to fit view".
|
|
15
|
+
*/
|
|
16
|
+
import { chromium } from 'playwright';
|
|
17
|
+
import { readFileSync } from 'node:fs';
|
|
18
|
+
|
|
19
|
+
const TOKEN = JSON.parse(readFileSync('/home/vansin/.anet/config.json', 'utf8')).token;
|
|
20
|
+
const browser = await chromium.launch({ headless: true });
|
|
21
|
+
|
|
22
|
+
const ctx = await browser.newContext({ viewport: { width: 1280, height: 1500 } });
|
|
23
|
+
await ctx.addCookies([{ name: 'anet_dashboard_session', value: `v3:${TOKEN}`, domain: '127.0.0.1', path: '/' }]);
|
|
24
|
+
await ctx.addInitScript(() => {
|
|
25
|
+
try {
|
|
26
|
+
localStorage.setItem('anet-theme', 'cyber');
|
|
27
|
+
localStorage.setItem('anet-topo-layout', 'ring');
|
|
28
|
+
sessionStorage.setItem('anet_v3_auth', '1');
|
|
29
|
+
} catch {}
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
const fresh = new Date(Date.now() - 60 * 1000).toISOString();
|
|
33
|
+
await ctx.route('**/api/hub/status*', async (route) => {
|
|
34
|
+
const r = await route.fetch();
|
|
35
|
+
const b = await r.json();
|
|
36
|
+
const nid = (b.sessions || [])[0]?.network_id || 'default';
|
|
37
|
+
const sessions = ['alpha', 'beta', 'gamma'].map(a => ({
|
|
38
|
+
alias: a, status: 'idle', network_id: nid, project_dir: null,
|
|
39
|
+
created_at: fresh, updated_at: fresh, last_seen_at: fresh,
|
|
40
|
+
}));
|
|
41
|
+
await route.fulfill({ response: r, json: { ...b, sessions } });
|
|
42
|
+
});
|
|
43
|
+
await ctx.route('**/api/hub/messages*', (route) => route.fulfill({ json: { messages: [] } }));
|
|
44
|
+
await ctx.route('**/api/hub/tasks*', (route) => route.fulfill({ json: { tasks: [] } }));
|
|
45
|
+
const page = await ctx.newPage();
|
|
46
|
+
await page.goto('http://127.0.0.1:3000/', { waitUntil: 'domcontentloaded' });
|
|
47
|
+
await page.waitForSelector('g[data-topo-hub]', { timeout: 30000 });
|
|
48
|
+
await page.waitForTimeout(500);
|
|
49
|
+
|
|
50
|
+
// Read the hub <title> to verify the hint text.
|
|
51
|
+
const hubTitle = await page.evaluate(() => {
|
|
52
|
+
return document.querySelector('g[data-topo-hub] title')?.textContent || '';
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
// Find the zoom/pan wrapper <g> (the one whose transform attribute holds
|
|
56
|
+
// the scale + translate string). The TopoGraph wraps all canvas content
|
|
57
|
+
// in a <g> with transform="translate(x, y) scale(zoom)" at the panel root.
|
|
58
|
+
// Grab the first child <g> under the SVG that carries a `transform` with
|
|
59
|
+
// a `scale(` token — that's our zoom group.
|
|
60
|
+
const readTransform = () => page.evaluate(() => {
|
|
61
|
+
const svg = document.querySelector('svg[viewBox="0 0 1000 680"]');
|
|
62
|
+
for (const g of svg.querySelectorAll(':scope > g')) {
|
|
63
|
+
const t = g.getAttribute('transform') || '';
|
|
64
|
+
if (t.includes('scale(')) return t;
|
|
65
|
+
}
|
|
66
|
+
return null;
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
const baseTransform = await readTransform();
|
|
70
|
+
|
|
71
|
+
// Nudge zoom by simulating Ctrl+= twice via keyboard shortcut. The
|
|
72
|
+
// keymap maps '+' to zoomBy; press 'Equal' with the right modifier so
|
|
73
|
+
// browsers see '+'.
|
|
74
|
+
await page.keyboard.press('+');
|
|
75
|
+
await page.keyboard.press('+');
|
|
76
|
+
await page.keyboard.press('+');
|
|
77
|
+
await page.waitForTimeout(150);
|
|
78
|
+
const zoomedTransform = await readTransform();
|
|
79
|
+
|
|
80
|
+
// Confirm the zoom transform actually changed.
|
|
81
|
+
const zoomChanged = baseTransform !== zoomedTransform;
|
|
82
|
+
|
|
83
|
+
// Click the hub center. Locator-based click hits the union bbox edge and
|
|
84
|
+
// gets intercepted by the SVG panel rect (which must keep pointer events
|
|
85
|
+
// for canvas pan). Sample the inner core circle (r=10 at viewBox 500,330)
|
|
86
|
+
// via getScreenCTM and click that on-screen point directly.
|
|
87
|
+
const hubCenter = await page.evaluate(() => {
|
|
88
|
+
const svg = document.querySelector('svg[viewBox="0 0 1000 680"]');
|
|
89
|
+
const core = [...svg.querySelectorAll('g[data-topo-hub] circle')].find(
|
|
90
|
+
c => c.getAttribute('r') === '10'
|
|
91
|
+
);
|
|
92
|
+
if (!core) return null;
|
|
93
|
+
const ctm = core.getScreenCTM();
|
|
94
|
+
const cx = +core.getAttribute('cx');
|
|
95
|
+
const cy = +core.getAttribute('cy');
|
|
96
|
+
return { x: cx * ctm.a + cy * ctm.c + ctm.e, y: cx * ctm.b + cy * ctm.d + ctm.f };
|
|
97
|
+
});
|
|
98
|
+
if (!hubCenter) { console.log('❌ hub core circle not found'); process.exit(1); }
|
|
99
|
+
await page.mouse.click(hubCenter.x, hubCenter.y);
|
|
100
|
+
await page.waitForTimeout(150);
|
|
101
|
+
const afterClickTransform = await readTransform();
|
|
102
|
+
const ripplePresent = await page.evaluate(() => {
|
|
103
|
+
const svg = document.querySelector('svg[viewBox="0 0 1000 680"]');
|
|
104
|
+
// The click ripple is a <circle> with stroke-width="2" + an <animate>.
|
|
105
|
+
const ripples = [...svg.querySelectorAll('circle')].filter(c => {
|
|
106
|
+
const sw = c.getAttribute('stroke-width');
|
|
107
|
+
return sw === '2' && c.querySelector('animate[attributeName="r"]');
|
|
108
|
+
});
|
|
109
|
+
return ripples.length > 0;
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
await page.waitForTimeout(800);
|
|
113
|
+
const rippleGone = await page.evaluate(() => {
|
|
114
|
+
const svg = document.querySelector('svg[viewBox="0 0 1000 680"]');
|
|
115
|
+
const ripples = [...svg.querySelectorAll('circle')].filter(c => {
|
|
116
|
+
const sw = c.getAttribute('stroke-width');
|
|
117
|
+
return sw === '2' && c.querySelector('animate[attributeName="r"]');
|
|
118
|
+
});
|
|
119
|
+
return ripples.length === 0;
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
await browser.close();
|
|
123
|
+
|
|
124
|
+
const results = {
|
|
125
|
+
hubTitleHasFitHint: /click to fit view/i.test(hubTitle),
|
|
126
|
+
zoomShifted: zoomChanged,
|
|
127
|
+
hubClickRestoredView: afterClickTransform !== zoomedTransform,
|
|
128
|
+
ripplePresentDuringClick: ripplePresent,
|
|
129
|
+
rippleClearsAfter600ms: rippleGone,
|
|
130
|
+
};
|
|
131
|
+
const ok = Object.values(results).every(Boolean);
|
|
132
|
+
console.log(`${ok ? '✅' : '❌'} hub click fit:`, JSON.stringify(results),
|
|
133
|
+
`\n hubTitle=${JSON.stringify(hubTitle)}`,
|
|
134
|
+
`\n base =${baseTransform}`,
|
|
135
|
+
`\n zoomed =${zoomedTransform}`,
|
|
136
|
+
`\n fitBack =${afterClickTransform}`);
|
|
137
|
+
process.exit(ok ? 0 : 1);
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/* Round 43 verification: central hub carries a `<title>` summary in ring
|
|
2
|
+
* layout. Assertions:
|
|
3
|
+
* - hub renders in ring layout (data-topo-hub group present)
|
|
4
|
+
* - <title> reads "Network hub · N sessions · …" with the right counts
|
|
5
|
+
* - zero-count clauses (online/working/links) drop cleanly
|
|
6
|
+
* - grid layout doesn't render the hub at all */
|
|
7
|
+
import { chromium } from 'playwright';
|
|
8
|
+
import { readFileSync } from 'node:fs';
|
|
9
|
+
|
|
10
|
+
const TOKEN = JSON.parse(readFileSync('/home/vansin/.anet/config.json', 'utf8')).token;
|
|
11
|
+
const browser = await chromium.launch({ headless: true });
|
|
12
|
+
|
|
13
|
+
async function probe({ layout, sessionsSpec, msgs = [] }) {
|
|
14
|
+
const ctx = await browser.newContext({ viewport: { width: 1400, height: 1000 } });
|
|
15
|
+
await ctx.addCookies([{ name: 'anet_dashboard_session', value: `v3:${TOKEN}`, domain: '127.0.0.1', path: '/' }]);
|
|
16
|
+
await ctx.addInitScript((lay) => {
|
|
17
|
+
try {
|
|
18
|
+
localStorage.setItem('anet-theme', 'cyber');
|
|
19
|
+
localStorage.setItem('anet-topo-layout', lay);
|
|
20
|
+
sessionStorage.setItem('anet_v3_auth', '1');
|
|
21
|
+
} catch {}
|
|
22
|
+
}, layout);
|
|
23
|
+
const fresh = new Date(Date.now() - 60 * 1000).toISOString();
|
|
24
|
+
await ctx.route('**/api/hub/status*', async (route) => {
|
|
25
|
+
const r = await route.fetch();
|
|
26
|
+
const b = await r.json();
|
|
27
|
+
const nid = (b.sessions || [])[0]?.network_id || 'default';
|
|
28
|
+
const sessions = sessionsSpec.map(s => ({
|
|
29
|
+
alias: s.alias, status: s.status, network_id: nid, project_dir: null,
|
|
30
|
+
created_at: fresh, updated_at: fresh, last_seen_at: fresh,
|
|
31
|
+
}));
|
|
32
|
+
await route.fulfill({ response: r, json: { ...b, sessions } });
|
|
33
|
+
});
|
|
34
|
+
await ctx.route('**/api/hub/messages*', (route) => route.fulfill({ json: { messages: msgs } }));
|
|
35
|
+
await ctx.route('**/api/hub/tasks*', (route) => route.fulfill({ json: { tasks: [] } }));
|
|
36
|
+
const page = await ctx.newPage();
|
|
37
|
+
await page.goto('http://127.0.0.1:3000/', { waitUntil: 'domcontentloaded' });
|
|
38
|
+
await page.waitForSelector('svg[viewBox="0 0 1000 680"]', { timeout: 30000 });
|
|
39
|
+
await page.waitForTimeout(500);
|
|
40
|
+
const data = await page.evaluate(() => {
|
|
41
|
+
const hub = document.querySelector('g[data-topo-hub]');
|
|
42
|
+
const title = hub?.querySelector('title');
|
|
43
|
+
return { hubPresent: !!hub, titleText: title?.textContent || null };
|
|
44
|
+
});
|
|
45
|
+
await ctx.close();
|
|
46
|
+
return data;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Ring + mixed-status fleet → full summary line
|
|
50
|
+
const ringFull = await probe({
|
|
51
|
+
layout: 'ring',
|
|
52
|
+
sessionsSpec: [
|
|
53
|
+
{ alias: 'a', status: 'working' },
|
|
54
|
+
{ alias: 'b', status: 'idle' },
|
|
55
|
+
{ alias: 'c', status: 'idle' },
|
|
56
|
+
{ alias: 'd', status: 'offline' },
|
|
57
|
+
],
|
|
58
|
+
msgs: [
|
|
59
|
+
{ from_alias: 'a', to_alias: 'b', content: 'm', created_at: new Date().toISOString() },
|
|
60
|
+
],
|
|
61
|
+
});
|
|
62
|
+
// Ring + all-offline → online/working/links clauses drop
|
|
63
|
+
const ringOfflineOnly = await probe({
|
|
64
|
+
layout: 'ring',
|
|
65
|
+
sessionsSpec: [
|
|
66
|
+
{ alias: 'x', status: 'offline' },
|
|
67
|
+
{ alias: 'y', status: 'offline' },
|
|
68
|
+
],
|
|
69
|
+
});
|
|
70
|
+
// Grid → no hub at all
|
|
71
|
+
const grid = await probe({
|
|
72
|
+
layout: 'grid',
|
|
73
|
+
sessionsSpec: [{ alias: 'a', status: 'idle' }, { alias: 'b', status: 'idle' }],
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
await browser.close();
|
|
77
|
+
// R52 appended "\nclick to fit view" as a second line to the hub
|
|
78
|
+
// <title> so the click-to-fit affordance is discoverable on hover.
|
|
79
|
+
// Compare on the first line only; assert the hint is present too.
|
|
80
|
+
const firstLine = (s) => (s || '').split('\n')[0];
|
|
81
|
+
const results = {
|
|
82
|
+
ringHubPresent: ringFull.hubPresent === true,
|
|
83
|
+
ringFullSummary: firstLine(ringFull.titleText) === 'Network hub · 4 sessions · 3 online · 1 working · 1 active link',
|
|
84
|
+
ringOfflineSummary: ringOfflineOnly.hubPresent === true && firstLine(ringOfflineOnly.titleText) === 'Network hub · 2 sessions',
|
|
85
|
+
ringHintsAtFit: /click to fit view/i.test(ringFull.titleText || ''),
|
|
86
|
+
gridHasNoHub: grid.hubPresent === false,
|
|
87
|
+
};
|
|
88
|
+
const ok = Object.values(results).every(Boolean);
|
|
89
|
+
console.log(`${ok ? '✅' : '❌'} hub title:`, JSON.stringify(results),
|
|
90
|
+
`\n ringFull=${JSON.stringify(ringFull.titleText)}`,
|
|
91
|
+
`\n ringOffline=${JSON.stringify(ringOfflineOnly.titleText)}`,
|
|
92
|
+
`\n gridHub=${grid.hubPresent}`);
|
|
93
|
+
process.exit(ok ? 0 : 1);
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/* Round 53 verification: edges between two members of the hovered prefix
|
|
2
|
+
* group brighten to 1.3× even if neither endpoint is the exact hovered
|
|
3
|
+
* alias. Edges leaving the team still dim per R40.
|
|
4
|
+
*
|
|
5
|
+
* Sessions:
|
|
6
|
+
* alpha1, alpha2, alpha3 — share prefix "alpha" → same group
|
|
7
|
+
* beta — singleton
|
|
8
|
+
* Messages:
|
|
9
|
+
* alpha1 → alpha2 (touches alpha1 directly → 1.7× per R40)
|
|
10
|
+
* alpha2 → alpha3 (BOTH in alpha group but neither is hovered → 1.3× per R53)
|
|
11
|
+
* alpha1 → beta (touches alpha1, beta is outside → 1.7× per R40)
|
|
12
|
+
* alpha2 → beta (in-group endpoint, but beta is outside → 0.35× per R40)
|
|
13
|
+
*
|
|
14
|
+
* Hover alpha1 and read the visible flow paths' opacity to validate the
|
|
15
|
+
* 4-tier ladder.
|
|
16
|
+
*/
|
|
17
|
+
import { chromium } from 'playwright';
|
|
18
|
+
import { readFileSync } from 'node:fs';
|
|
19
|
+
|
|
20
|
+
const TOKEN = JSON.parse(readFileSync('/home/vansin/.anet/config.json', 'utf8')).token;
|
|
21
|
+
const browser = await chromium.launch({ headless: true });
|
|
22
|
+
|
|
23
|
+
const ctx = await browser.newContext({ viewport: { width: 1280, height: 900 } });
|
|
24
|
+
await ctx.addCookies([{ name: 'anet_dashboard_session', value: `v3:${TOKEN}`, domain: '127.0.0.1', path: '/' }]);
|
|
25
|
+
await ctx.addInitScript(() => {
|
|
26
|
+
try {
|
|
27
|
+
localStorage.setItem('anet-theme', 'cyber');
|
|
28
|
+
localStorage.setItem('anet-topo-layout', 'grid');
|
|
29
|
+
sessionStorage.setItem('anet_v3_auth', '1');
|
|
30
|
+
} catch {}
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
const fresh = new Date(Date.now() - 60 * 1000).toISOString();
|
|
34
|
+
await ctx.route('**/api/hub/status*', async (route) => {
|
|
35
|
+
const r = await route.fetch();
|
|
36
|
+
const b = await r.json();
|
|
37
|
+
const nid = (b.sessions || [])[0]?.network_id || 'default';
|
|
38
|
+
const sessions = ['alpha1', 'alpha2', 'alpha3', 'beta'].map(a => ({
|
|
39
|
+
alias: a, status: 'idle', network_id: nid, project_dir: null,
|
|
40
|
+
created_at: fresh, updated_at: fresh, last_seen_at: fresh,
|
|
41
|
+
}));
|
|
42
|
+
await route.fulfill({ response: r, json: { ...b, sessions } });
|
|
43
|
+
});
|
|
44
|
+
const now = new Date().toISOString();
|
|
45
|
+
await ctx.route('**/api/hub/messages*', (route) => route.fulfill({ json: { messages: [
|
|
46
|
+
{ from_alias: 'alpha1', to_alias: 'alpha2', content: 'm', created_at: now },
|
|
47
|
+
{ from_alias: 'alpha2', to_alias: 'alpha3', content: 'm', created_at: now },
|
|
48
|
+
{ from_alias: 'alpha1', to_alias: 'beta', content: 'm', created_at: now },
|
|
49
|
+
{ from_alias: 'alpha2', to_alias: 'beta', content: 'm', created_at: now },
|
|
50
|
+
] } }));
|
|
51
|
+
await ctx.route('**/api/hub/tasks*', (route) => route.fulfill({ json: { tasks: [] } }));
|
|
52
|
+
const page = await ctx.newPage();
|
|
53
|
+
await page.goto('http://127.0.0.1:3000/', { waitUntil: 'domcontentloaded' });
|
|
54
|
+
await page.waitForFunction(() => document.querySelectorAll('g[data-node]').length === 4, { timeout: 30000 });
|
|
55
|
+
await page.waitForTimeout(600);
|
|
56
|
+
|
|
57
|
+
const readEdgeOpacities = () => page.evaluate(() => {
|
|
58
|
+
const svg = document.querySelector('svg[viewBox="0 0 1000 680"]');
|
|
59
|
+
const out = {};
|
|
60
|
+
for (const g of svg.querySelectorAll(':scope > g > g')) {
|
|
61
|
+
const t = g.querySelector('path[data-edge-hitbox] title');
|
|
62
|
+
if (!t) continue;
|
|
63
|
+
const route = (t.textContent || '').split('\n')[0];
|
|
64
|
+
const base = [...g.querySelectorAll(':scope > path')].find(
|
|
65
|
+
p => !p.hasAttribute('data-edge-hitbox') && p.hasAttribute('marker-end')
|
|
66
|
+
);
|
|
67
|
+
if (base) out[route] = +base.getAttribute('opacity');
|
|
68
|
+
}
|
|
69
|
+
return out;
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
const before = await readEdgeOpacities();
|
|
73
|
+
|
|
74
|
+
// Hover alpha1.
|
|
75
|
+
await page.locator('g[data-node="alpha1"]').hover();
|
|
76
|
+
await page.waitForTimeout(300);
|
|
77
|
+
const after = await readEdgeOpacities();
|
|
78
|
+
|
|
79
|
+
await browser.close();
|
|
80
|
+
|
|
81
|
+
const get = (m, r) => m[r];
|
|
82
|
+
const baseRef = get(before, 'alpha1 → alpha2'); // pick any
|
|
83
|
+
const exactTouch = get(after, 'alpha1 → alpha2'); // R40 1.7×
|
|
84
|
+
const inGroupOnly = get(after, 'alpha2 → alpha3'); // R53 1.3×
|
|
85
|
+
const externalTouch = get(after, 'alpha1 → beta'); // R40 1.7×
|
|
86
|
+
const externalAway = get(after, 'alpha2 → beta'); // R40 0.35×
|
|
87
|
+
|
|
88
|
+
const results = {
|
|
89
|
+
baselineAllEqual: Object.values(before).every(o => Math.abs(o - baseRef) < 0.001),
|
|
90
|
+
exactTouchBrightest: exactTouch > baseRef * 1.5,
|
|
91
|
+
inGroupBoosted: inGroupOnly > baseRef * 1.15 && inGroupOnly < exactTouch,
|
|
92
|
+
externalEndpointStillBright: externalTouch > baseRef * 1.5,
|
|
93
|
+
externalDims: externalAway < baseRef * 0.5,
|
|
94
|
+
hierarchyOrdered: exactTouch > inGroupOnly && inGroupOnly > externalAway,
|
|
95
|
+
};
|
|
96
|
+
const ok = Object.values(results).every(Boolean);
|
|
97
|
+
console.log(`${ok ? '✅' : '❌'} in-group edge boost:`, JSON.stringify(results),
|
|
98
|
+
`\n baseline=${baseRef}`,
|
|
99
|
+
`\n α1→α2 (exact)=${exactTouch}`,
|
|
100
|
+
`\n α2→α3 (in-group)=${inGroupOnly}`,
|
|
101
|
+
`\n α1→β (exact, out)=${externalTouch}`,
|
|
102
|
+
`\n α2→β (leaving)=${externalAway}`);
|
|
103
|
+
process.exit(ok ? 0 : 1);
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/* Round 26 verification: hovering a node lifts its label group up by
|
|
2
|
+
* 1.5 px (CSS transform stacked on the SVG positioning translate). Both
|
|
3
|
+
* the full-card path (sparse fleet) and the dense plain-text path
|
|
4
|
+
* (large fleet) should respond. */
|
|
5
|
+
import { chromium } from 'playwright';
|
|
6
|
+
import { readFileSync } from 'node:fs';
|
|
7
|
+
|
|
8
|
+
const TOKEN = JSON.parse(readFileSync('/home/vansin/.anet/config.json', 'utf8')).token;
|
|
9
|
+
const browser = await chromium.launch({ headless: true });
|
|
10
|
+
|
|
11
|
+
async function probe(fleetSize) {
|
|
12
|
+
const ctx = await browser.newContext({ viewport: { width: 1280, height: 1600 } });
|
|
13
|
+
await ctx.addCookies([{ name: 'anet_dashboard_session', value: `v3:${TOKEN}`, domain: '127.0.0.1', path: '/' }]);
|
|
14
|
+
await ctx.addInitScript(() => {
|
|
15
|
+
try {
|
|
16
|
+
localStorage.setItem('anet-theme', 'cyber');
|
|
17
|
+
localStorage.setItem('anet-topo-layout', 'grid');
|
|
18
|
+
localStorage.setItem('anet-topo-nodescale', '1');
|
|
19
|
+
sessionStorage.setItem('anet_v3_auth', '1');
|
|
20
|
+
} catch {}
|
|
21
|
+
});
|
|
22
|
+
const fresh = new Date(Date.now() - 60 * 1000).toISOString();
|
|
23
|
+
await ctx.route('**/api/hub/status*', async (route) => {
|
|
24
|
+
const r = await route.fetch();
|
|
25
|
+
const b = await r.json();
|
|
26
|
+
const nid = (b.sessions || [])[0]?.network_id || 'default';
|
|
27
|
+
const sessions = Array.from({ length: fleetSize }, (_, i) => ({
|
|
28
|
+
alias: `lab${i + 1}`, status: 'idle', network_id: nid, project_dir: null,
|
|
29
|
+
created_at: fresh, updated_at: fresh, last_seen_at: fresh,
|
|
30
|
+
}));
|
|
31
|
+
await route.fulfill({ response: r, json: { ...b, sessions } });
|
|
32
|
+
});
|
|
33
|
+
await ctx.route('**/api/hub/tasks*', (route) => route.fulfill({ json: { tasks: [] } }));
|
|
34
|
+
const page = await ctx.newPage();
|
|
35
|
+
await page.goto('http://127.0.0.1:3000/', { waitUntil: 'domcontentloaded' });
|
|
36
|
+
await page.waitForFunction((n) => {
|
|
37
|
+
const svg = document.querySelector('svg[viewBox="0 0 1000 680"]');
|
|
38
|
+
return !!svg && svg.querySelectorAll('g[data-node]').length === n;
|
|
39
|
+
}, fleetSize, { timeout: 30000 }).catch(() => {});
|
|
40
|
+
await page.waitForTimeout(500);
|
|
41
|
+
|
|
42
|
+
// Re-query the label element fresh each sample — React re-renders on
|
|
43
|
+
// hover (hoveredAlias state change) so any element handle captured
|
|
44
|
+
// before the hover would be detached/stale by the time we read its
|
|
45
|
+
// post-hover position.
|
|
46
|
+
const readLabelTop = () => page.evaluate(() => {
|
|
47
|
+
const node = document.querySelector('g[data-node="lab1"]');
|
|
48
|
+
if (!node) return null;
|
|
49
|
+
const full = [...node.querySelectorAll('g')].find(g => /group-hover:-translate-y/.test(g.getAttribute('class') || ''));
|
|
50
|
+
const el = full || [...node.querySelectorAll('text')].find(t => /group-hover:-translate-y/.test(t.getAttribute('class') || ''));
|
|
51
|
+
return el ? el.getBoundingClientRect().top : null;
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
const beforeY = await readLabelTop();
|
|
55
|
+
await page.locator('g[data-node="lab1"]').hover();
|
|
56
|
+
await page.waitForTimeout(300);
|
|
57
|
+
const afterY = await readLabelTop();
|
|
58
|
+
|
|
59
|
+
await ctx.close();
|
|
60
|
+
return { beforeY, afterY };
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const sparse = await probe(4);
|
|
64
|
+
// Note: in dense mode the same alias's hover triggers `showFullLabel`,
|
|
65
|
+
// which swaps the plain-text element for the full-card <g>. That path
|
|
66
|
+
// switch makes a same-element before/after comparison meaningless.
|
|
67
|
+
// The plain-text element still carries the same hover-lift class, so
|
|
68
|
+
// the lift wiring is verified at the DOM level via the second probe.
|
|
69
|
+
const denseClassPresent = await (async () => {
|
|
70
|
+
const ctx = await browser.newContext({ viewport: { width: 1280, height: 1600 } });
|
|
71
|
+
const TOKEN = JSON.parse(readFileSync('/home/vansin/.anet/config.json', 'utf8')).token;
|
|
72
|
+
await ctx.addCookies([{ name: 'anet_dashboard_session', value: `v3:${TOKEN}`, domain: '127.0.0.1', path: '/' }]);
|
|
73
|
+
await ctx.addInitScript(() => {
|
|
74
|
+
localStorage.setItem('anet-topo-layout', 'grid');
|
|
75
|
+
localStorage.setItem('anet-topo-nodescale', '1');
|
|
76
|
+
sessionStorage.setItem('anet_v3_auth', '1');
|
|
77
|
+
});
|
|
78
|
+
const fresh = new Date(Date.now() - 60 * 1000).toISOString();
|
|
79
|
+
await ctx.route('**/api/hub/status*', async (route) => {
|
|
80
|
+
const r = await route.fetch();
|
|
81
|
+
const b = await r.json();
|
|
82
|
+
const nid = (b.sessions || [])[0]?.network_id || 'default';
|
|
83
|
+
const sessions = Array.from({ length: 28 }, (_, i) => ({
|
|
84
|
+
alias: `lab${i + 1}`, status: 'idle', network_id: nid, project_dir: null,
|
|
85
|
+
created_at: fresh, updated_at: fresh, last_seen_at: fresh,
|
|
86
|
+
}));
|
|
87
|
+
await route.fulfill({ response: r, json: { ...b, sessions } });
|
|
88
|
+
});
|
|
89
|
+
await ctx.route('**/api/hub/tasks*', (route) => route.fulfill({ json: { tasks: [] } }));
|
|
90
|
+
const page = await ctx.newPage();
|
|
91
|
+
await page.goto('http://127.0.0.1:3000/', { waitUntil: 'domcontentloaded' });
|
|
92
|
+
await page.waitForFunction(() => document.querySelectorAll('g[data-node]').length === 28, { timeout: 30000 }).catch(() => {});
|
|
93
|
+
await page.waitForTimeout(500);
|
|
94
|
+
const has = await page.evaluate(() => {
|
|
95
|
+
const node = document.querySelector('g[data-node="lab2"]'); // not the one we'd hover
|
|
96
|
+
if (!node) return false;
|
|
97
|
+
const t = [...node.querySelectorAll('text')].find(x => /group-hover:-translate-y/.test(x.getAttribute('class') || ''));
|
|
98
|
+
return !!t;
|
|
99
|
+
});
|
|
100
|
+
await ctx.close();
|
|
101
|
+
return has;
|
|
102
|
+
})();
|
|
103
|
+
|
|
104
|
+
await browser.close();
|
|
105
|
+
|
|
106
|
+
// R26 contributes label-only -1.5px lift; R51 (preview.58) adds -2px on the
|
|
107
|
+
// parent <g data-node> on hover, so the label's total measured movement
|
|
108
|
+
// when the node is hovered is ~3.5px. Widen the upper bound to 4 so the
|
|
109
|
+
// two lifts compose without flagging this as a regression.
|
|
110
|
+
const lifted = (m) => m.beforeY != null && m.afterY != null && m.beforeY - m.afterY >= 1 && m.beforeY - m.afterY <= 4;
|
|
111
|
+
|
|
112
|
+
const results = {
|
|
113
|
+
sparseLabelLifts: lifted(sparse),
|
|
114
|
+
densePlainTextHasLiftClass: denseClassPresent,
|
|
115
|
+
};
|
|
116
|
+
const ok = Object.values(results).every(Boolean);
|
|
117
|
+
console.log(`${ok ? '✅' : '❌'} label hover lift:`, JSON.stringify(results),
|
|
118
|
+
`sparse=Δ${(sparse.beforeY - sparse.afterY)?.toFixed(2)}px`);
|
|
119
|
+
process.exit(ok ? 0 : 1);
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/* Round 15 verification: at nodeScale=S the label card + fonts step down
|
|
2
|
+
* one tier (rect 100×42 → 88×36, alias 12 → 11, sub 9 → 8); M and L keep
|
|
3
|
+
* the existing sizes. */
|
|
4
|
+
import { chromium } from 'playwright';
|
|
5
|
+
import { readFileSync } from 'node:fs';
|
|
6
|
+
|
|
7
|
+
const TOKEN = JSON.parse(readFileSync('/home/vansin/.anet/config.json', 'utf8')).token;
|
|
8
|
+
const browser = await chromium.launch({ headless: true });
|
|
9
|
+
|
|
10
|
+
async function measure(scaleVal) {
|
|
11
|
+
const ctx = await browser.newContext({ viewport: { width: 1280, height: 900 } });
|
|
12
|
+
await ctx.addCookies([{ name: 'anet_dashboard_session', value: `v3:${TOKEN}`, domain: '127.0.0.1', path: '/' }]);
|
|
13
|
+
await ctx.addInitScript((s) => {
|
|
14
|
+
try {
|
|
15
|
+
localStorage.setItem('anet-theme', 'cyber');
|
|
16
|
+
localStorage.removeItem('anet-brand');
|
|
17
|
+
localStorage.removeItem('anet-topo-view');
|
|
18
|
+
localStorage.setItem('anet-topo-layout', 'grid');
|
|
19
|
+
localStorage.setItem('anet-topo-nodescale', s);
|
|
20
|
+
sessionStorage.setItem('anet_v3_auth', '1');
|
|
21
|
+
} catch {}
|
|
22
|
+
}, scaleVal);
|
|
23
|
+
await ctx.route('**/api/hub/status*', async (route) => {
|
|
24
|
+
const r = await route.fetch();
|
|
25
|
+
const b = await r.json();
|
|
26
|
+
const nid = (b.sessions || [])[0]?.network_id || 'default';
|
|
27
|
+
// 4 nodes only → sparse, so the full-card label path renders.
|
|
28
|
+
const sessions = ['lab1', 'lab2', 'lab3', 'lab4'].map(a => ({
|
|
29
|
+
alias: a, status: 'idle', network_id: nid, project_dir: null,
|
|
30
|
+
created_at: '2026-05-15T00:00:00Z', updated_at: '2026-05-15T00:00:00Z',
|
|
31
|
+
last_seen_at: new Date().toISOString(),
|
|
32
|
+
}));
|
|
33
|
+
await route.fulfill({ response: r, json: { ...b, sessions } });
|
|
34
|
+
});
|
|
35
|
+
await ctx.route('**/api/hub/tasks*', (route) => route.fulfill({ json: { tasks: [] } }));
|
|
36
|
+
const page = await ctx.newPage();
|
|
37
|
+
await page.goto('http://127.0.0.1:3000/', { waitUntil: 'domcontentloaded' });
|
|
38
|
+
await page.waitForFunction(() => {
|
|
39
|
+
const svg = document.querySelector('svg[viewBox="0 0 1000 680"]');
|
|
40
|
+
return !!svg && svg.querySelectorAll('g[data-node]').length === 4;
|
|
41
|
+
}, { timeout: 30000 }).catch(() => {});
|
|
42
|
+
await page.waitForTimeout(400);
|
|
43
|
+
const m = await page.$eval('g[data-node="lab1"]', g => {
|
|
44
|
+
// label card = the <g transform="translate(...)" > inside the node <g>
|
|
45
|
+
// that contains the rect+two texts; pick the rect we just changed.
|
|
46
|
+
const labelG = [...g.querySelectorAll('g')].find(x => x.querySelector('rect') && x.querySelectorAll('text').length === 2);
|
|
47
|
+
if (!labelG) return null;
|
|
48
|
+
const rect = labelG.querySelector('rect');
|
|
49
|
+
const texts = labelG.querySelectorAll('text');
|
|
50
|
+
return {
|
|
51
|
+
w: +rect.getAttribute('width'),
|
|
52
|
+
h: +rect.getAttribute('height'),
|
|
53
|
+
aliasFs: +texts[0].getAttribute('font-size'),
|
|
54
|
+
subFs: +texts[1].getAttribute('font-size'),
|
|
55
|
+
};
|
|
56
|
+
});
|
|
57
|
+
await ctx.close();
|
|
58
|
+
return m;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const S = await measure('0.7');
|
|
62
|
+
const M = await measure('0.84');
|
|
63
|
+
const L = await measure('1');
|
|
64
|
+
await browser.close();
|
|
65
|
+
|
|
66
|
+
const results = {
|
|
67
|
+
smallCardW: S?.w === 88,
|
|
68
|
+
smallCardH: S?.h === 36,
|
|
69
|
+
smallAliasFs: S?.aliasFs === 11,
|
|
70
|
+
smallSubFs: S?.subFs === 8,
|
|
71
|
+
mediumKeepsW: M?.w === 100,
|
|
72
|
+
mediumKeepsAliasFs: M?.aliasFs === 12,
|
|
73
|
+
largeKeepsW: L?.w === 100,
|
|
74
|
+
largeKeepsAliasFs: L?.aliasFs === 12,
|
|
75
|
+
};
|
|
76
|
+
const ok = Object.values(results).every(Boolean);
|
|
77
|
+
console.log(`${ok ? '✅' : '❌'} label scale:`, JSON.stringify(results), 'S=', S, 'M=', M, 'L=', L);
|
|
78
|
+
process.exit(ok ? 0 : 1);
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/* Round 34 verification: offline node tooltip carries "last seen: <relative>";
|
|
2
|
+
* online nodes skip the line. SQL-style timestamp parsing is exercised in
|
|
3
|
+
* production (CommHub format) but the existing isGhost filter has a
|
|
4
|
+
* separate TZ-sensitivity issue that ghosts SQL-without-Z entries on
|
|
5
|
+
* non-UTC browsers — out of Round 34 scope. The helper supports both
|
|
6
|
+
* formats; the SQL path is covered by manual inspection. */
|
|
7
|
+
import { chromium } from 'playwright';
|
|
8
|
+
import { readFileSync } from 'node:fs';
|
|
9
|
+
|
|
10
|
+
const TOKEN = JSON.parse(readFileSync('/home/vansin/.anet/config.json', 'utf8')).token;
|
|
11
|
+
const browser = await chromium.launch({ headless: true });
|
|
12
|
+
const ctx = await browser.newContext({ viewport: { width: 1280, height: 900 } });
|
|
13
|
+
await ctx.addCookies([{ name: 'anet_dashboard_session', value: `v3:${TOKEN}`, domain: '127.0.0.1', path: '/' }]);
|
|
14
|
+
await ctx.addInitScript(() => {
|
|
15
|
+
try {
|
|
16
|
+
localStorage.setItem('anet-theme', 'cyber');
|
|
17
|
+
localStorage.setItem('anet-topo-layout', 'grid');
|
|
18
|
+
sessionStorage.setItem('anet_v3_auth', '1');
|
|
19
|
+
} catch {}
|
|
20
|
+
});
|
|
21
|
+
// One online, two offline at different ages (both ISO).
|
|
22
|
+
const now = Date.now();
|
|
23
|
+
const isoMin = (m) => new Date(now - m * 60 * 1000).toISOString();
|
|
24
|
+
await ctx.route('**/api/hub/status*', async (route) => {
|
|
25
|
+
const r = await route.fetch();
|
|
26
|
+
const b = await r.json();
|
|
27
|
+
const nid = (b.sessions || [])[0]?.network_id || 'default';
|
|
28
|
+
const fresh = isoMin(0.1);
|
|
29
|
+
const sessions = [
|
|
30
|
+
{ alias: 'live', status: 'idle', network_id: nid, project_dir: null,
|
|
31
|
+
created_at: fresh, updated_at: fresh, last_seen_at: fresh },
|
|
32
|
+
{ alias: 'off6m', status: 'offline', network_id: nid, project_dir: null,
|
|
33
|
+
created_at: fresh, updated_at: fresh, last_seen_at: isoMin(6) },
|
|
34
|
+
{ alias: 'off45m', status: 'offline', network_id: nid, project_dir: null,
|
|
35
|
+
created_at: fresh, updated_at: fresh, last_seen_at: isoMin(45) },
|
|
36
|
+
];
|
|
37
|
+
await route.fulfill({ response: r, json: { ...b, sessions } });
|
|
38
|
+
});
|
|
39
|
+
await ctx.route('**/api/hub/tasks*', (route) => route.fulfill({ json: { tasks: [] } }));
|
|
40
|
+
const page = await ctx.newPage();
|
|
41
|
+
await page.goto('http://127.0.0.1:3000/', { waitUntil: 'domcontentloaded' });
|
|
42
|
+
await page.waitForFunction(() => document.querySelectorAll('g[data-node]').length === 3, { timeout: 30000 });
|
|
43
|
+
await page.waitForTimeout(400);
|
|
44
|
+
|
|
45
|
+
const titleOf = alias => page.$eval(`g[data-node="${alias}"] title`, el => el.textContent);
|
|
46
|
+
const live = await titleOf('live');
|
|
47
|
+
const off6m = await titleOf('off6m');
|
|
48
|
+
const off45m = await titleOf('off45m');
|
|
49
|
+
|
|
50
|
+
await browser.close();
|
|
51
|
+
const results = {
|
|
52
|
+
liveSkipsLastSeen: !/last seen:/.test(live),
|
|
53
|
+
off6mShows6mAgo: /last seen: [56]m ago/.test(off6m), // 6m exactly, ±1 minute slack
|
|
54
|
+
off45mShows45mAgo: /last seen: 4[45]m ago/.test(off45m), // 45m exactly, ±1 minute slack
|
|
55
|
+
};
|
|
56
|
+
const ok = Object.values(results).every(Boolean);
|
|
57
|
+
console.log(`${ok ? '✅' : '❌'} last-seen tooltip:`, JSON.stringify(results),
|
|
58
|
+
`\n live=${JSON.stringify(live)}\n off6m=${JSON.stringify(off6m)}\n off45m=${JSON.stringify(off45m)}`);
|
|
59
|
+
process.exit(ok ? 0 : 1);
|