@sleep2agi/agent-network-dashboard 0.5.7-preview.7 → 0.5.7-preview.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +0 -1
- package/.next/build-manifest.json +3 -3
- package/.next/diagnostics/route-bundle-stats.json +65 -65
- package/.next/fallback-build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/routes-manifest.json +0 -6
- 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/next-font-manifest.json +2 -1
- package/.next/server/app/_not-found/page.js +1 -1
- package/.next/server/app/_not-found/page.js.nft.json +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 +16 -16
- package/.next/server/app/_not-found.segments/_full.segment.rsc +16 -16
- package/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
- package/.next/server/app/_not-found.segments/_index.segment.rsc +9 -9
- 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 +3 -3
- package/.next/server/app/admin/page/next-font-manifest.json +2 -1
- package/.next/server/app/admin/page.js +1 -1
- 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 +20 -19
- package/.next/server/app/admin.segments/_full.segment.rsc +20 -19
- package/.next/server/app/admin.segments/_head.segment.rsc +4 -4
- package/.next/server/app/admin.segments/_index.segment.rsc +9 -9
- package/.next/server/app/admin.segments/_tree.segment.rsc +5 -4
- 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 +20 -19
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/index.segments/_full.segment.rsc +20 -19
- package/.next/server/app/index.segments/_head.segment.rsc +4 -4
- package/.next/server/app/index.segments/_index.segment.rsc +9 -9
- package/.next/server/app/index.segments/_tree.segment.rsc +5 -4
- package/.next/server/app/login/page/next-font-manifest.json +2 -1
- package/.next/server/app/login/page.js +1 -1
- package/.next/server/app/login/page.js.nft.json +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 +20 -19
- package/.next/server/app/login.segments/_full.segment.rsc +20 -19
- package/.next/server/app/login.segments/_head.segment.rsc +4 -4
- package/.next/server/app/login.segments/_index.segment.rsc +9 -9
- package/.next/server/app/login.segments/_tree.segment.rsc +5 -4
- 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/next-font-manifest.json +2 -1
- package/.next/server/app/logs/page.js +1 -1
- 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 +20 -19
- package/.next/server/app/logs.segments/_full.segment.rsc +20 -19
- package/.next/server/app/logs.segments/_head.segment.rsc +4 -4
- package/.next/server/app/logs.segments/_index.segment.rsc +9 -9
- package/.next/server/app/logs.segments/_tree.segment.rsc +5 -4
- 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/manifest.webmanifest.body +1 -1
- package/.next/server/app/messages/page/next-font-manifest.json +2 -1
- package/.next/server/app/messages/page.js +1 -1
- 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 +20 -19
- package/.next/server/app/messages.segments/_full.segment.rsc +20 -19
- package/.next/server/app/messages.segments/_head.segment.rsc +4 -4
- package/.next/server/app/messages.segments/_index.segment.rsc +9 -9
- package/.next/server/app/messages.segments/_tree.segment.rsc +5 -4
- 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/next-font-manifest.json +2 -1
- package/.next/server/app/node/page.js +1 -1
- 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 +20 -19
- package/.next/server/app/node.segments/_full.segment.rsc +20 -19
- package/.next/server/app/node.segments/_head.segment.rsc +4 -4
- package/.next/server/app/node.segments/_index.segment.rsc +9 -9
- package/.next/server/app/node.segments/_tree.segment.rsc +5 -4
- 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/next-font-manifest.json +2 -1
- package/.next/server/app/nodes/page.js +1 -1
- 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 +20 -19
- package/.next/server/app/nodes.segments/_full.segment.rsc +20 -19
- package/.next/server/app/nodes.segments/_head.segment.rsc +4 -4
- package/.next/server/app/nodes.segments/_index.segment.rsc +9 -9
- package/.next/server/app/nodes.segments/_tree.segment.rsc +5 -4
- 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/next-font-manifest.json +2 -1
- package/.next/server/app/page.js +1 -1
- 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/next-font-manifest.json +2 -1
- package/.next/server/app/server-logs/page.js +1 -1
- package/.next/server/app/server-logs/page.js.nft.json +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 +20 -19
- package/.next/server/app/server-logs.segments/_full.segment.rsc +20 -19
- package/.next/server/app/server-logs.segments/_head.segment.rsc +4 -4
- package/.next/server/app/server-logs.segments/_index.segment.rsc +9 -9
- package/.next/server/app/server-logs.segments/_tree.segment.rsc +5 -4
- 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/servers/page/next-font-manifest.json +2 -1
- package/.next/server/app/servers/page.js +1 -1
- package/.next/server/app/servers/page.js.nft.json +1 -1
- package/.next/server/app/servers/page_client-reference-manifest.js +1 -1
- package/.next/server/app/servers.html +4 -4
- package/.next/server/app/servers.rsc +20 -19
- package/.next/server/app/servers.segments/_full.segment.rsc +20 -19
- package/.next/server/app/servers.segments/_head.segment.rsc +4 -4
- package/.next/server/app/servers.segments/_index.segment.rsc +9 -9
- package/.next/server/app/servers.segments/_tree.segment.rsc +5 -4
- package/.next/server/app/servers.segments/servers/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/servers.segments/servers.segment.rsc +3 -3
- package/.next/server/app/settings/networks/page/next-font-manifest.json +2 -1
- package/.next/server/app/settings/networks/page.js +1 -1
- 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 +20 -19
- package/.next/server/app/settings/networks.segments/_full.segment.rsc +20 -19
- package/.next/server/app/settings/networks.segments/_head.segment.rsc +4 -4
- package/.next/server/app/settings/networks.segments/_index.segment.rsc +9 -9
- package/.next/server/app/settings/networks.segments/_tree.segment.rsc +5 -4
- 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/next-font-manifest.json +2 -1
- package/.next/server/app/settings/page.js +1 -1
- package/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/tokens/page/next-font-manifest.json +2 -1
- package/.next/server/app/settings/tokens/page.js +1 -1
- package/.next/server/app/settings/tokens/page.js.nft.json +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 +20 -19
- package/.next/server/app/settings/tokens.segments/_full.segment.rsc +20 -19
- package/.next/server/app/settings/tokens.segments/_head.segment.rsc +4 -4
- package/.next/server/app/settings/tokens.segments/_index.segment.rsc +9 -9
- package/.next/server/app/settings/tokens.segments/_tree.segment.rsc +5 -4
- 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 +20 -19
- package/.next/server/app/settings.segments/_full.segment.rsc +20 -19
- package/.next/server/app/settings.segments/_head.segment.rsc +4 -4
- package/.next/server/app/settings.segments/_index.segment.rsc +9 -9
- package/.next/server/app/settings.segments/_tree.segment.rsc +5 -4
- 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/next-font-manifest.json +2 -1
- package/.next/server/app/tasks/[id]/page.js +1 -1
- package/.next/server/app/tasks/[id]/page.js.nft.json +1 -1
- package/.next/server/app/tasks/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/tasks/page/next-font-manifest.json +2 -1
- package/.next/server/app/tasks/page.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 +20 -19
- package/.next/server/app/tasks.segments/_full.segment.rsc +20 -19
- package/.next/server/app/tasks.segments/_head.segment.rsc +4 -4
- package/.next/server/app/tasks.segments/_index.segment.rsc +9 -9
- package/.next/server/app/tasks.segments/_tree.segment.rsc +5 -4
- package/.next/server/app/tasks.segments/tasks/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/tasks.segments/tasks.segment.rsc +3 -3
- package/.next/server/app-paths-manifest.json +0 -1
- package/.next/server/chunks/00jm_next_dist_0ju_ux9._.js +1 -1
- package/.next/server/chunks/00jm_next_dist_0ju_ux9._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__030vg4n._.js +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__030vg4n._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__05kf31s._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__05kf31s._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__096ytyk._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__096ytyk._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0fhoq8i._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0fhoq8i._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0nw1f-j._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0nw1f-j._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0u4-66w._.js +8 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0u4-66w._.js.map +1 -0
- package/.next/server/chunks/ssr/agent-network-dashboard_09kk21a._.js +3 -3
- package/.next/server/chunks/ssr/agent-network-dashboard_09kk21a._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_012oyw5._.js +3 -0
- package/.next/server/chunks/ssr/agent-network-dashboard_app_012oyw5._.js.map +1 -0
- 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_0_d45-d._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_0_d45-d._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_0fjlnh~._.js +3 -0
- package/.next/server/chunks/ssr/agent-network-dashboard_app_0fjlnh~._.js.map +1 -0
- package/.next/server/chunks/ssr/agent-network-dashboard_app_0gd.4pc._.js +9 -0
- package/.next/server/chunks/ssr/agent-network-dashboard_app_0gd.4pc._.js.map +1 -0
- package/.next/server/chunks/ssr/agent-network-dashboard_app_0wn4jc5._.js +3 -0
- package/.next/server/chunks/ssr/agent-network-dashboard_app_0wn4jc5._.js.map +1 -0
- package/.next/server/chunks/ssr/agent-network-dashboard_app_0xgney8._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_0xgney8._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_10hjgv4._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_10hjgv4._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_12l4oto._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_12l4oto._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_components_0r7kb.o._.js +9 -0
- package/.next/server/chunks/ssr/agent-network-dashboard_app_components_0r7kb.o._.js.map +1 -0
- package/.next/server/chunks/ssr/agent-network-dashboard_app_servers_page_tsx_0jib5qm._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_servers_page_tsx_0jib5qm._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_tasks_page_tsx_0mwxy4z._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_tasks_page_tsx_0mwxy4z._.js.map +1 -1
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/next-font-manifest.js +1 -1
- package/.next/server/next-font-manifest.json +30 -15
- 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/0.mh8n0itrii5.js +1 -0
- package/.next/static/chunks/049vx3qljs1tt.js +1 -0
- package/.next/static/chunks/04uju~n5s9g7..css +1 -0
- package/.next/static/chunks/066jf0nk75nic.css +2 -0
- package/.next/static/chunks/06vp7429lrzl7.js +1 -0
- package/.next/static/chunks/{0jp~cs9-zkmqa.js → 07h2umbpc5lqy.js} +2 -2
- package/.next/static/chunks/0_bn~gcrgo.4n.js +1 -0
- package/.next/static/chunks/0_cm~9rtqil56.js +1 -0
- package/.next/static/chunks/0cp0cz3mxejl~.js +4 -0
- package/.next/static/chunks/0g1o7c8fbafn7.js +1 -0
- package/.next/static/chunks/0g4d-_fi-d9hg.js +1 -0
- package/.next/static/chunks/0iv.0p9_5b36e.js +1 -0
- package/.next/static/chunks/0tor7h4q5_rz..js +1 -0
- package/.next/static/chunks/0vun~4ljcrj3p.js +7 -0
- package/.next/static/chunks/0wz0122ym_gr3.js +1 -0
- package/.next/static/chunks/0y5gol09tlu63.js +1 -0
- package/.next/static/chunks/114o05335p68v.js +1 -0
- package/.next/static/chunks/14141xj5.1t3t.js +1 -0
- package/.next/static/chunks/149a4l50_3vw-.js +7 -0
- package/.next/static/chunks/15hos-r_t7doi.js +1 -0
- package/.next/static/media/4fa387ec64143e14-s.0wkzw~je483f-.woff2 +0 -0
- package/.next/static/media/53b9e256198e5412-s.0-wfv7uh4i7h9.woff2 +0 -0
- package/.next/static/media/5ce348bf30bf5439-s.0zgw-jeven.3w.woff2 +0 -0
- package/.next/static/media/6306c77e7c8268e4-s.0rhz0arwfsn~5.woff2 +0 -0
- package/.next/static/media/7178b3e590c64307-s.0nx0ww8fni_q3.woff2 +0 -0
- package/.next/static/media/797e433ab948586e-s.p.08e28id.o-okb.woff2 +0 -0
- package/.next/static/media/7d817b4c03b0c5f1-s.0l76wvqk9d84w.woff2 +0 -0
- package/.next/static/media/8a480f0b521d4e75-s.0jzbimsg8vl84.woff2 +0 -0
- package/.next/static/media/bbc41e54d2fcbd21-s.0k4k9394f2q-k.woff2 +0 -0
- package/.next/static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2 +0 -0
- package/.next/static/media/fef07dbb0973bf53-s.12tyk43_3sh9u.woff2 +0 -0
- package/.next/trace +2 -2
- package/.next/trace-build +1 -1
- package/.next/types/routes.d.ts +1 -2
- package/.next/types/validator.ts +0 -9
- package/app/admin/page.tsx +53 -38
- package/app/components/AgentCard.tsx +36 -20
- package/app/components/AppShell.tsx +7 -1
- package/app/components/ChatPopover.tsx +1 -1
- package/app/components/CollapsibleSearch.tsx +127 -0
- package/app/components/CommandCenter.tsx +14 -4
- package/app/components/CommandPalette.tsx +6 -6
- package/app/components/DispatchPanel.tsx +13 -10
- package/app/components/EmptyState.tsx +19 -4
- package/app/components/HealthBanner.tsx +28 -4
- package/app/components/HelpOverlay.tsx +4 -7
- package/app/components/LoadingSkeleton.tsx +31 -21
- package/app/components/MobileNav.tsx +28 -21
- package/app/components/Sidebar.tsx +30 -23
- package/app/components/StatsBar.tsx +69 -42
- package/app/components/TaskChatPanel.tsx +105 -12
- package/app/components/TaskDrawer.tsx +9 -7
- package/app/components/ThemeSwitcher.tsx +15 -79
- package/app/components/TopoGraph.tsx +31 -21
- package/app/components/UserBar.tsx +5 -5
- package/app/globals.css +1757 -1776
- package/app/layout.tsx +37 -4
- package/app/lib/hooks.ts +4 -6
- package/app/lib/status.ts +24 -17
- package/app/login/page.tsx +7 -7
- package/app/logs/page.tsx +12 -6
- package/app/manifest.ts +2 -2
- package/app/messages/page.tsx +108 -50
- package/app/node/page.tsx +27 -17
- package/app/nodes/page.tsx +62 -49
- package/app/page.tsx +60 -282
- package/app/server-logs/page.tsx +40 -14
- package/app/servers/page.tsx +33 -12
- package/app/settings/networks/page.tsx +17 -15
- package/app/settings/page.tsx +102 -96
- package/app/settings/tokens/page.tsx +5 -5
- package/app/tasks/[id]/page.tsx +10 -10
- package/app/tasks/page.tsx +58 -34
- package/bin/start.js +0 -0
- package/package.json +1 -1
- package/public/favicon.svg +1 -1
- package/public/manifest.webmanifest +24 -0
- package/public/robots.txt +7 -0
- package/.next/server/app/api/hub/license/route/app-paths-manifest.json +0 -3
- package/.next/server/app/api/hub/license/route/build-manifest.json +0 -9
- package/.next/server/app/api/hub/license/route/server-reference-manifest.json +0 -4
- package/.next/server/app/api/hub/license/route.js +0 -7
- package/.next/server/app/api/hub/license/route.js.map +0 -5
- package/.next/server/app/api/hub/license/route.js.nft.json +0 -1
- package/.next/server/app/api/hub/license/route_client-reference-manifest.js +0 -3
- package/.next/server/chunks/0ykm__next-internal_server_app_api_hub_license_route_actions_0a4.fuh.js +0 -3
- package/.next/server/chunks/0ykm__next-internal_server_app_api_hub_license_route_actions_0a4.fuh.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__0rovr5-._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0rovr5-._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0lu1wok._.js +0 -8
- package/.next/server/chunks/ssr/[root-of-the-server]__0lu1wok._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0nw~zhp._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0nw~zhp._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0sv~g.o._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0sv~g.o._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__11fu-5m._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__11fu-5m._.js.map +0 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_057q.ne._.js +0 -3
- package/.next/server/chunks/ssr/agent-network-dashboard_app_057q.ne._.js.map +0 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_0i3759l._.js +0 -3
- package/.next/server/chunks/ssr/agent-network-dashboard_app_0i3759l._.js.map +0 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_1153xeb._.js +0 -9
- package/.next/server/chunks/ssr/agent-network-dashboard_app_1153xeb._.js.map +0 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_components_0s5uqlp._.js +0 -9
- package/.next/server/chunks/ssr/agent-network-dashboard_app_components_0s5uqlp._.js.map +0 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_server-logs_page_tsx_0dg.l_8._.js +0 -3
- package/.next/server/chunks/ssr/agent-network-dashboard_app_server-logs_page_tsx_0dg.l_8._.js.map +0 -1
- package/.next/static/chunks/0-mpa_947ipeq.js +0 -1
- package/.next/static/chunks/02to42x11p557.js +0 -7
- package/.next/static/chunks/03~5pxwbxxw-b.js +0 -1
- package/.next/static/chunks/04~fkia6-79k3.js +0 -1
- package/.next/static/chunks/0561vp5-q5.zp.js +0 -1
- package/.next/static/chunks/05uk96gc~9mni.js +0 -1
- package/.next/static/chunks/085rejlait1fs.js +0 -1
- package/.next/static/chunks/0a.9~-nf0gpec.js +0 -1
- package/.next/static/chunks/0im751o4n61c7.js +0 -1
- package/.next/static/chunks/0inql3s9ldyx5.js +0 -1
- package/.next/static/chunks/0ku0fjqlm9mca.js +0 -1
- package/.next/static/chunks/0mcamnu4w_x1r.js +0 -4
- package/.next/static/chunks/0ss8u23bnbyry.js +0 -1
- package/.next/static/chunks/0~rv5y.y5my9s.css +0 -1
- package/.next/static/chunks/13yktdzuatx3d.js +0 -1
- package/.next/static/chunks/15-ltfhot3b4n.js +0 -7
- package/.next/static/chunks/16ls93seuyj8a.js +0 -1
- package/.next/static/chunks/17sxlwlx5fhrp.css +0 -1
- package/.next/static/chunks/181u38qblp8lz.js +0 -1
- package/.next/static/media/4fa387ec64143e14-s.0.qu-9752pffj.woff2 +0 -0
- package/.next/static/media/5ce348bf30bf5439-s.0ee55_hj9qcer.woff2 +0 -0
- package/.next/static/media/6306c77e7c8268e4-s.0mao5jbfbduzp.woff2 +0 -0
- package/.next/static/media/797e433ab948586e-s.p.09zddjkbdep5a.woff2 +0 -0
- package/.next/static/media/7d817b4c03b0c5f1-s.0uzt.a6d44yda.woff2 +0 -0
- package/.next/static/media/bbc41e54d2fcbd21-s.0mvwgmnhv29no.woff2 +0 -0
- package/app/api/hub/license/route.ts +0 -33
- package/app/components/BroadcastBar.tsx +0 -84
- package/app/components/InboxPanel.tsx +0 -36
- /package/.next/static/{vv4Gz5yVhOzydMI2UlT1l → nPhsSMLrgn8H0RsXNP4ku}/_buildManifest.js +0 -0
- /package/.next/static/{vv4Gz5yVhOzydMI2UlT1l → nPhsSMLrgn8H0RsXNP4ku}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{vv4Gz5yVhOzydMI2UlT1l → nPhsSMLrgn8H0RsXNP4ku}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* CollapsibleSearch
|
|
5
|
+
* ──────────────────
|
|
6
|
+
* #209 R34 — Reusable WeChat-style search-toggle pattern.
|
|
7
|
+
*
|
|
8
|
+
* Two pieces of UI from one component:
|
|
9
|
+
* 1. A magnifier button (`w-9 h-9 rounded-full`) that lives in a page
|
|
10
|
+
* header — render it via `Button`.
|
|
11
|
+
* 2. A collapsible search row that reveals below the header on open —
|
|
12
|
+
* render it via `Row`.
|
|
13
|
+
*
|
|
14
|
+
* Used together they replicate WeChat's chat-list search affordance:
|
|
15
|
+
* the search field is hidden by default behind a small circle at the
|
|
16
|
+
* top-right of the page header. Tapping it slides the input open,
|
|
17
|
+
* autofocuses, and lets Escape clear + close. A cyan dot appears in
|
|
18
|
+
* the corner of the icon when there is an active search term but the
|
|
19
|
+
* row is collapsed, so the user always knows a filter is in effect.
|
|
20
|
+
*
|
|
21
|
+
* Owner of the search string is the parent (this component is
|
|
22
|
+
* uncontrolled w.r.t. value — pure UI). That keeps the filter logic
|
|
23
|
+
* with the page so it's easy to plumb additional behaviour like
|
|
24
|
+
* `from:alias` shortcuts or highlight rendering.
|
|
25
|
+
*
|
|
26
|
+
* Shipped as a single component with two named children so callers
|
|
27
|
+
* can place `<Button>` inside their existing header flex row and
|
|
28
|
+
* `<Row>` just after, without restructuring around a tighter API.
|
|
29
|
+
*
|
|
30
|
+
* First adopters: /nodes (R32), /messages (R33). R34 ships
|
|
31
|
+
* /nodes + /messages migrated to use this component; future pages
|
|
32
|
+
* can add search by importing it instead of copy-pasting the JSX.
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
import { useState, useCallback } from 'react';
|
|
36
|
+
|
|
37
|
+
interface CollapsibleSearchAPI {
|
|
38
|
+
/** Round magnifier button. Place in your page header (e.g. right edge). */
|
|
39
|
+
Button: () => React.JSX.Element;
|
|
40
|
+
/** Collapsible search input row. Place immediately after the header. */
|
|
41
|
+
Row: () => React.JSX.Element | null;
|
|
42
|
+
/** Current search value — pass to your filter logic. */
|
|
43
|
+
value: string;
|
|
44
|
+
/** Programmatically clear + close (useful for "no results" reset link). */
|
|
45
|
+
reset: () => void;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
interface UseCollapsibleSearchProps {
|
|
49
|
+
/** Controlled value + setter from the parent — owns the search string. */
|
|
50
|
+
value: string;
|
|
51
|
+
onChange: (next: string) => void;
|
|
52
|
+
/** Input placeholder. */
|
|
53
|
+
placeholder?: string;
|
|
54
|
+
/** Accessible label for the button (also drives `title=`). */
|
|
55
|
+
label?: string;
|
|
56
|
+
/** Hide everything when false (e.g. when there is nothing to search). */
|
|
57
|
+
enabled?: boolean;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function useCollapsibleSearch({
|
|
61
|
+
value,
|
|
62
|
+
onChange,
|
|
63
|
+
placeholder = 'Search…',
|
|
64
|
+
label = 'Search',
|
|
65
|
+
enabled = true,
|
|
66
|
+
}: UseCollapsibleSearchProps): CollapsibleSearchAPI {
|
|
67
|
+
const [open, setOpen] = useState(false);
|
|
68
|
+
|
|
69
|
+
const reset = useCallback(() => {
|
|
70
|
+
onChange('');
|
|
71
|
+
setOpen(false);
|
|
72
|
+
}, [onChange]);
|
|
73
|
+
|
|
74
|
+
const Button = useCallback(() => {
|
|
75
|
+
if (!enabled) return <></>;
|
|
76
|
+
const active = open || value;
|
|
77
|
+
return (
|
|
78
|
+
<button
|
|
79
|
+
type="button"
|
|
80
|
+
onClick={() => setOpen(v => !v)}
|
|
81
|
+
aria-label={open ? `Close ${label.toLowerCase()}` : `Open ${label.toLowerCase()}`}
|
|
82
|
+
aria-pressed={open}
|
|
83
|
+
title={open ? `Close ${label.toLowerCase()}` : label}
|
|
84
|
+
className={`relative shrink-0 inline-flex items-center justify-center rounded-full border w-9 h-9 transition-colors ${
|
|
85
|
+
active
|
|
86
|
+
? 'border-cyan-500/40 bg-cyan-500/10 text-cyan-300'
|
|
87
|
+
: 'border-[#26262b] bg-[#161618] text-gray-400 hover:text-gray-200 hover:border-[#3a3a41]'
|
|
88
|
+
}`}
|
|
89
|
+
>
|
|
90
|
+
<svg className="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2}>
|
|
91
|
+
<path strokeLinecap="round" strokeLinejoin="round" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
|
|
92
|
+
</svg>
|
|
93
|
+
{value && !open && (
|
|
94
|
+
<span aria-hidden className="absolute -top-0.5 -right-0.5 w-2 h-2 rounded-full bg-cyan-400 ring-2 ring-[#0b0b0d]" />
|
|
95
|
+
)}
|
|
96
|
+
</button>
|
|
97
|
+
);
|
|
98
|
+
}, [open, value, label, enabled]);
|
|
99
|
+
|
|
100
|
+
const Row = useCallback(() => {
|
|
101
|
+
if (!enabled) return null;
|
|
102
|
+
if (!open && !value) return null;
|
|
103
|
+
return (
|
|
104
|
+
<div className="mb-3 sm:mb-4 flex items-center gap-2">
|
|
105
|
+
<input
|
|
106
|
+
type="text"
|
|
107
|
+
value={value}
|
|
108
|
+
onChange={e => onChange(e.target.value)}
|
|
109
|
+
onKeyDown={e => { if (e.key === 'Escape') reset(); }}
|
|
110
|
+
placeholder={placeholder}
|
|
111
|
+
autoFocus={open}
|
|
112
|
+
className="flex-1 bg-[#161618] border border-[#26262b] rounded-lg px-3 py-2 text-base sm:text-sm text-white placeholder-gray-600 focus:border-cyan-500/40 focus:outline-none"
|
|
113
|
+
/>
|
|
114
|
+
<button
|
|
115
|
+
type="button"
|
|
116
|
+
onClick={reset}
|
|
117
|
+
className="shrink-0 text-xs text-gray-500 hover:text-gray-300 px-2 py-2"
|
|
118
|
+
aria-label="Clear and close search"
|
|
119
|
+
>
|
|
120
|
+
Cancel
|
|
121
|
+
</button>
|
|
122
|
+
</div>
|
|
123
|
+
);
|
|
124
|
+
}, [open, value, onChange, placeholder, reset, enabled]);
|
|
125
|
+
|
|
126
|
+
return { Button, Row, value, reset };
|
|
127
|
+
}
|
|
@@ -26,9 +26,9 @@ export function CommandCenter({ tabs, activeTab, onOpenTab, onCloseTab, onSetAct
|
|
|
26
26
|
<div className="fixed inset-0 bg-black/30 z-40 lg:hidden" onClick={onClose} />
|
|
27
27
|
|
|
28
28
|
{/* Panel */}
|
|
29
|
-
<div className="fixed top-0 right-0 h-[100dvh] w-full lg:w-[500px] bg-[#
|
|
29
|
+
<div className="fixed top-0 right-0 h-[100dvh] w-full lg:w-[500px] bg-[#0b0b0d] border-l border-[#26262b] z-50 flex flex-col shadow-2xl shadow-black/60 animate-slide-in">
|
|
30
30
|
{/* Tab bar */}
|
|
31
|
-
<div className="flex items-center border-b border-[#
|
|
31
|
+
<div className="flex items-center border-b border-[#26262b] bg-[#111113] overflow-x-auto">
|
|
32
32
|
<div className="flex-1 flex min-w-0">
|
|
33
33
|
{tabs.map(alias => (
|
|
34
34
|
<button
|
|
@@ -42,16 +42,26 @@ export function CommandCenter({ tabs, activeTab, onOpenTab, onCloseTab, onSetAct
|
|
|
42
42
|
>
|
|
43
43
|
<div className={`w-2 h-2 rounded-full ${activeTab === alias ? 'bg-cyan-400' : 'bg-gray-600'}`} />
|
|
44
44
|
<span className="max-w-[80px] truncate">{alias}</span>
|
|
45
|
+
{/* R21 of #190 mobile a11y: nested close had no aria-label
|
|
46
|
+
(screen-readers spoke just "button") and an ~8 px
|
|
47
|
+
tap target (p-0.5 + text "×"). Both fixed; nested
|
|
48
|
+
<button> inside <button> remains invalid HTML but
|
|
49
|
+
is browser-tolerated and refactoring to role="tab"
|
|
50
|
+
is out of scope for this round. */}
|
|
45
51
|
<button
|
|
46
52
|
onClick={e => { e.stopPropagation(); onCloseTab(alias); }}
|
|
47
|
-
|
|
53
|
+
aria-label={`Close ${alias} chat tab`}
|
|
54
|
+
className="ml-1 inline-flex h-7 w-7 items-center justify-center text-gray-600 hover:text-gray-300 rounded-md hover:bg-white/5"
|
|
48
55
|
>
|
|
49
56
|
×
|
|
50
57
|
</button>
|
|
51
58
|
</button>
|
|
52
59
|
))}
|
|
53
60
|
</div>
|
|
54
|
-
|
|
61
|
+
{/* R21 mobile a11y: outer command-center close was SVG-only
|
|
62
|
+
and screen-reader silent; also bumped to 44 x 44 hit zone
|
|
63
|
+
from 32 x ~36. */}
|
|
64
|
+
<button onClick={onClose} aria-label="Close command center" className="inline-flex min-h-[44px] min-w-[44px] items-center justify-center text-gray-500 hover:text-white shrink-0 border-l border-[#26262b]">
|
|
55
65
|
<svg className="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2}>
|
|
56
66
|
<path strokeLinecap="round" strokeLinejoin="round" d="M6 18L18 6M6 6l12 12" />
|
|
57
67
|
</svg>
|
|
@@ -426,10 +426,10 @@ export function CommandPalette() {
|
|
|
426
426
|
>
|
|
427
427
|
<div className="absolute inset-0 bg-black/50 backdrop-blur-sm" aria-hidden />
|
|
428
428
|
<div
|
|
429
|
-
className="relative w-full max-w-xl rounded-xl border border-[#
|
|
429
|
+
className="relative w-full max-w-xl rounded-xl border border-[#26262b] bg-[#111113] shadow-2xl shadow-black/40 overflow-hidden"
|
|
430
430
|
onClick={e => e.stopPropagation()}
|
|
431
431
|
>
|
|
432
|
-
<div className="flex items-center gap-2 border-b border-[#
|
|
432
|
+
<div className="flex items-center gap-2 border-b border-[#26262b] px-3 py-2.5">
|
|
433
433
|
<svg width="14" height="14" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth="1.5" className="text-gray-500 shrink-0">
|
|
434
434
|
<path strokeLinecap="round" strokeLinejoin="round" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
|
|
435
435
|
</svg>
|
|
@@ -438,9 +438,9 @@ export function CommandPalette() {
|
|
|
438
438
|
value={query}
|
|
439
439
|
onChange={e => { setQuery(e.target.value); setSelected(0); }}
|
|
440
440
|
placeholder="Type a command or search…"
|
|
441
|
-
className="flex-1 bg-transparent text-sm text-gray-200 placeholder-gray-600 focus:outline-none"
|
|
441
|
+
className="flex-1 bg-transparent text-base sm:text-sm text-gray-200 placeholder-gray-600 focus:outline-none"
|
|
442
442
|
/>
|
|
443
|
-
<kbd className="text-[10px] text-gray-600 border border-[#
|
|
443
|
+
<kbd className="text-[10px] text-gray-600 border border-[#26262b] rounded px-1.5 py-0.5 font-mono">esc</kbd>
|
|
444
444
|
</div>
|
|
445
445
|
|
|
446
446
|
<div className="max-h-[60vh] overflow-y-auto py-2">
|
|
@@ -461,7 +461,7 @@ export function CommandPalette() {
|
|
|
461
461
|
onMouseEnter={() => setSelected(idx)}
|
|
462
462
|
onClick={() => { pushRecent(c.id); c.perform(router); setOpen(false); }}
|
|
463
463
|
className={`anet-cmdk-row w-full flex items-center gap-3 px-3 py-2 text-left text-sm ${
|
|
464
|
-
isActive ? 'bg-cyan-500/10 text-cyan-300' : 'text-gray-300 hover:bg-[#
|
|
464
|
+
isActive ? 'bg-cyan-500/10 text-cyan-300' : 'text-gray-300 hover:bg-[#1c1c1f]/50'
|
|
465
465
|
}`}
|
|
466
466
|
>
|
|
467
467
|
<span className={isActive ? 'text-cyan-400' : 'text-gray-500'}>{c.icon}</span>
|
|
@@ -484,7 +484,7 @@ export function CommandPalette() {
|
|
|
484
484
|
)}
|
|
485
485
|
</div>
|
|
486
486
|
|
|
487
|
-
<div className="border-t border-[#
|
|
487
|
+
<div className="border-t border-[#26262b] px-3 py-1.5 flex items-center justify-between text-[10px] text-gray-600">
|
|
488
488
|
<span className="flex items-center gap-3">
|
|
489
489
|
<span><kbd className="font-mono">↑↓</kbd> navigate</span>
|
|
490
490
|
<span><kbd className="font-mono">↵</kbd> select</span>
|
|
@@ -73,14 +73,17 @@ export function DispatchPanel({ sessions, onClose }: DispatchPanelProps) {
|
|
|
73
73
|
return (
|
|
74
74
|
<>
|
|
75
75
|
<div className="fixed inset-0 bg-black/50 z-40 anet-fade-in" onClick={onClose} />
|
|
76
|
-
<div className="fixed inset-x-3 inset-y-3 max-h-[calc(100dvh-1.5rem)] lg:inset-x-[15%] lg:inset-y-[5%] lg:max-h-none bg-[#
|
|
76
|
+
<div className="fixed inset-x-3 inset-y-3 max-h-[calc(100dvh-1.5rem)] lg:inset-x-[15%] lg:inset-y-[5%] lg:max-h-none bg-[#0b0b0d] border border-[#26262b] rounded-2xl z-50 flex flex-col shadow-2xl shadow-black/70 overflow-hidden anet-fade-in">
|
|
77
77
|
{/* Header */}
|
|
78
|
-
<div className="flex items-center justify-between px-6 py-4 border-b border-[#
|
|
78
|
+
<div className="flex items-center justify-between px-6 py-4 border-b border-[#26262b] bg-[#111113]">
|
|
79
79
|
<div>
|
|
80
80
|
<h2 className="text-lg font-bold text-white">Dispatch Task</h2>
|
|
81
81
|
<p className="text-xs text-gray-500 mt-0.5">Send a task to one or more agents</p>
|
|
82
82
|
</div>
|
|
83
|
-
|
|
83
|
+
{/* R22 of #190: same SVG-only-no-aria-label pattern that R16
|
|
84
|
+
fixed on TaskChatPanel/TaskDrawer/ChatPopover; DispatchPanel
|
|
85
|
+
missed that pass. ~32 px hit zone + silent on screen-reader. */}
|
|
86
|
+
<button onClick={onClose} aria-label="Close dispatch panel" className="inline-flex min-h-[44px] min-w-[44px] items-center justify-center text-gray-500 hover:text-white rounded-lg hover:bg-[#1c1c1f]">
|
|
84
87
|
<svg className="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2}>
|
|
85
88
|
<path strokeLinecap="round" strokeLinejoin="round" d="M6 18L18 6M6 6l12 12" />
|
|
86
89
|
</svg>
|
|
@@ -89,12 +92,12 @@ export function DispatchPanel({ sessions, onClose }: DispatchPanelProps) {
|
|
|
89
92
|
|
|
90
93
|
<div className="flex-1 flex flex-col lg:flex-row overflow-hidden">
|
|
91
94
|
{/* Left: Node selection */}
|
|
92
|
-
<div className="lg:w-[280px] border-b lg:border-b-0 lg:border-r border-[#
|
|
93
|
-
<div className="px-4 py-3 border-b border-[#
|
|
95
|
+
<div className="lg:w-[280px] border-b lg:border-b-0 lg:border-r border-[#26262b] flex flex-col">
|
|
96
|
+
<div className="px-4 py-3 border-b border-[#26262b]">
|
|
94
97
|
<input
|
|
95
98
|
type="text" value={filter} onChange={e => setFilter(e.target.value)}
|
|
96
99
|
placeholder="Filter agents..."
|
|
97
|
-
className="w-full bg-[#
|
|
100
|
+
className="w-full bg-[#161618] border border-[#26262b] rounded-lg px-3 py-2 text-base sm:text-xs text-white placeholder-gray-600 focus:border-cyan-500/40 focus:outline-none"
|
|
98
101
|
/>
|
|
99
102
|
<div className="flex items-center justify-between mt-2">
|
|
100
103
|
<button onClick={selectAll} className="text-[10px] text-cyan-400 hover:text-cyan-300">
|
|
@@ -107,7 +110,7 @@ export function DispatchPanel({ sessions, onClose }: DispatchPanelProps) {
|
|
|
107
110
|
{filtered.map(s => (
|
|
108
111
|
<button key={s.alias} onClick={() => toggleNode(s.alias)}
|
|
109
112
|
className={`w-full flex items-center gap-2 px-3 py-2 rounded-lg text-xs text-left transition-colors ${
|
|
110
|
-
selected.has(s.alias) ? 'bg-cyan-500/10 text-cyan-300 border border-cyan-500/20' : 'text-gray-400 hover:bg-[#
|
|
113
|
+
selected.has(s.alias) ? 'bg-cyan-500/10 text-cyan-300 border border-cyan-500/20' : 'text-gray-400 hover:bg-[#1c1c1f]'
|
|
111
114
|
}`}>
|
|
112
115
|
<AliasAvatar alias={s.alias} size={16} />
|
|
113
116
|
<div className={`w-1.5 h-1.5 rounded-full shrink-0 ${s.status === 'working' ? 'bg-green-400' : s.status === 'idle' ? 'bg-cyan-400' : 'bg-gray-500'}`} />
|
|
@@ -126,12 +129,12 @@ export function DispatchPanel({ sessions, onClose }: DispatchPanelProps) {
|
|
|
126
129
|
<textarea
|
|
127
130
|
value={prompt} onChange={e => setPrompt(e.target.value)}
|
|
128
131
|
placeholder="Enter the task you want to dispatch..."
|
|
129
|
-
className="flex-1 min-h-[120px] bg-[#
|
|
132
|
+
className="flex-1 min-h-[120px] bg-[#161618] border border-[#26262b] rounded-xl px-4 py-3 text-base sm:text-sm text-white placeholder-gray-600 focus:border-cyan-500/40 focus:outline-none resize-none"
|
|
130
133
|
/>
|
|
131
134
|
|
|
132
135
|
<div className="flex items-center gap-3 mt-4">
|
|
133
136
|
<select value={priority} onChange={e => setPriority(e.target.value)}
|
|
134
|
-
className="bg-[#
|
|
137
|
+
className="bg-[#161618] border border-[#26262b] rounded-lg px-3 py-2 text-base sm:text-xs text-white focus:outline-none">
|
|
135
138
|
<option value="normal">Normal priority</option>
|
|
136
139
|
<option value="high">High priority</option>
|
|
137
140
|
<option value="low">Low priority</option>
|
|
@@ -155,7 +158,7 @@ export function DispatchPanel({ sessions, onClose }: DispatchPanelProps) {
|
|
|
155
158
|
|
|
156
159
|
{/* Results */}
|
|
157
160
|
{results.length > 0 && (
|
|
158
|
-
<div className="px-6 py-3 border-t border-[#
|
|
161
|
+
<div className="px-6 py-3 border-t border-[#26262b] bg-[#111113]">
|
|
159
162
|
<div className="text-xs text-gray-500 mb-2">
|
|
160
163
|
{successCount}/{results.length} dispatched successfully
|
|
161
164
|
</div>
|
|
@@ -172,7 +172,7 @@ export function EmptyState({ variant = 'generic', title, sub, cta, compact = fal
|
|
|
172
172
|
* floating in the content column. */
|
|
173
173
|
function EmptyCard({ children }: { children: React.ReactNode }) {
|
|
174
174
|
return (
|
|
175
|
-
<div className="max-w-2xl mx-auto rounded-xl border border-[#
|
|
175
|
+
<div className="max-w-2xl mx-auto rounded-xl border border-[#26262b] bg-[#161618] shadow-lg shadow-black/20">
|
|
176
176
|
{children}
|
|
177
177
|
</div>
|
|
178
178
|
);
|
|
@@ -246,6 +246,14 @@ export function NodesEmptyState({
|
|
|
246
246
|
<div className="mt-4 inline-block">
|
|
247
247
|
<QuickstartCommand cmd="npx --yes @sleep2agi/agent-network init" />
|
|
248
248
|
</div>
|
|
249
|
+
{/* #214 F6: expectation management — without this line, users
|
|
250
|
+
copy the command and stare at an empty screen not knowing
|
|
251
|
+
what to wait for. The page polls every 5s, so the node
|
|
252
|
+
really does appear by itself. */}
|
|
253
|
+
<p className="text-gray-600 text-xs mt-3 max-w-md mx-auto">
|
|
254
|
+
Once the agent connects, it appears here automatically within a
|
|
255
|
+
few seconds — no refresh needed.
|
|
256
|
+
</p>
|
|
249
257
|
<div className="mt-3">
|
|
250
258
|
<a
|
|
251
259
|
href="https://anet.sh"
|
|
@@ -274,13 +282,20 @@ function QuickstartCommand({ cmd }: { cmd: string }) {
|
|
|
274
282
|
} catch {}
|
|
275
283
|
};
|
|
276
284
|
return (
|
|
277
|
-
<div className="anet-empty-cmd flex items-center gap-2 bg-[#
|
|
278
|
-
|
|
285
|
+
<div className="anet-empty-cmd flex items-start sm:items-center gap-2 bg-[#0e0e10] border border-[#26262b] rounded-lg pl-4 pr-1.5 py-1.5 text-xs sm:text-sm">
|
|
286
|
+
{/* #209 R44: long quickstart commands (e.g. the `npm install -g …`
|
|
287
|
+
variant) overflowed the empty-state card horizontally on phones
|
|
288
|
+
because <code> defaults to white-space:pre. break-all on mobile
|
|
289
|
+
lets them wrap inside the box; sm: up restores normal wrapping
|
|
290
|
+
so desktop monospace lines stay clean. items-start on phones
|
|
291
|
+
aligns the Copy button to the top so a wrapped 2-line command
|
|
292
|
+
doesn't bottom-anchor the button. */}
|
|
293
|
+
<code className="text-cyan-300 font-mono select-all min-w-0 break-all sm:break-normal">{cmd}</code>
|
|
279
294
|
<button
|
|
280
295
|
type="button"
|
|
281
296
|
onClick={onCopy}
|
|
282
297
|
aria-label={copied ? 'Copied' : 'Copy command'}
|
|
283
|
-
className="shrink-0 rounded-md px-2 py-1.5 text-[11px] text-gray-500 hover:text-gray-200 hover:bg-[#
|
|
298
|
+
className="shrink-0 rounded-md px-2 py-1.5 text-[11px] text-gray-500 hover:text-gray-200 hover:bg-[#1c1c1f] transition-colors"
|
|
284
299
|
>
|
|
285
300
|
{copied ? (
|
|
286
301
|
<span className="flex items-center gap-1 text-green-400">
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import useSWR from 'swr';
|
|
4
4
|
import { useState } from 'react';
|
|
5
5
|
import Link from 'next/link';
|
|
6
|
+
import { parseHubTime } from '../lib/time';
|
|
6
7
|
|
|
7
8
|
interface StatsResponse {
|
|
8
9
|
ok?: boolean;
|
|
@@ -44,6 +45,17 @@ export function HealthBanner() {
|
|
|
44
45
|
shouldRetryOnError: false,
|
|
45
46
|
});
|
|
46
47
|
|
|
48
|
+
// #217 S4 (less is more): the amber count used the all-time `failed`
|
|
49
|
+
// total from /api/hub/stats, so the banner said "N failed recently"
|
|
50
|
+
// forever — a permanent warning is no warning. Only fetch the actual
|
|
51
|
+
// failed tasks when stats reports any, and count just the last 24 h.
|
|
52
|
+
const allTimeFailed = stats?.tasks?.by_status?.find(s => s.status === 'failed')?.count || 0;
|
|
53
|
+
const { data: failedTasks } = useSWR<{ tasks?: { created_at?: string | null; completed_at?: string | null }[] }>(
|
|
54
|
+
allTimeFailed > 0 ? '/api/hub/tasks?status=failed&limit=100' : null,
|
|
55
|
+
fetcher,
|
|
56
|
+
{ refreshInterval: 60000, dedupingInterval: 30000, shouldRetryOnError: false },
|
|
57
|
+
);
|
|
58
|
+
|
|
47
59
|
const [dismissed, setDismissed] = useState<boolean>(() => {
|
|
48
60
|
if (typeof window === 'undefined') return false;
|
|
49
61
|
return sessionStorage.getItem('anet-hb-dismissed') === '1';
|
|
@@ -53,7 +65,11 @@ export function HealthBanner() {
|
|
|
53
65
|
|
|
54
66
|
// Determine current state — priority: red > amber > empty > green
|
|
55
67
|
const hubDown = (statsErr && healthErr) || (health && health.ok === false);
|
|
56
|
-
const
|
|
68
|
+
const dayAgo = Date.now() - 24 * 3600 * 1000;
|
|
69
|
+
const failed = (failedTasks?.tasks || []).filter(t => {
|
|
70
|
+
const at = parseHubTime(t.completed_at) ?? parseHubTime(t.created_at);
|
|
71
|
+
return at !== null && at >= dayAgo;
|
|
72
|
+
}).length;
|
|
57
73
|
const fleetEmpty = stats?.nodes?.total === 0;
|
|
58
74
|
|
|
59
75
|
let kind: 'red' | 'amber' | 'green';
|
|
@@ -66,7 +82,7 @@ export function HealthBanner() {
|
|
|
66
82
|
cta = { label: 'Open Settings', href: '/settings' };
|
|
67
83
|
} else if (failed > 0) {
|
|
68
84
|
kind = 'amber';
|
|
69
|
-
message = `${failed} task${failed > 1 ? 's' : ''} failed
|
|
85
|
+
message = `${failed} task${failed > 1 ? 's' : ''} failed in the last 24h`;
|
|
70
86
|
cta = { label: 'Review failures', href: '/tasks?status=failed' };
|
|
71
87
|
} else if (fleetEmpty) {
|
|
72
88
|
// Round 70 — was "All systems go" before, which is misleading when
|
|
@@ -116,11 +132,19 @@ export function HealthBanner() {
|
|
|
116
132
|
{cta.label} →
|
|
117
133
|
</Link>
|
|
118
134
|
)}
|
|
135
|
+
{/* R9 of #190 mobile polish: the inline `→` CTA and the `×`
|
|
136
|
+
dismiss were ~14px tap targets — below iOS 44px and worst
|
|
137
|
+
for the right-edge dismiss where a thumb-miss either does
|
|
138
|
+
nothing or fires the CTA next to it. The banner is
|
|
139
|
+
intentionally 28px tall (design comment above), so make the
|
|
140
|
+
tap area larger without making the banner taller: an
|
|
141
|
+
invisible `::before` pseudo-element extends the hit zone to
|
|
142
|
+
~44×40px around each control. Visual size stays as is. */}
|
|
119
143
|
{cta && (
|
|
120
144
|
<Link
|
|
121
145
|
href={cta.href}
|
|
122
146
|
aria-label={cta.label}
|
|
123
|
-
className="sm:hidden text-[
|
|
147
|
+
className="sm:hidden text-[13px] font-medium opacity-90 hover:opacity-100 relative leading-none px-1.5 before:absolute before:inset-y-[-10px] before:inset-x-[-8px] before:content-['']"
|
|
124
148
|
>
|
|
125
149
|
→
|
|
126
150
|
</Link>
|
|
@@ -131,7 +155,7 @@ export function HealthBanner() {
|
|
|
131
155
|
try { sessionStorage.setItem('anet-hb-dismissed', '1'); } catch {}
|
|
132
156
|
}}
|
|
133
157
|
aria-label="Dismiss banner"
|
|
134
|
-
className="opacity-
|
|
158
|
+
className="opacity-60 hover:opacity-100 leading-none px-1.5 text-base relative rounded-md hover:bg-white/5 before:absolute before:inset-y-[-10px] before:inset-x-[-8px] before:content-['']"
|
|
135
159
|
>
|
|
136
160
|
×
|
|
137
161
|
</button>
|
|
@@ -29,10 +29,7 @@ const SHORTCUTS: { group: string; items: Shortcut[] }[] = [
|
|
|
29
29
|
{ keys: ['g', 'o'], label: 'Go to Overview' },
|
|
30
30
|
{ keys: ['g', 't'], label: 'Go to Tasks' },
|
|
31
31
|
{ keys: ['g', 'n'], label: 'Go to Nodes' },
|
|
32
|
-
{ keys: ['g', 'm'], label: 'Go to Messages' },
|
|
33
|
-
{ keys: ['g', 'w'], label: 'Go to Networks' },
|
|
34
32
|
{ keys: ['g', 'a'], label: 'Go to Admin' },
|
|
35
|
-
{ keys: ['g', 'l'], label: 'Go to Audit Log' },
|
|
36
33
|
{ keys: ['g', 's'], label: 'Go to Settings' },
|
|
37
34
|
],
|
|
38
35
|
},
|
|
@@ -236,10 +233,10 @@ export function HelpOverlay() {
|
|
|
236
233
|
>
|
|
237
234
|
<div className="absolute inset-0 bg-black/50 backdrop-blur-sm" aria-hidden />
|
|
238
235
|
<div
|
|
239
|
-
className="relative w-full max-w-md rounded-xl border border-[#
|
|
236
|
+
className="relative w-full max-w-md rounded-xl border border-[#26262b] bg-[#111113] shadow-2xl shadow-black/40 overflow-hidden"
|
|
240
237
|
onClick={e => e.stopPropagation()}
|
|
241
238
|
>
|
|
242
|
-
<div className="flex items-center justify-between border-b border-[#
|
|
239
|
+
<div className="flex items-center justify-between border-b border-[#26262b] px-4 py-2.5">
|
|
243
240
|
<div className="flex items-center gap-2 text-sm font-medium text-gray-200">
|
|
244
241
|
<svg width="14" height="14" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth="1.5" className="text-gray-500">
|
|
245
242
|
<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" />
|
|
@@ -264,7 +261,7 @@ export function HelpOverlay() {
|
|
|
264
261
|
<li key={i} className="flex items-center gap-3 text-xs">
|
|
265
262
|
<span className="flex items-center gap-1">
|
|
266
263
|
{s.keys.map((k, ki) => (
|
|
267
|
-
<kbd key={ki} className="text-[10px] font-mono border border-[#
|
|
264
|
+
<kbd key={ki} className="text-[10px] font-mono border border-[#26262b] rounded px-1.5 py-0.5 text-gray-400 bg-[#1c1c1f]/40">
|
|
268
265
|
{k}
|
|
269
266
|
</kbd>
|
|
270
267
|
))}
|
|
@@ -277,7 +274,7 @@ export function HelpOverlay() {
|
|
|
277
274
|
))}
|
|
278
275
|
</div>
|
|
279
276
|
|
|
280
|
-
<div className="border-t border-[#
|
|
277
|
+
<div className="border-t border-[#26262b] px-4 py-1.5 text-[10px] text-gray-600 flex items-center justify-between">
|
|
281
278
|
<span>Press <kbd className="font-mono">?</kbd> to toggle</span>
|
|
282
279
|
<span>or <kbd className="font-mono">esc</kbd> to close</span>
|
|
283
280
|
</div>
|
|
@@ -13,11 +13,14 @@
|
|
|
13
13
|
*/
|
|
14
14
|
export function LoadingSkeleton() {
|
|
15
15
|
return (
|
|
16
|
-
<div className="min-h-screen bg-[#
|
|
17
|
-
{/* KPI top strip — 4 cards matching StatsBar
|
|
18
|
-
|
|
16
|
+
<div className="min-h-screen bg-[#0b0b0d] text-gray-100 p-4 sm:p-6">
|
|
17
|
+
{/* KPI top strip — 4 cards matching StatsBar.
|
|
18
|
+
#209 R38: mb-8 → mb-4 sm:mb-8 to track the live StatsBar
|
|
19
|
+
wrapper after R29 mobile-tighten. Without this the skeleton
|
|
20
|
+
and the loaded page jump by 16 px on mobile when data arrives. */}
|
|
21
|
+
<div className="grid grid-cols-2 sm:grid-cols-4 gap-3 mb-4 sm:mb-8 anet-skeleton-pulse">
|
|
19
22
|
{[1, 2, 3, 4].map(i => (
|
|
20
|
-
<div key={i} className="rounded-xl border border-[#
|
|
23
|
+
<div key={i} className="rounded-xl border border-[#26262b] bg-[#161618] px-4 py-3">
|
|
21
24
|
<Bar w="2.5rem" h="1.75rem" />
|
|
22
25
|
<Bar w="3.5rem" h="0.75rem" className="mt-2" />
|
|
23
26
|
<Bar w="5rem" h="0.625rem" className="mt-1" />
|
|
@@ -25,10 +28,12 @@ export function LoadingSkeleton() {
|
|
|
25
28
|
))}
|
|
26
29
|
</div>
|
|
27
30
|
|
|
28
|
-
{/* Dispatch + UserBar row
|
|
29
|
-
|
|
31
|
+
{/* Dispatch + UserBar row.
|
|
32
|
+
#209 R38: mb-3 → mb-4 — live page uses mb-4 here, skeleton
|
|
33
|
+
was 4 px tighter and triggered a small jump on load. */}
|
|
34
|
+
<div className="flex items-center gap-3 mb-4 anet-skeleton-pulse">
|
|
30
35
|
<Bar w="6rem" h="2.5rem" rounded="0.75rem" />
|
|
31
|
-
<div className="flex-1 rounded-lg border border-[#
|
|
36
|
+
<div className="flex-1 rounded-lg border border-[#26262b] bg-[#161618] px-4 py-2.5 flex items-center gap-3">
|
|
32
37
|
<div className="w-8 h-8 rounded-full anet-skeleton-bar" />
|
|
33
38
|
<div className="flex-1">
|
|
34
39
|
<Bar w="6rem" h="0.875rem" />
|
|
@@ -37,15 +42,16 @@ export function LoadingSkeleton() {
|
|
|
37
42
|
</div>
|
|
38
43
|
</div>
|
|
39
44
|
|
|
40
|
-
{/* Config bar
|
|
41
|
-
|
|
45
|
+
{/* Config bar.
|
|
46
|
+
#209 R38: mb-6 → mb-4 sm:mb-6 to track the R28 mobile tighten. */}
|
|
47
|
+
<div className="mb-4 sm:mb-6 rounded-lg border border-[#26262b] bg-[#161618] px-4 py-3 anet-skeleton-pulse">
|
|
42
48
|
<Bar w="14rem" h="0.875rem" />
|
|
43
49
|
</div>
|
|
44
50
|
|
|
45
51
|
{/* Stat strip 3 cards */}
|
|
46
52
|
<div className="grid grid-cols-3 gap-2 sm:gap-3 mb-3 anet-skeleton-pulse">
|
|
47
53
|
{[1, 2, 3].map(i => (
|
|
48
|
-
<div key={i} className="rounded-xl border border-[#
|
|
54
|
+
<div key={i} className="rounded-xl border border-[#26262b] bg-[#161618] px-3 py-3">
|
|
49
55
|
<Bar w="2rem" h="1.25rem" />
|
|
50
56
|
<Bar w="2.5rem" h="0.75rem" className="mt-1" />
|
|
51
57
|
<Bar w="3.5rem" h="0.625rem" className="mt-px" />
|
|
@@ -53,26 +59,30 @@ export function LoadingSkeleton() {
|
|
|
53
59
|
))}
|
|
54
60
|
</div>
|
|
55
61
|
|
|
56
|
-
{/* Nav rail 3 cards
|
|
57
|
-
|
|
62
|
+
{/* Nav rail 3 cards.
|
|
63
|
+
#209 R38: mb-6 → mb-4 sm:mb-6 to track the R28 mobile tighten. */}
|
|
64
|
+
<div className="grid grid-cols-3 gap-2 sm:gap-3 mb-4 sm:mb-6 anet-skeleton-pulse">
|
|
58
65
|
{[1, 2, 3].map(i => (
|
|
59
|
-
<div key={i} className="rounded-xl border border-[#
|
|
66
|
+
<div key={i} className="rounded-xl border border-[#26262b] bg-[#161618] px-3 py-2.5 flex items-center justify-center gap-2">
|
|
60
67
|
<div className="w-4 h-4 rounded anet-skeleton-bar" />
|
|
61
68
|
<Bar w="4rem" h="0.75rem" />
|
|
62
69
|
</div>
|
|
63
70
|
))}
|
|
64
71
|
</div>
|
|
65
72
|
|
|
66
|
-
{/* Broadcast bar
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
73
|
+
{/* #209 R38: Broadcast bar skeleton dropped — the live page
|
|
74
|
+
removed BroadcastBar in r70's "demote zero-data noise" pass
|
|
75
|
+
(it lives behind /admin now) so the skeleton was a phantom
|
|
76
|
+
row that did not exist in the loaded page. Caused a 56 px
|
|
77
|
+
downward shift on data arrival. */}
|
|
71
78
|
|
|
72
|
-
{/* Agent card grid
|
|
73
|
-
|
|
79
|
+
{/* Agent card grid.
|
|
80
|
+
#209 R38: breakpoints synced with the live AgentCard grid
|
|
81
|
+
(R48 set lg:grid-cols-3 — skeleton was still on lg:grid-cols-2
|
|
82
|
+
which made cards rearrange under hydration on 1024-1279 px). */}
|
|
83
|
+
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 2xl:grid-cols-4 gap-3 sm:gap-4 anet-skeleton-pulse">
|
|
74
84
|
{[1, 2, 3, 4].map(i => (
|
|
75
|
-
<div key={i} className="rounded-xl border border-[#
|
|
85
|
+
<div key={i} className="rounded-xl border border-[#26262b] bg-[#161618] p-4">
|
|
76
86
|
<div className="flex items-center gap-2 mb-3">
|
|
77
87
|
<div className="w-2 h-2 rounded-full anet-skeleton-bar" />
|
|
78
88
|
<Bar w="6rem" h="0.875rem" />
|
|
@@ -3,23 +3,41 @@
|
|
|
3
3
|
import Link from 'next/link';
|
|
4
4
|
import { usePathname } from 'next/navigation';
|
|
5
5
|
|
|
6
|
+
// #209 R25 (Vincent msg 529 "command 留着干嘛" / 530 "Agents 放到最前面?"
|
|
7
|
+
// / 531 "设置放到最后面" / 533+534 "A / 加一个设置啊"):
|
|
8
|
+
// - drop the synthetic-Cmd+K Command tap (no Cmd/Ctrl key on phone — the
|
|
9
|
+
// palette functions it surfaced are reachable from Settings on touch:
|
|
10
|
+
// theme switch, sign-out, navigation to Messages/Logs are all there)
|
|
11
|
+
// - reorder so Agents is the first-thumb tap (Vincent's primary surface)
|
|
12
|
+
// - put Settings rightmost as the consolidated secondary-destinations hub
|
|
13
|
+
// (R16 absorbed Messages / Audit Log / Server Logs into the Resources
|
|
14
|
+
// card grid there, so /settings is the legitimate "everything else"
|
|
15
|
+
// leaf on mobile)
|
|
16
|
+
// Stays at 4 cells (R24's grid-cols-4) — same width per tab.
|
|
17
|
+
// Settings icon path is copied from app/components/Sidebar.tsx:22 so the
|
|
18
|
+
// icon shape matches the desktop sidebar entry.
|
|
6
19
|
const MOBILE_NAV_ITEMS = [
|
|
20
|
+
{ href: '/nodes', label: 'Agents', icon: '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' },
|
|
7
21
|
{ href: '/', label: 'Overview', icon: 'M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6' },
|
|
8
22
|
{ href: '/tasks', label: 'Tasks', icon: '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' },
|
|
9
|
-
{ href: '/
|
|
10
|
-
{ href: '/messages', label: 'Chats', icon: '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' },
|
|
23
|
+
{ href: '/settings', label: 'Settings', icon: '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' },
|
|
11
24
|
];
|
|
12
25
|
|
|
13
26
|
export function MobileNav() {
|
|
14
27
|
const pathname = usePathname();
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
28
|
+
// Match Sidebar.tsx isActive — /settings must be exact-match because
|
|
29
|
+
// Settings subpages (/settings/tokens, /settings/networks) have their
|
|
30
|
+
// own headers; startsWith would keep the bottom-nav highlighted there
|
|
31
|
+
// and steal back-affordance from the user.
|
|
32
|
+
const isActive = (href: string) => {
|
|
33
|
+
if (href === '/') return pathname === '/';
|
|
34
|
+
if (href === '/settings') return pathname === '/settings';
|
|
35
|
+
return pathname.startsWith(href);
|
|
18
36
|
};
|
|
19
37
|
|
|
20
38
|
return (
|
|
21
|
-
<nav className="fixed inset-x-0 bottom-0 z-40 border-t border-[#
|
|
22
|
-
<div className="mx-auto grid max-w-md grid-cols-
|
|
39
|
+
<nav className="fixed inset-x-0 bottom-0 z-40 border-t border-[#26262b] bg-[#111113]/95 px-1 pb-[calc(env(safe-area-inset-bottom)+0.35rem)] pt-1.5 backdrop-blur lg:hidden">
|
|
40
|
+
<div className="mx-auto grid max-w-md grid-cols-4 gap-1">
|
|
23
41
|
{MOBILE_NAV_ITEMS.map(item => {
|
|
24
42
|
const active = isActive(item.href);
|
|
25
43
|
return (
|
|
@@ -28,10 +46,10 @@ export function MobileNav() {
|
|
|
28
46
|
href={item.href}
|
|
29
47
|
prefetch={false}
|
|
30
48
|
aria-current={active ? 'page' : undefined}
|
|
31
|
-
className={`flex min-h-12 flex-col items-center justify-center gap-0.5 rounded-xl px-1 text-[10px] transition-colors ${
|
|
49
|
+
className={`relative flex min-h-12 flex-col items-center justify-center gap-0.5 rounded-xl px-1 text-[10px] transition-colors ${
|
|
32
50
|
active
|
|
33
|
-
? 'bg-cyan-500/12 text-cyan-300'
|
|
34
|
-
: 'text-gray-500 active:bg-[#
|
|
51
|
+
? 'bg-cyan-500/12 text-cyan-300 before:absolute before:top-0 before:left-3 before:right-3 before:h-0.5 before:rounded-full before:bg-cyan-400'
|
|
52
|
+
: 'text-gray-500 active:bg-[#232327] active:text-gray-200'
|
|
35
53
|
}`}
|
|
36
54
|
>
|
|
37
55
|
<svg className="h-5 w-5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={1.6}>
|
|
@@ -41,17 +59,6 @@ export function MobileNav() {
|
|
|
41
59
|
</Link>
|
|
42
60
|
);
|
|
43
61
|
})}
|
|
44
|
-
<button
|
|
45
|
-
type="button"
|
|
46
|
-
onClick={openCommand}
|
|
47
|
-
className="flex min-h-12 flex-col items-center justify-center gap-0.5 rounded-xl px-1 text-[10px] text-gray-500 transition-colors active:bg-[#1a1a3a] active:text-gray-200"
|
|
48
|
-
aria-label="Open command palette"
|
|
49
|
-
>
|
|
50
|
-
<svg className="h-5 w-5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={1.6}>
|
|
51
|
-
<path strokeLinecap="round" strokeLinejoin="round" d="M12 3v3m0 12v3m9-9h-3M6 12H3m15.364-6.364l-2.121 2.121M7.757 16.243l-2.121 2.121m12.728 0l-2.121-2.121M7.757 7.757L5.636 5.636M12 8.5A3.5 3.5 0 1112 15.5 3.5 3.5 0 0112 8.5z" />
|
|
52
|
-
</svg>
|
|
53
|
-
<span className="max-w-full truncate">Command</span>
|
|
54
|
-
</button>
|
|
55
62
|
</div>
|
|
56
63
|
</nav>
|
|
57
64
|
);
|