@sleep2agi/agent-network-dashboard 0.4.5-preview.4 → 0.4.5-preview.41
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 +50 -50
- 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 +4 -4
- package/.next/server/app/_not-found.rsc +12 -12
- package/.next/server/app/_not-found.segments/_full.segment.rsc +12 -12
- package/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
- package/.next/server/app/_not-found.segments/_index.segment.rsc +7 -7
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/admin/page.js.nft.json +1 -1
- package/.next/server/app/admin/page_client-reference-manifest.js +1 -1
- package/.next/server/app/admin.html +4 -4
- package/.next/server/app/admin.rsc +14 -14
- package/.next/server/app/admin.segments/_full.segment.rsc +14 -14
- package/.next/server/app/admin.segments/_head.segment.rsc +4 -4
- package/.next/server/app/admin.segments/_index.segment.rsc +7 -7
- package/.next/server/app/admin.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/admin.segments/admin/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/admin.segments/admin.segment.rsc +3 -3
- package/.next/server/app/index.html +4 -4
- package/.next/server/app/index.rsc +14 -14
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/index.segments/_full.segment.rsc +14 -14
- package/.next/server/app/index.segments/_head.segment.rsc +4 -4
- package/.next/server/app/index.segments/_index.segment.rsc +7 -7
- package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/login.html +2 -2
- package/.next/server/app/login.rsc +14 -14
- package/.next/server/app/login.segments/_full.segment.rsc +14 -14
- package/.next/server/app/login.segments/_head.segment.rsc +4 -4
- package/.next/server/app/login.segments/_index.segment.rsc +7 -7
- package/.next/server/app/login.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/login.segments/login.segment.rsc +3 -3
- package/.next/server/app/logs/page.js.nft.json +1 -1
- package/.next/server/app/logs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/logs.html +4 -4
- package/.next/server/app/logs.rsc +14 -14
- package/.next/server/app/logs.segments/_full.segment.rsc +14 -14
- package/.next/server/app/logs.segments/_head.segment.rsc +4 -4
- package/.next/server/app/logs.segments/_index.segment.rsc +7 -7
- package/.next/server/app/logs.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/logs.segments/logs/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/logs.segments/logs.segment.rsc +3 -3
- package/.next/server/app/messages/page.js.nft.json +1 -1
- package/.next/server/app/messages/page_client-reference-manifest.js +1 -1
- package/.next/server/app/messages.html +4 -4
- package/.next/server/app/messages.rsc +14 -14
- package/.next/server/app/messages.segments/_full.segment.rsc +14 -14
- package/.next/server/app/messages.segments/_head.segment.rsc +4 -4
- package/.next/server/app/messages.segments/_index.segment.rsc +7 -7
- package/.next/server/app/messages.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/messages.segments/messages/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/messages.segments/messages.segment.rsc +3 -3
- package/.next/server/app/node/page.js.nft.json +1 -1
- package/.next/server/app/node/page_client-reference-manifest.js +1 -1
- package/.next/server/app/node.html +4 -4
- package/.next/server/app/node.rsc +14 -14
- package/.next/server/app/node.segments/_full.segment.rsc +14 -14
- package/.next/server/app/node.segments/_head.segment.rsc +4 -4
- package/.next/server/app/node.segments/_index.segment.rsc +7 -7
- package/.next/server/app/node.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/node.segments/node/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/node.segments/node.segment.rsc +3 -3
- package/.next/server/app/nodes/page.js.nft.json +1 -1
- package/.next/server/app/nodes/page_client-reference-manifest.js +1 -1
- package/.next/server/app/nodes.html +4 -4
- package/.next/server/app/nodes.rsc +14 -14
- package/.next/server/app/nodes.segments/_full.segment.rsc +14 -14
- package/.next/server/app/nodes.segments/_head.segment.rsc +4 -4
- package/.next/server/app/nodes.segments/_index.segment.rsc +7 -7
- package/.next/server/app/nodes.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/nodes.segments/nodes/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/nodes.segments/nodes.segment.rsc +3 -3
- package/.next/server/app/page.js.nft.json +1 -1
- 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 +4 -4
- package/.next/server/app/server-logs.rsc +14 -14
- package/.next/server/app/server-logs.segments/_full.segment.rsc +14 -14
- package/.next/server/app/server-logs.segments/_head.segment.rsc +4 -4
- package/.next/server/app/server-logs.segments/_index.segment.rsc +7 -7
- package/.next/server/app/server-logs.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/server-logs.segments/server-logs/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/server-logs.segments/server-logs.segment.rsc +3 -3
- package/.next/server/app/settings/networks/page.js.nft.json +1 -1
- package/.next/server/app/settings/networks/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/networks.html +4 -4
- package/.next/server/app/settings/networks.rsc +14 -14
- package/.next/server/app/settings/networks.segments/_full.segment.rsc +14 -14
- package/.next/server/app/settings/networks.segments/_head.segment.rsc +4 -4
- package/.next/server/app/settings/networks.segments/_index.segment.rsc +7 -7
- package/.next/server/app/settings/networks.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings/networks.segments/settings/networks/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/settings/networks.segments/settings/networks.segment.rsc +3 -3
- package/.next/server/app/settings/networks.segments/settings.segment.rsc +3 -3
- package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/tokens/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/tokens.html +4 -4
- package/.next/server/app/settings/tokens.rsc +14 -14
- package/.next/server/app/settings/tokens.segments/_full.segment.rsc +14 -14
- package/.next/server/app/settings/tokens.segments/_head.segment.rsc +4 -4
- package/.next/server/app/settings/tokens.segments/_index.segment.rsc +7 -7
- package/.next/server/app/settings/tokens.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings/tokens.segments/settings/tokens/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/settings/tokens.segments/settings/tokens.segment.rsc +3 -3
- package/.next/server/app/settings/tokens.segments/settings.segment.rsc +3 -3
- package/.next/server/app/settings.html +4 -4
- package/.next/server/app/settings.rsc +14 -14
- package/.next/server/app/settings.segments/_full.segment.rsc +14 -14
- package/.next/server/app/settings.segments/_head.segment.rsc +4 -4
- package/.next/server/app/settings.segments/_index.segment.rsc +7 -7
- package/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/settings.segments/settings.segment.rsc +3 -3
- package/.next/server/app/tasks/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/tasks/page.js.nft.json +1 -1
- package/.next/server/app/tasks/page_client-reference-manifest.js +1 -1
- package/.next/server/app/tasks.html +4 -4
- package/.next/server/app/tasks.rsc +14 -14
- package/.next/server/app/tasks.segments/_full.segment.rsc +14 -14
- package/.next/server/app/tasks.segments/_head.segment.rsc +4 -4
- package/.next/server/app/tasks.segments/_index.segment.rsc +7 -7
- package/.next/server/app/tasks.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/tasks.segments/tasks/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/tasks.segments/tasks.segment.rsc +3 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__02ee4km._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__02ee4km._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0jjqrcf._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0jjqrcf._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0o8yj3c._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0o8yj3c._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0xm3h9x._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0xm3h9x._.js.map +1 -1
- package/.next/server/chunks/ssr/_0nne7mz._.js +3 -0
- package/.next/server/chunks/ssr/_0nne7mz._.js.map +1 -0
- package/.next/server/chunks/ssr/app_0.zbtn5._.js +9 -0
- package/.next/server/chunks/ssr/app_0.zbtn5._.js.map +1 -0
- package/.next/server/chunks/ssr/app_04n78pr._.js +3 -0
- package/.next/server/chunks/ssr/app_04n78pr._.js.map +1 -0
- package/.next/server/chunks/ssr/app_0_agk0r._.js +3 -0
- package/.next/server/chunks/ssr/app_0_agk0r._.js.map +1 -0
- package/.next/server/chunks/ssr/app_0dk5wao._.js +1 -1
- package/.next/server/chunks/ssr/app_0dk5wao._.js.map +1 -1
- package/.next/server/chunks/ssr/app_0izi28j._.js +1 -1
- package/.next/server/chunks/ssr/app_0izi28j._.js.map +1 -1
- package/.next/server/chunks/ssr/app_0tncr1_._.js +3 -0
- package/.next/server/chunks/ssr/app_0tncr1_._.js.map +1 -0
- package/.next/server/chunks/ssr/app_components_08ys5y3._.js +5 -5
- package/.next/server/chunks/ssr/app_components_08ys5y3._.js.map +1 -1
- package/.next/server/chunks/ssr/app_components_0lhp_k.._.js +3 -0
- package/.next/server/chunks/ssr/app_components_0lhp_k.._.js.map +1 -0
- package/.next/server/chunks/ssr/app_login_page_tsx_0z71ad3._.js +1 -1
- package/.next/server/chunks/ssr/app_login_page_tsx_0z71ad3._.js.map +1 -1
- package/.next/server/chunks/ssr/app_server-logs_page_tsx_0_kpp1p._.js +1 -1
- package/.next/server/chunks/ssr/app_server-logs_page_tsx_0_kpp1p._.js.map +1 -1
- package/.next/server/chunks/ssr/app_tasks_page_tsx_0z-d6mp._.js +1 -1
- package/.next/server/chunks/ssr/app_tasks_page_tsx_0z-d6mp._.js.map +1 -1
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/pages/404.html +4 -4
- 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/02oje7pf-g1v5.js +1 -0
- package/.next/static/chunks/06x7w8nwggx~~.js +1 -0
- package/.next/static/chunks/0943n0t.9c-o2.js +1 -0
- package/.next/static/chunks/{07okhs5561y5y.js → 0c1bp~g7.8ru..js} +1 -1
- package/.next/static/chunks/0csmku~3y472t.js +1 -0
- package/.next/static/chunks/0df0py1glk9xm.js +1 -0
- package/.next/static/chunks/0edt_z0rlxgfk.js +1 -0
- package/.next/static/chunks/0g394kqz_d5.x.js +1 -0
- package/.next/static/chunks/0irkayokwc1fm.js +1 -0
- package/.next/static/chunks/0j8ee64jv6zb7.js +7 -0
- package/.next/static/chunks/0qe_pfeioih-5.css +2 -0
- package/.next/static/chunks/0qnpc7rbxn12u.js +1 -0
- package/.next/static/chunks/0xdl435t_mf1c.js +1 -0
- package/.next/static/chunks/0~n.cadw9_e8s.js +7 -0
- package/.next/static/chunks/11_n-vjzf735y.js +1 -0
- package/.next/static/chunks/15c9pv6gxir.5.js +1 -0
- package/.next/trace +2 -2
- package/.next/trace-build +1 -1
- package/app/admin/page.tsx +77 -25
- package/app/components/AgentCard.tsx +19 -5
- package/app/components/AliasAvatar.tsx +51 -0
- package/app/components/BroadcastBar.tsx +22 -4
- package/app/components/DispatchPanel.tsx +9 -5
- package/app/components/EmptyState.tsx +77 -4
- package/app/components/HealthBanner.tsx +1 -1
- package/app/components/HelpOverlay.tsx +50 -10
- package/app/components/InboxPanel.tsx +6 -3
- package/app/components/Sidebar.tsx +49 -41
- package/app/components/TaskChatPanel.tsx +8 -10
- package/app/components/TaskDrawer.tsx +72 -28
- package/app/components/TopoGraph.tsx +118 -24
- package/app/globals.css +90 -0
- package/app/lib/version.ts +7 -0
- package/app/login/page.tsx +37 -7
- package/app/logs/page.tsx +72 -21
- package/app/messages/page.tsx +85 -51
- package/app/node/page.tsx +32 -15
- package/app/nodes/page.tsx +21 -23
- package/app/page.tsx +71 -13
- package/app/server-logs/page.tsx +37 -3
- package/app/settings/networks/page.tsx +37 -13
- package/app/settings/page.tsx +38 -10
- package/app/tasks/page.tsx +77 -41
- package/package.json +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0_jnflc._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0_jnflc._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0nrckjd._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0nrckjd._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__12mpoig._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__12mpoig._.js.map +0 -1
- package/.next/server/chunks/ssr/_0d-fuox._.js +0 -3
- package/.next/server/chunks/ssr/_0d-fuox._.js.map +0 -1
- package/.next/server/chunks/ssr/app_0.0wpa~._.js +0 -3
- package/.next/server/chunks/ssr/app_0.0wpa~._.js.map +0 -1
- package/.next/server/chunks/ssr/app_0ap_oiq._.js +0 -3
- package/.next/server/chunks/ssr/app_0ap_oiq._.js.map +0 -1
- package/.next/server/chunks/ssr/app_0et5yua._.js +0 -3
- package/.next/server/chunks/ssr/app_0et5yua._.js.map +0 -1
- package/.next/server/chunks/ssr/app_0ff~kjj._.js +0 -9
- package/.next/server/chunks/ssr/app_0ff~kjj._.js.map +0 -1
- package/.next/server/chunks/ssr/app_page_tsx_0es_sk2._.js +0 -3
- package/.next/server/chunks/ssr/app_page_tsx_0es_sk2._.js.map +0 -1
- package/.next/static/chunks/02flrewxlf_m_.js +0 -1
- package/.next/static/chunks/03sm_xa792mxv.css +0 -2
- package/.next/static/chunks/051gslfjka1kj.js +0 -1
- package/.next/static/chunks/06t_vzei8s9_h.js +0 -1
- package/.next/static/chunks/07oobuohrpigy.js +0 -1
- package/.next/static/chunks/0e7c40p~wq665.js +0 -1
- package/.next/static/chunks/0g7m7zk.v7g6h.js +0 -1
- package/.next/static/chunks/0khpyxpdrp~ty.js +0 -1
- package/.next/static/chunks/0lo_g.q1fm-hr.js +0 -7
- package/.next/static/chunks/0m328uz90rp81.js +0 -1
- package/.next/static/chunks/0ogeals5ufhho.js +0 -1
- package/.next/static/chunks/1031v6nw33ud3.js +0 -1
- package/.next/static/chunks/10ir.g.n~hre0.js +0 -7
- package/.next/static/chunks/10njj7kn9ylkf.js +0 -1
- package/.next/static/chunks/13.dst7liziwo.js +0 -1
- /package/.next/static/{dvKGMaUCm52sSTROKhYVL → t8ckUU0UVyOpv2ymrRHll}/_buildManifest.js +0 -0
- /package/.next/static/{dvKGMaUCm52sSTROKhYVL → t8ckUU0UVyOpv2ymrRHll}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{dvKGMaUCm52sSTROKhYVL → t8ckUU0UVyOpv2ymrRHll}/_ssgManifest.js +0 -0
|
@@ -33,10 +33,14 @@ const cy = 330;
|
|
|
33
33
|
const onlineRadius = 220;
|
|
34
34
|
const offlineRadius = 315;
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
/** Polar coordinate for a node on a ring. `rotateBy` lets the caller offset
|
|
37
|
+
* the whole ring so two stacked rings don't align radially (round 25: the
|
|
38
|
+
* offline ring gets a half-step rotation so its nodes sit in the gaps
|
|
39
|
+
* between online ones). */
|
|
40
|
+
function polarPoint(index: number, total: number, radius: number, rotateBy = 0) {
|
|
37
41
|
const spread = total <= 2 ? Math.PI : Math.PI * 1.78;
|
|
38
42
|
const start = -Math.PI / 2 - spread / 2;
|
|
39
|
-
const angle = total <= 1 ? -Math.PI / 2 : start + (spread * index) / (total - 1);
|
|
43
|
+
const angle = total <= 1 ? -Math.PI / 2 : start + (spread * index) / (total - 1) + rotateBy;
|
|
40
44
|
return {
|
|
41
45
|
x: cx + radius * Math.cos(angle),
|
|
42
46
|
y: cy + radius * Math.sin(angle),
|
|
@@ -248,8 +252,17 @@ export function TopoGraph({ sessions, sseSessions }: TopoGraphProps) {
|
|
|
248
252
|
positions[s.alias] = polarPoint(index, Math.max(online.length, 1), onlineRadius);
|
|
249
253
|
});
|
|
250
254
|
|
|
255
|
+
// Offset the offline ring radially by half the online step so offline
|
|
256
|
+
// bubbles sit in the angular gaps between online bubbles instead of
|
|
257
|
+
// stacking directly behind them. Also push the outer ring further when
|
|
258
|
+
// there are many offline nodes so labels don't crowd the legend.
|
|
259
|
+
const spread = online.length <= 2 ? Math.PI : Math.PI * 1.78;
|
|
260
|
+
const onlineStep = online.length > 1 ? spread / (online.length - 1) : 0;
|
|
261
|
+
const offlineRotation = online.length > 0 ? onlineStep / 2 : 0;
|
|
262
|
+
const offlineR = offlineRadius + Math.max(0, offline.length - 4) * 6;
|
|
263
|
+
|
|
251
264
|
offline.forEach((s, index) => {
|
|
252
|
-
positions[s.alias] = polarPoint(index, Math.max(offline.length, 1),
|
|
265
|
+
positions[s.alias] = polarPoint(index, Math.max(offline.length, 1), offlineR, offlineRotation);
|
|
253
266
|
});
|
|
254
267
|
|
|
255
268
|
const links = buildFlowLinks(messages, positions);
|
|
@@ -320,15 +333,85 @@ export function TopoGraph({ sessions, sseSessions }: TopoGraphProps) {
|
|
|
320
333
|
<marker id="topo-arrow" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="5" markerHeight="5" orient="auto-start-reverse">
|
|
321
334
|
<path d="M 0 0 L 10 5 L 0 10 z" fill={pal.arrowFill} />
|
|
322
335
|
</marker>
|
|
336
|
+
{/* Round 45: radial radar sweep gradient — bright at center
|
|
337
|
+
(where it meets the hub) fading to leading edge. */}
|
|
338
|
+
<radialGradient id="topo-sweep" cx="0%" cy="50%" r="100%">
|
|
339
|
+
<stop offset="0%" stopColor={isLight ? '#0d9488' : '#22d3ee'} stopOpacity={isLight ? 0.18 : 0.32} />
|
|
340
|
+
<stop offset="70%" stopColor={isLight ? '#0d9488' : '#22d3ee'} stopOpacity={isLight ? 0.10 : 0.18} />
|
|
341
|
+
<stop offset="100%" stopColor={isLight ? '#0d9488' : '#22d3ee'} stopOpacity="0" />
|
|
342
|
+
</radialGradient>
|
|
323
343
|
</defs>
|
|
324
344
|
|
|
325
345
|
<rect width="1000" height="680" fill="url(#topo-panel)" />
|
|
326
346
|
<circle cx={cx} cy={cy} r="330" fill="url(#topo-radar)" />
|
|
327
347
|
|
|
348
|
+
{/* Round 45: subtle star field — 24 deterministic dots scattered
|
|
349
|
+
across the canvas give the radar bg some depth. Skipped on
|
|
350
|
+
light theme so the white surface stays clean. */}
|
|
351
|
+
{!isLight && (
|
|
352
|
+
<g opacity="0.5">
|
|
353
|
+
{Array.from({ length: 28 }).map((_, i) => {
|
|
354
|
+
// Deterministic pseudo-random scatter so positions are
|
|
355
|
+
// stable between renders (no JS hydration mismatch).
|
|
356
|
+
const seed = i * 9301 + 49297;
|
|
357
|
+
const x = ((seed * 13) % 1000);
|
|
358
|
+
const y = ((seed * 7) % 680);
|
|
359
|
+
const r = (i % 3 === 0) ? 1.2 : 0.7;
|
|
360
|
+
return <circle key={i} cx={x} cy={y} r={r} fill="#a5b4fc" opacity={0.35 + (i % 4) * 0.05} />;
|
|
361
|
+
})}
|
|
362
|
+
</g>
|
|
363
|
+
)}
|
|
364
|
+
|
|
365
|
+
{/* Round 45: rotating radar sweep — a 40° wedge with a soft
|
|
366
|
+
leading-edge gradient. Slow 6s rotation reads as a radar
|
|
367
|
+
scan without being noisy. Inline transform-origin on the
|
|
368
|
+
<g> wrapper ensures Chrome / Firefox rotate around (cx,cy)
|
|
369
|
+
instead of the SVG viewBox corner. */}
|
|
370
|
+
<g
|
|
371
|
+
style={{
|
|
372
|
+
transformOrigin: `${cx}px ${cy}px`,
|
|
373
|
+
transformBox: 'view-box',
|
|
374
|
+
}}
|
|
375
|
+
className="anet-topo-sweep"
|
|
376
|
+
opacity={isLight ? 0.7 : 1}
|
|
377
|
+
>
|
|
378
|
+
<path
|
|
379
|
+
d={`M ${cx} ${cy} L ${cx + 330} ${cy} A 330 330 0 0 0 ${cx + 330 * Math.cos(-Math.PI / 4.5)} ${cy + 330 * Math.sin(-Math.PI / 4.5)} Z`}
|
|
380
|
+
fill="url(#topo-sweep)"
|
|
381
|
+
/>
|
|
382
|
+
</g>
|
|
383
|
+
|
|
328
384
|
{/* radar rings */}
|
|
329
385
|
{[90, 170, 250, 330].map(radius => (
|
|
330
386
|
<circle key={radius} cx={cx} cy={cy} r={radius} fill="none" stroke={pal.ringStroke} strokeWidth="1" opacity={isLight ? 0.6 : 0.35} />
|
|
331
387
|
))}
|
|
388
|
+
|
|
389
|
+
{/* Round 50: 4 small particles slowly orbiting the outer ring
|
|
390
|
+
(r=330). Each starts at a different angle (offset 0/0.25/0.5/0.75
|
|
391
|
+
of the cycle) so they're evenly spaced. 16s per revolution is
|
|
392
|
+
slow enough to feel ambient, not noisy. Skipped on light theme
|
|
393
|
+
so the white surface stays clean. */}
|
|
394
|
+
{!isLight && [0, 0.25, 0.5, 0.75].map((phase, i) => (
|
|
395
|
+
<g key={`orbit-${i}`}>
|
|
396
|
+
<circle
|
|
397
|
+
cx={cx + 330} cy={cy}
|
|
398
|
+
r={i === 0 ? 2.8 : 2.2}
|
|
399
|
+
fill="#22d3ee"
|
|
400
|
+
opacity={0.9}
|
|
401
|
+
filter="url(#topo-glow)"
|
|
402
|
+
>
|
|
403
|
+
<animateTransform
|
|
404
|
+
attributeName="transform"
|
|
405
|
+
type="rotate"
|
|
406
|
+
from={`${phase * 360} ${cx} ${cy}`}
|
|
407
|
+
to={`${phase * 360 + 360} ${cx} ${cy}`}
|
|
408
|
+
dur="16s"
|
|
409
|
+
repeatCount="indefinite"
|
|
410
|
+
/>
|
|
411
|
+
</circle>
|
|
412
|
+
</g>
|
|
413
|
+
))}
|
|
414
|
+
|
|
332
415
|
{[0, 30, 60, 90, 120, 150].map(angle => (
|
|
333
416
|
<line
|
|
334
417
|
key={angle}
|
|
@@ -342,21 +425,27 @@ export function TopoGraph({ sessions, sseSessions }: TopoGraphProps) {
|
|
|
342
425
|
/>
|
|
343
426
|
))}
|
|
344
427
|
|
|
345
|
-
{/* hub links
|
|
346
|
-
|
|
428
|
+
{/* hub links — round 46: idle spokes now have animated
|
|
429
|
+
stroke-dashoffset so dashes flow outward from the hub
|
|
430
|
+
("command relay" feel). Active spokes carrying live message
|
|
431
|
+
flow stay as solid bright strokes. */}
|
|
432
|
+
{onlineNodes.map((session, idx) => {
|
|
347
433
|
const pos = nodePositions[session.alias];
|
|
348
434
|
if (!pos) return null;
|
|
349
435
|
const path = curvePath({ x: cx, y: cy }, pos, 0);
|
|
436
|
+
const isActiveSpoke = activeAliases.has(session.alias);
|
|
350
437
|
|
|
351
438
|
return (
|
|
352
439
|
<path
|
|
353
440
|
key={`hub-${session.alias}`}
|
|
354
441
|
d={path}
|
|
355
442
|
fill="none"
|
|
356
|
-
stroke={
|
|
357
|
-
strokeWidth={
|
|
358
|
-
strokeDasharray={
|
|
359
|
-
opacity={
|
|
443
|
+
stroke={isActiveSpoke ? pal.spokeStroke.active : pal.spokeStroke.idle}
|
|
444
|
+
strokeWidth={isActiveSpoke ? 2 : 1}
|
|
445
|
+
strokeDasharray={isActiveSpoke ? 'none' : '6 14'}
|
|
446
|
+
opacity={isActiveSpoke ? 0.7 : 0.45}
|
|
447
|
+
className={isActiveSpoke ? undefined : 'anet-topo-spoke-flow'}
|
|
448
|
+
style={isActiveSpoke ? undefined : { animationDelay: `${-(idx * 0.25)}s` }}
|
|
360
449
|
/>
|
|
361
450
|
);
|
|
362
451
|
})}
|
|
@@ -399,27 +488,32 @@ export function TopoGraph({ sessions, sseSessions }: TopoGraphProps) {
|
|
|
399
488
|
);
|
|
400
489
|
})}
|
|
401
490
|
|
|
402
|
-
{/* center hub —
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
logo or label. Closes agent-network#5. */}
|
|
491
|
+
{/* center hub — round 39: enlarged from r=6 (12px) to r=10 (20px)
|
|
492
|
+
core so the "control plane" reads as the network's anchor,
|
|
493
|
+
not a stray particle. Static halo ring at r=18 grounds it
|
|
494
|
+
visually; two outward pulses keep the "signal source" idea
|
|
495
|
+
from r17. Light theme gets a paler core to avoid hot-spotting
|
|
496
|
+
the bg. */}
|
|
409
497
|
<g>
|
|
498
|
+
{/* static grounding halo — sits underneath, low opacity */}
|
|
499
|
+
<circle
|
|
500
|
+
cx={cx} cy={cy} r="18"
|
|
501
|
+
fill={isLight ? '#d1fae5' : '#10b981'}
|
|
502
|
+
opacity={isLight ? 0.35 : 0.10}
|
|
503
|
+
/>
|
|
410
504
|
{/* outer pulse 1 */}
|
|
411
|
-
<circle cx={cx} cy={cy} r="
|
|
412
|
-
<animate attributeName="r" values="
|
|
505
|
+
<circle cx={cx} cy={cy} r="10" fill="none" stroke="#10b981" strokeWidth="1.5">
|
|
506
|
+
<animate attributeName="r" values="10;38;10" dur="2.4s" repeatCount="indefinite" />
|
|
413
507
|
<animate attributeName="opacity" values="0.55;0;0.55" dur="2.4s" repeatCount="indefinite" />
|
|
414
508
|
</circle>
|
|
415
509
|
{/* outer pulse 2 (delayed 1.2s) */}
|
|
416
|
-
<circle cx={cx} cy={cy} r="
|
|
417
|
-
<animate attributeName="r" values="
|
|
510
|
+
<circle cx={cx} cy={cy} r="10" fill="none" stroke="#10b981" strokeWidth="1.5" opacity="0">
|
|
511
|
+
<animate attributeName="r" values="10;38;10" dur="2.4s" begin="1.2s" repeatCount="indefinite" />
|
|
418
512
|
<animate attributeName="opacity" values="0.45;0;0.45" dur="2.4s" begin="1.2s" repeatCount="indefinite" />
|
|
419
513
|
</circle>
|
|
420
|
-
{/* core
|
|
421
|
-
<circle cx={cx} cy={cy} r="
|
|
422
|
-
<circle cx={cx} cy={cy} r="
|
|
514
|
+
{/* core — 20px diameter, larger inner highlight reads as a "lit lamp" */}
|
|
515
|
+
<circle cx={cx} cy={cy} r="10" fill={isLight ? '#059669' : '#10b981'} />
|
|
516
|
+
<circle cx={cx} cy={cy} r="5" fill="#d1fae5" opacity="0.9" />
|
|
423
517
|
</g>
|
|
424
518
|
|
|
425
519
|
{/* agent nodes */}
|
|
@@ -441,7 +535,7 @@ export function TopoGraph({ sessions, sseSessions }: TopoGraphProps) {
|
|
|
441
535
|
<animate attributeName="opacity" values={isLight ? '0.12;0.02;0.12' : '0.18;0.04;0.18'} dur="2.4s" repeatCount="indefinite" />
|
|
442
536
|
</circle>
|
|
443
537
|
)}
|
|
444
|
-
<circle cx={pos.x} cy={pos.y} r={radius + 8} fill={status.halo} opacity={isOnline ? (isLight ? 0.85 : 0.
|
|
538
|
+
<circle cx={pos.x} cy={pos.y} r={radius + 8} fill={status.halo} opacity={isOnline ? (isLight ? 0.85 : 0.65) : (isLight ? 0.4 : 0.25)} />
|
|
445
539
|
<circle
|
|
446
540
|
cx={pos.x}
|
|
447
541
|
cy={pos.y}
|
package/app/globals.css
CHANGED
|
@@ -811,3 +811,93 @@ body {
|
|
|
811
811
|
color: #92400e !important;
|
|
812
812
|
border-color: rgba(217, 119, 6, 0.28) !important;
|
|
813
813
|
}
|
|
814
|
+
|
|
815
|
+
/* Round 30 — global drawer entrance keyframes so TaskDrawer, TaskChatPanel,
|
|
816
|
+
and any future right-side panel share one source. Previously the
|
|
817
|
+
keyframe lived inside TaskChatPanel's <style jsx global>; if that
|
|
818
|
+
component never mounted, the keyframe was missing for TaskDrawer. */
|
|
819
|
+
@keyframes anet-slide-in {
|
|
820
|
+
from { transform: translateX(100%); }
|
|
821
|
+
to { transform: translateX(0); }
|
|
822
|
+
}
|
|
823
|
+
.animate-slide-in { animation: anet-slide-in 0.2s ease-out; }
|
|
824
|
+
|
|
825
|
+
@keyframes anet-fade-in {
|
|
826
|
+
from { opacity: 0; }
|
|
827
|
+
to { opacity: 1; }
|
|
828
|
+
}
|
|
829
|
+
.anet-fade-in { animation: anet-fade-in 0.15s ease-out; }
|
|
830
|
+
|
|
831
|
+
/* Round 36 — current-step ring pulse on TaskDrawer timeline. Halo gently
|
|
832
|
+
breathes around the active step's dot so users can spot "task is here". */
|
|
833
|
+
@keyframes anet-current-step-pulse-kf {
|
|
834
|
+
0%, 100% { transform: scale(1); opacity: 0.6; }
|
|
835
|
+
50% { transform: scale(1.25); opacity: 0.0; }
|
|
836
|
+
}
|
|
837
|
+
.anet-current-step-pulse {
|
|
838
|
+
animation: anet-current-step-pulse-kf 1.6s ease-in-out infinite;
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
/* Round 45 — TopoGraph rotating radar sweep wedge. 6s slow rotation
|
|
842
|
+
gives the topology canvas a real "radar scan" feel without distracting
|
|
843
|
+
from the agent nodes. */
|
|
844
|
+
@keyframes anet-topo-sweep-kf {
|
|
845
|
+
0% { transform: rotate(0deg); }
|
|
846
|
+
100% { transform: rotate(360deg); }
|
|
847
|
+
}
|
|
848
|
+
.anet-topo-sweep {
|
|
849
|
+
animation: anet-topo-sweep-kf 6s linear infinite;
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
/* Round 46 — animated dashed spokes flowing from hub outward. Each spoke
|
|
853
|
+
gets a small animationDelay (set inline) so the dashes don't all flow
|
|
854
|
+
in sync — reads as "command relay" pulse rather than a metronome. */
|
|
855
|
+
@keyframes anet-topo-spoke-flow-kf {
|
|
856
|
+
from { stroke-dashoffset: 0; }
|
|
857
|
+
to { stroke-dashoffset: -40; }
|
|
858
|
+
}
|
|
859
|
+
.anet-topo-spoke-flow {
|
|
860
|
+
animation: anet-topo-spoke-flow-kf 2.4s linear infinite;
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
/* ─────────────────────────────────────────────────────────────────────
|
|
864
|
+
Round 29 — prefers-reduced-motion a11y sweep
|
|
865
|
+
|
|
866
|
+
Rounds 19~27 accumulated a lot of small animations: Tasks row 0fr↔1fr
|
|
867
|
+
expand, chevron rotate, hover bg shifts, Cmd+K popover, TaskChatPanel
|
|
868
|
+
slide-in, brand/skeleton pulses already had their own guards.
|
|
869
|
+
|
|
870
|
+
For users who set system "reduce motion": neutralise everything in one
|
|
871
|
+
pass. Don't kill state changes outright — only their durations and
|
|
872
|
+
keyframes. Hover and focus colours still apply, just instantly.
|
|
873
|
+
───────────────────────────────────────────────────────────────────── */
|
|
874
|
+
@media (prefers-reduced-motion: reduce) {
|
|
875
|
+
*,
|
|
876
|
+
*::before,
|
|
877
|
+
*::after {
|
|
878
|
+
animation-duration: 0.001ms !important;
|
|
879
|
+
animation-iteration-count: 1 !important;
|
|
880
|
+
transition-duration: 0.001ms !important;
|
|
881
|
+
scroll-behavior: auto !important;
|
|
882
|
+
}
|
|
883
|
+
/* Skeleton pulse already has its own guard; harden in case the bar
|
|
884
|
+
class is reused without anet-skeleton-pulse. */
|
|
885
|
+
.anet-skeleton-bar {
|
|
886
|
+
animation: none !important;
|
|
887
|
+
}
|
|
888
|
+
/* Brand pulse hidden — green/red dot still indicates state via color. */
|
|
889
|
+
.anet-brand-pulse {
|
|
890
|
+
animation: none !important;
|
|
891
|
+
}
|
|
892
|
+
/* Drawer entrance kills — keyframes promoted to globals in r30. */
|
|
893
|
+
.animate-slide-in,
|
|
894
|
+
.anet-fade-in,
|
|
895
|
+
.anet-current-step-pulse,
|
|
896
|
+
.anet-topo-sweep,
|
|
897
|
+
.anet-topo-spoke-flow {
|
|
898
|
+
animation: none !important;
|
|
899
|
+
}
|
|
900
|
+
/* Tasks row grid 0fr↔1fr keep working (it's the toggle mechanism),
|
|
901
|
+
but the smooth transition just snaps. Already handled via the
|
|
902
|
+
blanket transition-duration override above. */
|
|
903
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Dashboard package version sourced from package.json at build time.
|
|
2
|
+
* Importing JSON requires `resolveJsonModule: true` in tsconfig, which
|
|
3
|
+
* Next sets by default. Bumping is automated by the publish flow, so this
|
|
4
|
+
* surfaces the real preview number in Settings → Dashboard. */
|
|
5
|
+
import pkg from '../../package.json' assert { type: 'json' };
|
|
6
|
+
|
|
7
|
+
export const DASHBOARD_VERSION: string = pkg.version;
|
package/app/login/page.tsx
CHANGED
|
@@ -6,6 +6,7 @@ export default function LoginPage() {
|
|
|
6
6
|
const [mode, setMode] = useState<'login' | 'register'>('login');
|
|
7
7
|
const [username, setUsername] = useState('');
|
|
8
8
|
const [password, setPassword] = useState('');
|
|
9
|
+
const [showPassword, setShowPassword] = useState(false);
|
|
9
10
|
const [error, setError] = useState('');
|
|
10
11
|
const [pending, setPending] = useState(false);
|
|
11
12
|
|
|
@@ -68,7 +69,9 @@ export default function LoginPage() {
|
|
|
68
69
|
</div>
|
|
69
70
|
<h1 className="text-[22px] sm:text-2xl font-semibold text-white tracking-tight">Agent Network</h1>
|
|
70
71
|
<p className="text-[13px] text-gray-500 mt-1.5 leading-snug">
|
|
71
|
-
|
|
72
|
+
{mode === 'login'
|
|
73
|
+
? <>Welcome back · <span className="text-gray-600">Tasks · Mesh · Messages</span></>
|
|
74
|
+
: <>Create your account · <span className="text-gray-600">Free preview · no credit card</span></>}
|
|
72
75
|
</p>
|
|
73
76
|
</div>
|
|
74
77
|
|
|
@@ -93,17 +96,44 @@ export default function LoginPage() {
|
|
|
93
96
|
<label htmlFor="password" className="block text-xs text-gray-500 mb-2 uppercase tracking-wider">
|
|
94
97
|
Password
|
|
95
98
|
</label>
|
|
96
|
-
<
|
|
97
|
-
|
|
98
|
-
|
|
99
|
+
<div className="relative">
|
|
100
|
+
<input id="password" type={showPassword ? 'text' : 'password'} value={password} onChange={e => setPassword(e.target.value)}
|
|
101
|
+
placeholder="Enter password"
|
|
102
|
+
className="w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-4 pr-11 py-3 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:ring-1 focus:ring-cyan-500/20 focus:outline-none transition-all" />
|
|
103
|
+
<button
|
|
104
|
+
type="button"
|
|
105
|
+
onClick={() => setShowPassword(s => !s)}
|
|
106
|
+
tabIndex={-1}
|
|
107
|
+
aria-label={showPassword ? 'Hide password' : 'Show password'}
|
|
108
|
+
className="absolute inset-y-0 right-0 flex items-center px-3 text-gray-600 hover:text-gray-300 transition-colors"
|
|
109
|
+
>
|
|
110
|
+
{showPassword ? (
|
|
111
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
|
|
112
|
+
<path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24" />
|
|
113
|
+
<line x1="1" y1="1" x2="23" y2="23" />
|
|
114
|
+
</svg>
|
|
115
|
+
) : (
|
|
116
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
|
|
117
|
+
<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" />
|
|
118
|
+
<circle cx="12" cy="12" r="3" />
|
|
119
|
+
</svg>
|
|
120
|
+
)}
|
|
121
|
+
</button>
|
|
122
|
+
</div>
|
|
99
123
|
|
|
100
124
|
{error && (
|
|
101
125
|
<div className="mt-3 text-sm text-red-300 bg-red-500/5 border border-red-500/10 rounded-lg px-3 py-2">{error}</div>
|
|
102
126
|
)}
|
|
103
127
|
|
|
104
|
-
<button type="submit" disabled={pending || !password}
|
|
105
|
-
className="mt-5 w-full px-4 py-3 bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-500 hover:to-blue-500 disabled:from-gray-800 disabled:to-gray-800 disabled:text-gray-600 text-white text-sm font-medium rounded-lg transition-all shadow-lg shadow-cyan-500/10 hover:shadow-cyan-500/20 disabled:shadow-none">
|
|
106
|
-
{pending
|
|
128
|
+
<button type="submit" disabled={pending || !password || !username.trim()}
|
|
129
|
+
className="mt-5 w-full flex items-center justify-center gap-2 px-4 py-3 bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-500 hover:to-blue-500 disabled:from-gray-800 disabled:to-gray-800 disabled:text-gray-600 text-white text-sm font-medium rounded-lg transition-all shadow-lg shadow-cyan-500/10 hover:shadow-cyan-500/20 disabled:shadow-none">
|
|
130
|
+
{pending && (
|
|
131
|
+
<svg aria-hidden className="w-4 h-4 animate-spin" viewBox="0 0 24 24" fill="none">
|
|
132
|
+
<circle cx="12" cy="12" r="10" stroke="currentColor" strokeWidth="3" opacity="0.25" />
|
|
133
|
+
<path d="M4 12a8 8 0 018-8" stroke="currentColor" strokeWidth="3" strokeLinecap="round" />
|
|
134
|
+
</svg>
|
|
135
|
+
)}
|
|
136
|
+
<span>{pending ? (mode === 'login' ? 'Signing in…' : 'Registering…') : (mode === 'login' ? 'Sign in' : 'Create account')}</span>
|
|
107
137
|
</button>
|
|
108
138
|
</form>
|
|
109
139
|
|
package/app/logs/page.tsx
CHANGED
|
@@ -5,6 +5,7 @@ import Link from 'next/link';
|
|
|
5
5
|
import { timeAgo } from '../components/utils';
|
|
6
6
|
import { useNetworkId } from '../lib/network-context';
|
|
7
7
|
import { EmptyState } from '../components/EmptyState';
|
|
8
|
+
import { AliasAvatar } from '../components/AliasAvatar';
|
|
8
9
|
|
|
9
10
|
interface AuditLog {
|
|
10
11
|
id: string;
|
|
@@ -26,6 +27,18 @@ const ACTION_COLORS: Record<string, string> = {
|
|
|
26
27
|
send_task: 'bg-cyan-500/10 text-cyan-300 border-cyan-500/20',
|
|
27
28
|
};
|
|
28
29
|
|
|
30
|
+
/** 2px left-rail stripe color per audit action — reuses the r32 server-logs
|
|
31
|
+
* pattern so failed logins / token rotations spike out of a wall of
|
|
32
|
+
* registers and logins without users reading every chip. Inline hex
|
|
33
|
+
* prevents Tailwind v4 from purging dynamic class names. */
|
|
34
|
+
const ACTION_STRIPE: Record<string, string> = {
|
|
35
|
+
register: '#4ade80',
|
|
36
|
+
login: '#60a5fa',
|
|
37
|
+
login_failed: '#ef4444',
|
|
38
|
+
create_network: '#a78bfa',
|
|
39
|
+
send_task: '#22d3ee',
|
|
40
|
+
};
|
|
41
|
+
|
|
29
42
|
export default function LogsPage() {
|
|
30
43
|
const { networkId } = useNetworkId();
|
|
31
44
|
const [logs, setLogs] = useState<AuditLog[]>([]);
|
|
@@ -64,25 +77,52 @@ export default function LogsPage() {
|
|
|
64
77
|
return (
|
|
65
78
|
<div className="min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono">
|
|
66
79
|
<div className="flex items-center gap-4 mb-6">
|
|
67
|
-
<h1 className="text-2xl font-bold text-white lg:ml-0 ml-10">
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
80
|
+
<h1 className="text-2xl font-bold text-white lg:ml-0 ml-10">Audit Log</h1>
|
|
81
|
+
{logs.length > 0 && (
|
|
82
|
+
<span className="text-xs bg-blue-900/30 text-blue-400 px-2 py-0.5 rounded-full border border-blue-800/30">
|
|
83
|
+
{logs.length}
|
|
84
|
+
</span>
|
|
85
|
+
)}
|
|
71
86
|
</div>
|
|
72
87
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
<
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
88
|
+
{/* Action filter chips (round 43) — same chip pattern as Tasks
|
|
89
|
+
status tabs / Overview agent filter. Each chip carries its
|
|
90
|
+
ACTION_STRIPE dot so the visual key matches the per-row left
|
|
91
|
+
rail. Counts come from the currently loaded log set. */}
|
|
92
|
+
<div className="mb-6 flex flex-wrap items-center gap-1 anet-tabstrip-wrap overflow-x-auto sm:overflow-x-visible">
|
|
93
|
+
{(() => {
|
|
94
|
+
const counts: Record<string, number> = {};
|
|
95
|
+
logs.forEach(l => { counts[l.action] = (counts[l.action] || 0) + 1; });
|
|
96
|
+
const chips: { key: string; label: string; dot?: string }[] = [
|
|
97
|
+
{ key: '', label: 'All' },
|
|
98
|
+
{ key: 'login', label: 'login', dot: ACTION_STRIPE.login },
|
|
99
|
+
{ key: 'login_failed', label: 'login_failed', dot: ACTION_STRIPE.login_failed },
|
|
100
|
+
{ key: 'register', label: 'register', dot: ACTION_STRIPE.register },
|
|
101
|
+
{ key: 'create_network', label: 'create_network', dot: ACTION_STRIPE.create_network },
|
|
102
|
+
{ key: 'send_task', label: 'send_task', dot: ACTION_STRIPE.send_task },
|
|
103
|
+
];
|
|
104
|
+
return chips.map(c => {
|
|
105
|
+
const count = c.key === '' ? logs.length : counts[c.key] || 0;
|
|
106
|
+
const isActive = filterAction === c.key;
|
|
107
|
+
return (
|
|
108
|
+
<button
|
|
109
|
+
key={c.key || 'all'}
|
|
110
|
+
type="button"
|
|
111
|
+
onClick={() => setFilterAction(c.key)}
|
|
112
|
+
disabled={count === 0 && c.key !== ''}
|
|
113
|
+
className={`flex items-center gap-1.5 rounded-md px-2.5 py-1 text-xs transition-colors disabled:opacity-30 disabled:cursor-not-allowed shrink-0 whitespace-nowrap ${
|
|
114
|
+
isActive
|
|
115
|
+
? 'bg-cyan-500/10 text-cyan-300 border border-cyan-500/30'
|
|
116
|
+
: 'text-gray-500 hover:text-gray-200 hover:bg-[#1a1a2a] border border-transparent'
|
|
117
|
+
}`}
|
|
118
|
+
>
|
|
119
|
+
{c.dot && <span aria-hidden className="inline-block w-1.5 h-1.5 rounded-full" style={{ backgroundColor: c.dot }} />}
|
|
120
|
+
<span>{c.label}</span>
|
|
121
|
+
<span className={`text-[10px] tabular-nums ${isActive ? 'text-cyan-400' : 'text-gray-600'}`}>{count}</span>
|
|
122
|
+
</button>
|
|
123
|
+
);
|
|
124
|
+
});
|
|
125
|
+
})()}
|
|
86
126
|
</div>
|
|
87
127
|
|
|
88
128
|
{error && (() => {
|
|
@@ -125,13 +165,23 @@ export default function LogsPage() {
|
|
|
125
165
|
<EmptyState variant="logs" />
|
|
126
166
|
) : (
|
|
127
167
|
<div className="space-y-2">
|
|
128
|
-
{logs.map(log =>
|
|
129
|
-
|
|
168
|
+
{logs.map(log => {
|
|
169
|
+
const userName = log.username || log.user_id;
|
|
170
|
+
return (
|
|
171
|
+
<div key={log.id} className="relative bg-[#111128] border border-[#2a2a4a] rounded-lg pl-4 pr-4 py-3 hover:border-[#3a3a5a] transition-colors overflow-hidden">
|
|
172
|
+
{/* 2px left rail per action (round 33) — failed logins, token
|
|
173
|
+
rotations spike out of a wall of register/login rows. */}
|
|
174
|
+
<span
|
|
175
|
+
aria-hidden
|
|
176
|
+
className="absolute left-0 top-0 bottom-0 w-0.5"
|
|
177
|
+
style={{ backgroundColor: ACTION_STRIPE[log.action] || 'transparent' }}
|
|
178
|
+
/>
|
|
130
179
|
<div className="flex flex-wrap items-center gap-2 mb-1">
|
|
131
180
|
<span className={`text-xs px-2 py-0.5 rounded-md border ${ACTION_COLORS[log.action] || 'bg-gray-500/10 text-gray-400 border-gray-500/20'}`}>
|
|
132
181
|
{log.action}
|
|
133
182
|
</span>
|
|
134
|
-
<
|
|
183
|
+
{userName && <AliasAvatar alias={userName} size={16} />}
|
|
184
|
+
<span className="text-sm text-gray-200 font-medium">{userName}</span>
|
|
135
185
|
{log.target_type && (
|
|
136
186
|
<>
|
|
137
187
|
<span className="text-xs text-gray-600">→</span>
|
|
@@ -143,7 +193,8 @@ export default function LogsPage() {
|
|
|
143
193
|
{log.detail && <div className="text-xs text-gray-500">{log.detail}</div>}
|
|
144
194
|
{log.ip && log.ip !== 'unknown' && <div className="text-[10px] text-gray-700">IP: {log.ip}</div>}
|
|
145
195
|
</div>
|
|
146
|
-
|
|
196
|
+
);
|
|
197
|
+
})}
|
|
147
198
|
</div>
|
|
148
199
|
)}
|
|
149
200
|
</div>
|