@sleep2agi/agent-network-dashboard 0.4.6-preview.9 → 0.4.6-preview.91
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/05uk96gc~9mni.js +1 -0
- package/.next/static/chunks/08kf-.bgs10ze.js +1 -0
- package/.next/static/chunks/08pu6p-oh~oa1.js +1 -0
- package/.next/static/chunks/0glmrdj9112tc.js +7 -0
- package/.next/static/chunks/0oknosftxc9lm.css +2 -0
- package/.next/static/chunks/0p_caune7bdi8.js +2 -0
- package/.next/static/chunks/0rxrez_cjn.eh.js +1 -0
- package/.next/static/chunks/0tvn2l1pc.h65.js +1 -0
- package/.next/static/chunks/0w3m56zhfnsnx.js +7 -0
- package/.next/static/chunks/0x8x.29hkju5a.js +1 -0
- package/.next/static/chunks/0yxrc2w2b71zj.js +1 -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 +51 -0
- package/app/components/HelpOverlay.tsx +55 -0
- package/app/components/ServersDrawer.tsx +206 -0
- package/app/components/TopoGraph.tsx +1636 -157
- 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-hover-test.mjs +103 -0
- package/scripts/topo-active-links-chip-test.mjs +73 -0
- package/scripts/topo-arrival-ping-test.mjs +87 -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-chip-pin-mirror-test.mjs +113 -0
- package/scripts/topo-click-ripple-test.mjs +66 -0
- package/scripts/topo-cmdk-layout-view-test.mjs +108 -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-dispatch-pulse-test.mjs +83 -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-help-overlay-r78-test.mjs +59 -0
- package/scripts/topo-help-overlay-r81-test.mjs +58 -0
- package/scripts/topo-hub-busyness-test.mjs +100 -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 +32 -5
- 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-hover-test.mjs +123 -0
- package/scripts/topo-pressure-pin-test.mjs +119 -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-status-chip-hover-test.mjs +101 -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-vendor-chip-hover-test.mjs +111 -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/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/0kgak.tfh2-~i.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/10oi7l-tycgl9.js +0 -1
- package/.next/static/chunks/11uk1izuv3~0t.js +0 -1
- package/.next/static/chunks/131.zrqhdbu5x.js +0 -1
- package/.next/static/chunks/165lqf5.z.n10.js +0 -1
- /package/.next/static/{T0hK2WE0kVtyFouPsSpos → EgsOXmeDYX7rzWQpipoVB}/_buildManifest.js +0 -0
- /package/.next/static/{T0hK2WE0kVtyFouPsSpos → EgsOXmeDYX7rzWQpipoVB}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{T0hK2WE0kVtyFouPsSpos → EgsOXmeDYX7rzWQpipoVB}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/* Round 41 verification: double-clicking empty canvas resets view to
|
|
2
|
+
* {zoom:1, x:0, y:0}. Double-clicking a node does NOT reset (the
|
|
3
|
+
* node's own onClick wins, and resetView should not fire). */
|
|
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
|
+
const ctx = await browser.newContext({ viewport: { width: 1280, height: 1600 } });
|
|
10
|
+
await ctx.addCookies([{ name: 'anet_dashboard_session', value: `v3:${TOKEN}`, domain: '127.0.0.1', path: '/' }]);
|
|
11
|
+
await ctx.addInitScript(() => {
|
|
12
|
+
try {
|
|
13
|
+
localStorage.setItem('anet-theme', 'cyber');
|
|
14
|
+
localStorage.setItem('anet-topo-layout', 'grid');
|
|
15
|
+
localStorage.setItem('anet-topo-view', JSON.stringify({ zoom: 1, x: 0, y: 0 }));
|
|
16
|
+
sessionStorage.setItem('anet_v3_auth', '1');
|
|
17
|
+
} catch {}
|
|
18
|
+
});
|
|
19
|
+
const fresh = new Date(Date.now() - 60 * 1000).toISOString();
|
|
20
|
+
await ctx.route('**/api/hub/status*', async (route) => {
|
|
21
|
+
const r = await route.fetch();
|
|
22
|
+
const b = await r.json();
|
|
23
|
+
const nid = (b.sessions || [])[0]?.network_id || 'default';
|
|
24
|
+
const sessions = ['a', 'b'].map(a => ({
|
|
25
|
+
alias: a, status: 'idle', network_id: nid, project_dir: null,
|
|
26
|
+
created_at: fresh, updated_at: fresh, last_seen_at: fresh,
|
|
27
|
+
}));
|
|
28
|
+
await route.fulfill({ response: r, json: { ...b, sessions } });
|
|
29
|
+
});
|
|
30
|
+
await ctx.route('**/api/hub/tasks*', (route) => route.fulfill({ json: { tasks: [] } }));
|
|
31
|
+
const page = await ctx.newPage();
|
|
32
|
+
await page.goto('http://127.0.0.1:3000/', { waitUntil: 'domcontentloaded' });
|
|
33
|
+
await page.waitForSelector('svg[viewBox="0 0 1000 680"]', { timeout: 30000 });
|
|
34
|
+
await page.waitForTimeout(500);
|
|
35
|
+
|
|
36
|
+
const readZoom = () => page.evaluate(() => {
|
|
37
|
+
const span = document.querySelector('button[aria-label="Zoom in"]').parentElement.querySelector('span[title*="zoom level"]');
|
|
38
|
+
return +span.textContent.replace('%', '');
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
// Zoom in a couple times via keyboard, then dbl-click empty canvas → expect reset to 100%.
|
|
42
|
+
await page.keyboard.press('=');
|
|
43
|
+
await page.keyboard.press('=');
|
|
44
|
+
await page.waitForTimeout(120);
|
|
45
|
+
const zoomedIn = await readZoom();
|
|
46
|
+
|
|
47
|
+
// Find empty-canvas coords: top-left area of the SVG, well outside node positions.
|
|
48
|
+
const box = await page.$eval('svg[viewBox="0 0 1000 680"]', el => el.getBoundingClientRect());
|
|
49
|
+
// y=0.35 is below the top-overlay panels (which sit at y<100 inside the SVG)
|
|
50
|
+
const emptyX = box.x + box.width * 0.20;
|
|
51
|
+
const emptyY = box.y + box.height * 0.40;
|
|
52
|
+
await page.mouse.dblclick(emptyX, emptyY);
|
|
53
|
+
await page.waitForTimeout(200);
|
|
54
|
+
const afterEmptyDbl = await readZoom();
|
|
55
|
+
|
|
56
|
+
// Now zoom in again and dbl-click a node — view should NOT reset.
|
|
57
|
+
await page.keyboard.press('=');
|
|
58
|
+
await page.keyboard.press('=');
|
|
59
|
+
await page.waitForTimeout(120);
|
|
60
|
+
const zoomedIn2 = await readZoom();
|
|
61
|
+
await page.locator('g[data-node="a"]').dblclick().catch(() => {});
|
|
62
|
+
await page.waitForTimeout(200);
|
|
63
|
+
const afterNodeDbl = await readZoom();
|
|
64
|
+
|
|
65
|
+
await browser.close();
|
|
66
|
+
const results = {
|
|
67
|
+
zoomedInBeforeDbl: zoomedIn > 100,
|
|
68
|
+
emptyCanvasResets: afterEmptyDbl === 100,
|
|
69
|
+
nodeDoesNotReset: zoomedIn2 > 100 && afterNodeDbl === zoomedIn2,
|
|
70
|
+
};
|
|
71
|
+
const ok = Object.values(results).every(Boolean);
|
|
72
|
+
console.log(`${ok ? '✅' : '❌'} dblclick reset:`, JSON.stringify(results),
|
|
73
|
+
`\n zoomedIn=${zoomedIn} afterEmptyDbl=${afterEmptyDbl} zoomedIn2=${zoomedIn2} afterNodeDbl=${afterNodeDbl}`);
|
|
74
|
+
process.exit(ok ? 0 : 1);
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/* Round 76 verification: source-side dispatch pulse renders for high-
|
|
2
|
+
* traffic edges only (link.count >= 3), bookending the R75 destination
|
|
3
|
+
* ping. Quiet edges (count < 3) skip the source pulse to keep the
|
|
4
|
+
* canvas calm. Reduced-motion users see neither pulse nor ping.
|
|
5
|
+
*
|
|
6
|
+
* - Busy alpha→beta (5 messages, fresh) → dispatch pulse present at
|
|
7
|
+
* source AND arrival ping at destination.
|
|
8
|
+
* - Quiet gamma→delta (1 message, fresh) → arrival ping only, no
|
|
9
|
+
* dispatch pulse.
|
|
10
|
+
* - Reduced-motion: no dispatch pulses, no arrival pings.
|
|
11
|
+
*/
|
|
12
|
+
import { chromium } from 'playwright';
|
|
13
|
+
import { readFileSync } from 'node:fs';
|
|
14
|
+
|
|
15
|
+
const TOKEN = JSON.parse(readFileSync('/home/vansin/.anet/config.json', 'utf8')).token;
|
|
16
|
+
const browser = await chromium.launch({ headless: true });
|
|
17
|
+
|
|
18
|
+
async function probe(reducedMotion) {
|
|
19
|
+
const ctx = await browser.newContext({
|
|
20
|
+
viewport: { width: 1280, height: 1500 },
|
|
21
|
+
reducedMotion: reducedMotion ? 'reduce' : 'no-preference',
|
|
22
|
+
});
|
|
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
|
+
sessionStorage.removeItem('anet-topo-pinned-status');
|
|
30
|
+
sessionStorage.removeItem('anet-topo-pinned-group');
|
|
31
|
+
} catch {}
|
|
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 = ['alpha', 'beta', 'gamma', 'delta'].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
|
+
// 5 busy messages alpha→beta + 1 quiet gamma→delta.
|
|
45
|
+
const now = new Date().toISOString();
|
|
46
|
+
const msgs = [
|
|
47
|
+
...Array.from({ length: 5 }).map(() => ({ from_alias: 'alpha', to_alias: 'beta', content: 'm', created_at: now })),
|
|
48
|
+
{ from_alias: 'gamma', to_alias: 'delta', content: 'm', created_at: now },
|
|
49
|
+
];
|
|
50
|
+
await ctx.route('**/api/hub/messages*', (route) => route.fulfill({ json: { messages: msgs } }));
|
|
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
|
+
const elements = await page.evaluate(() => {
|
|
57
|
+
return {
|
|
58
|
+
dispatchPulses: [...document.querySelectorAll('[data-dispatch-pulse]')].map(el => el.getAttribute('data-dispatch-pulse')),
|
|
59
|
+
arrivalPings: [...document.querySelectorAll('[data-arrival-ping]')].map(el => el.getAttribute('data-arrival-ping')),
|
|
60
|
+
};
|
|
61
|
+
});
|
|
62
|
+
await ctx.close();
|
|
63
|
+
return elements;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const normal = await probe(false);
|
|
67
|
+
const reduced = await probe(true);
|
|
68
|
+
await browser.close();
|
|
69
|
+
|
|
70
|
+
const has = (arr, key) => arr.includes(key);
|
|
71
|
+
const results = {
|
|
72
|
+
normal_busyHasDispatch: has(normal.dispatchPulses, 'alpha->beta'),
|
|
73
|
+
normal_quietHasNoDispatch: !has(normal.dispatchPulses, 'gamma->delta'),
|
|
74
|
+
normal_busyHasArrival: has(normal.arrivalPings, 'alpha->beta'),
|
|
75
|
+
normal_quietHasArrival: has(normal.arrivalPings, 'gamma->delta'),
|
|
76
|
+
reduced_noDispatchPulses: reduced.dispatchPulses.length === 0,
|
|
77
|
+
reduced_noArrivalPings: reduced.arrivalPings.length === 0,
|
|
78
|
+
};
|
|
79
|
+
const ok = Object.values(results).every(Boolean);
|
|
80
|
+
console.log(`${ok ? '✅' : '❌'} dispatch pulse:`, JSON.stringify(results),
|
|
81
|
+
`\n normal=`, normal,
|
|
82
|
+
`\n reduced=`, reduced);
|
|
83
|
+
process.exit(ok ? 0 : 1);
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/* Round 49 verification: hovering a flow edge highlights its two endpoint
|
|
2
|
+
* nodes and dims the rest — the reverse direction of R40 (node→edges) so
|
|
3
|
+
* "who is this edge between" reads at a glance without the tooltip.
|
|
4
|
+
*
|
|
5
|
+
* Sessions: alpha, beta, gamma, delta. Messages: alpha→beta + gamma→delta.
|
|
6
|
+
* - Before hover: all 4 nodes at base opacity (~1.0).
|
|
7
|
+
* - Hover alpha→beta hitbox: alpha + beta opacity ≥ 0.6, gamma + delta
|
|
8
|
+
* drop below 0.4 (composed via `hoveredEdgeEndpoints`).
|
|
9
|
+
* - Move off the edge: opacities return to base.
|
|
10
|
+
*/
|
|
11
|
+
import { chromium } from 'playwright';
|
|
12
|
+
import { readFileSync } from 'node:fs';
|
|
13
|
+
|
|
14
|
+
const TOKEN = JSON.parse(readFileSync('/home/vansin/.anet/config.json', 'utf8')).token;
|
|
15
|
+
const browser = await chromium.launch({ headless: true });
|
|
16
|
+
|
|
17
|
+
// The dashboard chrome (sidebar + header + stats row) pushes the topology
|
|
18
|
+
// SVG well below the fold at width 1280. Height 1500 fits the whole canvas
|
|
19
|
+
// so SVG-local coordinates map to in-viewport screen coordinates.
|
|
20
|
+
const ctx = await browser.newContext({ viewport: { width: 1280, height: 1500 } });
|
|
21
|
+
await ctx.addCookies([{ name: 'anet_dashboard_session', value: `v3:${TOKEN}`, domain: '127.0.0.1', path: '/' }]);
|
|
22
|
+
await ctx.addInitScript(() => {
|
|
23
|
+
try {
|
|
24
|
+
localStorage.setItem('anet-theme', 'cyber');
|
|
25
|
+
// Ring layout places nodes around the SVG center and edges curve through
|
|
26
|
+
// it — well inside the 1280x900 viewport. Grid layout pushes the lower-
|
|
27
|
+
// row edges below the fold and breaks locator.hover positioning.
|
|
28
|
+
localStorage.setItem('anet-topo-layout', 'ring');
|
|
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 = ['alpha', 'beta', 'gamma', 'delta'].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: 'alpha', to_alias: 'beta', content: 'm', created_at: now },
|
|
47
|
+
{ from_alias: 'gamma', to_alias: 'delta', content: 'm', created_at: now },
|
|
48
|
+
] } }));
|
|
49
|
+
await ctx.route('**/api/hub/tasks*', (route) => route.fulfill({ json: { tasks: [] } }));
|
|
50
|
+
const page = await ctx.newPage();
|
|
51
|
+
await page.goto('http://127.0.0.1:3000/', { waitUntil: 'domcontentloaded' });
|
|
52
|
+
await page.waitForFunction(() => document.querySelectorAll('g[data-node]').length === 4, { timeout: 30000 });
|
|
53
|
+
await page.waitForTimeout(600);
|
|
54
|
+
|
|
55
|
+
const opacities = () => page.evaluate(() => {
|
|
56
|
+
const out = {};
|
|
57
|
+
for (const a of ['alpha', 'beta', 'gamma', 'delta']) {
|
|
58
|
+
const g = document.querySelector(`g[data-node="${a}"]`);
|
|
59
|
+
out[a] = g ? +(g.style.opacity || '1') : null;
|
|
60
|
+
}
|
|
61
|
+
return out;
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
const before = await opacities();
|
|
65
|
+
|
|
66
|
+
// Hover the alpha→beta edge hitbox. The hitbox is a curved <path> with
|
|
67
|
+
// `pointer-events: stroke`, so the cursor only triggers events when it
|
|
68
|
+
// sits on the stroke itself — the bbox centroid is inside an empty region.
|
|
69
|
+
// Sample a real point at half the path's length via getPointAtLength and
|
|
70
|
+
// convert SVG-local coordinates to screen via getScreenCTM, then move the
|
|
71
|
+
// physical mouse there.
|
|
72
|
+
const target = await page.evaluate(() => {
|
|
73
|
+
const svg = document.querySelector('svg[viewBox="0 0 1000 680"]');
|
|
74
|
+
for (const g of svg.querySelectorAll(':scope > g > g')) {
|
|
75
|
+
const t = g.querySelector('path[data-edge-hitbox] title');
|
|
76
|
+
if (t && /^alpha → beta/.test(t.textContent || '')) {
|
|
77
|
+
const hb = g.querySelector('path[data-edge-hitbox]');
|
|
78
|
+
const pt = hb.getPointAtLength(hb.getTotalLength() / 2);
|
|
79
|
+
const ctm = hb.getScreenCTM();
|
|
80
|
+
return { x: pt.x * ctm.a + pt.y * ctm.c + ctm.e, y: pt.x * ctm.b + pt.y * ctm.d + ctm.f };
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return null;
|
|
84
|
+
});
|
|
85
|
+
if (!target) { console.log('❌ no alpha→beta hitbox found'); process.exit(1); }
|
|
86
|
+
console.log(' hover target:', target);
|
|
87
|
+
// Move twice — first to an empty spot, then to the curve point — so the
|
|
88
|
+
// browser registers a pointermove from "elsewhere" to the hitbox stroke.
|
|
89
|
+
await page.mouse.move(10, 10);
|
|
90
|
+
await page.mouse.move(target.x, target.y);
|
|
91
|
+
await page.waitForTimeout(350);
|
|
92
|
+
const during = await opacities();
|
|
93
|
+
|
|
94
|
+
// Move far away — over an empty corner — so no node/edge is hovered.
|
|
95
|
+
await page.mouse.move(20, 20);
|
|
96
|
+
await page.waitForTimeout(250);
|
|
97
|
+
const after = await opacities();
|
|
98
|
+
|
|
99
|
+
await browser.close();
|
|
100
|
+
const baseOk = (o) => o >= 0.55; // online nodes at base ~1.0; allow 0.6 floor
|
|
101
|
+
const dimOk = (o) => o !== null && o < 0.4;
|
|
102
|
+
const results = {
|
|
103
|
+
beforeBaseAll: baseOk(before.alpha) && baseOk(before.beta) && baseOk(before.gamma) && baseOk(before.delta),
|
|
104
|
+
hoverKeepsEndpoints: baseOk(during.alpha) && baseOk(during.beta),
|
|
105
|
+
hoverDimsNonEndpoints: dimOk(during.gamma) && dimOk(during.delta),
|
|
106
|
+
releaseRestoresAll: baseOk(after.alpha) && baseOk(after.beta) && baseOk(after.gamma) && baseOk(after.delta),
|
|
107
|
+
};
|
|
108
|
+
const ok = Object.values(results).every(Boolean);
|
|
109
|
+
console.log(`${ok ? '✅' : '❌'} edge-endpoint highlight:`, JSON.stringify(results),
|
|
110
|
+
`\n before=`, before, `\n during=`, during, `\n after=`, after);
|
|
111
|
+
process.exit(ok ? 0 : 1);
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/* Round 50 verification: hovering a flow edge boosts that edge's own
|
|
2
|
+
* opacity 2× and thickens its stroke 1.4×, while every other edge dims
|
|
3
|
+
* to 0.35×. Complements R49 (which highlights the endpoint nodes) —
|
|
4
|
+
* together they make "this is the edge you're pointing at" unmistakable.
|
|
5
|
+
*
|
|
6
|
+
* Sessions: alpha, beta, gamma, delta. Messages: alpha→beta + gamma→delta.
|
|
7
|
+
* Hover the alpha→beta hitbox and read:
|
|
8
|
+
* - alpha→beta visible-path opacity boosts (~2× base)
|
|
9
|
+
* - alpha→beta visible-path strokeWidth = 1.4 × base (rounded by browser)
|
|
10
|
+
* - gamma→delta visible-path opacity dims (~0.35× base)
|
|
11
|
+
* - gamma→delta visible-path strokeWidth unchanged
|
|
12
|
+
*/
|
|
13
|
+
import { chromium } from 'playwright';
|
|
14
|
+
import { readFileSync } from 'node:fs';
|
|
15
|
+
|
|
16
|
+
const TOKEN = JSON.parse(readFileSync('/home/vansin/.anet/config.json', 'utf8')).token;
|
|
17
|
+
const browser = await chromium.launch({ headless: true });
|
|
18
|
+
|
|
19
|
+
const ctx = await browser.newContext({ viewport: { width: 1280, height: 1500 } });
|
|
20
|
+
await ctx.addCookies([{ name: 'anet_dashboard_session', value: `v3:${TOKEN}`, domain: '127.0.0.1', path: '/' }]);
|
|
21
|
+
await ctx.addInitScript(() => {
|
|
22
|
+
try {
|
|
23
|
+
localStorage.setItem('anet-theme', 'cyber');
|
|
24
|
+
localStorage.setItem('anet-topo-layout', 'ring');
|
|
25
|
+
sessionStorage.setItem('anet_v3_auth', '1');
|
|
26
|
+
} catch {}
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
const fresh = new Date(Date.now() - 60 * 1000).toISOString();
|
|
30
|
+
await ctx.route('**/api/hub/status*', async (route) => {
|
|
31
|
+
const r = await route.fetch();
|
|
32
|
+
const b = await r.json();
|
|
33
|
+
const nid = (b.sessions || [])[0]?.network_id || 'default';
|
|
34
|
+
const sessions = ['alpha', 'beta', 'gamma', 'delta'].map(a => ({
|
|
35
|
+
alias: a, status: 'idle', network_id: nid, project_dir: null,
|
|
36
|
+
created_at: fresh, updated_at: fresh, last_seen_at: fresh,
|
|
37
|
+
}));
|
|
38
|
+
await route.fulfill({ response: r, json: { ...b, sessions } });
|
|
39
|
+
});
|
|
40
|
+
const now = new Date().toISOString();
|
|
41
|
+
await ctx.route('**/api/hub/messages*', (route) => route.fulfill({ json: { messages: [
|
|
42
|
+
{ from_alias: 'alpha', to_alias: 'beta', content: 'm', created_at: now },
|
|
43
|
+
{ from_alias: 'gamma', to_alias: 'delta', content: 'm', created_at: now },
|
|
44
|
+
] } }));
|
|
45
|
+
await ctx.route('**/api/hub/tasks*', (route) => route.fulfill({ json: { tasks: [] } }));
|
|
46
|
+
const page = await ctx.newPage();
|
|
47
|
+
await page.goto('http://127.0.0.1:3000/', { waitUntil: 'domcontentloaded' });
|
|
48
|
+
await page.waitForFunction(() => document.querySelectorAll('g[data-node]').length === 4, { timeout: 30000 });
|
|
49
|
+
await page.waitForTimeout(600);
|
|
50
|
+
|
|
51
|
+
// Read each flow edge's visible base path (the one with marker-end).
|
|
52
|
+
const readEdges = () => page.evaluate(() => {
|
|
53
|
+
const svg = document.querySelector('svg[viewBox="0 0 1000 680"]');
|
|
54
|
+
const rows = [];
|
|
55
|
+
for (const g of svg.querySelectorAll(':scope > g > g')) {
|
|
56
|
+
const t = g.querySelector('path[data-edge-hitbox] title');
|
|
57
|
+
if (!t) continue;
|
|
58
|
+
const route = (t.textContent || '').split('\n')[0];
|
|
59
|
+
const base = [...g.querySelectorAll(':scope > path')].find(
|
|
60
|
+
p => !p.hasAttribute('data-edge-hitbox') && p.hasAttribute('marker-end')
|
|
61
|
+
);
|
|
62
|
+
if (!base) continue;
|
|
63
|
+
rows.push({
|
|
64
|
+
route,
|
|
65
|
+
opacity: +base.getAttribute('opacity'),
|
|
66
|
+
strokeWidth: +base.getAttribute('stroke-width'),
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
return rows;
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
const before = await readEdges();
|
|
73
|
+
|
|
74
|
+
// Move cursor to a point ON the alpha→beta hitbox curve.
|
|
75
|
+
const target = await page.evaluate(() => {
|
|
76
|
+
const svg = document.querySelector('svg[viewBox="0 0 1000 680"]');
|
|
77
|
+
for (const g of svg.querySelectorAll(':scope > g > g')) {
|
|
78
|
+
const t = g.querySelector('path[data-edge-hitbox] title');
|
|
79
|
+
if (t && /^alpha → beta/.test(t.textContent || '')) {
|
|
80
|
+
const hb = g.querySelector('path[data-edge-hitbox]');
|
|
81
|
+
const pt = hb.getPointAtLength(hb.getTotalLength() / 2);
|
|
82
|
+
const ctm = hb.getScreenCTM();
|
|
83
|
+
return { x: pt.x * ctm.a + pt.y * ctm.c + ctm.e, y: pt.x * ctm.b + pt.y * ctm.d + ctm.f };
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return null;
|
|
87
|
+
});
|
|
88
|
+
if (!target) { console.log('❌ no alpha→beta hitbox found'); process.exit(1); }
|
|
89
|
+
await page.mouse.move(10, 10);
|
|
90
|
+
await page.mouse.move(target.x, target.y);
|
|
91
|
+
await page.waitForTimeout(350);
|
|
92
|
+
const during = await readEdges();
|
|
93
|
+
|
|
94
|
+
await browser.close();
|
|
95
|
+
|
|
96
|
+
const find = (rows, r) => rows.find(e => e.route === r);
|
|
97
|
+
const b_ab = find(before, 'alpha → beta');
|
|
98
|
+
const b_gd = find(before, 'gamma → delta');
|
|
99
|
+
const a_ab = find(during, 'alpha → beta');
|
|
100
|
+
const a_gd = find(during, 'gamma → delta');
|
|
101
|
+
|
|
102
|
+
const results = {
|
|
103
|
+
baselineMatches: b_ab && b_gd && Math.abs(b_ab.opacity - b_gd.opacity) < 0.001 && b_ab.strokeWidth === b_gd.strokeWidth,
|
|
104
|
+
hoveredEdgeBrightens: a_ab && a_ab.opacity > b_ab.opacity * 1.5,
|
|
105
|
+
hoveredEdgeThickens: a_ab && a_ab.strokeWidth > b_ab.strokeWidth * 1.2,
|
|
106
|
+
otherEdgeDims: a_gd && a_gd.opacity < b_gd.opacity * 0.6,
|
|
107
|
+
otherEdgeStaysThin: a_gd && a_gd.strokeWidth === b_gd.strokeWidth,
|
|
108
|
+
};
|
|
109
|
+
const ok = Object.values(results).every(Boolean);
|
|
110
|
+
console.log(`${ok ? '✅' : '❌'} edge focus:`, JSON.stringify(results),
|
|
111
|
+
`\n before α→β=${JSON.stringify(b_ab)} γ→δ=${JSON.stringify(b_gd)}`,
|
|
112
|
+
`\n during α→β=${JSON.stringify(a_ab)} γ→δ=${JSON.stringify(a_gd)}`);
|
|
113
|
+
process.exit(ok ? 0 : 1);
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/* Round 40 verification: hovering a node brightens edges touching it
|
|
2
|
+
* and dims the rest. Three edges in the fleet — hover one node and
|
|
3
|
+
* compare base-path opacity of touching vs non-touching edges. */
|
|
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
|
+
const ctx = await browser.newContext({ viewport: { width: 1280, height: 900 } });
|
|
11
|
+
await ctx.addCookies([{ name: 'anet_dashboard_session', value: `v3:${TOKEN}`, domain: '127.0.0.1', path: '/' }]);
|
|
12
|
+
await ctx.addInitScript(() => {
|
|
13
|
+
try {
|
|
14
|
+
localStorage.setItem('anet-theme', 'cyber');
|
|
15
|
+
localStorage.setItem('anet-topo-layout', 'grid');
|
|
16
|
+
sessionStorage.setItem('anet_v3_auth', '1');
|
|
17
|
+
} catch {}
|
|
18
|
+
});
|
|
19
|
+
const fresh = new Date(Date.now() - 60 * 1000).toISOString();
|
|
20
|
+
await ctx.route('**/api/hub/status*', async (route) => {
|
|
21
|
+
const r = await route.fetch();
|
|
22
|
+
const b = await r.json();
|
|
23
|
+
const nid = (b.sessions || [])[0]?.network_id || 'default';
|
|
24
|
+
const sessions = ['alpha', 'beta', 'gamma', 'delta'].map(a => ({
|
|
25
|
+
alias: a, status: 'idle', network_id: nid, project_dir: null,
|
|
26
|
+
created_at: fresh, updated_at: fresh, last_seen_at: fresh,
|
|
27
|
+
}));
|
|
28
|
+
await route.fulfill({ response: r, json: { ...b, sessions } });
|
|
29
|
+
});
|
|
30
|
+
// Edges:
|
|
31
|
+
// alpha → beta (touches alpha + beta)
|
|
32
|
+
// alpha → gamma (touches alpha + gamma)
|
|
33
|
+
// delta → gamma (touches delta + gamma — does NOT touch alpha)
|
|
34
|
+
const now = new Date().toISOString();
|
|
35
|
+
await ctx.route('**/api/hub/messages*', (route) => route.fulfill({ json: { messages: [
|
|
36
|
+
{ from_alias: 'alpha', to_alias: 'beta', content: 'm', created_at: now },
|
|
37
|
+
{ from_alias: 'alpha', to_alias: 'gamma', content: 'm', created_at: now },
|
|
38
|
+
{ from_alias: 'delta', to_alias: 'gamma', content: 'm', created_at: now },
|
|
39
|
+
] } }));
|
|
40
|
+
await ctx.route('**/api/hub/tasks*', (route) => route.fulfill({ json: { tasks: [] } }));
|
|
41
|
+
const page = await ctx.newPage();
|
|
42
|
+
await page.goto('http://127.0.0.1:3000/', { waitUntil: 'domcontentloaded' });
|
|
43
|
+
await page.waitForFunction(() => document.querySelectorAll('g[data-node]').length === 4, { timeout: 30000 });
|
|
44
|
+
await page.waitForTimeout(600);
|
|
45
|
+
|
|
46
|
+
const edgeOpacities = () => page.evaluate(() => {
|
|
47
|
+
const svg = document.querySelector('svg[viewBox="0 0 1000 680"]');
|
|
48
|
+
// R48 reordered the children of each flow-link <g>:
|
|
49
|
+
// path[data-edge-hitbox] <-- transparent hover surface, carries <title>
|
|
50
|
+
// path[marker-end] <-- the visible base edge with opacity
|
|
51
|
+
// path[id^=flow-path-] <-- the dashed runway
|
|
52
|
+
// Read the route from the hitbox's <title>, but the opacity from the
|
|
53
|
+
// visible base path. Picking by marker-end keeps the selector resilient
|
|
54
|
+
// to future siblings.
|
|
55
|
+
return [...svg.querySelectorAll(':scope > g > g')]
|
|
56
|
+
.map(g => {
|
|
57
|
+
const hitbox = g.querySelector('path[data-edge-hitbox]');
|
|
58
|
+
const title = hitbox?.querySelector('title');
|
|
59
|
+
const base = [...g.querySelectorAll(':scope > path')].find(
|
|
60
|
+
p => !p.hasAttribute('data-edge-hitbox') && p.hasAttribute('marker-end')
|
|
61
|
+
);
|
|
62
|
+
if (!title || !base) return null;
|
|
63
|
+
return { route: title.textContent.split('\n')[0], opacity: +base.getAttribute('opacity') };
|
|
64
|
+
})
|
|
65
|
+
.filter(Boolean);
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
const before = await edgeOpacities();
|
|
69
|
+
// Hover alpha → its two outgoing edges should brighten, delta→gamma should dim.
|
|
70
|
+
await page.locator('g[data-node="alpha"]').hover();
|
|
71
|
+
await page.waitForTimeout(350);
|
|
72
|
+
const after = await edgeOpacities();
|
|
73
|
+
|
|
74
|
+
await browser.close();
|
|
75
|
+
const get = (rows, r) => rows.find(e => e.route === r)?.opacity ?? null;
|
|
76
|
+
const b_ab = get(before, 'alpha → beta');
|
|
77
|
+
const b_ag = get(before, 'alpha → gamma');
|
|
78
|
+
const b_dg = get(before, 'delta → gamma');
|
|
79
|
+
const a_ab = get(after, 'alpha → beta');
|
|
80
|
+
const a_ag = get(after, 'alpha → gamma');
|
|
81
|
+
const a_dg = get(after, 'delta → gamma');
|
|
82
|
+
|
|
83
|
+
const results = {
|
|
84
|
+
baselineMatches: b_ab !== null && b_ag !== null && b_dg !== null && Math.abs(b_ab - b_dg) < 0.001,
|
|
85
|
+
hoverBrightensAlphaBeta: a_ab !== null && a_ab > b_ab + 0.05,
|
|
86
|
+
hoverBrightensAlphaGamma: a_ag !== null && a_ag > b_ag + 0.05,
|
|
87
|
+
hoverDimsDeltaGamma: a_dg !== null && a_dg < b_dg - 0.05,
|
|
88
|
+
};
|
|
89
|
+
const ok = Object.values(results).every(Boolean);
|
|
90
|
+
console.log(`${ok ? '✅' : '❌'} edge hover:`, JSON.stringify(results),
|
|
91
|
+
`\n before α→β=${b_ab} α→γ=${b_ag} δ→γ=${b_dg}`,
|
|
92
|
+
`\n after α→β=${a_ab} α→γ=${a_ag} δ→γ=${a_dg}`);
|
|
93
|
+
process.exit(ok ? 0 : 1);
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/* Round 39 verification: each flow-link path carries a `<title>` with
|
|
2
|
+
* "from → to\nN messages · last <relative>". Tests:
|
|
3
|
+
* - tooltip text shape (route + count + relative time)
|
|
4
|
+
* - singular vs. plural ("1 message" vs "5 messages")
|
|
5
|
+
* - missing last_at falls through cleanly */
|
|
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
|
+
localStorage.setItem('anet-topo-layout', 'grid');
|
|
18
|
+
sessionStorage.setItem('anet_v3_auth', '1');
|
|
19
|
+
} catch {}
|
|
20
|
+
});
|
|
21
|
+
const fresh = new Date(Date.now() - 60 * 1000).toISOString();
|
|
22
|
+
await ctx.route('**/api/hub/status*', async (route) => {
|
|
23
|
+
const r = await route.fetch();
|
|
24
|
+
const b = await r.json();
|
|
25
|
+
const nid = (b.sessions || [])[0]?.network_id || 'default';
|
|
26
|
+
const sessions = ['alpha', 'beta', 'gamma'].map(a => ({
|
|
27
|
+
alias: a, status: 'idle', network_id: nid, project_dir: null,
|
|
28
|
+
created_at: fresh, updated_at: fresh, last_seen_at: fresh,
|
|
29
|
+
}));
|
|
30
|
+
await route.fulfill({ response: r, json: { ...b, sessions } });
|
|
31
|
+
});
|
|
32
|
+
// Inject messages: 1 between alpha→beta (singular), 5 between alpha→gamma (plural).
|
|
33
|
+
const old = new Date(Date.now() - 8 * 60 * 1000).toISOString();
|
|
34
|
+
const recent = new Date(Date.now() - 30 * 1000).toISOString();
|
|
35
|
+
await ctx.route('**/api/hub/messages*', (route) => route.fulfill({ json: { messages: [
|
|
36
|
+
{ from_alias: 'alpha', to_alias: 'beta', content: 'hello', created_at: old },
|
|
37
|
+
{ from_alias: 'alpha', to_alias: 'gamma', content: 'm1', created_at: recent },
|
|
38
|
+
{ from_alias: 'alpha', to_alias: 'gamma', content: 'm2', created_at: recent },
|
|
39
|
+
{ from_alias: 'alpha', to_alias: 'gamma', content: 'm3', created_at: recent },
|
|
40
|
+
{ from_alias: 'alpha', to_alias: 'gamma', content: 'm4', created_at: recent },
|
|
41
|
+
{ from_alias: 'alpha', to_alias: 'gamma', content: 'm5', created_at: recent },
|
|
42
|
+
] } }));
|
|
43
|
+
await ctx.route('**/api/hub/tasks*', (route) => route.fulfill({ json: { tasks: [] } }));
|
|
44
|
+
const page = await ctx.newPage();
|
|
45
|
+
await page.goto('http://127.0.0.1:3000/', { waitUntil: 'domcontentloaded' });
|
|
46
|
+
await page.waitForFunction(() => document.querySelectorAll('g[data-node]').length === 3, { timeout: 30000 });
|
|
47
|
+
await page.waitForTimeout(600);
|
|
48
|
+
|
|
49
|
+
// Collect every flow-link tooltip (each base path with a child <title>).
|
|
50
|
+
const tooltips = await page.evaluate(() => {
|
|
51
|
+
const svg = document.querySelector('svg[viewBox="0 0 1000 680"]');
|
|
52
|
+
// Two paths per flow link — the base one carries the <title>.
|
|
53
|
+
const titled = [...svg.querySelectorAll('path > title')];
|
|
54
|
+
return titled.map(t => t.textContent);
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
await browser.close();
|
|
58
|
+
const has = (route, count, plural) => tooltips.some(t =>
|
|
59
|
+
t.includes(route) &&
|
|
60
|
+
(plural ? t.includes(`${count} messages`) : t.includes(`${count} message`)) &&
|
|
61
|
+
/last \w+ ago/.test(t)
|
|
62
|
+
);
|
|
63
|
+
const results = {
|
|
64
|
+
singularAlphaToBeta: has('alpha → beta', 1, false),
|
|
65
|
+
pluralAlphaToGamma: has('alpha → gamma', 5, true),
|
|
66
|
+
tooltipCount: tooltips.length === 2,
|
|
67
|
+
};
|
|
68
|
+
const ok = Object.values(results).every(Boolean);
|
|
69
|
+
console.log(`${ok ? '✅' : '❌'} edge tooltip:`, JSON.stringify(results), '\n tooltips=', tooltips);
|
|
70
|
+
process.exit(ok ? 0 : 1);
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/* Round 62 verification: pressing Esc clears pinnedStatus when no chat
|
|
2
|
+
* is open. Composes cleanly with the R136 ChatPopover Esc handler
|
|
3
|
+
* (which only mounts while chatAlias is set).
|
|
4
|
+
*
|
|
5
|
+
* - Pin via legend row (R61) → assert filter active.
|
|
6
|
+
* - Press Esc → assert pin released, all nodes restore.
|
|
7
|
+
* - aria-pressed flips back to false.
|
|
8
|
+
*/
|
|
9
|
+
import { chromium } from 'playwright';
|
|
10
|
+
import { readFileSync } from 'node:fs';
|
|
11
|
+
|
|
12
|
+
const TOKEN = JSON.parse(readFileSync('/home/vansin/.anet/config.json', 'utf8')).token;
|
|
13
|
+
const browser = await chromium.launch({ headless: true });
|
|
14
|
+
|
|
15
|
+
const ctx = await browser.newContext({ viewport: { width: 1400, height: 1500 } });
|
|
16
|
+
await ctx.addCookies([{ name: 'anet_dashboard_session', value: `v3:${TOKEN}`, domain: '127.0.0.1', path: '/' }]);
|
|
17
|
+
await ctx.addInitScript(() => {
|
|
18
|
+
try {
|
|
19
|
+
localStorage.setItem('anet-theme', 'cyber');
|
|
20
|
+
localStorage.setItem('anet-topo-layout', 'ring');
|
|
21
|
+
sessionStorage.setItem('anet_v3_auth', '1');
|
|
22
|
+
} catch {}
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
const fresh = new Date(Date.now() - 60 * 1000).toISOString();
|
|
26
|
+
await ctx.route('**/api/hub/status*', async (route) => {
|
|
27
|
+
const r = await route.fetch();
|
|
28
|
+
const b = await r.json();
|
|
29
|
+
const nid = (b.sessions || [])[0]?.network_id || 'default';
|
|
30
|
+
const sessions = [
|
|
31
|
+
{ alias: 'wkr', status: 'working', network_id: nid, project_dir: null, created_at: fresh, updated_at: fresh, last_seen_at: fresh },
|
|
32
|
+
{ alias: 'idl1', status: 'idle', network_id: nid, project_dir: null, created_at: fresh, updated_at: fresh, last_seen_at: fresh },
|
|
33
|
+
{ alias: 'idl2', status: 'idle', network_id: nid, project_dir: null, created_at: fresh, updated_at: fresh, last_seen_at: fresh },
|
|
34
|
+
];
|
|
35
|
+
await route.fulfill({ response: r, json: { ...b, sessions } });
|
|
36
|
+
});
|
|
37
|
+
await ctx.route('**/api/hub/messages*', (route) => route.fulfill({ json: { messages: [] } }));
|
|
38
|
+
await ctx.route('**/api/hub/tasks*', (route) => route.fulfill({ json: { tasks: [] } }));
|
|
39
|
+
const page = await ctx.newPage();
|
|
40
|
+
await page.goto('http://127.0.0.1:3000/', { waitUntil: 'domcontentloaded' });
|
|
41
|
+
await page.waitForFunction(() => document.querySelectorAll('g[data-node]').length === 3, { timeout: 30000 });
|
|
42
|
+
await page.waitForTimeout(500);
|
|
43
|
+
|
|
44
|
+
const opacities = () => page.evaluate(() => {
|
|
45
|
+
const o = {};
|
|
46
|
+
for (const a of ['wkr', 'idl1', 'idl2']) {
|
|
47
|
+
const g = document.querySelector(`g[data-node="${a}"]`);
|
|
48
|
+
o[a] = g ? +(g.style.opacity || '1') : null;
|
|
49
|
+
}
|
|
50
|
+
return o;
|
|
51
|
+
});
|
|
52
|
+
const ariaPressed = (status) => page.evaluate(s => {
|
|
53
|
+
const g = document.querySelector(`g[data-legend-status="${s}"]`);
|
|
54
|
+
return g?.getAttribute('aria-pressed');
|
|
55
|
+
}, status);
|
|
56
|
+
|
|
57
|
+
const before = await opacities();
|
|
58
|
+
|
|
59
|
+
// Pin working via legend row click.
|
|
60
|
+
await page.locator('g[data-legend-status="working"]').first().click({ force: true });
|
|
61
|
+
// Move mouse away so we observe pin-only (not hover-driven) filter.
|
|
62
|
+
await page.mouse.move(10, 10);
|
|
63
|
+
await page.waitForTimeout(250);
|
|
64
|
+
const afterPin = await opacities();
|
|
65
|
+
const ariaAfterPin = await ariaPressed('working');
|
|
66
|
+
|
|
67
|
+
// Press Esc. Body should have focus so the document-level keydown
|
|
68
|
+
// handler fires.
|
|
69
|
+
await page.evaluate(() => document.activeElement && typeof document.activeElement.blur === 'function' && document.activeElement.blur());
|
|
70
|
+
await page.keyboard.press('Escape');
|
|
71
|
+
await page.waitForTimeout(250);
|
|
72
|
+
const afterEsc = await opacities();
|
|
73
|
+
const ariaAfterEsc = await ariaPressed('working');
|
|
74
|
+
|
|
75
|
+
// Press Esc again — should be a no-op (no pin, no chat).
|
|
76
|
+
await page.keyboard.press('Escape');
|
|
77
|
+
await page.waitForTimeout(150);
|
|
78
|
+
const afterEsc2 = await opacities();
|
|
79
|
+
|
|
80
|
+
await browser.close();
|
|
81
|
+
|
|
82
|
+
const bright = (v) => v != null && v >= 0.55;
|
|
83
|
+
const dim = (v) => v != null && v < 0.4;
|
|
84
|
+
const results = {
|
|
85
|
+
before_baseline: bright(before.wkr) && bright(before.idl1) && bright(before.idl2),
|
|
86
|
+
pin_keepsWorking: bright(afterPin.wkr),
|
|
87
|
+
pin_dimsIdle: dim(afterPin.idl1) && dim(afterPin.idl2),
|
|
88
|
+
pin_ariaTrue: ariaAfterPin === 'true',
|
|
89
|
+
esc_releasesPin: bright(afterEsc.wkr) && bright(afterEsc.idl1) && bright(afterEsc.idl2),
|
|
90
|
+
esc_ariaBackToFalse: ariaAfterEsc === 'false',
|
|
91
|
+
escAgain_isNoOp: bright(afterEsc2.wkr) && bright(afterEsc2.idl1),
|
|
92
|
+
};
|
|
93
|
+
const ok = Object.values(results).every(Boolean);
|
|
94
|
+
console.log(`${ok ? '✅' : '❌'} esc clears pin:`, JSON.stringify(results),
|
|
95
|
+
`\n before=`, before,
|
|
96
|
+
`\n afterPin=`, afterPin, ` aria=${ariaAfterPin}`,
|
|
97
|
+
`\n afterEsc=`, afterEsc, ` aria=${ariaAfterEsc}`);
|
|
98
|
+
process.exit(ok ? 0 : 1);
|