@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,164 @@
|
|
|
1
|
+
/* Issue #112 acceptance: ZERO overlap in the topology (Vincent's hard
|
|
2
|
+
* done-criterion). At ~30 nodes, in both ring and grid layouts, asserts:
|
|
3
|
+
* - node ↔ node — status rings don't intersect
|
|
4
|
+
* - node ↔ panel — no node circle intersects an overlay panel rect
|
|
5
|
+
* - node ↔ group-label — no group-box label text covers a node
|
|
6
|
+
* - group-box ↔ box — no two group boxes overlap
|
|
7
|
+
* - label ↔ label — no two text labels overlap (Round 27 — caught
|
|
8
|
+
* the dense-node-label vs group-label collision
|
|
9
|
+
* Vincent reported in preview.29) */
|
|
10
|
+
import { chromium } from 'playwright';
|
|
11
|
+
import { readFileSync, mkdirSync } from 'node:fs';
|
|
12
|
+
|
|
13
|
+
const TOKEN = JSON.parse(readFileSync('/home/vansin/.anet/config.json', 'utf8')).token;
|
|
14
|
+
mkdirSync('/tmp/anet-issue-112', { recursive: true });
|
|
15
|
+
const browser = await chromium.launch({ headless: true });
|
|
16
|
+
|
|
17
|
+
// ~30 nodes: 4 prefix groups + a workdir group + singletons
|
|
18
|
+
const FLEET = [
|
|
19
|
+
...['A站内容', 'A站评测', 'A站数据', 'A站设计', 'A站运营', 'A站工程'].map(a => ({ alias: a })),
|
|
20
|
+
...['B站产品', 'B站工程', 'B站测试', 'B站运维', 'B站运营'].map(a => ({ alias: a })),
|
|
21
|
+
...['P站产品', 'P站工程', 'P站测试', 'P站运维'].map(a => ({ alias: a })),
|
|
22
|
+
...['通信龙', '通信牛', '通信马', '通信SDK马'].map(a => ({ alias: a })),
|
|
23
|
+
...['srv-a', 'srv-b', 'srv-c'].map(a => ({ alias: a, project_dir: '/home/v/agent-orchestra' })),
|
|
24
|
+
...['群星马', '书生1号', '微信马', '飞书马', '独立节点', '研究员1号', '研究员2号', '游侠马'].map(a => ({ alias: a })),
|
|
25
|
+
];
|
|
26
|
+
|
|
27
|
+
const overlaps1D = (a0, a1, b0, b1, tol) => a0 < b1 - tol && b0 < a1 - tol;
|
|
28
|
+
|
|
29
|
+
async function check(layout) {
|
|
30
|
+
const ctx = await browser.newContext({ viewport: { width: 1280, height: 920 } });
|
|
31
|
+
await ctx.addCookies([{ name: 'anet_dashboard_session', value: `v3:${TOKEN}`, domain: '127.0.0.1', path: '/' }]);
|
|
32
|
+
await ctx.addInitScript((lay) => {
|
|
33
|
+
try {
|
|
34
|
+
localStorage.setItem('anet-theme', 'cyber');
|
|
35
|
+
localStorage.removeItem('anet-brand');
|
|
36
|
+
localStorage.removeItem('anet-topo-view');
|
|
37
|
+
localStorage.removeItem('anet-topo-nodescale'); // default M
|
|
38
|
+
localStorage.setItem('anet-topo-layout', lay);
|
|
39
|
+
sessionStorage.setItem('anet_v3_auth', '1');
|
|
40
|
+
} catch {}
|
|
41
|
+
}, layout);
|
|
42
|
+
await ctx.route('**/api/hub/status*', async (route) => {
|
|
43
|
+
const r = await route.fetch();
|
|
44
|
+
const b = await r.json();
|
|
45
|
+
const nid = (b.sessions || [])[0]?.network_id || 'default';
|
|
46
|
+
const sessions = FLEET.map((f, i) => ({
|
|
47
|
+
alias: f.alias, status: i % 5 === 0 ? 'working' : 'idle', network_id: nid,
|
|
48
|
+
project_dir: f.project_dir ?? null,
|
|
49
|
+
created_at: '2026-05-15T00:00:00Z', updated_at: '2026-05-15T00:00:00Z', last_seen_at: new Date().toISOString(),
|
|
50
|
+
}));
|
|
51
|
+
await route.fulfill({ response: r, json: { ...b, sessions } });
|
|
52
|
+
});
|
|
53
|
+
await ctx.route('**/api/hub/tasks*', (route) => route.fulfill({ json: { tasks: [] } }));
|
|
54
|
+
const page = await ctx.newPage();
|
|
55
|
+
await page.goto('http://127.0.0.1:3000/', { waitUntil: 'domcontentloaded' });
|
|
56
|
+
await page.waitForFunction(() => {
|
|
57
|
+
const svg = document.querySelector('svg[viewBox="0 0 1000 680"]');
|
|
58
|
+
return !!svg && svg.querySelectorAll('g[data-node]').length > 20;
|
|
59
|
+
}, { timeout: 30000 }).catch(() => {});
|
|
60
|
+
await page.waitForTimeout(800);
|
|
61
|
+
|
|
62
|
+
const data = await page.evaluate(() => {
|
|
63
|
+
const svg = document.querySelector('svg[viewBox="0 0 1000 680"]');
|
|
64
|
+
// node status rings: stroke-width 3 (online) / 1.5 (offline), centred on the node
|
|
65
|
+
const nodes = [...svg.querySelectorAll('g[data-node]')].map(g => {
|
|
66
|
+
const ring = g.querySelector('circle[stroke-width="3"], circle[stroke-width="1.5"]');
|
|
67
|
+
if (!ring) return null;
|
|
68
|
+
return { alias: g.getAttribute('data-node'), cx: +ring.getAttribute('cx'), cy: +ring.getAttribute('cy'), r: +ring.getAttribute('r') };
|
|
69
|
+
}).filter(Boolean);
|
|
70
|
+
// overlay panels (direct svg children, fixed)
|
|
71
|
+
const panels = [...svg.querySelectorAll(':scope > g[transform^="translate(28, 34)"], :scope > g[transform^="translate(720, 34)"]')].map(g => {
|
|
72
|
+
const m = g.getAttribute('transform').match(/translate\(([\d.]+),\s*([\d.]+)\)/);
|
|
73
|
+
const rect = g.querySelector('rect');
|
|
74
|
+
return { x: +m[1], y: +m[2], w: +rect.getAttribute('width'), h: +rect.getAttribute('height') };
|
|
75
|
+
});
|
|
76
|
+
// group boxes + their label text bounding boxes
|
|
77
|
+
const groups = [...svg.querySelectorAll('g[data-group]')].map(g => {
|
|
78
|
+
const rect = g.querySelector('rect');
|
|
79
|
+
const text = g.querySelector('text');
|
|
80
|
+
const bb = text.getBBox();
|
|
81
|
+
return {
|
|
82
|
+
box: { x: +rect.getAttribute('x'), y: +rect.getAttribute('y'), w: +rect.getAttribute('width'), h: +rect.getAttribute('height') },
|
|
83
|
+
label: { x: bb.x, y: bb.y, w: bb.width, h: bb.height },
|
|
84
|
+
};
|
|
85
|
+
});
|
|
86
|
+
// Round 27 / P0: every visible label bbox (node alias text + group
|
|
87
|
+
// headings) so we can assert label↔label clearance. Skip elements
|
|
88
|
+
// with empty bboxes (e.g., text inside an unrendered <g>).
|
|
89
|
+
const allLabels = [];
|
|
90
|
+
for (const t of svg.querySelectorAll('g[data-node] text, g[data-group] text')) {
|
|
91
|
+
const bb = t.getBBox();
|
|
92
|
+
if (bb.width === 0 || bb.height === 0) continue;
|
|
93
|
+
allLabels.push({
|
|
94
|
+
kind: t.closest('g[data-group]') ? 'group' : 'node',
|
|
95
|
+
owner: (t.closest('g[data-group]')?.getAttribute('data-group')) || (t.closest('g[data-node]')?.getAttribute('data-node')) || '?',
|
|
96
|
+
x: bb.x, y: bb.y, w: bb.width, h: bb.height,
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
return { nodes, panels, groups, allLabels };
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
const TOL = 2; // px slack — touching edges is fine, real overlap is not
|
|
103
|
+
let nodeNode = 0, nodePanel = 0, nodeLabel = 0, boxBox = 0, labelLabel = 0;
|
|
104
|
+
|
|
105
|
+
// node ↔ node
|
|
106
|
+
for (let i = 0; i < data.nodes.length; i++) {
|
|
107
|
+
for (let j = i + 1; j < data.nodes.length; j++) {
|
|
108
|
+
const a = data.nodes[i], b = data.nodes[j];
|
|
109
|
+
const d = Math.hypot(a.cx - b.cx, a.cy - b.cy);
|
|
110
|
+
if (d < a.r + b.r - TOL) nodeNode++;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
// node ↔ panel (circle vs rect)
|
|
114
|
+
for (const n of data.nodes) {
|
|
115
|
+
for (const p of data.panels) {
|
|
116
|
+
const qx = Math.max(p.x, Math.min(n.cx, p.x + p.w));
|
|
117
|
+
const qy = Math.max(p.y, Math.min(n.cy, p.y + p.h));
|
|
118
|
+
if (Math.hypot(n.cx - qx, n.cy - qy) < n.r - TOL) nodePanel++;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
// node ↔ group label (circle vs label text bbox)
|
|
122
|
+
for (const n of data.nodes) {
|
|
123
|
+
for (const g of data.groups) {
|
|
124
|
+
const L = g.label;
|
|
125
|
+
const qx = Math.max(L.x, Math.min(n.cx, L.x + L.w));
|
|
126
|
+
const qy = Math.max(L.y, Math.min(n.cy, L.y + L.h));
|
|
127
|
+
if (Math.hypot(n.cx - qx, n.cy - qy) < n.r - TOL) nodeLabel++;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
// group box ↔ group box
|
|
131
|
+
for (let i = 0; i < data.groups.length; i++) {
|
|
132
|
+
for (let j = i + 1; j < data.groups.length; j++) {
|
|
133
|
+
const a = data.groups[i].box, b = data.groups[j].box;
|
|
134
|
+
if (overlaps1D(a.x, a.x + a.w, b.x, b.x + b.w, TOL) &&
|
|
135
|
+
overlaps1D(a.y, a.y + a.h, b.y, b.y + b.h, TOL)) boxBox++;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
// label ↔ label (Round 27)
|
|
139
|
+
// Same-node node-labels (e.g. alias + sub-status in the full card) are
|
|
140
|
+
// intentionally close and adjacent — skip pairs that share an owner.
|
|
141
|
+
for (let i = 0; i < data.allLabels.length; i++) {
|
|
142
|
+
for (let j = i + 1; j < data.allLabels.length; j++) {
|
|
143
|
+
const a = data.allLabels[i], b = data.allLabels[j];
|
|
144
|
+
if (a.owner === b.owner) continue;
|
|
145
|
+
if (overlaps1D(a.x, a.x + a.w, b.x, b.x + b.w, TOL) &&
|
|
146
|
+
overlaps1D(a.y, a.y + a.h, b.y, b.y + b.h, TOL)) labelLabel++;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
await page.screenshot({ path: `/tmp/anet-issue-112/overlap-${layout}.png` });
|
|
151
|
+
await ctx.close();
|
|
152
|
+
const ok = nodeNode === 0 && nodePanel === 0 && nodeLabel === 0 && boxBox === 0 && labelLabel === 0;
|
|
153
|
+
console.log(`${ok ? '✅' : '❌'} [${layout}] nodes=${data.nodes.length} groups=${data.groups.length} — ` +
|
|
154
|
+
`node↔node:${nodeNode} node↔panel:${nodePanel} node↔label:${nodeLabel} box↔box:${boxBox} label↔label:${labelLabel}`);
|
|
155
|
+
return ok;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
const all = [];
|
|
159
|
+
all.push(await check('grid'));
|
|
160
|
+
all.push(await check('ring'));
|
|
161
|
+
await browser.close();
|
|
162
|
+
const pass = all.every(Boolean);
|
|
163
|
+
console.log(pass ? '\n✅ ZERO OVERLAP' : '\n❌ OVERLAP DETECTED');
|
|
164
|
+
process.exit(pass ? 0 : 1);
|
|
@@ -68,7 +68,7 @@ const results = {};
|
|
|
68
68
|
results.panelOcclusion = await page.evaluate(() => {
|
|
69
69
|
const svg = document.querySelector('svg[viewBox="0 0 1000 680"]');
|
|
70
70
|
// overlay panels: <g transform="translate(28, 34)"> and translate(720, 34)
|
|
71
|
-
const panels = [...svg.querySelectorAll(':scope > g[transform^="translate(
|
|
71
|
+
const panels = [...svg.querySelectorAll(':scope > g[transform^="translate(16, 16)"], :scope > g[transform^="translate(760, 16)"]')]
|
|
72
72
|
.map(g => {
|
|
73
73
|
const m = g.getAttribute('transform').match(/translate\(([\d.]+),\s*([\d.]+)\)/);
|
|
74
74
|
const rect = g.querySelector('rect');
|
|
@@ -92,7 +92,7 @@ const results = {};
|
|
|
92
92
|
// panels exist and are OUTSIDE the zoom/pan transform group (direct svg children)
|
|
93
93
|
results.panelsOutsideTransform = await page.evaluate(() => {
|
|
94
94
|
const svg = document.querySelector('svg[viewBox="0 0 1000 680"]');
|
|
95
|
-
const panels = [...svg.querySelectorAll(':scope > g[transform^="translate(
|
|
95
|
+
const panels = [...svg.querySelectorAll(':scope > g[transform^="translate(16, 16)"], :scope > g[transform^="translate(760, 16)"]')];
|
|
96
96
|
return panels.length === 2; // :scope > = direct children, not inside the view <g>
|
|
97
97
|
});
|
|
98
98
|
await page.screenshot({ path: '/tmp/anet-issue-112/grid-occlusion.png' });
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/* Round 21 verification: SVG cursor flips from grab → grabbing during
|
|
2
|
+
* a pan drag and back to grab on release. */
|
|
3
|
+
import { chromium } from 'playwright';
|
|
4
|
+
import { readFileSync } from 'node:fs';
|
|
5
|
+
|
|
6
|
+
const TOKEN = JSON.parse(readFileSync('/home/vansin/.anet/config.json', 'utf8')).token;
|
|
7
|
+
const browser = await chromium.launch({ headless: true });
|
|
8
|
+
// Need a tall enough viewport to keep the SVG ABOVE the fold so real
|
|
9
|
+
// pointer events land — at 1280×900 the canvas starts at ~y=815 (the
|
|
10
|
+
// /admin hero + StatsBar above push it below the viewport bottom).
|
|
11
|
+
const ctx = await browser.newContext({ viewport: { width: 1280, height: 1600 } });
|
|
12
|
+
await ctx.addCookies([{ name: 'anet_dashboard_session', value: `v3:${TOKEN}`, domain: '127.0.0.1', path: '/' }]);
|
|
13
|
+
await ctx.addInitScript(() => {
|
|
14
|
+
try {
|
|
15
|
+
localStorage.setItem('anet-theme', 'cyber');
|
|
16
|
+
localStorage.setItem('anet-topo-layout', 'grid');
|
|
17
|
+
sessionStorage.setItem('anet_v3_auth', '1');
|
|
18
|
+
} catch {}
|
|
19
|
+
});
|
|
20
|
+
const fresh = new Date(Date.now() - 60 * 1000).toISOString();
|
|
21
|
+
await ctx.route('**/api/hub/status*', async (route) => {
|
|
22
|
+
const r = await route.fetch();
|
|
23
|
+
const b = await r.json();
|
|
24
|
+
const nid = (b.sessions || [])[0]?.network_id || 'default';
|
|
25
|
+
const sessions = ['a', 'b'].map(a => ({
|
|
26
|
+
alias: a, status: 'idle', network_id: nid, project_dir: null,
|
|
27
|
+
created_at: fresh, updated_at: fresh, last_seen_at: fresh,
|
|
28
|
+
}));
|
|
29
|
+
await route.fulfill({ response: r, json: { ...b, sessions } });
|
|
30
|
+
});
|
|
31
|
+
await ctx.route('**/api/hub/tasks*', (route) => route.fulfill({ json: { tasks: [] } }));
|
|
32
|
+
const page = await ctx.newPage();
|
|
33
|
+
await page.goto('http://127.0.0.1:3000/', { waitUntil: 'domcontentloaded' });
|
|
34
|
+
await page.waitForSelector('svg[viewBox="0 0 1000 680"]', { timeout: 30000 });
|
|
35
|
+
await page.waitForTimeout(400);
|
|
36
|
+
|
|
37
|
+
const cursorAt = () => page.$eval('svg[viewBox="0 0 1000 680"]', el => el.style.cursor);
|
|
38
|
+
const rest = await cursorAt();
|
|
39
|
+
|
|
40
|
+
// pick a pan-safe target far from any node — top-left empty canvas region
|
|
41
|
+
const box = await page.$eval('svg[viewBox="0 0 1000 680"]', el => el.getBoundingClientRect());
|
|
42
|
+
const sx = box.x + box.width * 0.08;
|
|
43
|
+
const sy = box.y + box.height * 0.40;
|
|
44
|
+
|
|
45
|
+
await page.mouse.move(sx, sy);
|
|
46
|
+
await page.mouse.down();
|
|
47
|
+
await page.mouse.move(sx + 40, sy + 30);
|
|
48
|
+
await page.waitForTimeout(50);
|
|
49
|
+
const during = await cursorAt();
|
|
50
|
+
await page.mouse.up();
|
|
51
|
+
await page.waitForTimeout(50);
|
|
52
|
+
const after = await cursorAt();
|
|
53
|
+
|
|
54
|
+
await browser.close();
|
|
55
|
+
const results = {
|
|
56
|
+
restIsGrab: rest === 'grab',
|
|
57
|
+
duringIsGrabbing: during === 'grabbing',
|
|
58
|
+
afterIsGrab: after === 'grab',
|
|
59
|
+
};
|
|
60
|
+
const ok = Object.values(results).every(Boolean);
|
|
61
|
+
console.log(`${ok ? '✅' : '❌'} pan cursor:`, JSON.stringify(results), `rest=${rest} during=${during} after=${after}`);
|
|
62
|
+
process.exit(ok ? 0 : 1);
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/* Round 57 verification: recent-signal + legend panels carry a drop-
|
|
2
|
+
* shadow filter so they read as floating cards instead of pasted-on
|
|
3
|
+
* graphics — especially important on light theme where panel fill is
|
|
4
|
+
* near-white on a near-white canvas.
|
|
5
|
+
*
|
|
6
|
+
* - Both panels render a <rect> with `data-topo-panel-elevation`.
|
|
7
|
+
* - The rect's `style.filter` contains "drop-shadow(".
|
|
8
|
+
* - Light vs cyber themes use different shadow alpha (light tuned for
|
|
9
|
+
* contrast against white canvas; cyber for subtle depth on dark).
|
|
10
|
+
* Verify the strings differ so the theme switch isn't a no-op.
|
|
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(theme) {
|
|
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((t) => {
|
|
22
|
+
try {
|
|
23
|
+
localStorage.setItem('anet-theme', t);
|
|
24
|
+
localStorage.setItem('anet-topo-layout', 'ring');
|
|
25
|
+
sessionStorage.setItem('anet_v3_auth', '1');
|
|
26
|
+
} catch {}
|
|
27
|
+
}, theme);
|
|
28
|
+
const fresh = new Date(Date.now() - 60 * 1000).toISOString();
|
|
29
|
+
await ctx.route('**/api/hub/status*', async (route) => {
|
|
30
|
+
const r = await route.fetch();
|
|
31
|
+
const b = await r.json();
|
|
32
|
+
const nid = (b.sessions || [])[0]?.network_id || 'default';
|
|
33
|
+
const sessions = ['alpha', 'beta'].map(a => ({
|
|
34
|
+
alias: a, status: 'idle', network_id: nid, project_dir: null,
|
|
35
|
+
created_at: fresh, updated_at: fresh, last_seen_at: fresh,
|
|
36
|
+
}));
|
|
37
|
+
await route.fulfill({ response: r, json: { ...b, sessions } });
|
|
38
|
+
});
|
|
39
|
+
await ctx.route('**/api/hub/messages*', (route) => route.fulfill({ json: { messages: [] } }));
|
|
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.waitForSelector('rect[data-topo-panel-elevation="recent"]', { timeout: 30000 });
|
|
44
|
+
await page.waitForTimeout(400);
|
|
45
|
+
const filters = await page.evaluate(() => {
|
|
46
|
+
const recent = document.querySelector('rect[data-topo-panel-elevation="recent"]');
|
|
47
|
+
const legend = document.querySelector('rect[data-topo-panel-elevation="legend"]');
|
|
48
|
+
return {
|
|
49
|
+
recent: recent?.getAttribute('style') || '',
|
|
50
|
+
legend: legend?.getAttribute('style') || '',
|
|
51
|
+
recentComputed: recent ? getComputedStyle(recent).filter : null,
|
|
52
|
+
legendComputed: legend ? getComputedStyle(legend).filter : null,
|
|
53
|
+
};
|
|
54
|
+
});
|
|
55
|
+
await ctx.close();
|
|
56
|
+
return filters;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const light = await probe('light');
|
|
60
|
+
const cyber = await probe('cyber');
|
|
61
|
+
await browser.close();
|
|
62
|
+
|
|
63
|
+
const hasShadow = (s) => /drop-shadow\(/.test(s || '');
|
|
64
|
+
const results = {
|
|
65
|
+
light_recent_hasShadow: hasShadow(light.recent),
|
|
66
|
+
light_legend_hasShadow: hasShadow(light.legend),
|
|
67
|
+
cyber_recent_hasShadow: hasShadow(cyber.recent),
|
|
68
|
+
cyber_legend_hasShadow: hasShadow(cyber.legend),
|
|
69
|
+
themes_differ: light.recent !== cyber.recent,
|
|
70
|
+
computed_resolves: hasShadow(light.recentComputed) && hasShadow(cyber.recentComputed),
|
|
71
|
+
};
|
|
72
|
+
const ok = Object.values(results).every(Boolean);
|
|
73
|
+
console.log(`${ok ? '✅' : '❌'} panel elevation:`, JSON.stringify(results),
|
|
74
|
+
`\n light.recent=${JSON.stringify(light.recent)}`,
|
|
75
|
+
`\n cyber.recent=${JSON.stringify(cyber.recent)}`);
|
|
76
|
+
process.exit(ok ? 0 : 1);
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/* Round 66 verification: pinnedStatus + pinnedGroup persist across page
|
|
2
|
+
* reloads via sessionStorage. Stale group pins (group no longer exists)
|
|
3
|
+
* are cleared on hydration so the chip row doesn't show a phantom team.
|
|
4
|
+
*
|
|
5
|
+
* - Pre-seed sessionStorage with anet-topo-pinned-status='working' →
|
|
6
|
+
* reload → assert filter pill renders + working stays bright + idles
|
|
7
|
+
* dim. (Status pin survives.)
|
|
8
|
+
* - Pre-seed anet-topo-pinned-group='alpha' WITH alpha sessions → reload
|
|
9
|
+
* → pill renders + alpha team stays bright.
|
|
10
|
+
* - Pre-seed anet-topo-pinned-group='ghost' WITHOUT any ghost session →
|
|
11
|
+
* reload → the stale pin is cleared on hydration; no pill renders.
|
|
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
|
+
async function probe({ status = null, group = null, sessions }) {
|
|
20
|
+
const ctx = await browser.newContext({ viewport: { width: 1400, height: 1500 } });
|
|
21
|
+
await ctx.addCookies([{ name: 'anet_dashboard_session', value: `v3:${TOKEN}`, domain: '127.0.0.1', path: '/' }]);
|
|
22
|
+
await ctx.addInitScript(({ status, group }) => {
|
|
23
|
+
try {
|
|
24
|
+
localStorage.setItem('anet-theme', 'cyber');
|
|
25
|
+
localStorage.setItem('anet-topo-layout', 'grid');
|
|
26
|
+
sessionStorage.setItem('anet_v3_auth', '1');
|
|
27
|
+
if (status) sessionStorage.setItem('anet-topo-pinned-status', status);
|
|
28
|
+
else sessionStorage.removeItem('anet-topo-pinned-status');
|
|
29
|
+
if (group) sessionStorage.setItem('anet-topo-pinned-group', group);
|
|
30
|
+
else sessionStorage.removeItem('anet-topo-pinned-group');
|
|
31
|
+
} catch {}
|
|
32
|
+
}, { status, group });
|
|
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 seeded = sessions.map(s => ({
|
|
39
|
+
alias: s.alias, status: s.status, 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: seeded } });
|
|
43
|
+
});
|
|
44
|
+
await ctx.route('**/api/hub/messages*', (r) => r.fulfill({ json: { messages: [] } }));
|
|
45
|
+
await ctx.route('**/api/hub/tasks*', (r) => r.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(c => document.querySelectorAll('g[data-node]').length === c, sessions.length, { timeout: 30000 });
|
|
49
|
+
await page.waitForTimeout(700);
|
|
50
|
+
const result = await page.evaluate(() => {
|
|
51
|
+
const pills = [...document.querySelectorAll('[data-active-filter]')].map(el => ({
|
|
52
|
+
kind: el.getAttribute('data-active-filter'),
|
|
53
|
+
text: (el.textContent || '').trim(),
|
|
54
|
+
}));
|
|
55
|
+
const opacities = {};
|
|
56
|
+
for (const el of document.querySelectorAll('g[data-node]')) {
|
|
57
|
+
const a = el.getAttribute('data-node');
|
|
58
|
+
if (a) opacities[a] = +(el.style.opacity || '1');
|
|
59
|
+
}
|
|
60
|
+
const storage = {
|
|
61
|
+
status: sessionStorage.getItem('anet-topo-pinned-status'),
|
|
62
|
+
group: sessionStorage.getItem('anet-topo-pinned-group'),
|
|
63
|
+
};
|
|
64
|
+
return { pills, opacities, storage };
|
|
65
|
+
});
|
|
66
|
+
await ctx.close();
|
|
67
|
+
return result;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const sessions3 = [
|
|
71
|
+
{ alias: 'alpha1', status: 'working' },
|
|
72
|
+
{ alias: 'alpha2', status: 'idle' },
|
|
73
|
+
{ alias: 'beta', status: 'idle' },
|
|
74
|
+
];
|
|
75
|
+
const alphaPlus = [
|
|
76
|
+
{ alias: 'alpha1', status: 'idle' },
|
|
77
|
+
{ alias: 'alpha2', status: 'idle' },
|
|
78
|
+
{ alias: 'alpha3', status: 'idle' },
|
|
79
|
+
{ alias: 'beta', status: 'idle' },
|
|
80
|
+
];
|
|
81
|
+
|
|
82
|
+
const statusRestore = await probe({ status: 'working', sessions: sessions3 });
|
|
83
|
+
const groupRestore = await probe({ group: 'alpha', sessions: alphaPlus });
|
|
84
|
+
const stalePin = await probe({ group: 'ghost', sessions: sessions3 });
|
|
85
|
+
|
|
86
|
+
await browser.close();
|
|
87
|
+
|
|
88
|
+
const bright = (v) => v != null && v >= 0.55;
|
|
89
|
+
const dim = (v) => v != null && v < 0.4;
|
|
90
|
+
const results = {
|
|
91
|
+
statusPill_restored: statusRestore.pills.length === 1 && statusRestore.pills[0].kind === 'status'
|
|
92
|
+
&& /filter:\s*working/.test(statusRestore.pills[0].text),
|
|
93
|
+
statusPin_dimsIdle: bright(statusRestore.opacities.alpha1) && dim(statusRestore.opacities.alpha2),
|
|
94
|
+
groupPill_restored: groupRestore.pills.length === 1 && groupRestore.pills[0].kind === 'group'
|
|
95
|
+
&& /filter:\s*alpha/.test(groupRestore.pills[0].text),
|
|
96
|
+
groupPin_dimsOutsider: bright(groupRestore.opacities.alpha1) && dim(groupRestore.opacities.beta),
|
|
97
|
+
stale_pillCleared: stalePin.pills.length === 0,
|
|
98
|
+
stale_storageCleared: stalePin.storage.group === null,
|
|
99
|
+
};
|
|
100
|
+
const ok = Object.values(results).every(Boolean);
|
|
101
|
+
console.log(`${ok ? '✅' : '❌'} pin persistence:`, JSON.stringify(results),
|
|
102
|
+
`\n statusRestore=`, statusRestore,
|
|
103
|
+
`\n groupRestore=`, groupRestore,
|
|
104
|
+
`\n stalePin=`, stalePin);
|
|
105
|
+
process.exit(ok ? 0 : 1);
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/* Round 37 verification: ChatPopover header carries cwd / last-seen
|
|
2
|
+
* lines pulled from the SWR session cache. Three cases:
|
|
3
|
+
* - online node with cwd → cwd line, no last-seen
|
|
4
|
+
* - offline node with cwd → both lines
|
|
5
|
+
* - bare node (no cwd, no last_seen) → drag/Esc fallback hint */
|
|
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
|
+
async function probe(targetAlias) {
|
|
13
|
+
const ctx = await browser.newContext({ viewport: { width: 1400, height: 1000 } });
|
|
14
|
+
await ctx.addCookies([{ name: 'anet_dashboard_session', value: `v3:${TOKEN}`, domain: '127.0.0.1', path: '/' }]);
|
|
15
|
+
await ctx.addInitScript(() => {
|
|
16
|
+
try {
|
|
17
|
+
localStorage.setItem('anet-theme', 'cyber');
|
|
18
|
+
localStorage.setItem('anet-topo-layout', 'grid');
|
|
19
|
+
localStorage.setItem('anet-topo-nodescale', '1');
|
|
20
|
+
sessionStorage.setItem('anet_v3_auth', '1');
|
|
21
|
+
} catch {}
|
|
22
|
+
});
|
|
23
|
+
const fresh = new Date(Date.now() - 60 * 1000).toISOString();
|
|
24
|
+
const offline = new Date(Date.now() - 8 * 60 * 1000).toISOString(); // 8 min ago
|
|
25
|
+
await ctx.route('**/api/hub/status*', async (route) => {
|
|
26
|
+
const r = await route.fetch();
|
|
27
|
+
const b = await r.json();
|
|
28
|
+
const nid = (b.sessions || [])[0]?.network_id || 'default';
|
|
29
|
+
const sessions = [
|
|
30
|
+
{ alias: 'liveCwd', status: 'idle', network_id: nid,
|
|
31
|
+
project_dir: '/home/vansin/agent-orchestra',
|
|
32
|
+
created_at: fresh, updated_at: fresh, last_seen_at: fresh },
|
|
33
|
+
{ alias: 'offCwd', status: 'offline', network_id: nid,
|
|
34
|
+
project_dir: '/home/vansin/some-project',
|
|
35
|
+
created_at: fresh, updated_at: fresh, last_seen_at: offline },
|
|
36
|
+
{ alias: 'bare', status: 'idle', network_id: nid, project_dir: null,
|
|
37
|
+
created_at: fresh, updated_at: fresh, last_seen_at: fresh },
|
|
38
|
+
];
|
|
39
|
+
await route.fulfill({ response: r, json: { ...b, sessions } });
|
|
40
|
+
});
|
|
41
|
+
await ctx.route('**/api/hub/tasks*', (route) => route.fulfill({ json: { tasks: [] } }));
|
|
42
|
+
const page = await ctx.newPage();
|
|
43
|
+
await page.goto('http://127.0.0.1:3000/', { waitUntil: 'domcontentloaded' });
|
|
44
|
+
await page.waitForFunction(() => document.querySelectorAll('g[data-node]').length === 3, { timeout: 30000 });
|
|
45
|
+
await page.waitForTimeout(400);
|
|
46
|
+
await page.locator(`g[data-node="${targetAlias}"]`).click();
|
|
47
|
+
await page.waitForTimeout(300);
|
|
48
|
+
const meta = await page.evaluate(() => {
|
|
49
|
+
const cwd = document.querySelector('[data-popover-cwd]');
|
|
50
|
+
const ls = document.querySelector('[data-popover-lastseen]');
|
|
51
|
+
const popover = document.querySelector('[aria-label^="Chat with"]');
|
|
52
|
+
const dragHint = popover ? [...popover.querySelectorAll('div')].find(d => /Drag to move/.test(d.textContent || '')) : null;
|
|
53
|
+
return {
|
|
54
|
+
cwdText: cwd?.textContent || null,
|
|
55
|
+
lsText: ls?.textContent || null,
|
|
56
|
+
dragHintPresent: !!dragHint,
|
|
57
|
+
};
|
|
58
|
+
});
|
|
59
|
+
await ctx.close();
|
|
60
|
+
return meta;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const live = await probe('liveCwd');
|
|
64
|
+
const off = await probe('offCwd');
|
|
65
|
+
const bare = await probe('bare');
|
|
66
|
+
await browser.close();
|
|
67
|
+
|
|
68
|
+
const results = {
|
|
69
|
+
liveShowsCwd: live.cwdText === 'cwd: /home/vansin/agent-orchestra' && live.lsText === null && !live.dragHintPresent,
|
|
70
|
+
offlineShowsBoth: off.cwdText === 'cwd: /home/vansin/some-project'
|
|
71
|
+
&& /last seen: [78]m ago/.test(off.lsText || '')
|
|
72
|
+
&& !off.dragHintPresent,
|
|
73
|
+
bareFallsBackToDragHint: bare.cwdText === null && bare.lsText === null && bare.dragHintPresent,
|
|
74
|
+
};
|
|
75
|
+
const ok = Object.values(results).every(Boolean);
|
|
76
|
+
console.log(`${ok ? '✅' : '❌'} popover meta:`, JSON.stringify(results),
|
|
77
|
+
`\n live=`, live, `\n off=`, off, `\n bare=`, bare);
|
|
78
|
+
process.exit(ok ? 0 : 1);
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/* Round 31 verification: fleet-pressure chip with proportional segments.
|
|
2
|
+
* 4 working + 6 idle + 2 offline = 12 total → 33% / 50% / 17%. */
|
|
3
|
+
import { chromium } from 'playwright';
|
|
4
|
+
import { readFileSync } from 'node:fs';
|
|
5
|
+
|
|
6
|
+
const TOKEN = JSON.parse(readFileSync('/home/vansin/.anet/config.json', 'utf8')).token;
|
|
7
|
+
const browser = await chromium.launch({ headless: true });
|
|
8
|
+
const ctx = await browser.newContext({ viewport: { width: 1400, height: 1000 } });
|
|
9
|
+
await ctx.addCookies([{ name: 'anet_dashboard_session', value: `v3:${TOKEN}`, domain: '127.0.0.1', path: '/' }]);
|
|
10
|
+
await ctx.addInitScript(() => {
|
|
11
|
+
try {
|
|
12
|
+
localStorage.setItem('anet-theme', 'cyber');
|
|
13
|
+
localStorage.setItem('anet-topo-layout', 'grid');
|
|
14
|
+
sessionStorage.setItem('anet_v3_auth', '1');
|
|
15
|
+
} catch {}
|
|
16
|
+
});
|
|
17
|
+
const fresh = new Date(Date.now() - 60 * 1000).toISOString();
|
|
18
|
+
await ctx.route('**/api/hub/status*', async (route) => {
|
|
19
|
+
const r = await route.fetch();
|
|
20
|
+
const b = await r.json();
|
|
21
|
+
const nid = (b.sessions || [])[0]?.network_id || 'default';
|
|
22
|
+
const make = (alias, status) => ({
|
|
23
|
+
alias, status, network_id: nid, project_dir: null,
|
|
24
|
+
created_at: fresh, updated_at: fresh, last_seen_at: fresh,
|
|
25
|
+
});
|
|
26
|
+
const sessions = [
|
|
27
|
+
...Array.from({ length: 4 }, (_, i) => make(`w${i}`, 'working')),
|
|
28
|
+
...Array.from({ length: 6 }, (_, i) => make(`i${i}`, 'idle')),
|
|
29
|
+
...Array.from({ length: 2 }, (_, i) => make(`o${i}`, 'offline')),
|
|
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.waitForSelector('[data-fleet-pressure]', { timeout: 30000 });
|
|
37
|
+
await page.waitForTimeout(400);
|
|
38
|
+
|
|
39
|
+
const chip = '[data-fleet-pressure]';
|
|
40
|
+
const titleText = await page.locator(chip).getAttribute('title');
|
|
41
|
+
// The chip layout: <chip> > <label-span> + <bar-span> ; bar-span has the 3 segment spans.
|
|
42
|
+
const segments = await page.evaluate(() => {
|
|
43
|
+
const chip = document.querySelector('[data-fleet-pressure]');
|
|
44
|
+
if (!chip) return [];
|
|
45
|
+
// The bar container is the inline-flex w-16 span (second child).
|
|
46
|
+
const bar = [...chip.children].find(c => c.classList?.contains('w-16'));
|
|
47
|
+
if (!bar) return [];
|
|
48
|
+
return [...bar.children].map(el => ({ width: el.style.width, background: el.style.background }));
|
|
49
|
+
});
|
|
50
|
+
const segmentWidths = segments.map(s => s.width);
|
|
51
|
+
const segmentColors = segments.map(s => s.background);
|
|
52
|
+
|
|
53
|
+
// 4/12 = 33.33%, 6/12 = 50.00%, 2/12 = 16.67%
|
|
54
|
+
const close = (a, b) => Math.abs(parseFloat(a) - b) < 0.5;
|
|
55
|
+
|
|
56
|
+
await browser.close();
|
|
57
|
+
const results = {
|
|
58
|
+
titleHasCounts: titleText === '4 working · 6 idle · 2 offline',
|
|
59
|
+
threeSegments: segmentWidths.length === 3,
|
|
60
|
+
workingProportion: close(segmentWidths[0], 100 * 4 / 12),
|
|
61
|
+
idleProportion: close(segmentWidths[1], 100 * 6 / 12),
|
|
62
|
+
offlineProportion: close(segmentWidths[2], 100 * 2 / 12),
|
|
63
|
+
workingColor: /22c55e|rgb\(34, 197, 94\)/.test(segmentColors[0] || ''),
|
|
64
|
+
idleColor: /2dd4bf|rgb\(45, 212, 191\)/.test(segmentColors[1] || ''),
|
|
65
|
+
offlineColor: /6b7280|rgb\(107, 114, 128\)/.test(segmentColors[2] || ''),
|
|
66
|
+
};
|
|
67
|
+
const ok = Object.values(results).every(Boolean);
|
|
68
|
+
console.log(`${ok ? '✅' : '❌'} pressure bar:`, JSON.stringify(results), `widths=${segmentWidths.join(',')} colors=${segmentColors.join(' | ')}`);
|
|
69
|
+
process.exit(ok ? 0 : 1);
|