@sleep2agi/agent-network-dashboard 0.4.6-preview.87 → 0.4.6-preview.89
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/build-manifest.json +3 -3
- package/.next/diagnostics/route-bundle-stats.json +31 -31
- package/.next/fallback-build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- 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 +11 -11
- package/.next/server/app/_not-found.segments/_full.segment.rsc +11 -11
- package/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
- package/.next/server/app/_not-found.segments/_index.segment.rsc +6 -6
- 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 +1 -1
- 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 +13 -13
- package/.next/server/app/admin.segments/_full.segment.rsc +13 -13
- package/.next/server/app/admin.segments/_head.segment.rsc +4 -4
- package/.next/server/app/admin.segments/_index.segment.rsc +6 -6
- package/.next/server/app/admin.segments/_tree.segment.rsc +1 -1
- 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/index.html +2 -2
- package/.next/server/app/index.rsc +13 -13
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/index.segments/_full.segment.rsc +13 -13
- package/.next/server/app/index.segments/_head.segment.rsc +4 -4
- package/.next/server/app/index.segments/_index.segment.rsc +6 -6
- package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- 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 +13 -13
- package/.next/server/app/login.segments/_full.segment.rsc +13 -13
- package/.next/server/app/login.segments/_head.segment.rsc +4 -4
- package/.next/server/app/login.segments/_index.segment.rsc +6 -6
- package/.next/server/app/login.segments/_tree.segment.rsc +1 -1
- 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 +13 -13
- package/.next/server/app/logs.segments/_full.segment.rsc +13 -13
- package/.next/server/app/logs.segments/_head.segment.rsc +4 -4
- package/.next/server/app/logs.segments/_index.segment.rsc +6 -6
- package/.next/server/app/logs.segments/_tree.segment.rsc +1 -1
- 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 +13 -13
- package/.next/server/app/messages.segments/_full.segment.rsc +13 -13
- package/.next/server/app/messages.segments/_head.segment.rsc +4 -4
- package/.next/server/app/messages.segments/_index.segment.rsc +6 -6
- package/.next/server/app/messages.segments/_tree.segment.rsc +1 -1
- 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 +13 -13
- package/.next/server/app/node.segments/_full.segment.rsc +13 -13
- package/.next/server/app/node.segments/_head.segment.rsc +4 -4
- package/.next/server/app/node.segments/_index.segment.rsc +6 -6
- package/.next/server/app/node.segments/_tree.segment.rsc +1 -1
- 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 +13 -13
- package/.next/server/app/nodes.segments/_full.segment.rsc +13 -13
- package/.next/server/app/nodes.segments/_head.segment.rsc +4 -4
- package/.next/server/app/nodes.segments/_index.segment.rsc +6 -6
- package/.next/server/app/nodes.segments/_tree.segment.rsc +1 -1
- 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 +13 -13
- package/.next/server/app/server-logs.segments/_full.segment.rsc +13 -13
- package/.next/server/app/server-logs.segments/_head.segment.rsc +4 -4
- package/.next/server/app/server-logs.segments/_index.segment.rsc +6 -6
- package/.next/server/app/server-logs.segments/_tree.segment.rsc +1 -1
- 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 +13 -13
- package/.next/server/app/settings/networks.segments/_full.segment.rsc +13 -13
- package/.next/server/app/settings/networks.segments/_head.segment.rsc +4 -4
- package/.next/server/app/settings/networks.segments/_index.segment.rsc +6 -6
- package/.next/server/app/settings/networks.segments/_tree.segment.rsc +1 -1
- 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 +13 -13
- package/.next/server/app/settings/tokens.segments/_full.segment.rsc +13 -13
- package/.next/server/app/settings/tokens.segments/_head.segment.rsc +4 -4
- package/.next/server/app/settings/tokens.segments/_index.segment.rsc +6 -6
- package/.next/server/app/settings/tokens.segments/_tree.segment.rsc +1 -1
- 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 +13 -13
- package/.next/server/app/settings.segments/_full.segment.rsc +13 -13
- package/.next/server/app/settings.segments/_head.segment.rsc +4 -4
- package/.next/server/app/settings.segments/_index.segment.rsc +6 -6
- package/.next/server/app/settings.segments/_tree.segment.rsc +1 -1
- 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 +13 -13
- package/.next/server/app/tasks.segments/_full.segment.rsc +13 -13
- package/.next/server/app/tasks.segments/_head.segment.rsc +4 -4
- package/.next/server/app/tasks.segments/_index.segment.rsc +6 -6
- package/.next/server/app/tasks.segments/_tree.segment.rsc +1 -1
- 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/chunks/ssr/agent-network-dashboard_09kk21a._.js +1 -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_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_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/{06bl5f-6t8i~0.js → 0d5jfwcqf9y30.js} +1 -1
- package/.next/static/chunks/{0ou7p_~l6jo.-.js → 0g4fy9htpe9t4.js} +1 -1
- package/.next/static/chunks/{09~fj-h56xh-r.js → 0sp.4wnkluzi8.js} +1 -1
- package/.next/static/chunks/{0hr.crc7w7q.z.js → 0w3m56zhfnsnx.js} +1 -1
- package/.next/trace +2 -2
- package/.next/trace-build +1 -1
- package/app/components/HelpOverlay.tsx +6 -0
- package/app/components/TopoGraph.tsx +21 -4
- package/package.json +1 -1
- package/scripts/topo-chip-pin-mirror-test.mjs +113 -0
- package/scripts/topo-help-overlay-r81-test.mjs +58 -0
- /package/.next/static/{IOohr_ulu1UubAKC80RVa → -9X1vRQUdY2jVyIGZTnV6}/_buildManifest.js +0 -0
- /package/.next/static/{IOohr_ulu1UubAKC80RVa → -9X1vRQUdY2jVyIGZTnV6}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{IOohr_ulu1UubAKC80RVa → -9X1vRQUdY2jVyIGZTnV6}/_ssgManifest.js +0 -0
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
${h?"w-16":"w-52"}
|
|
5
5
|
${p?"translate-x-0 shadow-2xl shadow-black/40 lg:shadow-none":"-translate-x-full"}
|
|
6
6
|
lg:translate-x-0 lg:static lg:shrink-0 lg:shadow-none
|
|
7
|
-
`,children:[(0,t.jsx)(x,{collapsed:h}),(0,t.jsx)("div",{className:"border-b border-[#2a2a4a]"}),!h&&j.length>0&&(0,t.jsxs)("div",{className:"px-2 py-3 border-b border-[#2a2a4a]",children:[(0,t.jsx)("div",{className:"px-3 text-[10px] text-gray-600 uppercase mb-2",children:"Networks"}),(0,t.jsx)("div",{className:"space-y-0.5 max-h-32 overflow-y-auto",children:j.map(e=>(0,t.jsxs)("button",{onClick:()=>{b(e.network_id),g(!1)},title:e.network_id,className:`w-full flex items-center gap-2 px-3 py-1.5 rounded-md text-xs transition-colors text-left ${f===e.network_id?"bg-cyan-500/10 text-cyan-300":"text-gray-500 hover:text-gray-300 hover:bg-[#1a1a2a]"}`,children:[(0,t.jsx)("span",{children:d[e.role||"member"]||"👤"}),(0,t.jsx)("span",{className:"truncate flex-1",children:e.network_name}),e.agentCount?(0,t.jsx)("span",{className:"shrink-0 tabular-nums text-[10px] text-gray-600",children:e.agentCount}):null]},e.network_id))})]}),(0,t.jsx)("div",{className:"pb-20",children:w}),(0,t.jsxs)("div",{className:"absolute bottom-0 left-0 right-0 border-t border-[#2a2a4a] bg-[#0d0d1a]",children:[(0,t.jsxs)("button",{onClick:()=>{window.dispatchEvent(new KeyboardEvent("keydown",{key:"k",metaKey:!0,ctrlKey:!0}))},title:h?"Quick search (⌘K)":void 0,className:`w-full flex items-center text-[11px] text-gray-600 hover:text-gray-400 hover:bg-[#1a1a2a] transition-colors ${h?"justify-center px-0 py-2.5":"justify-between gap-2 px-5 py-2"}`,"aria-label":"Open command palette",children:[(0,t.jsxs)("span",{className:`flex items-center ${h?"":"gap-2"}`,children:[(0,t.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),!h&&"Quick search"]}),!h&&(0,t.jsx)("kbd",{className:"text-[10px] border border-current rounded px-1 py-0.5 opacity-60 font-mono",children:"⌘K"})]}),(0,t.jsxs)("button",{onClick:async()=>{await fetch("/api/auth/logout",{method:"POST"}).catch(()=>{}),sessionStorage.removeItem("anet_v3_auth"),window.location.assign("/login")},title:h?"Sign out":void 0,className:`w-full flex items-center text-xs text-gray-500 hover:text-red-400 hover:bg-red-500/5 transition-colors ${h?"justify-center px-0 py-2.5":"gap-3 px-5 py-3"}`,children:[(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 9V5.25A2.25 2.25 0 0013.5 3h-6a2.25 2.25 0 00-2.25 2.25v13.5A2.25 2.25 0 007.5 21h6a2.25 2.25 0 002.25-2.25V15m3 0l3-3m0 0l-3-3m3 3H9"})}),!h&&"Sign out"]}),(0,t.jsxs)("div",{className:`flex items-center gap-2 ${h?"flex-col px-0 py-2":"px-3 py-2 justify-between"}`,children:[(0,t.jsx)(o.ThemeSwitcher,{compact:h}),(0,t.jsx)("button",{onClick:()=>u(!h),title:h?"Expand sidebar":"Collapse sidebar",className:"hidden lg:flex p-1.5 rounded text-gray-600 hover:text-gray-400 transition-colors","aria-label":h?"Expand sidebar":"Collapse sidebar",children:(0,t.jsx)("svg",{className:`w-4 h-4 transition-transform ${h?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19l-7-7 7-7"})})})]})]})]})]})}let m=e=>fetch(e).then(e=>e.ok?e.json():{sessions:[]});function x({collapsed:e}){let{data:a}=(0,n.default)("/api/hub/status",m,{refreshInterval:1e4,dedupingInterval:4e3}),r=a?.sessions||[],l=r.filter(e=>e.status&&"offline"!==e.status).length,o=r.length;return e?(0,t.jsx)(s.default,{href:"/",className:"block px-3 py-4 flex justify-center hover:opacity-80 transition-opacity","aria-label":"Agent Network — home",children:(0,t.jsx)(u,{size:32})}):(0,t.jsxs)(s.default,{href:"/",className:"block px-4 py-4 flex items-center gap-3 hover:bg-[#11112a]/40 transition-colors rounded-r-xl","aria-label":"Agent Network — home",children:[(0,t.jsx)(u,{size:32}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("div",{className:"text-white text-[13px] font-semibold leading-tight",children:"Agent Network"}),(0,t.jsxs)("div",{className:"text-[10px] text-gray-500 flex items-center gap-1.5 mt-0.5",children:[(0,t.jsx)("span",{className:`inline-block w-1.5 h-1.5 rounded-full ${l>0?"bg-emerald-400 anet-brand-pulse":"bg-gray-600"}`,"aria-hidden":!0}),0===o?(0,t.jsx)("span",{children:"waiting for agents"}):(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"text-gray-300 font-medium tabular-nums",children:l}),(0,t.jsxs)("span",{className:"text-gray-600",children:["/",o]})," online"]})]})]})]})}function u({size:e}){return(0,t.jsxs)("svg",{width:e,height:e,viewBox:"0 0 32 32","aria-hidden":!0,className:"shrink-0",children:[(0,t.jsx)("circle",{cx:"16",cy:"16",r:"10",fill:"none",stroke:"currentColor",strokeWidth:"1.5",opacity:"0.2",className:"text-cyan-400"}),(0,t.jsx)("line",{x1:"16",y1:"10",x2:"10",y2:"20",stroke:"currentColor",strokeWidth:"1",opacity:"0.45",className:"text-cyan-400"}),(0,t.jsx)("line",{x1:"16",y1:"10",x2:"22",y2:"20",stroke:"currentColor",strokeWidth:"1",opacity:"0.45",className:"text-cyan-400"}),(0,t.jsx)("line",{x1:"10",y1:"20",x2:"22",y2:"20",stroke:"currentColor",strokeWidth:"1",opacity:"0.45",className:"text-cyan-400"}),(0,t.jsx)("circle",{cx:"16",cy:"10",r:"2.5",fill:"currentColor",className:"text-cyan-400"}),(0,t.jsx)("circle",{cx:"10",cy:"20",r:"2.5",fill:"currentColor",className:"text-green-400"}),(0,t.jsx)("circle",{cx:"22",cy:"20",r:"2.5",fill:"currentColor",className:"text-violet-400"})]})}let p=async e=>{let t=await fetch(e);if(!t.ok)throw Error(String(t.status));return t.json()};function g(){let e,a,{data:l,error:o}=(0,n.default)("/api/hub/stats",p,{refreshInterval:15e3,dedupingInterval:5e3,shouldRetryOnError:!1}),{data:i,error:c}=(0,n.default)("/api/hub/health",p,{refreshInterval:15e3,dedupingInterval:5e3,shouldRetryOnError:!1}),[d,h]=(0,r.useState)(()=>"1"===sessionStorage.getItem("anet-hb-dismissed"));if(d)return null;let m=o&&c||i&&!1===i.ok,x=l?.tasks?.by_status?.find(e=>"failed"===e.status)?.count||0,u=l?.nodes?.total===0,g=null;if(m?(e="red",a="CommHub unreachable — agents may be offline",g={label:"Open Settings",href:"/settings"}):x>0?(e="amber",a=`${x} task${x>1?"s":""} failed recently`,g={label:"Review failures",href:"/tasks?status=failed"}):(u?(e="green",a="Waiting for first agent"):(e="green",a="All systems go"),g=null),"green"===e&&!l)return null;let f={red:"bg-red-500/8 border-red-500/25 text-red-300",amber:"bg-amber-500/8 border-amber-500/25 text-amber-300",green:"bg-emerald-500/6 border-emerald-500/20 text-emerald-300"}[e],b={red:"bg-red-400",amber:"bg-amber-400 anet-brand-pulse",green:"bg-emerald-400"}[e];return(0,t.jsxs)("div",{role:"status",className:`anet-health-banner sticky top-0 z-30 border-b ${f} pl-14 pr-3 sm:px-6 py-1.5 text-[12px] flex items-center justify-between gap-3 backdrop-blur-sm`,children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,t.jsx)("span",{className:`inline-block w-1.5 h-1.5 rounded-full shrink-0 ${b}`,"aria-hidden":!0}),(0,t.jsx)("span",{className:"truncate",children:a})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[g&&(0,t.jsxs)(s.default,{href:g.href,className:"text-[11px] font-medium underline-offset-2 hover:underline opacity-90 hover:opacity-100 hidden sm:inline",children:[g.label," →"]}),g&&(0,t.jsx)(s.default,{href:g.href,"aria-label":g.label,className:"sm:hidden text-[11px] font-medium opacity-90 hover:opacity-100",children:"→"}),(0,t.jsx)("button",{onClick:()=>{h(!0);try{sessionStorage.setItem("anet-hb-dismissed","1")}catch{}},"aria-label":"Dismiss banner",className:"opacity-50 hover:opacity-100 leading-none px-1",children:"×"})]})]})}let f="anet-cmdk-recents";function b(){try{let e=sessionStorage.getItem(f);return e?JSON.parse(e):[]}catch{return[]}}function v(e){try{let t=b().filter(t=>t!==e);t.unshift(e),sessionStorage.setItem(f,JSON.stringify(t.slice(0,4)))}catch{}}function y(e,t){if(!t)return{score:0,indices:[]};let a=e.toLowerCase(),s=t.toLowerCase(),r=0,n=0,l=0,o=0,i=[];for(;r<a.length&&n<s.length;)a[r]===s[n]?(l+=2+o,o++,i.push(r),(0===r||/[\s·:_/-]/.test(a[r-1]))&&(l+=4),n++):o=0,r++;return n<s.length?{score:-1,indices:[]}:{score:l-.05*Math.max(0,a.length-s.length),indices:i}}function k({text:e,indices:a}){if(!a.length)return(0,t.jsx)(t.Fragment,{children:e});let s=new Set(a),r=Array.from(e);return(0,t.jsx)(t.Fragment,{children:r.map((e,a)=>s.has(a)?(0,t.jsx)("mark",{className:"anet-cmdk-mark",children:e},a):(0,t.jsx)("span",{children:e},a))})}function j({d:e}){return(0,t.jsx)("svg",{width:"14",height:"14",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.5",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e})})}let w=[{id:"go-overview",title:"Go to Overview",hint:"Fleet at a glance",group:"Navigate",icon:(0,t.jsx)(j,{d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3"}),perform:e=>e.push("/")},{id:"go-tasks",title:"Go to Tasks",hint:"All task statuses",group:"Navigate",icon:(0,t.jsx)(j,{d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"}),perform:e=>e.push("/tasks")},{id:"go-tasks-failed",title:"Go to Failed tasks",hint:"Filter status=failed",group:"Navigate",icon:(0,t.jsx)(j,{d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"}),perform:e=>e.push("/tasks?status=failed")},{id:"go-nodes",title:"Go to Nodes",hint:"Agent fleet",group:"Navigate",icon:(0,t.jsx)(j,{d:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"}),perform:e=>e.push("/nodes")},{id:"go-messages",title:"Go to Messages",hint:"Inter-agent chat",group:"Navigate",icon:(0,t.jsx)(j,{d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"}),perform:e=>e.push("/messages")},{id:"go-networks",title:"Go to Networks",hint:"Manage networks",group:"Navigate",icon:(0,t.jsx)(j,{d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"}),perform:e=>e.push("/settings/networks")},{id:"go-logs",title:"Go to Audit Log",hint:"Register / login / actions",group:"Navigate",icon:(0,t.jsx)(j,{d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"}),perform:e=>e.push("/logs")},{id:"go-server-logs",title:"Go to Server Logs",hint:"CommHub stdout/stderr",group:"Navigate",icon:(0,t.jsx)(j,{d:"M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"}),perform:e=>e.push("/server-logs")},{id:"go-admin",title:"Go to Admin",hint:"Server overview + broadcast",group:"Navigate",icon:(0,t.jsx)(j,{d:"M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z"}),perform:e=>e.push("/admin")},{id:"go-settings",title:"Go to Settings",hint:"Connection / Account / Resources",group:"Navigate",icon:(0,t.jsx)(j,{d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),perform:e=>e.push("/settings")},{id:"act-toggle-theme",title:"Toggle theme",hint:"cyber ↔ light",group:"Actions",icon:(0,t.jsx)(j,{d:"M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"}),perform:()=>{let e=document.documentElement.getAttribute("data-theme")||"cyber",t="light"===e||"mint"===e?"cyber":"light";document.documentElement.setAttribute("data-theme",t);try{localStorage.setItem("anet-theme",t)}catch{}}},{id:"act-copy-url",title:"Copy current URL",hint:"page link to clipboard",group:"Actions",icon:(0,t.jsx)(j,{d:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"}),perform:()=>{try{navigator.clipboard.writeText(window.location.href)}catch{}}},{id:"act-sign-out",title:"Sign out",hint:"clear session",group:"Actions",icon:(0,t.jsx)(j,{d:"M15.75 9V5.25A2.25 2.25 0 0013.5 3h-6a2.25 2.25 0 00-2.25 2.25v13.5A2.25 2.25 0 007.5 21h6a2.25 2.25 0 002.25-2.25V15m3 0l3-3m0 0l-3-3m3 3H9"}),perform:()=>{fetch("/api/auth/logout",{method:"POST"}).catch(()=>{});try{sessionStorage.removeItem("anet_v3_auth")}catch{}window.location.assign("/login")}},{id:"act-help",title:"Show keyboard shortcuts",hint:"press ? — works on mobile too",group:"Actions",icon:(0,t.jsx)(j,{d:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}),perform:()=>{window.dispatchEvent(new KeyboardEvent("keydown",{key:"?"}))}},{id:"act-pin-working",title:"Pin topology filter: working",hint:"highlight working nodes only",group:"Actions",icon:(0,t.jsx)(j,{d:"M4 6h16M4 12h8m-8 6h16"}),perform:()=>{try{sessionStorage.setItem("anet-topo-pinned-status","working")}catch{}window.dispatchEvent(new CustomEvent("anet:topo-pin",{detail:{kind:"status",value:"working"}}))}},{id:"act-pin-idle",title:"Pin topology filter: idle",hint:"highlight idle (online) nodes only",group:"Actions",icon:(0,t.jsx)(j,{d:"M4 6h16M4 12h8m-8 6h16"}),perform:()=>{try{sessionStorage.setItem("anet-topo-pinned-status","idle")}catch{}window.dispatchEvent(new CustomEvent("anet:topo-pin",{detail:{kind:"status",value:"idle"}}))}},{id:"act-pin-offline",title:"Pin topology filter: offline",hint:"highlight offline / no-SSE nodes",group:"Actions",icon:(0,t.jsx)(j,{d:"M4 6h16M4 12h8m-8 6h16"}),perform:()=>{try{sessionStorage.setItem("anet-topo-pinned-status","offline")}catch{}window.dispatchEvent(new CustomEvent("anet:topo-pin",{detail:{kind:"status",value:"offline"}}))}},{id:"act-clear-topo-pins",title:"Clear topology filters",hint:"release pinned status + group",group:"Actions",icon:(0,t.jsx)(j,{d:"M6 18L18 6M6 6l12 12"}),perform:()=>{try{sessionStorage.removeItem("anet-topo-pinned-status"),sessionStorage.removeItem("anet-topo-pinned-group")}catch{}window.dispatchEvent(new CustomEvent("anet:topo-pin",{detail:{kind:"clear"}}))}},{id:"act-topo-toggle-layout",title:"Toggle topology layout",hint:"ring ↔ grid (or press `l`)",group:"Actions",icon:(0,t.jsx)(j,{d:"M4 4h6v6H4V4zm10 0h6v6h-6V4zM4 14h6v6H4v-6zm10 0h6v6h-6v-6z"}),perform:()=>{window.dispatchEvent(new CustomEvent("anet:topo-layout",{detail:{kind:"toggle"}}))}},{id:"act-topo-fit",title:"Fit topology to canvas",hint:"auto-zoom to content (or press `f`)",group:"Actions",icon:(0,t.jsx)(j,{d:"M4 8V4h4M16 4h4v4M20 16v4h-4M8 20H4v-4"}),perform:()=>{window.dispatchEvent(new CustomEvent("anet:topo-view",{detail:{kind:"fit"}}))}}];function N(){let e=(0,a.useRouter)(),[s,n]=(0,r.useState)(!1),[l,o]=(0,r.useState)(""),[i,c]=(0,r.useState)(0),d=(0,r.useRef)(null);(0,r.useEffect)(()=>{let e=e=>{if((e.metaKey||e.ctrlKey)&&"k"===e.key.toLowerCase()){e.preventDefault(),n(e=>!e);return}if("/"===e.key&&document.activeElement?.tagName!=="INPUT"&&document.activeElement?.tagName!=="TEXTAREA"&&!s){e.preventDefault(),n(!0);return}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[s]),(0,r.useEffect)(()=>{s&&(o(""),c(0),setTimeout(()=>d.current?.focus(),50))},[s]);let[h,m]=(0,r.useState)([]);(0,r.useEffect)(()=>{s&&m(b())},[s]);let[x,u]=(0,r.useState)([]);(0,r.useEffect)(()=>{if(!s)return;let e=!1;return(async()=>{try{let[a,s]=await Promise.all([fetch("/api/hub/status").then(e=>e.ok?e.json():{sessions:[]}),fetch("/api/hub/tasks?limit=20").then(e=>e.ok?e.json():{tasks:[]})]);if(e)return;let r=(a.sessions||[]).filter(e=>e.alias).slice(0,20).map(e=>({id:`agent-${e.alias}`,title:`Go to agent ${e.alias}`,hint:`${e.agent||"agent"} \xb7 ${e.status||"unknown"}`,group:"Agents",icon:(0,t.jsx)(j,{d:"M5.121 17.804A13.937 13.937 0 0112 16c2.5 0 4.847.655 6.879 1.804M15 10a3 3 0 11-6 0 3 3 0 016 0zm6 2a9 9 0 11-18 0 9 9 0 0118 0z"}),perform:t=>t.push(`/node?alias=${encodeURIComponent(e.alias)}`)})),n=(s.tasks||[]).filter(e=>e.task_id).slice(0,15).map(e=>({id:`task-${e.task_id}`,title:`Open task: ${(e.content||e.task_id||"").slice(0,50)}`,hint:`${e.from_name||"?"} → ${e.to_name||"?"} \xb7 ${e.status||""}`,group:"Tasks",icon:(0,t.jsx)(j,{d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"}),perform:t=>t.push(`/tasks/${encodeURIComponent(e.task_id)}`)}));u([...r,...n])}catch{}})(),()=>{e=!0}},[s]);let p=(0,r.useMemo)(()=>{let e=[...w,...x];if(!l.trim()){let t=h.map(t=>e.find(e=>e.id===t)).filter(e=>!!e).map(e=>({...e,group:"Recents"})),a=new Set(h);return[...t,...w.filter(e=>!a.has(e.id))]}let t=e.map(e=>{let t=y(e.title,l),a=e.hint?y(e.hint,l):{score:-1,indices:[]},s=y(e.id,l);return{c:e,score:Math.max(t.score>=0?+t.score:-1/0,a.score>=0?.6*a.score:-1/0,s.score>=0?.3*s.score:-1/0),_titleHi:t.score>=0?t.indices:[],_hintHi:a.score>=0?a.indices:[]}}).filter(e=>e.score>-1/0);return t.sort((e,t)=>t.score-e.score),t.map(e=>({...e.c,_titleHi:e._titleHi,_hintHi:e._hintHi}))},[l,h,x]);if((0,r.useEffect)(()=>{i>=p.length&&c(0)},[p.length,i]),!s)return null;let g={};for(let e of p)(g[e.group]||=[]).push(e);let f=0;return(0,t.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":"Command palette",className:"anet-cmdk fixed inset-0 z-[100] flex items-start justify-center pt-[10vh] sm:pt-[15vh] px-4",onClick:()=>n(!1),onKeyDown:t=>{if("Escape"===t.key)return void n(!1);if("ArrowDown"===t.key){t.preventDefault(),c(e=>Math.min(e+1,p.length-1));return}if("ArrowUp"===t.key){t.preventDefault(),c(e=>Math.max(e-1,0));return}if("Enter"===t.key){t.preventDefault();let a=p[i];a&&(v(a.id),a.perform(e),n(!1))}},children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm","aria-hidden":!0}),(0,t.jsxs)("div",{className:"relative w-full max-w-xl rounded-xl border border-[#2a2a4a] bg-[#0d0d1a] shadow-2xl shadow-black/40 overflow-hidden",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 border-b border-[#2a2a4a] px-3 py-2.5",children:[(0,t.jsx)("svg",{width:"14",height:"14",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.5",className:"text-gray-500 shrink-0",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),(0,t.jsx)("input",{ref:d,value:l,onChange:e=>{o(e.target.value),c(0)},placeholder:"Type a command or search…",className:"flex-1 bg-transparent text-sm text-gray-200 placeholder-gray-600 focus:outline-none"}),(0,t.jsx)("kbd",{className:"text-[10px] text-gray-600 border border-[#2a2a4a] rounded px-1.5 py-0.5 font-mono",children:"esc"})]}),(0,t.jsx)("div",{className:"max-h-[60vh] overflow-y-auto py-2",children:0===p.length?(0,t.jsxs)("div",{className:"px-4 py-8 text-center text-xs text-gray-600",children:['No commands match "',l,'"']}):Object.entries(g).map(([a,s])=>(0,t.jsxs)("div",{className:"mb-2 last:mb-0",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-[0.12em] text-gray-600 px-3 py-1",children:a}),s.map(a=>{let s=f++,r=s===i;return(0,t.jsxs)("button",{onMouseEnter:()=>c(s),onClick:()=>{v(a.id),a.perform(e),n(!1)},className:`anet-cmdk-row w-full flex items-center gap-3 px-3 py-2 text-left text-sm ${r?"bg-cyan-500/10 text-cyan-300":"text-gray-300 hover:bg-[#1a1a2a]/50"}`,children:[(0,t.jsx)("span",{className:r?"text-cyan-400":"text-gray-500",children:a.icon}),(0,t.jsxs)("span",{className:"flex-1 min-w-0",children:[(0,t.jsx)("span",{className:"block truncate",children:(0,t.jsx)(k,{text:a.title,indices:a._titleHi||[]})}),a.hint&&(0,t.jsx)("span",{className:"block text-[11px] text-gray-600 truncate",children:(0,t.jsx)(k,{text:a.hint,indices:a._hintHi||[]})})]}),r&&(0,t.jsx)("span",{className:"text-[10px] text-gray-500",children:"↵"})]},a.id)})]},a))}),(0,t.jsxs)("div",{className:"border-t border-[#2a2a4a] px-3 py-1.5 flex items-center justify-between text-[10px] text-gray-600",children:[(0,t.jsxs)("span",{className:"flex items-center gap-3",children:[(0,t.jsxs)("span",{children:[(0,t.jsx)("kbd",{className:"font-mono",children:"↑↓"})," navigate"]}),(0,t.jsxs)("span",{children:[(0,t.jsx)("kbd",{className:"font-mono",children:"↵"})," select"]}),(0,t.jsxs)("span",{children:[(0,t.jsx)("kbd",{className:"font-mono",children:"esc"})," close"]})]}),(0,t.jsxs)("span",{children:[(0,t.jsx)("kbd",{className:"font-mono",children:"⌘K"})," toggle"]})]})]})]})}let M=[{group:"Global",items:[{keys:["⌘","K"],label:"Open command palette (also Ctrl+K)"},{keys:["/"],label:"Open command palette"},{keys:["?"],label:"Toggle this help overlay"},{keys:["Esc"],label:"Close any open modal"}]},{group:"Navigate (vim-style)",items:[{keys:["g","o"],label:"Go to Overview"},{keys:["g","t"],label:"Go to Tasks"},{keys:["g","n"],label:"Go to Nodes"},{keys:["g","m"],label:"Go to Messages"},{keys:["g","w"],label:"Go to Networks"},{keys:["g","a"],label:"Go to Admin"},{keys:["g","l"],label:"Go to Audit Log"},{keys:["g","s"],label:"Go to Settings"}]},{group:"Command palette",items:[{keys:["↑","↓"],label:"Move selection"},{keys:["↵"],label:"Activate selected command"},{keys:["type"],label:"Filter — searches commands, agents, tasks"}]},{group:"Topology canvas",items:[{keys:["+"],label:"Zoom in (also =)"},{keys:["−"],label:"Zoom out"},{keys:["0"],label:"Reset zoom + pan"},{keys:["f"],label:"Fit topology to canvas"},{keys:["l"],label:"Toggle layout (ring ↔ grid)"},{keys:["⌘","wheel"],label:"Zoom toward cursor (Ctrl on Windows/Linux)"},{keys:["drag"],label:"Pan the canvas (cursor → grabbing)"},{keys:["dbl-click"],label:"Reset zoom + pan (empty canvas only)"},{keys:["click"],label:"Open chat popover on a node (Esc to close)"},{keys:["click hub"],label:"Fit topology to canvas (R52)"},{keys:["hover legend"],label:"Highlight nodes of a status (R55)"},{keys:["hover signal"],label:"Highlight one flow edge (R56)"},{keys:["click chip"],label:"Pin a status filter (R60/R61)"},{keys:["Esc"],label:"Clear pinned filter (R62) — or close chat"},{keys:["click group"],label:"Pin a team focus (R63)"},{keys:["click ×"],label:"Clear one filter (R64) — Esc clears all"},{keys:["⌘","K"],label:'Pin / clear filters via palette → "Pin topology filter…" (R69)'},{keys:["⌘","K"],label:"Toggle layout / Fit canvas via palette (R74)"},{keys:["click pill"],label:"Clear filter — click anywhere on the pill body (R73)"},{keys:["hover chip"],label:'Brighten all active flows — hover "N active links" (R77)'}]}],C={o:"/",t:"/tasks",n:"/nodes",m:"/messages",w:"/settings/networks",a:"/admin",l:"/logs",s:"/settings"};function E(){let[e,s]=(0,r.useState)(!1),n=(0,a.useRouter)(),l=(0,r.useRef)(0);return((0,r.useEffect)(()=>{let t=t=>{let a=document.activeElement?.tagName,r="INPUT"===a||"TEXTAREA"===a||document.activeElement?.isContentEditable;if("?"===t.key&&!r){t.preventDefault(),s(e=>!e);return}if("Escape"===t.key&&e&&s(!1),!r&&!t.metaKey&&!t.ctrlKey&&!t.altKey){if("g"===t.key){l.current=Date.now();return}if(Date.now()-l.current<1500){let e=C[t.key.toLowerCase()];e&&(t.preventDefault(),l.current=0,n.push(e))}}};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e,n]),e)?(0,t.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":"Keyboard shortcuts",className:"anet-help fixed inset-0 z-[101] flex items-center justify-center px-4",onClick:()=>s(!1),children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm","aria-hidden":!0}),(0,t.jsxs)("div",{className:"relative w-full max-w-md rounded-xl border border-[#2a2a4a] bg-[#0d0d1a] shadow-2xl shadow-black/40 overflow-hidden",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"flex items-center justify-between border-b border-[#2a2a4a] px-4 py-2.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium text-gray-200",children:[(0,t.jsx)("svg",{width:"14",height:"14",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.5",className:"text-gray-500",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),"Keyboard shortcuts"]}),(0,t.jsx)("button",{onClick:()=>s(!1),"aria-label":"Close help",className:"text-gray-500 hover:text-gray-300 text-lg leading-none px-1",children:"×"})]}),(0,t.jsx)("div",{className:"px-4 py-3 max-h-[70vh] overflow-y-auto",children:M.map(e=>(0,t.jsxs)("div",{className:"mb-3 last:mb-0",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-[0.12em] text-gray-600 mb-1.5",children:e.group}),(0,t.jsx)("ul",{className:"space-y-1.5",children:e.items.map((e,a)=>(0,t.jsxs)("li",{className:"flex items-center gap-3 text-xs",children:[(0,t.jsx)("span",{className:"flex items-center gap-1",children:e.keys.map((e,a)=>(0,t.jsx)("kbd",{className:"text-[10px] font-mono border border-[#2a2a4a] rounded px-1.5 py-0.5 text-gray-400 bg-[#1a1a2a]/40",children:e},a))}),(0,t.jsx)("span",{className:"text-gray-400 flex-1",children:e.label})]},a))})]},e.group))}),(0,t.jsxs)("div",{className:"border-t border-[#2a2a4a] px-4 py-1.5 text-[10px] text-gray-600 flex items-center justify-between",children:[(0,t.jsxs)("span",{children:["Press ",(0,t.jsx)("kbd",{className:"font-mono",children:"?"})," to toggle"]}),(0,t.jsxs)("span",{children:["or ",(0,t.jsx)("kbd",{className:"font-mono",children:"esc"})," to close"]})]})]})]}):null}let S=async e=>{let t=await fetch(e);if(401===t.status)throw window.location.assign("/login"),Error("unauthorized");if(!t.ok)throw Error(`hub ${t.status}`);return t.json()};function _({pct:e,label:a}){let s=e>=85?{fill:"#ef4444",track:"rgb(239 68 68 / 0.16)"}:e>=60?{fill:"#f59e0b",track:"rgb(245 158 11 / 0.16)"}:{fill:"#10b981",track:"rgb(16 185 129 / 0.16)"},r=Math.max(0,Math.min(100,e));return(0,t.jsxs)("div",{className:"space-y-0.5",children:[(0,t.jsxs)("div",{className:"flex justify-between text-[10px] text-[var(--fg-muted)] font-mono",children:[(0,t.jsx)("span",{children:a}),(0,t.jsxs)("span",{className:"tabular-nums",children:[Math.round(r),"%"]})]}),(0,t.jsx)("div",{className:"h-1.5 rounded-full overflow-hidden",style:{background:s.track},children:(0,t.jsx)("div",{className:"h-full transition-[width] duration-300 ease-out",style:{width:`${r}%`,background:s.fill}})})]})}function A(){let[e,a]=(0,r.useState)(!1);(0,r.useEffect)(()=>{try{"1"===localStorage.getItem("anet-servers-drawer")&&a(!0)}catch{}},[]);let{data:s,error:l}=(0,n.default)(e?"/api/hub/servers":null,S,{refreshInterval:5e3,dedupingInterval:3e3}),o=s?.servers??[],i=s?.unavailable===!0,c=o.filter(e=>"online"===e.status).length,d=e&&!s&&!l;return(0,t.jsxs)("aside",{className:"fixed right-0 top-20 z-40 hidden lg:flex flex-col rounded-l-xl border border-r-0 shadow-xl shadow-black/30 anet-fade-in",style:{background:"var(--bg-secondary)",borderColor:"var(--border)",width:e?296:40,maxHeight:"calc(100vh - 6rem)",transition:"width 200ms ease-out"},"aria-label":"Servers panel",children:[(0,t.jsxs)("button",{onClick:()=>a(e=>{let t=!e;try{localStorage.setItem("anet-servers-drawer",t?"1":"0")}catch{}return t}),"aria-expanded":e,"aria-label":e?"Collapse servers panel":"Expand servers panel",className:"flex items-center gap-2 px-2.5 py-2 border-b text-[11px] font-semibold tracking-wide select-none",style:{color:"var(--fg)",borderColor:"var(--border)"},children:[(0,t.jsxs)("svg",{className:"w-4 h-4 shrink-0",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("rect",{x:"3",y:"4",width:"18",height:"6",rx:"1.5"}),(0,t.jsx)("rect",{x:"3",y:"14",width:"18",height:"6",rx:"1.5"}),(0,t.jsx)("circle",{cx:"7",cy:"7",r:"0.7",fill:"currentColor"}),(0,t.jsx)("circle",{cx:"7",cy:"17",r:"0.7",fill:"currentColor"})]}),e&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"flex-1 text-left",children:"Servers"}),(0,t.jsxs)("span",{className:"text-[10px] text-[var(--fg-muted)] font-mono",children:[c,"/",o.length]})]})]}),e&&(0,t.jsxs)("div",{className:"flex-1 min-h-0 overflow-y-auto px-2 py-2 space-y-2","data-servers-body":!0,children:[d&&(0,t.jsx)("div",{className:"text-[10px] text-[var(--fg-muted)] font-mono text-center py-4",children:"loading servers…"}),l&&!s&&(0,t.jsx)("div",{className:"rounded-md border px-2.5 py-2 text-[10px] font-mono",style:{background:"rgb(239 68 68 / 0.06)",borderColor:"rgb(239 68 68 / 0.25)",color:"#ef4444"},children:"hub unreachable · retrying every 5s"}),i&&(0,t.jsxs)("div",{className:"text-[10px] text-[var(--fg-muted)] font-mono text-center py-3 leading-relaxed",children:["host telemetry not available",(0,t.jsx)("br",{}),(0,t.jsx)("span",{className:"text-[var(--fg-dim)]",children:"upgrade commhub-server ≥ 0.8.1-preview.2"})]}),!d&&!l&&!i&&0===o.length&&(0,t.jsx)("div",{className:"text-[10px] text-[var(--fg-muted)] font-mono text-center py-4",children:"no servers reporting yet"}),o.map(e=>{let a="offline"===e.status,s=null!=e.cpu_load_1min&&e.cpu_cores>0?e.cpu_load_1min/e.cpu_cores*100:null,r=null!=e.mem_used_gb&&null!=e.mem_total_gb&&e.mem_total_gb>0?e.mem_used_gb/e.mem_total_gb*100:null;return(0,t.jsxs)("div",{className:"rounded-lg border px-2.5 py-2 space-y-1.5",style:{background:"var(--bg)",borderColor:"var(--border)",opacity:a?.55:1},title:e.ip?`${e.hostname} \xb7 ${e.ip}`:e.hostname,children:[(0,t.jsxs)("div",{className:"flex items-baseline justify-between gap-2",children:[(0,t.jsxs)("div",{className:"min-w-0 flex items-baseline gap-1.5",children:[(0,t.jsx)("span",{className:"font-mono text-[12px] font-semibold truncate",style:{color:"var(--fg)"},children:e.hostname}),e.note&&(0,t.jsxs)("span",{className:"text-[9px] text-[var(--fg-dim)]",children:["(",e.note,")"]})]}),(0,t.jsxs)("span",{className:"text-[10px] text-[var(--fg-muted)] font-mono tabular-nums shrink-0",children:[e.agent_count," agent",1===e.agent_count?"":"s"]})]}),!a&&null!=s&&(0,t.jsx)(_,{pct:s,label:`CPU ${e.cpu_load_1min.toFixed(2)}/${e.cpu_cores}`}),!a&&null!=r&&(0,t.jsx)(_,{pct:r,label:`RAM ${e.mem_used_gb.toFixed(1)}/${e.mem_total_gb.toFixed(1)}G`}),a&&(0,t.jsx)("div",{className:"text-[10px] text-[var(--fg-dim)] font-mono italic",children:"CPU n/a · RAM n/a · offline"})]},e.hostname)}),o.length>0&&(0,t.jsx)("div",{className:"pt-1 text-[9px] text-[var(--fg-dim)] font-mono text-center",children:"live · refreshing every 5s"})]})]})}let L=["/login"];e.s(["AppShell",0,function({children:e}){let s=(0,a.usePathname)();return L.includes(s)?(0,t.jsx)(t.Fragment,{children:e}):(0,t.jsxs)("div",{className:"flex min-h-screen",children:[(0,t.jsx)(h,{}),(0,t.jsxs)("main",{className:"flex-1 min-w-0 flex flex-col",children:[(0,t.jsx)(g,{}),(0,t.jsx)("div",{className:"flex-1 min-w-0",children:e})]}),(0,t.jsx)(N,{}),(0,t.jsx)(E,{}),(0,t.jsx)(A,{})]})}],22485)}]);
|
|
7
|
+
`,children:[(0,t.jsx)(x,{collapsed:h}),(0,t.jsx)("div",{className:"border-b border-[#2a2a4a]"}),!h&&j.length>0&&(0,t.jsxs)("div",{className:"px-2 py-3 border-b border-[#2a2a4a]",children:[(0,t.jsx)("div",{className:"px-3 text-[10px] text-gray-600 uppercase mb-2",children:"Networks"}),(0,t.jsx)("div",{className:"space-y-0.5 max-h-32 overflow-y-auto",children:j.map(e=>(0,t.jsxs)("button",{onClick:()=>{b(e.network_id),g(!1)},title:e.network_id,className:`w-full flex items-center gap-2 px-3 py-1.5 rounded-md text-xs transition-colors text-left ${f===e.network_id?"bg-cyan-500/10 text-cyan-300":"text-gray-500 hover:text-gray-300 hover:bg-[#1a1a2a]"}`,children:[(0,t.jsx)("span",{children:d[e.role||"member"]||"👤"}),(0,t.jsx)("span",{className:"truncate flex-1",children:e.network_name}),e.agentCount?(0,t.jsx)("span",{className:"shrink-0 tabular-nums text-[10px] text-gray-600",children:e.agentCount}):null]},e.network_id))})]}),(0,t.jsx)("div",{className:"pb-20",children:w}),(0,t.jsxs)("div",{className:"absolute bottom-0 left-0 right-0 border-t border-[#2a2a4a] bg-[#0d0d1a]",children:[(0,t.jsxs)("button",{onClick:()=>{window.dispatchEvent(new KeyboardEvent("keydown",{key:"k",metaKey:!0,ctrlKey:!0}))},title:h?"Quick search (⌘K)":void 0,className:`w-full flex items-center text-[11px] text-gray-600 hover:text-gray-400 hover:bg-[#1a1a2a] transition-colors ${h?"justify-center px-0 py-2.5":"justify-between gap-2 px-5 py-2"}`,"aria-label":"Open command palette",children:[(0,t.jsxs)("span",{className:`flex items-center ${h?"":"gap-2"}`,children:[(0,t.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),!h&&"Quick search"]}),!h&&(0,t.jsx)("kbd",{className:"text-[10px] border border-current rounded px-1 py-0.5 opacity-60 font-mono",children:"⌘K"})]}),(0,t.jsxs)("button",{onClick:async()=>{await fetch("/api/auth/logout",{method:"POST"}).catch(()=>{}),sessionStorage.removeItem("anet_v3_auth"),window.location.assign("/login")},title:h?"Sign out":void 0,className:`w-full flex items-center text-xs text-gray-500 hover:text-red-400 hover:bg-red-500/5 transition-colors ${h?"justify-center px-0 py-2.5":"gap-3 px-5 py-3"}`,children:[(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 9V5.25A2.25 2.25 0 0013.5 3h-6a2.25 2.25 0 00-2.25 2.25v13.5A2.25 2.25 0 007.5 21h6a2.25 2.25 0 002.25-2.25V15m3 0l3-3m0 0l-3-3m3 3H9"})}),!h&&"Sign out"]}),(0,t.jsxs)("div",{className:`flex items-center gap-2 ${h?"flex-col px-0 py-2":"px-3 py-2 justify-between"}`,children:[(0,t.jsx)(o.ThemeSwitcher,{compact:h}),(0,t.jsx)("button",{onClick:()=>u(!h),title:h?"Expand sidebar":"Collapse sidebar",className:"hidden lg:flex p-1.5 rounded text-gray-600 hover:text-gray-400 transition-colors","aria-label":h?"Expand sidebar":"Collapse sidebar",children:(0,t.jsx)("svg",{className:`w-4 h-4 transition-transform ${h?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19l-7-7 7-7"})})})]})]})]})]})}let m=e=>fetch(e).then(e=>e.ok?e.json():{sessions:[]});function x({collapsed:e}){let{data:a}=(0,n.default)("/api/hub/status",m,{refreshInterval:1e4,dedupingInterval:4e3}),r=a?.sessions||[],l=r.filter(e=>e.status&&"offline"!==e.status).length,o=r.length;return e?(0,t.jsx)(s.default,{href:"/",className:"block px-3 py-4 flex justify-center hover:opacity-80 transition-opacity","aria-label":"Agent Network — home",children:(0,t.jsx)(u,{size:32})}):(0,t.jsxs)(s.default,{href:"/",className:"block px-4 py-4 flex items-center gap-3 hover:bg-[#11112a]/40 transition-colors rounded-r-xl","aria-label":"Agent Network — home",children:[(0,t.jsx)(u,{size:32}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("div",{className:"text-white text-[13px] font-semibold leading-tight",children:"Agent Network"}),(0,t.jsxs)("div",{className:"text-[10px] text-gray-500 flex items-center gap-1.5 mt-0.5",children:[(0,t.jsx)("span",{className:`inline-block w-1.5 h-1.5 rounded-full ${l>0?"bg-emerald-400 anet-brand-pulse":"bg-gray-600"}`,"aria-hidden":!0}),0===o?(0,t.jsx)("span",{children:"waiting for agents"}):(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"text-gray-300 font-medium tabular-nums",children:l}),(0,t.jsxs)("span",{className:"text-gray-600",children:["/",o]})," online"]})]})]})]})}function u({size:e}){return(0,t.jsxs)("svg",{width:e,height:e,viewBox:"0 0 32 32","aria-hidden":!0,className:"shrink-0",children:[(0,t.jsx)("circle",{cx:"16",cy:"16",r:"10",fill:"none",stroke:"currentColor",strokeWidth:"1.5",opacity:"0.2",className:"text-cyan-400"}),(0,t.jsx)("line",{x1:"16",y1:"10",x2:"10",y2:"20",stroke:"currentColor",strokeWidth:"1",opacity:"0.45",className:"text-cyan-400"}),(0,t.jsx)("line",{x1:"16",y1:"10",x2:"22",y2:"20",stroke:"currentColor",strokeWidth:"1",opacity:"0.45",className:"text-cyan-400"}),(0,t.jsx)("line",{x1:"10",y1:"20",x2:"22",y2:"20",stroke:"currentColor",strokeWidth:"1",opacity:"0.45",className:"text-cyan-400"}),(0,t.jsx)("circle",{cx:"16",cy:"10",r:"2.5",fill:"currentColor",className:"text-cyan-400"}),(0,t.jsx)("circle",{cx:"10",cy:"20",r:"2.5",fill:"currentColor",className:"text-green-400"}),(0,t.jsx)("circle",{cx:"22",cy:"20",r:"2.5",fill:"currentColor",className:"text-violet-400"})]})}let p=async e=>{let t=await fetch(e);if(!t.ok)throw Error(String(t.status));return t.json()};function g(){let e,a,{data:l,error:o}=(0,n.default)("/api/hub/stats",p,{refreshInterval:15e3,dedupingInterval:5e3,shouldRetryOnError:!1}),{data:i,error:c}=(0,n.default)("/api/hub/health",p,{refreshInterval:15e3,dedupingInterval:5e3,shouldRetryOnError:!1}),[d,h]=(0,r.useState)(()=>"1"===sessionStorage.getItem("anet-hb-dismissed"));if(d)return null;let m=o&&c||i&&!1===i.ok,x=l?.tasks?.by_status?.find(e=>"failed"===e.status)?.count||0,u=l?.nodes?.total===0,g=null;if(m?(e="red",a="CommHub unreachable — agents may be offline",g={label:"Open Settings",href:"/settings"}):x>0?(e="amber",a=`${x} task${x>1?"s":""} failed recently`,g={label:"Review failures",href:"/tasks?status=failed"}):(u?(e="green",a="Waiting for first agent"):(e="green",a="All systems go"),g=null),"green"===e&&!l)return null;let f={red:"bg-red-500/8 border-red-500/25 text-red-300",amber:"bg-amber-500/8 border-amber-500/25 text-amber-300",green:"bg-emerald-500/6 border-emerald-500/20 text-emerald-300"}[e],b={red:"bg-red-400",amber:"bg-amber-400 anet-brand-pulse",green:"bg-emerald-400"}[e];return(0,t.jsxs)("div",{role:"status",className:`anet-health-banner sticky top-0 z-30 border-b ${f} pl-14 pr-3 sm:px-6 py-1.5 text-[12px] flex items-center justify-between gap-3 backdrop-blur-sm`,children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,t.jsx)("span",{className:`inline-block w-1.5 h-1.5 rounded-full shrink-0 ${b}`,"aria-hidden":!0}),(0,t.jsx)("span",{className:"truncate",children:a})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[g&&(0,t.jsxs)(s.default,{href:g.href,className:"text-[11px] font-medium underline-offset-2 hover:underline opacity-90 hover:opacity-100 hidden sm:inline",children:[g.label," →"]}),g&&(0,t.jsx)(s.default,{href:g.href,"aria-label":g.label,className:"sm:hidden text-[11px] font-medium opacity-90 hover:opacity-100",children:"→"}),(0,t.jsx)("button",{onClick:()=>{h(!0);try{sessionStorage.setItem("anet-hb-dismissed","1")}catch{}},"aria-label":"Dismiss banner",className:"opacity-50 hover:opacity-100 leading-none px-1",children:"×"})]})]})}let f="anet-cmdk-recents";function b(){try{let e=sessionStorage.getItem(f);return e?JSON.parse(e):[]}catch{return[]}}function v(e){try{let t=b().filter(t=>t!==e);t.unshift(e),sessionStorage.setItem(f,JSON.stringify(t.slice(0,4)))}catch{}}function y(e,t){if(!t)return{score:0,indices:[]};let a=e.toLowerCase(),s=t.toLowerCase(),r=0,n=0,l=0,o=0,i=[];for(;r<a.length&&n<s.length;)a[r]===s[n]?(l+=2+o,o++,i.push(r),(0===r||/[\s·:_/-]/.test(a[r-1]))&&(l+=4),n++):o=0,r++;return n<s.length?{score:-1,indices:[]}:{score:l-.05*Math.max(0,a.length-s.length),indices:i}}function k({text:e,indices:a}){if(!a.length)return(0,t.jsx)(t.Fragment,{children:e});let s=new Set(a),r=Array.from(e);return(0,t.jsx)(t.Fragment,{children:r.map((e,a)=>s.has(a)?(0,t.jsx)("mark",{className:"anet-cmdk-mark",children:e},a):(0,t.jsx)("span",{children:e},a))})}function j({d:e}){return(0,t.jsx)("svg",{width:"14",height:"14",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.5",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e})})}let w=[{id:"go-overview",title:"Go to Overview",hint:"Fleet at a glance",group:"Navigate",icon:(0,t.jsx)(j,{d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3"}),perform:e=>e.push("/")},{id:"go-tasks",title:"Go to Tasks",hint:"All task statuses",group:"Navigate",icon:(0,t.jsx)(j,{d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"}),perform:e=>e.push("/tasks")},{id:"go-tasks-failed",title:"Go to Failed tasks",hint:"Filter status=failed",group:"Navigate",icon:(0,t.jsx)(j,{d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"}),perform:e=>e.push("/tasks?status=failed")},{id:"go-nodes",title:"Go to Nodes",hint:"Agent fleet",group:"Navigate",icon:(0,t.jsx)(j,{d:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"}),perform:e=>e.push("/nodes")},{id:"go-messages",title:"Go to Messages",hint:"Inter-agent chat",group:"Navigate",icon:(0,t.jsx)(j,{d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"}),perform:e=>e.push("/messages")},{id:"go-networks",title:"Go to Networks",hint:"Manage networks",group:"Navigate",icon:(0,t.jsx)(j,{d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"}),perform:e=>e.push("/settings/networks")},{id:"go-logs",title:"Go to Audit Log",hint:"Register / login / actions",group:"Navigate",icon:(0,t.jsx)(j,{d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"}),perform:e=>e.push("/logs")},{id:"go-server-logs",title:"Go to Server Logs",hint:"CommHub stdout/stderr",group:"Navigate",icon:(0,t.jsx)(j,{d:"M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"}),perform:e=>e.push("/server-logs")},{id:"go-admin",title:"Go to Admin",hint:"Server overview + broadcast",group:"Navigate",icon:(0,t.jsx)(j,{d:"M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z"}),perform:e=>e.push("/admin")},{id:"go-settings",title:"Go to Settings",hint:"Connection / Account / Resources",group:"Navigate",icon:(0,t.jsx)(j,{d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),perform:e=>e.push("/settings")},{id:"act-toggle-theme",title:"Toggle theme",hint:"cyber ↔ light",group:"Actions",icon:(0,t.jsx)(j,{d:"M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"}),perform:()=>{let e=document.documentElement.getAttribute("data-theme")||"cyber",t="light"===e||"mint"===e?"cyber":"light";document.documentElement.setAttribute("data-theme",t);try{localStorage.setItem("anet-theme",t)}catch{}}},{id:"act-copy-url",title:"Copy current URL",hint:"page link to clipboard",group:"Actions",icon:(0,t.jsx)(j,{d:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"}),perform:()=>{try{navigator.clipboard.writeText(window.location.href)}catch{}}},{id:"act-sign-out",title:"Sign out",hint:"clear session",group:"Actions",icon:(0,t.jsx)(j,{d:"M15.75 9V5.25A2.25 2.25 0 0013.5 3h-6a2.25 2.25 0 00-2.25 2.25v13.5A2.25 2.25 0 007.5 21h6a2.25 2.25 0 002.25-2.25V15m3 0l3-3m0 0l-3-3m3 3H9"}),perform:()=>{fetch("/api/auth/logout",{method:"POST"}).catch(()=>{});try{sessionStorage.removeItem("anet_v3_auth")}catch{}window.location.assign("/login")}},{id:"act-help",title:"Show keyboard shortcuts",hint:"press ? — works on mobile too",group:"Actions",icon:(0,t.jsx)(j,{d:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}),perform:()=>{window.dispatchEvent(new KeyboardEvent("keydown",{key:"?"}))}},{id:"act-pin-working",title:"Pin topology filter: working",hint:"highlight working nodes only",group:"Actions",icon:(0,t.jsx)(j,{d:"M4 6h16M4 12h8m-8 6h16"}),perform:()=>{try{sessionStorage.setItem("anet-topo-pinned-status","working")}catch{}window.dispatchEvent(new CustomEvent("anet:topo-pin",{detail:{kind:"status",value:"working"}}))}},{id:"act-pin-idle",title:"Pin topology filter: idle",hint:"highlight idle (online) nodes only",group:"Actions",icon:(0,t.jsx)(j,{d:"M4 6h16M4 12h8m-8 6h16"}),perform:()=>{try{sessionStorage.setItem("anet-topo-pinned-status","idle")}catch{}window.dispatchEvent(new CustomEvent("anet:topo-pin",{detail:{kind:"status",value:"idle"}}))}},{id:"act-pin-offline",title:"Pin topology filter: offline",hint:"highlight offline / no-SSE nodes",group:"Actions",icon:(0,t.jsx)(j,{d:"M4 6h16M4 12h8m-8 6h16"}),perform:()=>{try{sessionStorage.setItem("anet-topo-pinned-status","offline")}catch{}window.dispatchEvent(new CustomEvent("anet:topo-pin",{detail:{kind:"status",value:"offline"}}))}},{id:"act-clear-topo-pins",title:"Clear topology filters",hint:"release pinned status + group",group:"Actions",icon:(0,t.jsx)(j,{d:"M6 18L18 6M6 6l12 12"}),perform:()=>{try{sessionStorage.removeItem("anet-topo-pinned-status"),sessionStorage.removeItem("anet-topo-pinned-group")}catch{}window.dispatchEvent(new CustomEvent("anet:topo-pin",{detail:{kind:"clear"}}))}},{id:"act-topo-toggle-layout",title:"Toggle topology layout",hint:"ring ↔ grid (or press `l`)",group:"Actions",icon:(0,t.jsx)(j,{d:"M4 4h6v6H4V4zm10 0h6v6h-6V4zM4 14h6v6H4v-6zm10 0h6v6h-6v-6z"}),perform:()=>{window.dispatchEvent(new CustomEvent("anet:topo-layout",{detail:{kind:"toggle"}}))}},{id:"act-topo-fit",title:"Fit topology to canvas",hint:"auto-zoom to content (or press `f`)",group:"Actions",icon:(0,t.jsx)(j,{d:"M4 8V4h4M16 4h4v4M20 16v4h-4M8 20H4v-4"}),perform:()=>{window.dispatchEvent(new CustomEvent("anet:topo-view",{detail:{kind:"fit"}}))}}];function N(){let e=(0,a.useRouter)(),[s,n]=(0,r.useState)(!1),[l,o]=(0,r.useState)(""),[i,c]=(0,r.useState)(0),d=(0,r.useRef)(null);(0,r.useEffect)(()=>{let e=e=>{if((e.metaKey||e.ctrlKey)&&"k"===e.key.toLowerCase()){e.preventDefault(),n(e=>!e);return}if("/"===e.key&&document.activeElement?.tagName!=="INPUT"&&document.activeElement?.tagName!=="TEXTAREA"&&!s){e.preventDefault(),n(!0);return}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[s]),(0,r.useEffect)(()=>{s&&(o(""),c(0),setTimeout(()=>d.current?.focus(),50))},[s]);let[h,m]=(0,r.useState)([]);(0,r.useEffect)(()=>{s&&m(b())},[s]);let[x,u]=(0,r.useState)([]);(0,r.useEffect)(()=>{if(!s)return;let e=!1;return(async()=>{try{let[a,s]=await Promise.all([fetch("/api/hub/status").then(e=>e.ok?e.json():{sessions:[]}),fetch("/api/hub/tasks?limit=20").then(e=>e.ok?e.json():{tasks:[]})]);if(e)return;let r=(a.sessions||[]).filter(e=>e.alias).slice(0,20).map(e=>({id:`agent-${e.alias}`,title:`Go to agent ${e.alias}`,hint:`${e.agent||"agent"} \xb7 ${e.status||"unknown"}`,group:"Agents",icon:(0,t.jsx)(j,{d:"M5.121 17.804A13.937 13.937 0 0112 16c2.5 0 4.847.655 6.879 1.804M15 10a3 3 0 11-6 0 3 3 0 016 0zm6 2a9 9 0 11-18 0 9 9 0 0118 0z"}),perform:t=>t.push(`/node?alias=${encodeURIComponent(e.alias)}`)})),n=(s.tasks||[]).filter(e=>e.task_id).slice(0,15).map(e=>({id:`task-${e.task_id}`,title:`Open task: ${(e.content||e.task_id||"").slice(0,50)}`,hint:`${e.from_name||"?"} → ${e.to_name||"?"} \xb7 ${e.status||""}`,group:"Tasks",icon:(0,t.jsx)(j,{d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"}),perform:t=>t.push(`/tasks/${encodeURIComponent(e.task_id)}`)}));u([...r,...n])}catch{}})(),()=>{e=!0}},[s]);let p=(0,r.useMemo)(()=>{let e=[...w,...x];if(!l.trim()){let t=h.map(t=>e.find(e=>e.id===t)).filter(e=>!!e).map(e=>({...e,group:"Recents"})),a=new Set(h);return[...t,...w.filter(e=>!a.has(e.id))]}let t=e.map(e=>{let t=y(e.title,l),a=e.hint?y(e.hint,l):{score:-1,indices:[]},s=y(e.id,l);return{c:e,score:Math.max(t.score>=0?+t.score:-1/0,a.score>=0?.6*a.score:-1/0,s.score>=0?.3*s.score:-1/0),_titleHi:t.score>=0?t.indices:[],_hintHi:a.score>=0?a.indices:[]}}).filter(e=>e.score>-1/0);return t.sort((e,t)=>t.score-e.score),t.map(e=>({...e.c,_titleHi:e._titleHi,_hintHi:e._hintHi}))},[l,h,x]);if((0,r.useEffect)(()=>{i>=p.length&&c(0)},[p.length,i]),!s)return null;let g={};for(let e of p)(g[e.group]||=[]).push(e);let f=0;return(0,t.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":"Command palette",className:"anet-cmdk fixed inset-0 z-[100] flex items-start justify-center pt-[10vh] sm:pt-[15vh] px-4",onClick:()=>n(!1),onKeyDown:t=>{if("Escape"===t.key)return void n(!1);if("ArrowDown"===t.key){t.preventDefault(),c(e=>Math.min(e+1,p.length-1));return}if("ArrowUp"===t.key){t.preventDefault(),c(e=>Math.max(e-1,0));return}if("Enter"===t.key){t.preventDefault();let a=p[i];a&&(v(a.id),a.perform(e),n(!1))}},children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm","aria-hidden":!0}),(0,t.jsxs)("div",{className:"relative w-full max-w-xl rounded-xl border border-[#2a2a4a] bg-[#0d0d1a] shadow-2xl shadow-black/40 overflow-hidden",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 border-b border-[#2a2a4a] px-3 py-2.5",children:[(0,t.jsx)("svg",{width:"14",height:"14",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.5",className:"text-gray-500 shrink-0",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),(0,t.jsx)("input",{ref:d,value:l,onChange:e=>{o(e.target.value),c(0)},placeholder:"Type a command or search…",className:"flex-1 bg-transparent text-sm text-gray-200 placeholder-gray-600 focus:outline-none"}),(0,t.jsx)("kbd",{className:"text-[10px] text-gray-600 border border-[#2a2a4a] rounded px-1.5 py-0.5 font-mono",children:"esc"})]}),(0,t.jsx)("div",{className:"max-h-[60vh] overflow-y-auto py-2",children:0===p.length?(0,t.jsxs)("div",{className:"px-4 py-8 text-center text-xs text-gray-600",children:['No commands match "',l,'"']}):Object.entries(g).map(([a,s])=>(0,t.jsxs)("div",{className:"mb-2 last:mb-0",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-[0.12em] text-gray-600 px-3 py-1",children:a}),s.map(a=>{let s=f++,r=s===i;return(0,t.jsxs)("button",{onMouseEnter:()=>c(s),onClick:()=>{v(a.id),a.perform(e),n(!1)},className:`anet-cmdk-row w-full flex items-center gap-3 px-3 py-2 text-left text-sm ${r?"bg-cyan-500/10 text-cyan-300":"text-gray-300 hover:bg-[#1a1a2a]/50"}`,children:[(0,t.jsx)("span",{className:r?"text-cyan-400":"text-gray-500",children:a.icon}),(0,t.jsxs)("span",{className:"flex-1 min-w-0",children:[(0,t.jsx)("span",{className:"block truncate",children:(0,t.jsx)(k,{text:a.title,indices:a._titleHi||[]})}),a.hint&&(0,t.jsx)("span",{className:"block text-[11px] text-gray-600 truncate",children:(0,t.jsx)(k,{text:a.hint,indices:a._hintHi||[]})})]}),r&&(0,t.jsx)("span",{className:"text-[10px] text-gray-500",children:"↵"})]},a.id)})]},a))}),(0,t.jsxs)("div",{className:"border-t border-[#2a2a4a] px-3 py-1.5 flex items-center justify-between text-[10px] text-gray-600",children:[(0,t.jsxs)("span",{className:"flex items-center gap-3",children:[(0,t.jsxs)("span",{children:[(0,t.jsx)("kbd",{className:"font-mono",children:"↑↓"})," navigate"]}),(0,t.jsxs)("span",{children:[(0,t.jsx)("kbd",{className:"font-mono",children:"↵"})," select"]}),(0,t.jsxs)("span",{children:[(0,t.jsx)("kbd",{className:"font-mono",children:"esc"})," close"]})]}),(0,t.jsxs)("span",{children:[(0,t.jsx)("kbd",{className:"font-mono",children:"⌘K"})," toggle"]})]})]})]})}let M=[{group:"Global",items:[{keys:["⌘","K"],label:"Open command palette (also Ctrl+K)"},{keys:["/"],label:"Open command palette"},{keys:["?"],label:"Toggle this help overlay"},{keys:["Esc"],label:"Close any open modal"}]},{group:"Navigate (vim-style)",items:[{keys:["g","o"],label:"Go to Overview"},{keys:["g","t"],label:"Go to Tasks"},{keys:["g","n"],label:"Go to Nodes"},{keys:["g","m"],label:"Go to Messages"},{keys:["g","w"],label:"Go to Networks"},{keys:["g","a"],label:"Go to Admin"},{keys:["g","l"],label:"Go to Audit Log"},{keys:["g","s"],label:"Go to Settings"}]},{group:"Command palette",items:[{keys:["↑","↓"],label:"Move selection"},{keys:["↵"],label:"Activate selected command"},{keys:["type"],label:"Filter — searches commands, agents, tasks"}]},{group:"Topology canvas",items:[{keys:["+"],label:"Zoom in (also =)"},{keys:["−"],label:"Zoom out"},{keys:["0"],label:"Reset zoom + pan"},{keys:["f"],label:"Fit topology to canvas"},{keys:["l"],label:"Toggle layout (ring ↔ grid)"},{keys:["⌘","wheel"],label:"Zoom toward cursor (Ctrl on Windows/Linux)"},{keys:["drag"],label:"Pan the canvas (cursor → grabbing)"},{keys:["dbl-click"],label:"Reset zoom + pan (empty canvas only)"},{keys:["click"],label:"Open chat popover on a node (Esc to close)"},{keys:["click hub"],label:"Fit topology to canvas (R52)"},{keys:["hover legend"],label:"Highlight nodes of a status (R55)"},{keys:["hover signal"],label:"Highlight one flow edge (R56)"},{keys:["click chip"],label:"Pin a status filter (R60/R61)"},{keys:["Esc"],label:"Clear pinned filter (R62) — or close chat"},{keys:["click group"],label:"Pin a team focus (R63)"},{keys:["click ×"],label:"Clear one filter (R64) — Esc clears all"},{keys:["⌘","K"],label:'Pin / clear filters via palette → "Pin topology filter…" (R69)'},{keys:["⌘","K"],label:"Toggle layout / Fit canvas via palette (R74)"},{keys:["click pill"],label:"Clear filter — click anywhere on the pill body (R73)"},{keys:["hover chip"],label:'Brighten all active flows — hover "N active links" (R77)'},{keys:["hover N working"],label:"Highlight working nodes — chip-row sibling of legend (R79)"},{keys:["hover vendor"],label:"Highlight one vendor — hover A/O/书/? in the chip row (R80)"}]}],C={o:"/",t:"/tasks",n:"/nodes",m:"/messages",w:"/settings/networks",a:"/admin",l:"/logs",s:"/settings"};function E(){let[e,s]=(0,r.useState)(!1),n=(0,a.useRouter)(),l=(0,r.useRef)(0);return((0,r.useEffect)(()=>{let t=t=>{let a=document.activeElement?.tagName,r="INPUT"===a||"TEXTAREA"===a||document.activeElement?.isContentEditable;if("?"===t.key&&!r){t.preventDefault(),s(e=>!e);return}if("Escape"===t.key&&e&&s(!1),!r&&!t.metaKey&&!t.ctrlKey&&!t.altKey){if("g"===t.key){l.current=Date.now();return}if(Date.now()-l.current<1500){let e=C[t.key.toLowerCase()];e&&(t.preventDefault(),l.current=0,n.push(e))}}};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e,n]),e)?(0,t.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":"Keyboard shortcuts",className:"anet-help fixed inset-0 z-[101] flex items-center justify-center px-4",onClick:()=>s(!1),children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm","aria-hidden":!0}),(0,t.jsxs)("div",{className:"relative w-full max-w-md rounded-xl border border-[#2a2a4a] bg-[#0d0d1a] shadow-2xl shadow-black/40 overflow-hidden",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"flex items-center justify-between border-b border-[#2a2a4a] px-4 py-2.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium text-gray-200",children:[(0,t.jsx)("svg",{width:"14",height:"14",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.5",className:"text-gray-500",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),"Keyboard shortcuts"]}),(0,t.jsx)("button",{onClick:()=>s(!1),"aria-label":"Close help",className:"text-gray-500 hover:text-gray-300 text-lg leading-none px-1",children:"×"})]}),(0,t.jsx)("div",{className:"px-4 py-3 max-h-[70vh] overflow-y-auto",children:M.map(e=>(0,t.jsxs)("div",{className:"mb-3 last:mb-0",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-[0.12em] text-gray-600 mb-1.5",children:e.group}),(0,t.jsx)("ul",{className:"space-y-1.5",children:e.items.map((e,a)=>(0,t.jsxs)("li",{className:"flex items-center gap-3 text-xs",children:[(0,t.jsx)("span",{className:"flex items-center gap-1",children:e.keys.map((e,a)=>(0,t.jsx)("kbd",{className:"text-[10px] font-mono border border-[#2a2a4a] rounded px-1.5 py-0.5 text-gray-400 bg-[#1a1a2a]/40",children:e},a))}),(0,t.jsx)("span",{className:"text-gray-400 flex-1",children:e.label})]},a))})]},e.group))}),(0,t.jsxs)("div",{className:"border-t border-[#2a2a4a] px-4 py-1.5 text-[10px] text-gray-600 flex items-center justify-between",children:[(0,t.jsxs)("span",{children:["Press ",(0,t.jsx)("kbd",{className:"font-mono",children:"?"})," to toggle"]}),(0,t.jsxs)("span",{children:["or ",(0,t.jsx)("kbd",{className:"font-mono",children:"esc"})," to close"]})]})]})]}):null}let S=async e=>{let t=await fetch(e);if(401===t.status)throw window.location.assign("/login"),Error("unauthorized");if(!t.ok)throw Error(`hub ${t.status}`);return t.json()};function _({pct:e,label:a}){let s=e>=85?{fill:"#ef4444",track:"rgb(239 68 68 / 0.16)"}:e>=60?{fill:"#f59e0b",track:"rgb(245 158 11 / 0.16)"}:{fill:"#10b981",track:"rgb(16 185 129 / 0.16)"},r=Math.max(0,Math.min(100,e));return(0,t.jsxs)("div",{className:"space-y-0.5",children:[(0,t.jsxs)("div",{className:"flex justify-between text-[10px] text-[var(--fg-muted)] font-mono",children:[(0,t.jsx)("span",{children:a}),(0,t.jsxs)("span",{className:"tabular-nums",children:[Math.round(r),"%"]})]}),(0,t.jsx)("div",{className:"h-1.5 rounded-full overflow-hidden",style:{background:s.track},children:(0,t.jsx)("div",{className:"h-full transition-[width] duration-300 ease-out",style:{width:`${r}%`,background:s.fill}})})]})}function A(){let[e,a]=(0,r.useState)(!1);(0,r.useEffect)(()=>{try{"1"===localStorage.getItem("anet-servers-drawer")&&a(!0)}catch{}},[]);let{data:s,error:l}=(0,n.default)(e?"/api/hub/servers":null,S,{refreshInterval:5e3,dedupingInterval:3e3}),o=s?.servers??[],i=s?.unavailable===!0,c=o.filter(e=>"online"===e.status).length,d=e&&!s&&!l;return(0,t.jsxs)("aside",{className:"fixed right-0 top-20 z-40 hidden lg:flex flex-col rounded-l-xl border border-r-0 shadow-xl shadow-black/30 anet-fade-in",style:{background:"var(--bg-secondary)",borderColor:"var(--border)",width:e?296:40,maxHeight:"calc(100vh - 6rem)",transition:"width 200ms ease-out"},"aria-label":"Servers panel",children:[(0,t.jsxs)("button",{onClick:()=>a(e=>{let t=!e;try{localStorage.setItem("anet-servers-drawer",t?"1":"0")}catch{}return t}),"aria-expanded":e,"aria-label":e?"Collapse servers panel":"Expand servers panel",className:"flex items-center gap-2 px-2.5 py-2 border-b text-[11px] font-semibold tracking-wide select-none",style:{color:"var(--fg)",borderColor:"var(--border)"},children:[(0,t.jsxs)("svg",{className:"w-4 h-4 shrink-0",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("rect",{x:"3",y:"4",width:"18",height:"6",rx:"1.5"}),(0,t.jsx)("rect",{x:"3",y:"14",width:"18",height:"6",rx:"1.5"}),(0,t.jsx)("circle",{cx:"7",cy:"7",r:"0.7",fill:"currentColor"}),(0,t.jsx)("circle",{cx:"7",cy:"17",r:"0.7",fill:"currentColor"})]}),e&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"flex-1 text-left",children:"Servers"}),(0,t.jsxs)("span",{className:"text-[10px] text-[var(--fg-muted)] font-mono",children:[c,"/",o.length]})]})]}),e&&(0,t.jsxs)("div",{className:"flex-1 min-h-0 overflow-y-auto px-2 py-2 space-y-2","data-servers-body":!0,children:[d&&(0,t.jsx)("div",{className:"text-[10px] text-[var(--fg-muted)] font-mono text-center py-4",children:"loading servers…"}),l&&!s&&(0,t.jsx)("div",{className:"rounded-md border px-2.5 py-2 text-[10px] font-mono",style:{background:"rgb(239 68 68 / 0.06)",borderColor:"rgb(239 68 68 / 0.25)",color:"#ef4444"},children:"hub unreachable · retrying every 5s"}),i&&(0,t.jsxs)("div",{className:"text-[10px] text-[var(--fg-muted)] font-mono text-center py-3 leading-relaxed",children:["host telemetry not available",(0,t.jsx)("br",{}),(0,t.jsx)("span",{className:"text-[var(--fg-dim)]",children:"upgrade commhub-server ≥ 0.8.1-preview.2"})]}),!d&&!l&&!i&&0===o.length&&(0,t.jsx)("div",{className:"text-[10px] text-[var(--fg-muted)] font-mono text-center py-4",children:"no servers reporting yet"}),o.map(e=>{let a="offline"===e.status,s=null!=e.cpu_load_1min&&e.cpu_cores>0?e.cpu_load_1min/e.cpu_cores*100:null,r=null!=e.mem_used_gb&&null!=e.mem_total_gb&&e.mem_total_gb>0?e.mem_used_gb/e.mem_total_gb*100:null;return(0,t.jsxs)("div",{className:"rounded-lg border px-2.5 py-2 space-y-1.5",style:{background:"var(--bg)",borderColor:"var(--border)",opacity:a?.55:1},title:e.ip?`${e.hostname} \xb7 ${e.ip}`:e.hostname,children:[(0,t.jsxs)("div",{className:"flex items-baseline justify-between gap-2",children:[(0,t.jsxs)("div",{className:"min-w-0 flex items-baseline gap-1.5",children:[(0,t.jsx)("span",{className:"font-mono text-[12px] font-semibold truncate",style:{color:"var(--fg)"},children:e.hostname}),e.note&&(0,t.jsxs)("span",{className:"text-[9px] text-[var(--fg-dim)]",children:["(",e.note,")"]})]}),(0,t.jsxs)("span",{className:"text-[10px] text-[var(--fg-muted)] font-mono tabular-nums shrink-0",children:[e.agent_count," agent",1===e.agent_count?"":"s"]})]}),!a&&null!=s&&(0,t.jsx)(_,{pct:s,label:`CPU ${e.cpu_load_1min.toFixed(2)}/${e.cpu_cores}`}),!a&&null!=r&&(0,t.jsx)(_,{pct:r,label:`RAM ${e.mem_used_gb.toFixed(1)}/${e.mem_total_gb.toFixed(1)}G`}),a&&(0,t.jsx)("div",{className:"text-[10px] text-[var(--fg-dim)] font-mono italic",children:"CPU n/a · RAM n/a · offline"})]},e.hostname)}),o.length>0&&(0,t.jsx)("div",{className:"pt-1 text-[9px] text-[var(--fg-dim)] font-mono text-center",children:"live · refreshing every 5s"})]})]})}let L=["/login"];e.s(["AppShell",0,function({children:e}){let s=(0,a.usePathname)();return L.includes(s)?(0,t.jsx)(t.Fragment,{children:e}):(0,t.jsxs)("div",{className:"flex min-h-screen",children:[(0,t.jsx)(h,{}),(0,t.jsxs)("main",{className:"flex-1 min-w-0 flex flex-col",children:[(0,t.jsx)(g,{}),(0,t.jsx)("div",{className:"flex-1 min-w-0",children:e})]}),(0,t.jsx)(N,{}),(0,t.jsx)(E,{}),(0,t.jsx)(A,{})]})}],22485)}]);
|
package/.next/trace
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
[{"name":"generate-buildid","duration":334,"timestamp":35188476490,"id":4,"parentId":1,"tags":{},"startTime":1778843160723,"traceId":"a673d107e95cfece"},{"name":"load-custom-routes","duration":461,"timestamp":35188477019,"id":5,"parentId":1,"tags":{},"startTime":1778843160723,"traceId":"a673d107e95cfece"},{"name":"create-dist-dir","duration":653,"timestamp":35188477524,"id":6,"parentId":1,"tags":{},"startTime":1778843160724,"traceId":"a673d107e95cfece"},{"name":"clean","duration":477,"timestamp":35188478805,"id":7,"parentId":1,"tags":{},"startTime":1778843160725,"traceId":"a673d107e95cfece"},{"name":"discover-routes","duration":10006,"timestamp":35188572103,"id":8,"parentId":1,"tags":{},"startTime":1778843160818,"traceId":"a673d107e95cfece"},{"name":"create-root-mapping","duration":131,"timestamp":35188582166,"id":9,"parentId":1,"tags":{},"startTime":1778843160828,"traceId":"a673d107e95cfece"},{"name":"generate-route-types","duration":34142,"timestamp":35188585219,"id":10,"parentId":1,"tags":{},"startTime":1778843160831,"traceId":"a673d107e95cfece"},{"name":"public-dir-conflict-check","duration":99,"timestamp":35188619520,"id":11,"parentId":1,"tags":{},"startTime":1778843160866,"traceId":"a673d107e95cfece"},{"name":"generate-routes-manifest","duration":5030,"timestamp":35188619750,"id":12,"parentId":1,"tags":{},"startTime":1778843160866,"traceId":"a673d107e95cfece"},{"name":"run-turbopack","duration":5933866,"timestamp":35188630874,"id":14,"parentId":1,"tags":{},"startTime":1778843160877,"traceId":"a673d107e95cfece"},{"name":"turbopack-build-events","duration":77,"timestamp":35188939678,"id":15,"parentId":1,"tags":{},"startTime":1778843161186,"traceId":"a673d107e95cfece"},{"name":"run-typescript","duration":8478664,"timestamp":35194573044,"id":16,"parentId":1,"tags":{},"startTime":1778843166819,"traceId":"a673d107e95cfece"},{"name":"generate-required-server-files","duration":2398,"timestamp":35203053090,"id":18,"parentId":1,"tags":{},"startTime":1778843175299,"traceId":"a673d107e95cfece"},{"name":"check-static-error-page","duration":16595,"timestamp":35203229557,"id":20,"parentId":19,"tags":{},"startTime":1778843175476,"traceId":"a673d107e95cfece"},{"name":"is-page-static","duration":424951,"timestamp":35203249101,"id":63,"parentId":22,"tags":{},"startTime":1778843175495,"traceId":"a673d107e95cfece"},{"name":"check-page","duration":441223,"timestamp":35203232979,"id":22,"parentId":19,"tags":{"page":"/_global-error"},"startTime":1778843175479,"traceId":"a673d107e95cfece"},{"name":"is-page-static","duration":502431,"timestamp":35203249207,"id":64,"parentId":25,"tags":{},"startTime":1778843175495,"traceId":"a673d107e95cfece"},{"name":"check-page","duration":515271,"timestamp":35203236463,"id":25,"parentId":19,"tags":{"page":"/api/auth/login"},"startTime":1778843175483,"traceId":"a673d107e95cfece"},{"name":"is-page-static","duration":522870,"timestamp":35203250090,"id":69,"parentId":30,"tags":{},"startTime":1778843175496,"traceId":"a673d107e95cfece"},{"name":"check-page","duration":535751,"timestamp":35203237302,"id":30,"parentId":19,"tags":{"page":"/api/hub/broadcast"},"startTime":1778843175484,"traceId":"a673d107e95cfece"},{"name":"is-page-static","duration":532739,"timestamp":35203249748,"id":67,"parentId":28,"tags":{},"startTime":1778843175496,"traceId":"a673d107e95cfece"},{"name":"check-page","duration":545624,"timestamp":35203236939,"id":28,"parentId":19,"tags":{"page":"/api/hub/audit-log"},"startTime":1778843175483,"traceId":"a673d107e95cfece"},{"name":"is-page-static","duration":532474,"timestamp":35203250316,"id":70,"parentId":32,"tags":{},"startTime":1778843175497,"traceId":"a673d107e95cfece"},{"name":"check-page","duration":545055,"timestamp":35203237777,"id":32,"parentId":19,"tags":{"page":"/api/hub/health"},"startTime":1778843175484,"traceId":"a673d107e95cfece"},{"name":"is-page-static","duration":545783,"timestamp":35203250469,"id":72,"parentId":34,"tags":{},"startTime":1778843175497,"traceId":"a673d107e95cfece"},{"name":"check-page","duration":558192,"timestamp":35203238122,"id":34,"parentId":19,"tags":{"page":"/api/hub/license"},"startTime":1778843175484,"traceId":"a673d107e95cfece"},{"name":"is-page-static","duration":546093,"timestamp":35203250502,"id":73,"parentId":35,"tags":{},"startTime":1778843175497,"traceId":"a673d107e95cfece"},{"name":"check-page","duration":558325,"timestamp":35203238303,"id":35,"parentId":19,"tags":{"page":"/api/hub/messages"},"startTime":1778843175485,"traceId":"a673d107e95cfece"},{"name":"is-page-static","duration":562366,"timestamp":35203250626,"id":74,"parentId":36,"tags":{},"startTime":1778843175497,"traceId":"a673d107e95cfece"},{"name":"check-page","duration":574269,"timestamp":35203238824,"id":36,"parentId":19,"tags":{"page":"/api/hub/networks"},"startTime":1778843175485,"traceId":"a673d107e95cfece"},{"name":"is-page-static","duration":563029,"timestamp":35203250659,"id":75,"parentId":37,"tags":{},"startTime":1778843175497,"traceId":"a673d107e95cfece"},{"name":"check-page","duration":574695,"timestamp":35203239058,"id":37,"parentId":19,"tags":{"page":"/api/hub/nodes"},"startTime":1778843175485,"traceId":"a673d107e95cfece"},{"name":"is-page-static","duration":564298,"timestamp":35203250388,"id":71,"parentId":33,"tags":{},"startTime":1778843175497,"traceId":"a673d107e95cfece"},{"name":"check-page","duration":576788,"timestamp":35203237948,"id":33,"parentId":19,"tags":{"page":"/api/hub/inbox"},"startTime":1778843175484,"traceId":"a673d107e95cfece"},{"name":"is-page-static","duration":567713,"timestamp":35203250688,"id":77,"parentId":39,"tags":{},"startTime":1778843175497,"traceId":"a673d107e95cfece"},{"name":"check-page","duration":579061,"timestamp":35203239389,"id":39,"parentId":19,"tags":{"page":"/api/hub/send"},"startTime":1778843175486,"traceId":"a673d107e95cfece"},{"name":"is-page-static","duration":572499,"timestamp":35203250700,"id":78,"parentId":40,"tags":{},"startTime":1778843175497,"traceId":"a673d107e95cfece"},{"name":"check-page","duration":583731,"timestamp":35203239517,"id":40,"parentId":19,"tags":{"page":"/api/hub/server-logs"},"startTime":1778843175486,"traceId":"a673d107e95cfece"},{"name":"is-page-static","duration":574022,"timestamp":35203249454,"id":66,"parentId":27,"tags":{},"startTime":1778843175496,"traceId":"a673d107e95cfece"},{"name":"check-page","duration":586727,"timestamp":35203236795,"id":27,"parentId":19,"tags":{"page":"/api/auth/v3"},"startTime":1778843175483,"traceId":"a673d107e95cfece"},{"name":"is-page-static","duration":574387,"timestamp":35203249339,"id":65,"parentId":26,"tags":{},"startTime":1778843175496,"traceId":"a673d107e95cfece"},{"name":"check-page","duration":587112,"timestamp":35203236648,"id":26,"parentId":19,"tags":{"page":"/api/auth/logout"},"startTime":1778843175483,"traceId":"a673d107e95cfece"},{"name":"is-page-static","duration":567789,"timestamp":35203256143,"id":79,"parentId":41,"tags":{},"startTime":1778843175502,"traceId":"a673d107e95cfece"},{"name":"check-page","duration":584330,"timestamp":35203239635,"id":41,"parentId":19,"tags":{"page":"/api/hub/servers"},"startTime":1778843175486,"traceId":"a673d107e95cfece"},{"name":"is-page-static","duration":574424,"timestamp":35203250676,"id":76,"parentId":38,"tags":{},"startTime":1778843175497,"traceId":"a673d107e95cfece"},{"name":"check-page","duration":585895,"timestamp":35203239241,"id":38,"parentId":19,"tags":{"page":"/api/hub/register"},"startTime":1778843175486,"traceId":"a673d107e95cfece"},{"name":"is-page-static","duration":570535,"timestamp":35203256179,"id":80,"parentId":42,"tags":{},"startTime":1778843175502,"traceId":"a673d107e95cfece"},{"name":"check-page","duration":586992,"timestamp":35203239771,"id":42,"parentId":19,"tags":{"page":"/api/hub/session"},"startTime":1778843175486,"traceId":"a673d107e95cfece"},{"name":"is-page-static","duration":571898,"timestamp":35203256224,"id":83,"parentId":45,"tags":{},"startTime":1778843175502,"traceId":"a673d107e95cfece"},{"name":"check-page","duration":587996,"timestamp":35203240166,"id":45,"parentId":19,"tags":{"page":"/api/hub/task-events"},"startTime":1778843175486,"traceId":"a673d107e95cfece"},{"name":"is-page-static","duration":573684,"timestamp":35203256240,"id":84,"parentId":46,"tags":{},"startTime":1778843175503,"traceId":"a673d107e95cfece"},{"name":"check-page","duration":589672,"timestamp":35203240295,"id":46,"parentId":19,"tags":{"page":"/api/hub/tasks"},"startTime":1778843175487,"traceId":"a673d107e95cfece"},{"name":"is-page-static","duration":574648,"timestamp":35203256252,"id":85,"parentId":47,"tags":{},"startTime":1778843175503,"traceId":"a673d107e95cfece"},{"name":"check-page","duration":590490,"timestamp":35203240453,"id":47,"parentId":19,"tags":{"page":"/api/hub/tmux"},"startTime":1778843175487,"traceId":"a673d107e95cfece"},{"name":"is-page-static","duration":575463,"timestamp":35203256642,"id":86,"parentId":48,"tags":{},"startTime":1778843175503,"traceId":"a673d107e95cfece"},{"name":"check-page","duration":591569,"timestamp":35203240583,"id":48,"parentId":19,"tags":{"page":"/api/hub/tokens"},"startTime":1778843175487,"traceId":"a673d107e95cfece"},{"name":"is-page-static","duration":570652,"timestamp":35203265929,"id":88,"parentId":24,"tags":{},"startTime":1778843175512,"traceId":"a673d107e95cfece"},{"name":"check-page","duration":603280,"timestamp":35203233639,"id":24,"parentId":19,"tags":{"page":"/api/anet/config"},"startTime":1778843175480,"traceId":"a673d107e95cfece"},{"name":"is-page-static","duration":587871,"timestamp":35203249916,"id":68,"parentId":29,"tags":{},"startTime":1778843175496,"traceId":"a673d107e95cfece"},{"name":"check-page","duration":600717,"timestamp":35203237115,"id":29,"parentId":19,"tags":{"page":"/api/hub/auth"},"startTime":1778843175483,"traceId":"a673d107e95cfece"},{"name":"is-page-static","duration":574187,"timestamp":35203267145,"id":89,"parentId":31,"tags":{},"startTime":1778843175513,"traceId":"a673d107e95cfece"},{"name":"check-page","duration":603954,"timestamp":35203237453,"id":31,"parentId":19,"tags":{"page":"/api/hub/events"},"startTime":1778843175484,"traceId":"a673d107e95cfece"},{"name":"is-page-static","duration":588947,"timestamp":35203256687,"id":87,"parentId":49,"tags":{},"startTime":1778843175503,"traceId":"a673d107e95cfece"},{"name":"check-page","duration":604974,"timestamp":35203240708,"id":49,"parentId":19,"tags":{"page":"/favicon.ico"},"startTime":1778843175487,"traceId":"a673d107e95cfece"},{"name":"is-page-static","duration":614818,"timestamp":35203248766,"id":62,"parentId":21,"tags":{},"startTime":1778843175495,"traceId":"a673d107e95cfece"},{"name":"check-page","duration":632324,"timestamp":35203231318,"id":21,"parentId":19,"tags":{"page":"/_not-found"},"startTime":1778843175478,"traceId":"a673d107e95cfece"},{"name":"is-page-static","duration":612870,"timestamp":35203256209,"id":82,"parentId":44,"tags":{},"startTime":1778843175502,"traceId":"a673d107e95cfece"},{"name":"check-page","duration":629113,"timestamp":35203240028,"id":44,"parentId":19,"tags":{"page":"/api/hub/status"},"startTime":1778843175486,"traceId":"a673d107e95cfece"},{"name":"is-page-static","duration":613779,"timestamp":35203256196,"id":81,"parentId":43,"tags":{},"startTime":1778843175502,"traceId":"a673d107e95cfece"},{"name":"check-page","duration":630148,"timestamp":35203239900,"id":43,"parentId":19,"tags":{"page":"/api/hub/stats"},"startTime":1778843175486,"traceId":"a673d107e95cfece"},{"name":"is-page-static","duration":598110,"timestamp":35203274459,"id":94,"parentId":53,"tags":{},"startTime":1778843175521,"traceId":"a673d107e95cfece"},{"name":"check-page","duration":629130,"timestamp":35203243481,"id":53,"parentId":19,"tags":{"page":"/node"},"startTime":1778843175490,"traceId":"a673d107e95cfece"},{"name":"is-page-static","duration":626938,"timestamp":35203274379,"id":90,"parentId":23,"tags":{},"startTime":1778843175521,"traceId":"a673d107e95cfece"},{"name":"check-page","duration":668029,"timestamp":35203233353,"id":23,"parentId":19,"tags":{"page":"/admin"},"startTime":1778843175480,"traceId":"a673d107e95cfece"},{"name":"is-page-static","duration":627109,"timestamp":35203274427,"id":92,"parentId":51,"tags":{},"startTime":1778843175521,"traceId":"a673d107e95cfece"},{"name":"check-page","duration":658567,"timestamp":35203242996,"id":51,"parentId":19,"tags":{"page":"/logs"},"startTime":1778843175489,"traceId":"a673d107e95cfece"},{"name":"is-page-static","duration":630086,"timestamp":35203274444,"id":93,"parentId":52,"tags":{},"startTime":1778843175521,"traceId":"a673d107e95cfece"},{"name":"check-page","duration":661373,"timestamp":35203243209,"id":52,"parentId":19,"tags":{"page":"/messages"},"startTime":1778843175489,"traceId":"a673d107e95cfece"},{"name":"is-page-static","duration":635922,"timestamp":35203274515,"id":98,"parentId":59,"tags":{},"startTime":1778843175521,"traceId":"a673d107e95cfece"},{"name":"check-page","duration":664979,"timestamp":35203245530,"id":59,"parentId":19,"tags":{"page":"/settings/tokens"},"startTime":1778843175492,"traceId":"a673d107e95cfece"},{"name":"is-page-static","duration":637686,"timestamp":35203274556,"id":100,"parentId":61,"tags":{},"startTime":1778843175521,"traceId":"a673d107e95cfece"},{"name":"check-page","duration":666444,"timestamp":35203245861,"id":61,"parentId":19,"tags":{"page":"/tasks"},"startTime":1778843175492,"traceId":"a673d107e95cfece"},{"name":"is-page-static","duration":637068,"timestamp":35203280759,"id":101,"parentId":58,"tags":{},"startTime":1778843175527,"traceId":"a673d107e95cfece"},{"name":"check-page","duration":672802,"timestamp":35203245069,"id":58,"parentId":19,"tags":{"page":"/settings"},"startTime":1778843175491,"traceId":"a673d107e95cfece"},{"name":"is-page-static","duration":643739,"timestamp":35203274535,"id":99,"parentId":60,"tags":{},"startTime":1778843175521,"traceId":"a673d107e95cfece"},{"name":"check-page","duration":672639,"timestamp":35203245696,"id":60,"parentId":19,"tags":{"page":"/tasks/[id]"},"startTime":1778843175492,"traceId":"a673d107e95cfece"},{"name":"is-page-static","duration":620028,"timestamp":35203300204,"id":102,"parentId":55,"tags":{},"startTime":1778843175546,"traceId":"a673d107e95cfece"},{"name":"check-page","duration":676306,"timestamp":35203243980,"id":55,"parentId":19,"tags":{"page":"/"},"startTime":1778843175490,"traceId":"a673d107e95cfece"},{"name":"is-page-static","duration":646820,"timestamp":35203274503,"id":97,"parentId":57,"tags":{},"startTime":1778843175521,"traceId":"a673d107e95cfece"},{"name":"check-page","duration":676517,"timestamp":35203244845,"id":57,"parentId":19,"tags":{"page":"/settings/networks"},"startTime":1778843175491,"traceId":"a673d107e95cfece"},{"name":"is-page-static","duration":668692,"timestamp":35203274409,"id":91,"parentId":50,"tags":{},"startTime":1778843175521,"traceId":"a673d107e95cfece"},{"name":"check-page","duration":700340,"timestamp":35203242795,"id":50,"parentId":19,"tags":{"page":"/login"},"startTime":1778843175489,"traceId":"a673d107e95cfece"},{"name":"is-page-static","duration":670280,"timestamp":35203274471,"id":95,"parentId":54,"tags":{},"startTime":1778843175521,"traceId":"a673d107e95cfece"},{"name":"check-page","duration":701074,"timestamp":35203243717,"id":54,"parentId":19,"tags":{"page":"/nodes"},"startTime":1778843175490,"traceId":"a673d107e95cfece"},{"name":"is-page-static","duration":679361,"timestamp":35203274487,"id":96,"parentId":56,"tags":{},"startTime":1778843175521,"traceId":"a673d107e95cfece"},{"name":"check-page","duration":709258,"timestamp":35203244620,"id":56,"parentId":19,"tags":{"page":"/server-logs"},"startTime":1778843175491,"traceId":"a673d107e95cfece"},{"name":"static-check","duration":725535,"timestamp":35203228382,"id":19,"parentId":1,"tags":{},"startTime":1778843175475,"traceId":"a673d107e95cfece"},{"name":"write-routes-manifest","duration":389,"timestamp":35203960324,"id":104,"parentId":1,"tags":{},"startTime":1778843176207,"traceId":"a673d107e95cfece"},{"name":"load-dotenv","duration":41,"timestamp":35203970854,"id":107,"parentId":106,"tags":{},"startTime":1778843176217,"traceId":"a673d107e95cfece"},{"name":"run-export-path-map","duration":569,"timestamp":35203974183,"id":108,"parentId":106,"tags":{},"startTime":1778843176220,"traceId":"a673d107e95cfece"},{"name":"next-export","duration":609019,"timestamp":35203969648,"id":106,"parentId":1,"tags":{},"startTime":1778843176216,"traceId":"a673d107e95cfece"}]
|
|
2
|
-
[{"name":"move-exported-app-not-found-","duration":
|
|
1
|
+
[{"name":"generate-buildid","duration":264,"timestamp":35978936528,"id":4,"parentId":1,"tags":{},"startTime":1778843951183,"traceId":"381b95611ef1c76f"},{"name":"load-custom-routes","duration":489,"timestamp":35978936949,"id":5,"parentId":1,"tags":{},"startTime":1778843951183,"traceId":"381b95611ef1c76f"},{"name":"create-dist-dir","duration":617,"timestamp":35978937479,"id":6,"parentId":1,"tags":{},"startTime":1778843951184,"traceId":"381b95611ef1c76f"},{"name":"clean","duration":492,"timestamp":35978938714,"id":7,"parentId":1,"tags":{},"startTime":1778843951185,"traceId":"381b95611ef1c76f"},{"name":"discover-routes","duration":8512,"timestamp":35979021939,"id":8,"parentId":1,"tags":{},"startTime":1778843951268,"traceId":"381b95611ef1c76f"},{"name":"create-root-mapping","duration":103,"timestamp":35979030507,"id":9,"parentId":1,"tags":{},"startTime":1778843951277,"traceId":"381b95611ef1c76f"},{"name":"generate-route-types","duration":33101,"timestamp":35979033198,"id":10,"parentId":1,"tags":{},"startTime":1778843951279,"traceId":"381b95611ef1c76f"},{"name":"public-dir-conflict-check","duration":110,"timestamp":35979066455,"id":11,"parentId":1,"tags":{},"startTime":1778843951313,"traceId":"381b95611ef1c76f"},{"name":"generate-routes-manifest","duration":5469,"timestamp":35979066731,"id":12,"parentId":1,"tags":{},"startTime":1778843951313,"traceId":"381b95611ef1c76f"},{"name":"run-turbopack","duration":5444220,"timestamp":35979076868,"id":14,"parentId":1,"tags":{},"startTime":1778843951323,"traceId":"381b95611ef1c76f"},{"name":"turbopack-build-events","duration":68,"timestamp":35979350852,"id":15,"parentId":1,"tags":{},"startTime":1778843951597,"traceId":"381b95611ef1c76f"},{"name":"run-typescript","duration":8203795,"timestamp":35984531822,"id":16,"parentId":1,"tags":{},"startTime":1778843956778,"traceId":"381b95611ef1c76f"},{"name":"generate-required-server-files","duration":2368,"timestamp":35992736745,"id":18,"parentId":1,"tags":{},"startTime":1778843964983,"traceId":"381b95611ef1c76f"},{"name":"check-static-error-page","duration":15546,"timestamp":35992880903,"id":20,"parentId":19,"tags":{},"startTime":1778843965127,"traceId":"381b95611ef1c76f"},{"name":"is-page-static","duration":403732,"timestamp":35992898957,"id":63,"parentId":22,"tags":{},"startTime":1778843965145,"traceId":"381b95611ef1c76f"},{"name":"check-page","duration":418396,"timestamp":35992884445,"id":22,"parentId":19,"tags":{"page":"/_global-error"},"startTime":1778843965131,"traceId":"381b95611ef1c76f"},{"name":"is-page-static","duration":481703,"timestamp":35992899153,"id":65,"parentId":26,"tags":{},"startTime":1778843965145,"traceId":"381b95611ef1c76f"},{"name":"check-page","duration":493077,"timestamp":35992887855,"id":26,"parentId":19,"tags":{"page":"/api/auth/logout"},"startTime":1778843965134,"traceId":"381b95611ef1c76f"},{"name":"is-page-static","duration":484128,"timestamp":35992900712,"id":70,"parentId":32,"tags":{},"startTime":1778843965147,"traceId":"381b95611ef1c76f"},{"name":"check-page","duration":496025,"timestamp":35992888879,"id":32,"parentId":19,"tags":{"page":"/api/hub/health"},"startTime":1778843965135,"traceId":"381b95611ef1c76f"},{"name":"is-page-static","duration":511628,"timestamp":35992902178,"id":71,"parentId":33,"tags":{},"startTime":1778843965148,"traceId":"381b95611ef1c76f"},{"name":"check-page","duration":524842,"timestamp":35992889038,"id":33,"parentId":19,"tags":{"page":"/api/hub/inbox"},"startTime":1778843965135,"traceId":"381b95611ef1c76f"},{"name":"is-page-static","duration":513601,"timestamp":35992900529,"id":69,"parentId":30,"tags":{},"startTime":1778843965147,"traceId":"381b95611ef1c76f"},{"name":"check-page","duration":525724,"timestamp":35992888464,"id":30,"parentId":19,"tags":{"page":"/api/hub/broadcast"},"startTime":1778843965135,"traceId":"381b95611ef1c76f"},{"name":"is-page-static","duration":514249,"timestamp":35992900147,"id":67,"parentId":28,"tags":{},"startTime":1778843965146,"traceId":"381b95611ef1c76f"},{"name":"check-page","duration":526310,"timestamp":35992888134,"id":28,"parentId":19,"tags":{"page":"/api/hub/audit-log"},"startTime":1778843965134,"traceId":"381b95611ef1c76f"},{"name":"is-page-static","duration":523819,"timestamp":35992898652,"id":62,"parentId":21,"tags":{},"startTime":1778843965145,"traceId":"381b95611ef1c76f"},{"name":"check-page","duration":539833,"timestamp":35992882698,"id":21,"parentId":19,"tags":{"page":"/_not-found"},"startTime":1778843965129,"traceId":"381b95611ef1c76f"},{"name":"is-page-static","duration":531167,"timestamp":35992902318,"id":72,"parentId":34,"tags":{},"startTime":1778843965149,"traceId":"381b95611ef1c76f"},{"name":"check-page","duration":544358,"timestamp":35992889182,"id":34,"parentId":19,"tags":{"page":"/api/hub/license"},"startTime":1778843965135,"traceId":"381b95611ef1c76f"},{"name":"is-page-static","duration":534967,"timestamp":35992903527,"id":76,"parentId":38,"tags":{},"startTime":1778843965150,"traceId":"381b95611ef1c76f"},{"name":"check-page","duration":548278,"timestamp":35992890268,"id":38,"parentId":19,"tags":{"page":"/api/hub/register"},"startTime":1778843965137,"traceId":"381b95611ef1c76f"},{"name":"is-page-static","duration":540774,"timestamp":35992903455,"id":74,"parentId":36,"tags":{},"startTime":1778843965150,"traceId":"381b95611ef1c76f"},{"name":"check-page","duration":554387,"timestamp":35992889894,"id":36,"parentId":19,"tags":{"page":"/api/hub/networks"},"startTime":1778843965136,"traceId":"381b95611ef1c76f"},{"name":"is-page-static","duration":545407,"timestamp":35992899073,"id":64,"parentId":25,"tags":{},"startTime":1778843965145,"traceId":"381b95611ef1c76f"},{"name":"check-page","duration":556846,"timestamp":35992887666,"id":25,"parentId":19,"tags":{"page":"/api/auth/login"},"startTime":1778843965134,"traceId":"381b95611ef1c76f"},{"name":"is-page-static","duration":541239,"timestamp":35992903541,"id":77,"parentId":39,"tags":{},"startTime":1778843965150,"traceId":"381b95611ef1c76f"},{"name":"check-page","duration":554425,"timestamp":35992890387,"id":39,"parentId":19,"tags":{"page":"/api/hub/send"},"startTime":1778843965137,"traceId":"381b95611ef1c76f"},{"name":"is-page-static","duration":542612,"timestamp":35992902354,"id":73,"parentId":35,"tags":{},"startTime":1778843965149,"traceId":"381b95611ef1c76f"},{"name":"check-page","duration":555664,"timestamp":35992889331,"id":35,"parentId":19,"tags":{"page":"/api/hub/messages"},"startTime":1778843965136,"traceId":"381b95611ef1c76f"},{"name":"is-page-static","duration":546209,"timestamp":35992900364,"id":68,"parentId":29,"tags":{},"startTime":1778843965147,"traceId":"381b95611ef1c76f"},{"name":"check-page","duration":558349,"timestamp":35992888265,"id":29,"parentId":19,"tags":{"page":"/api/hub/auth"},"startTime":1778843965135,"traceId":"381b95611ef1c76f"},{"name":"is-page-static","duration":550574,"timestamp":35992903577,"id":80,"parentId":42,"tags":{},"startTime":1778843965150,"traceId":"381b95611ef1c76f"},{"name":"check-page","duration":563489,"timestamp":35992890710,"id":42,"parentId":19,"tags":{"page":"/api/hub/session"},"startTime":1778843965137,"traceId":"381b95611ef1c76f"},{"name":"is-page-static","duration":552237,"timestamp":35992903599,"id":82,"parentId":44,"tags":{},"startTime":1778843965150,"traceId":"381b95611ef1c76f"},{"name":"check-page","duration":564967,"timestamp":35992890922,"id":44,"parentId":19,"tags":{"page":"/api/hub/status"},"startTime":1778843965137,"traceId":"381b95611ef1c76f"},{"name":"is-page-static","duration":553485,"timestamp":35992903586,"id":81,"parentId":43,"tags":{},"startTime":1778843965150,"traceId":"381b95611ef1c76f"},{"name":"check-page","duration":566304,"timestamp":35992890816,"id":43,"parentId":19,"tags":{"page":"/api/hub/stats"},"startTime":1778843965137,"traceId":"381b95611ef1c76f"},{"name":"is-page-static","duration":557280,"timestamp":35992903612,"id":83,"parentId":45,"tags":{},"startTime":1778843965150,"traceId":"381b95611ef1c76f"},{"name":"check-page","duration":569891,"timestamp":35992891046,"id":45,"parentId":19,"tags":{"page":"/api/hub/task-events"},"startTime":1778843965137,"traceId":"381b95611ef1c76f"},{"name":"is-page-static","duration":557471,"timestamp":35992903634,"id":85,"parentId":47,"tags":{},"startTime":1778843965150,"traceId":"381b95611ef1c76f"},{"name":"check-page","duration":569836,"timestamp":35992891300,"id":47,"parentId":19,"tags":{"page":"/api/hub/tmux"},"startTime":1778843965138,"traceId":"381b95611ef1c76f"},{"name":"is-page-static","duration":563139,"timestamp":35992903647,"id":86,"parentId":48,"tags":{},"startTime":1778843965150,"traceId":"381b95611ef1c76f"},{"name":"check-page","duration":575413,"timestamp":35992891424,"id":48,"parentId":19,"tags":{"page":"/api/hub/tokens"},"startTime":1778843965138,"traceId":"381b95611ef1c76f"},{"name":"is-page-static","duration":563447,"timestamp":35992903551,"id":78,"parentId":40,"tags":{},"startTime":1778843965150,"traceId":"381b95611ef1c76f"},{"name":"check-page","duration":576562,"timestamp":35992890499,"id":40,"parentId":19,"tags":{"page":"/api/hub/server-logs"},"startTime":1778843965137,"traceId":"381b95611ef1c76f"},{"name":"is-page-static","duration":569153,"timestamp":35992906913,"id":88,"parentId":24,"tags":{},"startTime":1778843965153,"traceId":"381b95611ef1c76f"},{"name":"check-page","duration":591128,"timestamp":35992884993,"id":24,"parentId":19,"tags":{"page":"/api/anet/config"},"startTime":1778843965131,"traceId":"381b95611ef1c76f"},{"name":"is-page-static","duration":572858,"timestamp":35992903563,"id":79,"parentId":41,"tags":{},"startTime":1778843965150,"traceId":"381b95611ef1c76f"},{"name":"check-page","duration":585863,"timestamp":35992890602,"id":41,"parentId":19,"tags":{"page":"/api/hub/servers"},"startTime":1778843965137,"traceId":"381b95611ef1c76f"},{"name":"is-page-static","duration":568123,"timestamp":35992908526,"id":89,"parentId":31,"tags":{},"startTime":1778843965155,"traceId":"381b95611ef1c76f"},{"name":"check-page","duration":588092,"timestamp":35992888596,"id":31,"parentId":19,"tags":{"page":"/api/hub/events"},"startTime":1778843965135,"traceId":"381b95611ef1c76f"},{"name":"is-page-static","duration":578019,"timestamp":35992899230,"id":66,"parentId":27,"tags":{},"startTime":1778843965146,"traceId":"381b95611ef1c76f"},{"name":"check-page","duration":589325,"timestamp":35992887982,"id":27,"parentId":19,"tags":{"page":"/api/auth/v3"},"startTime":1778843965134,"traceId":"381b95611ef1c76f"},{"name":"is-page-static","duration":575519,"timestamp":35992903660,"id":87,"parentId":49,"tags":{},"startTime":1778843965150,"traceId":"381b95611ef1c76f"},{"name":"check-page","duration":586140,"timestamp":35992893082,"id":49,"parentId":19,"tags":{"page":"/favicon.ico"},"startTime":1778843965139,"traceId":"381b95611ef1c76f"},{"name":"is-page-static","duration":591619,"timestamp":35992903625,"id":84,"parentId":46,"tags":{},"startTime":1778843965150,"traceId":"381b95611ef1c76f"},{"name":"check-page","duration":604151,"timestamp":35992891151,"id":46,"parentId":19,"tags":{"page":"/api/hub/tasks"},"startTime":1778843965137,"traceId":"381b95611ef1c76f"},{"name":"is-page-static","duration":594155,"timestamp":35992903507,"id":75,"parentId":37,"tags":{},"startTime":1778843965150,"traceId":"381b95611ef1c76f"},{"name":"check-page","duration":607584,"timestamp":35992890120,"id":37,"parentId":19,"tags":{"page":"/api/hub/nodes"},"startTime":1778843965136,"traceId":"381b95611ef1c76f"},{"name":"is-page-static","duration":594140,"timestamp":35992910927,"id":96,"parentId":56,"tags":{},"startTime":1778843965157,"traceId":"381b95611ef1c76f"},{"name":"check-page","duration":609955,"timestamp":35992895150,"id":56,"parentId":19,"tags":{"page":"/server-logs"},"startTime":1778843965141,"traceId":"381b95611ef1c76f"},{"name":"is-page-static","duration":602294,"timestamp":35992910940,"id":97,"parentId":57,"tags":{},"startTime":1778843965157,"traceId":"381b95611ef1c76f"},{"name":"check-page","duration":617888,"timestamp":35992895388,"id":57,"parentId":19,"tags":{"page":"/settings/networks"},"startTime":1778843965142,"traceId":"381b95611ef1c76f"},{"name":"is-page-static","duration":609686,"timestamp":35992910954,"id":98,"parentId":59,"tags":{},"startTime":1778843965157,"traceId":"381b95611ef1c76f"},{"name":"check-page","duration":624663,"timestamp":35992896018,"id":59,"parentId":19,"tags":{"page":"/settings/tokens"},"startTime":1778843965142,"traceId":"381b95611ef1c76f"},{"name":"is-page-static","duration":622396,"timestamp":35992910837,"id":90,"parentId":23,"tags":{},"startTime":1778843965157,"traceId":"381b95611ef1c76f"},{"name":"check-page","duration":648563,"timestamp":35992884735,"id":23,"parentId":19,"tags":{"page":"/admin"},"startTime":1778843965131,"traceId":"381b95611ef1c76f"},{"name":"is-page-static","duration":624642,"timestamp":35992910881,"id":92,"parentId":51,"tags":{},"startTime":1778843965157,"traceId":"381b95611ef1c76f"},{"name":"check-page","duration":641897,"timestamp":35992893693,"id":51,"parentId":19,"tags":{"page":"/logs"},"startTime":1778843965140,"traceId":"381b95611ef1c76f"},{"name":"is-page-static","duration":625644,"timestamp":35992910904,"id":94,"parentId":53,"tags":{},"startTime":1778843965157,"traceId":"381b95611ef1c76f"},{"name":"check-page","duration":642492,"timestamp":35992894096,"id":53,"parentId":19,"tags":{"page":"/node"},"startTime":1778843965140,"traceId":"381b95611ef1c76f"},{"name":"is-page-static","duration":626161,"timestamp":35992910971,"id":99,"parentId":60,"tags":{},"startTime":1778843965157,"traceId":"381b95611ef1c76f"},{"name":"check-page","duration":641036,"timestamp":35992896152,"id":60,"parentId":19,"tags":{"page":"/tasks/[id]"},"startTime":1778843965142,"traceId":"381b95611ef1c76f"},{"name":"is-page-static","duration":630717,"timestamp":35992910985,"id":100,"parentId":61,"tags":{},"startTime":1778843965157,"traceId":"381b95611ef1c76f"},{"name":"check-page","duration":645489,"timestamp":35992896254,"id":61,"parentId":19,"tags":{"page":"/tasks"},"startTime":1778843965143,"traceId":"381b95611ef1c76f"},{"name":"is-page-static","duration":619402,"timestamp":35992923844,"id":101,"parentId":55,"tags":{},"startTime":1778843965170,"traceId":"381b95611ef1c76f"},{"name":"check-page","duration":648724,"timestamp":35992894582,"id":55,"parentId":19,"tags":{"page":"/"},"startTime":1778843965141,"traceId":"381b95611ef1c76f"},{"name":"is-page-static","duration":607184,"timestamp":35992937346,"id":102,"parentId":58,"tags":{},"startTime":1778843965184,"traceId":"381b95611ef1c76f"},{"name":"check-page","duration":648994,"timestamp":35992895572,"id":58,"parentId":19,"tags":{"page":"/settings"},"startTime":1778843965142,"traceId":"381b95611ef1c76f"},{"name":"is-page-static","duration":645819,"timestamp":35992910866,"id":91,"parentId":50,"tags":{},"startTime":1778843965157,"traceId":"381b95611ef1c76f"},{"name":"check-page","duration":663180,"timestamp":35992893535,"id":50,"parentId":19,"tags":{"page":"/login"},"startTime":1778843965140,"traceId":"381b95611ef1c76f"},{"name":"is-page-static","duration":650194,"timestamp":35992910918,"id":95,"parentId":54,"tags":{},"startTime":1778843965157,"traceId":"381b95611ef1c76f"},{"name":"check-page","duration":666819,"timestamp":35992894325,"id":54,"parentId":19,"tags":{"page":"/nodes"},"startTime":1778843965141,"traceId":"381b95611ef1c76f"},{"name":"is-page-static","duration":651780,"timestamp":35992910891,"id":93,"parentId":52,"tags":{},"startTime":1778843965157,"traceId":"381b95611ef1c76f"},{"name":"check-page","duration":668838,"timestamp":35992893856,"id":52,"parentId":19,"tags":{"page":"/messages"},"startTime":1778843965140,"traceId":"381b95611ef1c76f"},{"name":"static-check","duration":683036,"timestamp":35992879701,"id":19,"parentId":1,"tags":{},"startTime":1778843965126,"traceId":"381b95611ef1c76f"},{"name":"write-routes-manifest","duration":550,"timestamp":35993569493,"id":104,"parentId":1,"tags":{},"startTime":1778843965816,"traceId":"381b95611ef1c76f"},{"name":"load-dotenv","duration":56,"timestamp":35993582250,"id":107,"parentId":106,"tags":{},"startTime":1778843965829,"traceId":"381b95611ef1c76f"},{"name":"run-export-path-map","duration":582,"timestamp":35993585297,"id":108,"parentId":106,"tags":{},"startTime":1778843965832,"traceId":"381b95611ef1c76f"},{"name":"next-export","duration":542367,"timestamp":35993581016,"id":106,"parentId":1,"tags":{},"startTime":1778843965827,"traceId":"381b95611ef1c76f"}]
|
|
2
|
+
[{"name":"move-exported-app-not-found-","duration":1992,"timestamp":35994126541,"id":109,"parentId":105,"tags":{},"startTime":1778843966373,"traceId":"381b95611ef1c76f"},{"name":"move-exported-app-global-error-","duration":515,"timestamp":35994128616,"id":110,"parentId":105,"tags":{},"startTime":1778843966375,"traceId":"381b95611ef1c76f"},{"name":"static-generation","duration":556267,"timestamp":35993574701,"id":105,"parentId":1,"tags":{},"startTime":1778843965821,"traceId":"381b95611ef1c76f"},{"name":"write-routes-manifest","duration":359,"timestamp":35994131139,"id":111,"parentId":1,"tags":{},"startTime":1778843966377,"traceId":"381b95611ef1c76f"},{"name":"print-tree-view","duration":3653,"timestamp":35994145247,"id":112,"parentId":1,"tags":{},"startTime":1778843966392,"traceId":"381b95611ef1c76f"},{"name":"write-route-bundle-stats","duration":12584,"timestamp":35994148924,"id":113,"parentId":1,"tags":{},"startTime":1778843966395,"traceId":"381b95611ef1c76f"},{"name":"telemetry-flush","duration":21648,"timestamp":35994161531,"id":114,"parentId":1,"tags":{},"startTime":1778843966408,"traceId":"381b95611ef1c76f"},{"name":"next-build","duration":15293952,"timestamp":35978889249,"id":1,"tags":{"buildMode":"default","version":"16.2.3","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1778843951136,"traceId":"381b95611ef1c76f"}]
|
package/.next/trace-build
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"name":"run-turbopack","duration":
|
|
1
|
+
[{"name":"run-turbopack","duration":5444220,"timestamp":35979076868,"id":14,"parentId":1,"tags":{},"startTime":1778843951323,"traceId":"381b95611ef1c76f"},{"name":"turbopack-build-events","duration":68,"timestamp":35979350852,"id":15,"parentId":1,"tags":{},"startTime":1778843951597,"traceId":"381b95611ef1c76f"},{"name":"run-typescript","duration":8203795,"timestamp":35984531822,"id":16,"parentId":1,"tags":{},"startTime":1778843956778,"traceId":"381b95611ef1c76f"},{"name":"static-check","duration":683036,"timestamp":35992879701,"id":19,"parentId":1,"tags":{},"startTime":1778843965126,"traceId":"381b95611ef1c76f"},{"name":"static-generation","duration":556267,"timestamp":35993574701,"id":105,"parentId":1,"tags":{},"startTime":1778843965821,"traceId":"381b95611ef1c76f"},{"name":"telemetry-flush","duration":21648,"timestamp":35994161531,"id":114,"parentId":1,"tags":{},"startTime":1778843966408,"traceId":"381b95611ef1c76f"},{"name":"next-build","duration":15293952,"timestamp":35978889249,"id":1,"tags":{"buildMode":"default","version":"16.2.3","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1778843951136,"traceId":"381b95611ef1c76f"}]
|
|
@@ -91,6 +91,12 @@ const SHORTCUTS: { group: string; items: Shortcut[] }[] = [
|
|
|
91
91
|
// both are real user gestures that weren't in the help overlay.
|
|
92
92
|
{ keys: ['click pill'], label: 'Clear filter — click anywhere on the pill body (R73)' },
|
|
93
93
|
{ keys: ['hover chip'], label: 'Brighten all active flows — hover "N active links" (R77)' },
|
|
94
|
+
// Round 81 / Loop: catch up on the two newest chip-row affordances
|
|
95
|
+
// — R79 working/online chips and R80 vendor-letter chips. All
|
|
96
|
+
// four chip hovers feed the same dim mechanic the R55 legend
|
|
97
|
+
// rows use.
|
|
98
|
+
{ keys: ['hover N working'], label: 'Highlight working nodes — chip-row sibling of legend (R79)' },
|
|
99
|
+
{ keys: ['hover vendor'], label: 'Highlight one vendor — hover A/O/书/? in the chip row (R80)' },
|
|
94
100
|
],
|
|
95
101
|
},
|
|
96
102
|
];
|
|
@@ -1211,11 +1211,24 @@ export function TopoGraph({ sessions, sseSessions, renameSignal }: TopoGraphProp
|
|
|
1211
1211
|
isn't part of the R55 type set, so this chip routes to the
|
|
1212
1212
|
dominant online sub-tier instead of inventing a new state.
|
|
1213
1213
|
Cursor only flips when there's anything to highlight. */}
|
|
1214
|
+
{/* R82: pin-mirror. R60 pressure-bar segments visualise the
|
|
1215
|
+
pinned status via an inset boxShadow; R61 legend rows via a
|
|
1216
|
+
concentric r=8 ring; the chip-row chips next to them did
|
|
1217
|
+
not — so a user who pinned via Cmd+K (R69) or the legend
|
|
1218
|
+
had no chip-row signal that "working" was the current
|
|
1219
|
+
filter. Mirror the pressure-bar treatment here so all
|
|
1220
|
+
status surfaces sing in unison. The online chip mirrors
|
|
1221
|
+
for idle pins (working ⊆ online; the routing in
|
|
1222
|
+
onMouseEnter already treats online as the idle fallback). */}
|
|
1214
1223
|
<span
|
|
1215
1224
|
className="px-2.5 py-1 rounded-md bg-green-500/10 text-green-300 border border-green-500/20"
|
|
1216
1225
|
data-working-chip
|
|
1217
|
-
|
|
1218
|
-
|
|
1226
|
+
data-pin-mirror={pinnedStatus === 'working' ? 'true' : 'false'}
|
|
1227
|
+
title={workingCount > 0 ? (pinnedStatus === 'working' ? 'Pinned — Esc to clear' : 'Hover to highlight working nodes') : undefined}
|
|
1228
|
+
style={{
|
|
1229
|
+
cursor: workingCount > 0 ? 'pointer' : undefined,
|
|
1230
|
+
boxShadow: pinnedStatus === 'working' ? 'inset 0 0 0 1px #4ade80, inset 0 0 0 2px rgba(255,255,255,0.45)' : undefined,
|
|
1231
|
+
}}
|
|
1219
1232
|
onMouseEnter={() => { if (workingCount > 0) setHoveredStatus('working'); }}
|
|
1220
1233
|
onMouseLeave={() => setHoveredStatus(prev => prev === 'working' ? null : prev)}
|
|
1221
1234
|
>
|
|
@@ -1224,8 +1237,12 @@ export function TopoGraph({ sessions, sseSessions, renameSignal }: TopoGraphProp
|
|
|
1224
1237
|
<span
|
|
1225
1238
|
className="px-2.5 py-1 rounded-md bg-cyan-500/10 text-cyan-300 border border-cyan-500/20"
|
|
1226
1239
|
data-online-chip
|
|
1227
|
-
|
|
1228
|
-
|
|
1240
|
+
data-pin-mirror={pinnedStatus === 'idle' ? 'true' : 'false'}
|
|
1241
|
+
title={onlineNodes.length > 0 ? (pinnedStatus === 'idle' ? 'Pinned — Esc to clear' : 'Hover to highlight online nodes') : undefined}
|
|
1242
|
+
style={{
|
|
1243
|
+
cursor: onlineNodes.length > 0 ? 'pointer' : undefined,
|
|
1244
|
+
boxShadow: pinnedStatus === 'idle' ? 'inset 0 0 0 1px #67e8f9, inset 0 0 0 2px rgba(255,255,255,0.45)' : undefined,
|
|
1245
|
+
}}
|
|
1229
1246
|
onMouseEnter={() => {
|
|
1230
1247
|
// If a working filter would isolate nothing, route to idle.
|
|
1231
1248
|
const idleCount = onlineNodes.length - workingCount;
|
package/package.json
CHANGED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/* Round 82 verification: chip-row "N working" + "N online" chips mirror
|
|
2
|
+
* the pin state already shown by the R60 pressure-bar segments. When
|
|
3
|
+
* pinnedStatus === 'working', the working chip lights up via inset
|
|
4
|
+
* boxShadow + data-pin-mirror="true"; idle pin lights the online chip.
|
|
5
|
+
* Closes the visual inconsistency where pressure-bar + legend showed
|
|
6
|
+
* the pin but the sibling count chips stayed flat.
|
|
7
|
+
*
|
|
8
|
+
* Drive the pin via Cmd+K palette (R69 action) to verify the chip
|
|
9
|
+
* reflects a pin set from a non-chip surface — exercises the full
|
|
10
|
+
* coupling, not just a chip clicking itself.
|
|
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
|
+
const ctx = await browser.newContext({ viewport: { width: 1400, height: 1200 } });
|
|
19
|
+
await ctx.addCookies([{ name: 'anet_dashboard_session', value: `v3:${TOKEN}`, domain: '127.0.0.1', path: '/' }]);
|
|
20
|
+
await ctx.addInitScript(() => {
|
|
21
|
+
try {
|
|
22
|
+
localStorage.setItem('anet-theme', 'cyber');
|
|
23
|
+
sessionStorage.setItem('anet_v3_auth', '1');
|
|
24
|
+
sessionStorage.removeItem('anet-topo-pinned-status');
|
|
25
|
+
sessionStorage.removeItem('anet-topo-pinned-group');
|
|
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 = [
|
|
35
|
+
{ alias: 'alpha', status: 'working', model: 'claude-opus-4', runtime: 'cli-claude-code',
|
|
36
|
+
network_id: nid, project_dir: null, created_at: fresh, updated_at: fresh, last_seen_at: fresh },
|
|
37
|
+
{ alias: 'beta', status: 'idle', model: 'gpt-5', runtime: 'codex-cli',
|
|
38
|
+
network_id: nid, project_dir: null, created_at: fresh, updated_at: fresh, last_seen_at: fresh },
|
|
39
|
+
];
|
|
40
|
+
await route.fulfill({ response: r, json: { ...b, sessions } });
|
|
41
|
+
});
|
|
42
|
+
await ctx.route('**/api/hub/messages*', (route) => route.fulfill({ json: { messages: [] } }));
|
|
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 === 2, { timeout: 30000 });
|
|
47
|
+
await page.waitForTimeout(400);
|
|
48
|
+
|
|
49
|
+
const snap = () => page.evaluate(() => {
|
|
50
|
+
const w = document.querySelector('[data-working-chip]');
|
|
51
|
+
const o = document.querySelector('[data-online-chip]');
|
|
52
|
+
return {
|
|
53
|
+
working: {
|
|
54
|
+
mirror: w?.getAttribute('data-pin-mirror'),
|
|
55
|
+
shadow: w ? (w.getAttribute('style') || '').includes('inset') : false,
|
|
56
|
+
title: w?.getAttribute('title') || '',
|
|
57
|
+
},
|
|
58
|
+
online: {
|
|
59
|
+
mirror: o?.getAttribute('data-pin-mirror'),
|
|
60
|
+
shadow: o ? (o.getAttribute('style') || '').includes('inset') : false,
|
|
61
|
+
title: o?.getAttribute('title') || '',
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
const before = await snap();
|
|
67
|
+
|
|
68
|
+
// Dispatch the R69 CustomEvent directly — same coupling the palette
|
|
69
|
+
// uses, deterministic without fuzzy-match ambiguity. The R69 listener
|
|
70
|
+
// in TopoGraph reads `detail.kind === 'status'` + `detail.value`.
|
|
71
|
+
const pin = async (value) => {
|
|
72
|
+
await page.evaluate((v) => {
|
|
73
|
+
try { sessionStorage.setItem('anet-topo-pinned-status', v); } catch {}
|
|
74
|
+
window.dispatchEvent(new CustomEvent('anet:topo-pin', { detail: { kind: 'status', value: v } }));
|
|
75
|
+
}, value);
|
|
76
|
+
await page.waitForTimeout(200);
|
|
77
|
+
};
|
|
78
|
+
const clear = async () => {
|
|
79
|
+
await page.keyboard.press('Escape');
|
|
80
|
+
await page.waitForTimeout(250);
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
await pin('working');
|
|
84
|
+
const onWorking = await snap();
|
|
85
|
+
await clear();
|
|
86
|
+
const afterWorking = await snap();
|
|
87
|
+
|
|
88
|
+
await pin('idle');
|
|
89
|
+
const onIdle = await snap();
|
|
90
|
+
await clear();
|
|
91
|
+
const afterIdle = await snap();
|
|
92
|
+
|
|
93
|
+
await browser.close();
|
|
94
|
+
|
|
95
|
+
const results = {
|
|
96
|
+
before_workingFlat: before.working.mirror === 'false' && !before.working.shadow,
|
|
97
|
+
before_onlineFlat: before.online.mirror === 'false' && !before.online.shadow,
|
|
98
|
+
workingPin_workingLit: onWorking.working.mirror === 'true' && onWorking.working.shadow,
|
|
99
|
+
workingPin_onlineFlat: onWorking.online.mirror === 'false' && !onWorking.online.shadow,
|
|
100
|
+
workingPin_titleHint: /Pinned/i.test(onWorking.working.title),
|
|
101
|
+
esc_workingFlat: afterWorking.working.mirror === 'false' && !afterWorking.working.shadow,
|
|
102
|
+
esc_onlineUntouched: afterWorking.online.mirror === 'false' && !afterWorking.online.shadow,
|
|
103
|
+
idlePin_onlineLit: onIdle.online.mirror === 'true' && onIdle.online.shadow,
|
|
104
|
+
idlePin_workingFlat: onIdle.working.mirror === 'false' && !onIdle.working.shadow,
|
|
105
|
+
idlePin_titleHint: /Pinned/i.test(onIdle.online.title),
|
|
106
|
+
esc_onlineFlat: afterIdle.online.mirror === 'false' && !afterIdle.online.shadow,
|
|
107
|
+
};
|
|
108
|
+
const ok = Object.values(results).every(Boolean);
|
|
109
|
+
console.log(`${ok ? '✅' : '❌'} chip pin-mirror:`, JSON.stringify(results),
|
|
110
|
+
`\n before=`, before,
|
|
111
|
+
`\n onWorking=`, onWorking,
|
|
112
|
+
`\n onIdle=`, onIdle);
|
|
113
|
+
process.exit(ok ? 0 : 1);
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/* Round 81 verification: HelpOverlay surfaces R79 (status chip hover) +
|
|
2
|
+
* R80 (vendor chip letter hover). Both gestures landed without entries
|
|
3
|
+
* in the discoverability surface. Continues the R59/R62/R65/R70/R78
|
|
4
|
+
* docs-catch-up cadence.
|
|
5
|
+
*/
|
|
6
|
+
import { chromium } from 'playwright';
|
|
7
|
+
import { readFileSync } from 'node:fs';
|
|
8
|
+
|
|
9
|
+
const TOKEN = JSON.parse(readFileSync('/home/vansin/.anet/config.json', 'utf8')).token;
|
|
10
|
+
const browser = await chromium.launch({ headless: true });
|
|
11
|
+
|
|
12
|
+
const ctx = await browser.newContext({ viewport: { width: 1280, height: 900 } });
|
|
13
|
+
await ctx.addCookies([{ name: 'anet_dashboard_session', value: `v3:${TOKEN}`, domain: '127.0.0.1', path: '/' }]);
|
|
14
|
+
await ctx.addInitScript(() => {
|
|
15
|
+
try { localStorage.setItem('anet-theme', 'cyber'); sessionStorage.setItem('anet_v3_auth', '1'); } catch {}
|
|
16
|
+
});
|
|
17
|
+
await ctx.route('**/api/hub/messages*', (route) => route.fulfill({ json: { messages: [] } }));
|
|
18
|
+
await ctx.route('**/api/hub/tasks*', (route) => route.fulfill({ json: { tasks: [] } }));
|
|
19
|
+
const page = await ctx.newPage();
|
|
20
|
+
await page.goto('http://127.0.0.1:3000/', { waitUntil: 'domcontentloaded' });
|
|
21
|
+
await page.waitForTimeout(800);
|
|
22
|
+
|
|
23
|
+
await page.keyboard.press('?');
|
|
24
|
+
await page.waitForSelector('[role="dialog"][aria-label="Keyboard shortcuts"]', { timeout: 5000 });
|
|
25
|
+
|
|
26
|
+
const items = await page.evaluate(() => {
|
|
27
|
+
const dialog = document.querySelector('[role="dialog"][aria-label="Keyboard shortcuts"]');
|
|
28
|
+
const groups = [...(dialog?.querySelectorAll('div') || [])];
|
|
29
|
+
let active = null;
|
|
30
|
+
for (const g of groups) {
|
|
31
|
+
if (g.textContent && /^Topology canvas$/i.test(g.textContent.trim())) {
|
|
32
|
+
active = g.parentElement;
|
|
33
|
+
break;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return active ? [...active.querySelectorAll('li')].map(li => (li.textContent || '').trim()) : [];
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
await browser.close();
|
|
40
|
+
|
|
41
|
+
const has = (s) => items.some(t => t.includes(s));
|
|
42
|
+
const results = {
|
|
43
|
+
r81_workingChip: has('Highlight working nodes — chip-row sibling of legend (R79)'),
|
|
44
|
+
r81_vendorChip: has('Highlight one vendor — hover A/O/书/? in the chip row (R80)'),
|
|
45
|
+
// R78 priors
|
|
46
|
+
r73_pillBodyClick: has('Clear filter — click anywhere on the pill body (R73)'),
|
|
47
|
+
r77_activeLinks: has('Brighten all active flows — hover'),
|
|
48
|
+
// R74 / R70 / R65 / R59 priors
|
|
49
|
+
r74_cmdkLayout: has('Toggle layout / Fit canvas via palette (R74)'),
|
|
50
|
+
r70_cmdkPin: has('(R69)'),
|
|
51
|
+
r63_groupPin: has('Pin a team focus (R63)'),
|
|
52
|
+
r60_pinChip: has('Pin a status filter (R60/R61)'),
|
|
53
|
+
r52_clickHub: has('Fit topology to canvas (R52)'),
|
|
54
|
+
};
|
|
55
|
+
const ok = Object.values(results).every(Boolean);
|
|
56
|
+
console.log(`${ok ? '✅' : '❌'} help overlay R81:`, JSON.stringify(results),
|
|
57
|
+
`\n items=`, items);
|
|
58
|
+
process.exit(ok ? 0 : 1);
|
|
File without changes
|
/package/.next/static/{IOohr_ulu1UubAKC80RVa → -9X1vRQUdY2jVyIGZTnV6}/_clientMiddlewareManifest.js
RENAMED
|
File without changes
|
|
File without changes
|