@sleep2agi/agent-network-dashboard 0.5.7-preview.3 → 0.5.7-preview.31
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 +48 -48
- 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.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 +3 -3
- package/.next/server/app/_not-found.rsc +15 -15
- package/.next/server/app/_not-found.segments/_full.segment.rsc +15 -15
- package/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
- package/.next/server/app/_not-found.segments/_index.segment.rsc +8 -8
- 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 +3 -3
- package/.next/server/app/admin.rsc +17 -17
- package/.next/server/app/admin.segments/_full.segment.rsc +17 -17
- package/.next/server/app/admin.segments/_head.segment.rsc +4 -4
- package/.next/server/app/admin.segments/_index.segment.rsc +8 -8
- 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 +3 -3
- package/.next/server/app/index.rsc +17 -17
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/index.segments/_full.segment.rsc +17 -17
- package/.next/server/app/index.segments/_head.segment.rsc +4 -4
- package/.next/server/app/index.segments/_index.segment.rsc +8 -8
- package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- 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 +17 -17
- package/.next/server/app/login.segments/_full.segment.rsc +17 -17
- package/.next/server/app/login.segments/_head.segment.rsc +4 -4
- package/.next/server/app/login.segments/_index.segment.rsc +8 -8
- 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 +3 -3
- package/.next/server/app/logs.rsc +17 -17
- package/.next/server/app/logs.segments/_full.segment.rsc +17 -17
- package/.next/server/app/logs.segments/_head.segment.rsc +4 -4
- package/.next/server/app/logs.segments/_index.segment.rsc +8 -8
- 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 +3 -3
- package/.next/server/app/messages.rsc +17 -17
- package/.next/server/app/messages.segments/_full.segment.rsc +17 -17
- package/.next/server/app/messages.segments/_head.segment.rsc +4 -4
- package/.next/server/app/messages.segments/_index.segment.rsc +8 -8
- 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 +3 -3
- package/.next/server/app/node.rsc +17 -17
- package/.next/server/app/node.segments/_full.segment.rsc +17 -17
- package/.next/server/app/node.segments/_head.segment.rsc +4 -4
- package/.next/server/app/node.segments/_index.segment.rsc +8 -8
- 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 +3 -3
- package/.next/server/app/nodes.rsc +17 -17
- package/.next/server/app/nodes.segments/_full.segment.rsc +17 -17
- package/.next/server/app/nodes.segments/_head.segment.rsc +4 -4
- package/.next/server/app/nodes.segments/_index.segment.rsc +8 -8
- 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.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 +3 -3
- package/.next/server/app/server-logs.rsc +17 -17
- package/.next/server/app/server-logs.segments/_full.segment.rsc +17 -17
- package/.next/server/app/server-logs.segments/_head.segment.rsc +4 -4
- package/.next/server/app/server-logs.segments/_index.segment.rsc +8 -8
- 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/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 +3 -3
- package/.next/server/app/servers.rsc +17 -17
- package/.next/server/app/servers.segments/_full.segment.rsc +17 -17
- package/.next/server/app/servers.segments/_head.segment.rsc +4 -4
- package/.next/server/app/servers.segments/_index.segment.rsc +8 -8
- package/.next/server/app/servers.segments/_tree.segment.rsc +2 -2
- 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.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 +3 -3
- package/.next/server/app/settings/networks.rsc +17 -17
- package/.next/server/app/settings/networks.segments/_full.segment.rsc +17 -17
- package/.next/server/app/settings/networks.segments/_head.segment.rsc +4 -4
- package/.next/server/app/settings/networks.segments/_index.segment.rsc +8 -8
- 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.js.nft.json +1 -1
- package/.next/server/app/settings/page_client-reference-manifest.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 +3 -3
- package/.next/server/app/settings/tokens.rsc +17 -17
- package/.next/server/app/settings/tokens.segments/_full.segment.rsc +17 -17
- package/.next/server/app/settings/tokens.segments/_head.segment.rsc +4 -4
- package/.next/server/app/settings/tokens.segments/_index.segment.rsc +8 -8
- 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 +3 -3
- package/.next/server/app/settings.rsc +17 -17
- package/.next/server/app/settings.segments/_full.segment.rsc +17 -17
- package/.next/server/app/settings.segments/_head.segment.rsc +4 -4
- package/.next/server/app/settings.segments/_index.segment.rsc +8 -8
- 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.js.nft.json +1 -1
- 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 +3 -3
- package/.next/server/app/tasks.rsc +17 -17
- package/.next/server/app/tasks.segments/_full.segment.rsc +17 -17
- package/.next/server/app/tasks.segments/_head.segment.rsc +4 -4
- package/.next/server/app/tasks.segments/_index.segment.rsc +8 -8
- package/.next/server/app/tasks.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/tasks.segments/tasks/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/tasks.segments/tasks.segment.rsc +3 -3
- package/.next/server/app-paths-manifest.json +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__030vg4n._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__030vg4n._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0fhoq8i._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0fhoq8i._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0lu1wok._.js +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__0lu1wok._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0nw~zhp._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0nw~zhp._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0sv~g.o._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0sv~g.o._.js.map +1 -1
- 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_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_0i3759l._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_0i3759l._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_0xgney8._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_0xgney8._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_10hjgv4._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_10hjgv4._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_1153xeb._.js +2 -2
- package/.next/server/chunks/ssr/agent-network-dashboard_app_1153xeb._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_12l4oto._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_12l4oto._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_components_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_server-logs_page_tsx_0dg.l_8._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_server-logs_page_tsx_0dg.l_8._.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/pages/404.html +3 -3
- 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.054rbp43q.y.js +1 -0
- package/.next/static/chunks/{181u38qblp8lz.js → 00b-ysl~m~dr~.js} +1 -1
- package/.next/static/chunks/{0jp~cs9-zkmqa.js → 00b4y77vxfabl.js} +1 -1
- package/.next/static/chunks/0188imvuz-~kd.js +1 -0
- package/.next/static/chunks/{15qxef.ilfysw.js → 03g.reu.n2vy-.js} +3 -3
- package/.next/static/chunks/{0a.9~-nf0gpec.js → 0_eddxjio~tei.js} +1 -1
- package/.next/static/chunks/0fkd-56.k2ts..js +1 -0
- package/.next/static/chunks/0fvus2k1~nj8..js +1 -0
- package/.next/static/chunks/{0im751o4n61c7.js → 0hv6izw.g6cnm.js} +1 -1
- package/.next/static/chunks/0miet1u_5tj06.js +7 -0
- package/.next/static/chunks/{05uk96gc~9mni.js → 0ti3v67ixu43p.js} +1 -1
- package/.next/static/chunks/{0xqeurx5nvu76.js → 0xa~3.e0_hqfk.js} +1 -1
- package/.next/static/chunks/{0561vp5-q5.zp.js → 0ymogrg8t82.8.js} +1 -1
- package/.next/static/chunks/{0nqm.7w9_inwd.js → 0~eyvw9.ips4y.js} +2 -2
- package/.next/static/chunks/10u21fv4dvd...css +1 -0
- package/.next/static/chunks/{0.66f3.rtcybb.js → 136r0ae9ihgvo.js} +1 -1
- 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 +1 -1
- package/app/components/AgentCard.tsx +19 -9
- package/app/components/AppShell.tsx +7 -1
- package/app/components/ChatPopover.tsx +1 -1
- package/app/components/CommandCenter.tsx +12 -2
- package/app/components/CommandPalette.tsx +1 -1
- package/app/components/DispatchPanel.tsx +7 -4
- package/app/components/HealthBanner.tsx +10 -2
- package/app/components/HelpOverlay.tsx +0 -3
- package/app/components/MobileNav.tsx +26 -19
- package/app/components/Sidebar.tsx +19 -12
- package/app/components/TaskChatPanel.tsx +19 -5
- package/app/components/TaskDrawer.tsx +3 -1
- package/app/components/ThemeSwitcher.tsx +10 -79
- package/app/components/UserBar.tsx +3 -3
- package/app/globals.css +76 -707
- package/app/layout.tsx +27 -1
- package/app/lib/hooks.ts +0 -5
- package/app/login/page.tsx +3 -3
- package/app/logs/page.tsx +6 -2
- package/app/messages/page.tsx +19 -12
- package/app/node/page.tsx +2 -2
- package/app/nodes/page.tsx +12 -6
- package/app/page.tsx +0 -24
- package/app/server-logs/page.tsx +10 -3
- package/app/settings/networks/page.tsx +3 -3
- package/app/settings/page.tsx +31 -83
- package/app/settings/tokens/page.tsx +1 -1
- package/app/tasks/page.tsx +13 -9
- package/bin/start.js +0 -0
- package/package.json +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/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/static/chunks/03~5pxwbxxw-b.js +0 -1
- package/.next/static/chunks/0eggl7f36vd8m.js +0 -1
- package/.next/static/chunks/0h_gdeiy~s92j.css +0 -1
- package/.next/static/chunks/0inql3s9ldyx5.js +0 -1
- package/.next/static/chunks/0xze0l75jjpwr.js +0 -1
- package/.next/static/chunks/15-ltfhot3b4n.js +0 -7
- 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/{cssa52keEzN4TEvVJY7V3 → 1jvl1LpPAXW-Ul4xR7NzO}/_buildManifest.js +0 -0
- /package/.next/static/{cssa52keEzN4TEvVJY7V3 → 1jvl1LpPAXW-Ul4xR7NzO}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{cssa52keEzN4TEvVJY7V3 → 1jvl1LpPAXW-Ul4xR7NzO}/_ssgManifest.js +0 -0
|
@@ -28,7 +28,7 @@ export function AgentCard({ session: s, hasSse, sseCount, onChat }: AgentCardPro
|
|
|
28
28
|
<Link
|
|
29
29
|
href={`/node?alias=${encodeURIComponent(s.alias)}`}
|
|
30
30
|
prefetch={false}
|
|
31
|
-
className={`anet-agent-card group relative block rounded-xl border p-4 transition-all duration-300 cursor-pointer hover:-translate-y-0.5 ${
|
|
31
|
+
className={`anet-agent-card group relative block rounded-xl border p-3 sm:p-4 transition-all duration-300 cursor-pointer hover:-translate-y-0.5 ${
|
|
32
32
|
hasSse
|
|
33
33
|
? `bg-[#111128] border-[#2a2a4a] hover:border-cyan-500/30 hover:shadow-lg ${cfg.glow}`
|
|
34
34
|
: 'bg-[#0d0d1a] border-[#1a1a2a] opacity-40'
|
|
@@ -36,8 +36,10 @@ export function AgentCard({ session: s, hasSse, sseCount, onChat }: AgentCardPro
|
|
|
36
36
|
>
|
|
37
37
|
{/* Header: avatar + name + status. Avatar carries the alias→hue map
|
|
38
38
|
shared with Messages/Nodes/Tasks/Overview; the live status dot
|
|
39
|
-
stays as a small pulse-capable indicator.
|
|
40
|
-
|
|
39
|
+
stays as a small pulse-capable indicator. R5 of #190 mobile
|
|
40
|
+
polish: trim mb-3 → mb-2 sm:mb-3 so the card's vertical rhythm
|
|
41
|
+
tightens on narrow viewports. */}
|
|
42
|
+
<div className="flex items-center justify-between mb-2 sm:mb-3">
|
|
41
43
|
<div className="flex items-center gap-2 min-w-0">
|
|
42
44
|
<AliasAvatar alias={s.alias} size={22} />
|
|
43
45
|
<span className="font-semibold text-white truncate text-sm" title={s.alias}>{s.alias}</span>
|
|
@@ -48,8 +50,11 @@ export function AgentCard({ session: s, hasSse, sseCount, onChat }: AgentCardPro
|
|
|
48
50
|
</span>
|
|
49
51
|
</div>
|
|
50
52
|
|
|
51
|
-
{/* Agent type badge
|
|
52
|
-
|
|
53
|
+
{/* Agent type badge — hidden below sm because the runtime
|
|
54
|
+
(`claude-code` / `codex`) repeats across nearly every card and
|
|
55
|
+
chews ~28px per card × 99 sessions on Overview mobile. The
|
|
56
|
+
agent type stays one tap away on /node detail. */}
|
|
57
|
+
<div className="hidden sm:flex items-center gap-2 mb-3">
|
|
53
58
|
<span className="text-xs text-gray-600 bg-[#0a0a15] px-2 py-0.5 rounded border border-[#1a1a2a]">
|
|
54
59
|
{s.agent || 'unknown'}
|
|
55
60
|
</span>
|
|
@@ -58,18 +63,23 @@ export function AgentCard({ session: s, hasSse, sseCount, onChat }: AgentCardPro
|
|
|
58
63
|
)}
|
|
59
64
|
</div>
|
|
60
65
|
|
|
61
|
-
{/* Task
|
|
66
|
+
{/* Task. Mobile: line-clamp-1 (one-liner) instead of two, and a
|
|
67
|
+
single-line padding (px-2 py-1) so the task strip is ~28px
|
|
68
|
+
rather than ~56px. The full task is still in the title
|
|
69
|
+
tooltip and on /node detail. */}
|
|
62
70
|
{s.task ? (
|
|
63
|
-
<div className="text-xs text-gray-400 bg-[#0a0a15] rounded-lg px-3 py-2 border border-[#1a1a2a] line-clamp-2" title={s.task}>
|
|
71
|
+
<div className="text-xs text-gray-400 bg-[#0a0a15] rounded-lg px-2 sm:px-3 py-1 sm:py-2 border border-[#1a1a2a] line-clamp-1 sm:line-clamp-2" title={s.task}>
|
|
64
72
|
{s.task}
|
|
65
73
|
</div>
|
|
66
74
|
) : (
|
|
67
75
|
<div className="text-xs text-gray-700 italic">No active task</div>
|
|
68
76
|
)}
|
|
69
77
|
|
|
70
|
-
{/* Progress bar
|
|
78
|
+
{/* Progress bar — hidden below sm so an empty 0% bar doesn't
|
|
79
|
+
occupy 20px on every idle card. Visible from sm up where space
|
|
80
|
+
is no longer the constraint. */}
|
|
71
81
|
{s.progress > 0 && (
|
|
72
|
-
<div className="mt-3">
|
|
82
|
+
<div className="hidden sm:block mt-3">
|
|
73
83
|
<div className="flex justify-between text-[10px] mb-1">
|
|
74
84
|
<span className="text-gray-600">Progress</span>
|
|
75
85
|
<span className={cfg.text}>{s.progress}%</span>
|
|
@@ -20,7 +20,13 @@ export function AppShell({ children }: { children: React.ReactNode }) {
|
|
|
20
20
|
return (
|
|
21
21
|
<div className="flex min-h-[100dvh] max-w-full overflow-x-hidden">
|
|
22
22
|
<Sidebar />
|
|
23
|
-
|
|
23
|
+
{/* R25 of #190: pair the existing bottom safe-area padding with a
|
|
24
|
+
top one so the HealthBanner clears the iOS status bar when
|
|
25
|
+
launched as an installed PWA (statusBarStyle: black-translucent
|
|
26
|
+
+ viewportFit: cover, see app/layout.tsx). On non-PWA contexts
|
|
27
|
+
env(safe-area-inset-top) is 0, so this is a no-op for browser
|
|
28
|
+
tab visits. */}
|
|
29
|
+
<main className="flex-1 min-w-0 max-w-full overflow-x-hidden flex flex-col pt-[env(safe-area-inset-top)]">
|
|
24
30
|
<HealthBanner />
|
|
25
31
|
<div className="flex-1 min-w-0 max-w-full overflow-x-hidden pb-[calc(5rem+env(safe-area-inset-bottom))] lg:pb-0">{children}</div>
|
|
26
32
|
</main>
|
|
@@ -191,7 +191,7 @@ export function ChatPopover({ alias, onClose }: ChatPopoverProps) {
|
|
|
191
191
|
// Chromium retargets the click to the header — the button never fires.
|
|
192
192
|
onPointerDown={(e) => e.stopPropagation()}
|
|
193
193
|
aria-label="Close chat"
|
|
194
|
-
className="text-[var(--fg-muted)] hover:text-[var(--fg)]
|
|
194
|
+
className="inline-flex min-h-[44px] min-w-[44px] items-center justify-center text-[var(--fg-muted)] hover:text-[var(--fg)] rounded-lg hover:bg-[var(--bg-elevated)] shrink-0"
|
|
195
195
|
>
|
|
196
196
|
<svg className="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2}>
|
|
197
197
|
<path strokeLinecap="round" strokeLinejoin="round" d="M6 18L18 6M6 6l12 12" />
|
|
@@ -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-[#2a2a4a]">
|
|
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>
|
|
@@ -438,7 +438,7 @@ 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
443
|
<kbd className="text-[10px] text-gray-600 border border-[#2a2a4a] rounded px-1.5 py-0.5 font-mono">esc</kbd>
|
|
444
444
|
</div>
|
|
@@ -80,7 +80,10 @@ export function DispatchPanel({ sessions, onClose }: DispatchPanelProps) {
|
|
|
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-[#1a1a2a]">
|
|
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>
|
|
@@ -94,7 +97,7 @@ export function DispatchPanel({ sessions, onClose }: DispatchPanelProps) {
|
|
|
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-[#111128] border border-[#2a2a4a] rounded-lg px-3 py-2 text-xs text-white placeholder-gray-600 focus:border-cyan-500/40 focus:outline-none"
|
|
100
|
+
className="w-full bg-[#111128] border border-[#2a2a4a] 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">
|
|
@@ -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-[#111128] border border-[#2a2a4a] rounded-xl px-4 py-3 text-sm text-white placeholder-gray-600 focus:border-cyan-500/40 focus:outline-none resize-none"
|
|
132
|
+
className="flex-1 min-h-[120px] bg-[#111128] border border-[#2a2a4a] 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-[#111128] border border-[#2a2a4a] rounded-lg px-3 py-2 text-xs text-white focus:outline-none">
|
|
137
|
+
className="bg-[#111128] border border-[#2a2a4a] 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>
|
|
@@ -116,11 +116,19 @@ export function HealthBanner() {
|
|
|
116
116
|
{cta.label} →
|
|
117
117
|
</Link>
|
|
118
118
|
)}
|
|
119
|
+
{/* R9 of #190 mobile polish: the inline `→` CTA and the `×`
|
|
120
|
+
dismiss were ~14px tap targets — below iOS 44px and worst
|
|
121
|
+
for the right-edge dismiss where a thumb-miss either does
|
|
122
|
+
nothing or fires the CTA next to it. The banner is
|
|
123
|
+
intentionally 28px tall (design comment above), so make the
|
|
124
|
+
tap area larger without making the banner taller: an
|
|
125
|
+
invisible `::before` pseudo-element extends the hit zone to
|
|
126
|
+
~44×40px around each control. Visual size stays as is. */}
|
|
119
127
|
{cta && (
|
|
120
128
|
<Link
|
|
121
129
|
href={cta.href}
|
|
122
130
|
aria-label={cta.label}
|
|
123
|
-
className="sm:hidden text-[
|
|
131
|
+
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
132
|
>
|
|
125
133
|
→
|
|
126
134
|
</Link>
|
|
@@ -131,7 +139,7 @@ export function HealthBanner() {
|
|
|
131
139
|
try { sessionStorage.setItem('anet-hb-dismissed', '1'); } catch {}
|
|
132
140
|
}}
|
|
133
141
|
aria-label="Dismiss banner"
|
|
134
|
-
className="opacity-
|
|
142
|
+
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
143
|
>
|
|
136
144
|
×
|
|
137
145
|
</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
|
},
|
|
@@ -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
39
|
<nav className="fixed inset-x-0 bottom-0 z-40 border-t border-[#2a2a4a] bg-[#0d0d1a]/95 px-1 pb-[calc(env(safe-area-inset-bottom)+0.35rem)] pt-1.5 backdrop-blur lg:hidden">
|
|
22
|
-
<div className="mx-auto grid max-w-md grid-cols-
|
|
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,9 +46,9 @@ 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'
|
|
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'
|
|
34
52
|
: 'text-gray-500 active:bg-[#1a1a3a] active:text-gray-200'
|
|
35
53
|
}`}
|
|
36
54
|
>
|
|
@@ -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
|
);
|
|
@@ -5,19 +5,19 @@ import { usePathname } from 'next/navigation';
|
|
|
5
5
|
import { useState } from 'react';
|
|
6
6
|
import useSWR from 'swr';
|
|
7
7
|
import { useNetworkId } from '../lib/network-context';
|
|
8
|
-
import { ThemeSwitcher } from './ThemeSwitcher';
|
|
9
8
|
|
|
10
9
|
const networkFetcher = (url: string) => fetch(url).then(r => r.ok ? r.json() : { networks: [] });
|
|
11
10
|
|
|
11
|
+
// Cleanup (issue #4): sidebar collapsed to the 6 core destinations. The
|
|
12
|
+
// low-frequency / unverified entries (Messages, Networks, Audit Log,
|
|
13
|
+
// Server Logs) were removed from primary nav — those pages still exist
|
|
14
|
+
// and stay reachable via direct URL and the command palette (⌘K); they
|
|
15
|
+
// were just cluttering the main rail. Restore here if usage warrants.
|
|
12
16
|
const NAV_ITEMS = [
|
|
13
17
|
{ 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' },
|
|
14
18
|
{ 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' },
|
|
15
19
|
{ href: '/nodes', label: 'Nodes', 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' },
|
|
16
20
|
{ href: '/servers', label: 'Servers', icon: 'M4 6.5A2.5 2.5 0 016.5 4h11A2.5 2.5 0 0120 6.5v1A2.5 2.5 0 0117.5 10h-11A2.5 2.5 0 014 7.5v-1zM4 16.5A2.5 2.5 0 016.5 14h11a2.5 2.5 0 012.5 2.5v1a2.5 2.5 0 01-2.5 2.5h-11A2.5 2.5 0 014 17.5v-1zM7 7h.01M7 17h.01' },
|
|
17
|
-
{ href: '/messages', label: 'Messages', 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' },
|
|
18
|
-
{ href: '/settings/networks', label: 'Networks', icon: 'M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9' },
|
|
19
|
-
{ href: '/logs', label: 'Audit Log', icon: 'M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z' },
|
|
20
|
-
{ href: '/server-logs', label: 'Server Logs', icon: 'M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z' },
|
|
21
21
|
{ href: '/admin', label: 'Admin', icon: 'M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z' },
|
|
22
22
|
{ 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' },
|
|
23
23
|
];
|
|
@@ -91,10 +91,12 @@ export function Sidebar() {
|
|
|
91
91
|
|
|
92
92
|
return (
|
|
93
93
|
<>
|
|
94
|
-
{/* Mobile hamburger
|
|
94
|
+
{/* Mobile hamburger — R13 of #190: was p-2.5 = ~40px tap target,
|
|
95
|
+
just below the iOS 44px guideline. Bump padding and add an
|
|
96
|
+
explicit min-w/min-h so it can never be miss-tapped. */}
|
|
95
97
|
<button
|
|
96
98
|
onClick={() => setMobileOpen(!mobileOpen)}
|
|
97
|
-
className="fixed top-
|
|
99
|
+
className="fixed top-3 left-3 z-50 lg:hidden bg-[#111128] border border-[#2a2a4a] rounded-lg p-3 min-h-[44px] min-w-[44px] inline-flex items-center justify-center text-gray-400 hover:text-white active:bg-[#1a1a3a]"
|
|
98
100
|
aria-label="Toggle menu"
|
|
99
101
|
>
|
|
100
102
|
<svg className="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2}>
|
|
@@ -143,7 +145,7 @@ export function Sidebar() {
|
|
|
143
145
|
key={n.network_id}
|
|
144
146
|
onClick={() => { setNetworkId(n.network_id); setMobileOpen(false); }}
|
|
145
147
|
title={n.network_id}
|
|
146
|
-
className={`w-full flex items-center gap-2 px-3 py-1.5 rounded-md text-xs transition-colors text-left ${
|
|
148
|
+
className={`w-full flex items-center gap-2 px-3 py-2.5 lg:py-1.5 rounded-md text-xs transition-colors text-left ${
|
|
147
149
|
networkId === n.network_id
|
|
148
150
|
? 'bg-cyan-500/10 text-cyan-300'
|
|
149
151
|
: 'text-gray-500 hover:text-gray-300 hover:bg-[#1a1a2a]'
|
|
@@ -164,7 +166,13 @@ export function Sidebar() {
|
|
|
164
166
|
</div>
|
|
165
167
|
)}
|
|
166
168
|
|
|
167
|
-
|
|
169
|
+
{/* #209 R26 (Vincent msg 540 screenshot — "设置页面没展示全"): the
|
|
170
|
+
absolute-bottom footer below stacks 3 rows (Quick search /
|
|
171
|
+
Sign out / collapse) ≈ 92-100px tall, but this spacer was
|
|
172
|
+
pb-20 (80px), so the last nav entry (Settings on /settings)
|
|
173
|
+
was being eaten by the footer overlay. Bump to pb-28 (112px)
|
|
174
|
+
to clear the actual footer height. */}
|
|
175
|
+
<div className="pb-28">
|
|
168
176
|
{nav}
|
|
169
177
|
</div>
|
|
170
178
|
|
|
@@ -178,7 +186,7 @@ export function Sidebar() {
|
|
|
178
186
|
}}
|
|
179
187
|
title={collapsed ? 'Quick search (⌘K)' : undefined}
|
|
180
188
|
className={`w-full flex items-center text-[11px] text-gray-600 hover:text-gray-400 hover:bg-[#1a1a2a] transition-colors ${
|
|
181
|
-
collapsed ? 'justify-center px-0 py-2.5' : 'justify-between gap-2 px-5 py-2'
|
|
189
|
+
collapsed ? 'justify-center px-0 py-2.5' : 'justify-between gap-2 px-5 py-3 lg:py-2'
|
|
182
190
|
}`}
|
|
183
191
|
aria-label="Open command palette"
|
|
184
192
|
>
|
|
@@ -206,8 +214,7 @@ export function Sidebar() {
|
|
|
206
214
|
</svg>
|
|
207
215
|
{!collapsed && 'Sign out'}
|
|
208
216
|
</button>
|
|
209
|
-
<div className={`flex items-center
|
|
210
|
-
<ThemeSwitcher compact={collapsed} />
|
|
217
|
+
<div className={`flex items-center ${collapsed ? 'flex-col px-0 py-2' : 'px-3 py-2 justify-end'}`}>
|
|
211
218
|
<button
|
|
212
219
|
onClick={() => setCollapsed(!collapsed)}
|
|
213
220
|
title={collapsed ? 'Expand sidebar' : 'Collapse sidebar'}
|
|
@@ -483,7 +483,14 @@ export function TaskChatPanel({ alias, onClose, inline, availableNodes }: TaskCh
|
|
|
483
483
|
const chatContent = (
|
|
484
484
|
<>
|
|
485
485
|
{/* Messages area */}
|
|
486
|
-
|
|
486
|
+
{/* R12 of #190 mobile polish: the chat scroll surface used
|
|
487
|
+
space-y-3 between task+reply pairs at mobile = 12 px, which
|
|
488
|
+
in a long thread (the panel's bread-and-butter use case)
|
|
489
|
+
adds up to a significant scroll length. Drop to space-y-2 at
|
|
490
|
+
mobile and the per-pair grouping (line 540) from space-y-2
|
|
491
|
+
to space-y-1.5 so messages read denser without losing the
|
|
492
|
+
speaker-turn rhythm. Desktop unchanged at sm: and up. */}
|
|
493
|
+
<div className="flex-1 overflow-y-auto px-3 py-3 sm:px-4 sm:py-4 space-y-2 sm:space-y-4">
|
|
487
494
|
{!historyLoaded && (
|
|
488
495
|
<div className="flex justify-center py-8">
|
|
489
496
|
<div className="w-5 h-5 border-2 border-cyan-500/30 border-t-cyan-500 rounded-full animate-spin" />
|
|
@@ -537,7 +544,7 @@ export function TaskChatPanel({ alias, onClose, inline, availableNodes }: TaskCh
|
|
|
537
544
|
);
|
|
538
545
|
}
|
|
539
546
|
return (
|
|
540
|
-
<div key={`${m.task_id}:task`} className="space-y-2">
|
|
547
|
+
<div key={`${m.task_id}:task`} className="space-y-1.5 sm:space-y-2">
|
|
541
548
|
{/* Outgoing task — labeled with origin so peer-forwarded tasks are obvious */}
|
|
542
549
|
<div className="flex justify-end">
|
|
543
550
|
<div className="max-w-[92%] sm:max-w-[85%] bg-cyan-500/8 border border-cyan-500/15 rounded-2xl rounded-br-md px-3 py-2.5 sm:px-4 shadow-sm">
|
|
@@ -626,8 +633,11 @@ export function TaskChatPanel({ alias, onClose, inline, availableNodes }: TaskCh
|
|
|
626
633
|
</select>
|
|
627
634
|
</div>
|
|
628
635
|
</div>
|
|
629
|
-
|
|
630
|
-
|
|
636
|
+
{/* R17 of #190: send button was p-2.5 + w-5 icon = ~40 x 40
|
|
637
|
+
hit zone, 4 px short of the iOS 44 px guideline on
|
|
638
|
+
the short axis. Bump to inline-flex + min-h/w 44. */}
|
|
639
|
+
<button onClick={send} aria-label="Send message" disabled={sending || (!input.trim() && attachedFiles.length === 0)}
|
|
640
|
+
className="inline-flex min-h-[44px] min-w-[44px] items-center justify-center bg-cyan-600 hover:bg-cyan-500 disabled:bg-[var(--border)] disabled:text-[var(--fg-dim)] text-[var(--fg)] rounded-xl transition-all shrink-0 active:scale-95">
|
|
631
641
|
{sending ? (
|
|
632
642
|
<div className="w-5 h-5 border-2 border-white/30 border-t-white rounded-full animate-spin" />
|
|
633
643
|
) : (
|
|
@@ -673,7 +683,11 @@ export function TaskChatPanel({ alias, onClose, inline, availableNodes }: TaskCh
|
|
|
673
683
|
<div className="text-[10px] text-[var(--fg-muted)]">{pollingIds.size > 0 ? 'Processing...' : 'Ready'}</div>
|
|
674
684
|
</div>
|
|
675
685
|
</div>
|
|
676
|
-
|
|
686
|
+
{/* R16 of #190: was p-1.5 + w-5 h-5 svg = ~32 px tap target.
|
|
687
|
+
The chat panel close is high-frequency on mobile (user
|
|
688
|
+
dismisses to scroll the underlying page); bump to a
|
|
689
|
+
uniform 44 x 44 hit zone via inline-flex + min-h/w. */}
|
|
690
|
+
<button onClick={onClose} aria-label="Close chat" className="inline-flex min-h-[44px] min-w-[44px] items-center justify-center text-[var(--fg-muted)] hover:text-[var(--fg)] rounded-lg hover:bg-[var(--bg-elevated)]">
|
|
677
691
|
<svg className="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2}>
|
|
678
692
|
<path strokeLinecap="round" strokeLinejoin="round" d="M6 18L18 6M6 6l12 12" />
|
|
679
693
|
</svg>
|
|
@@ -88,7 +88,9 @@ export function TaskDrawer({ taskId, onClose }: TaskDrawerProps) {
|
|
|
88
88
|
<div className="text-sm font-semibold text-white">Task Detail</div>
|
|
89
89
|
<div className="text-[10px] text-gray-500 mt-0.5">{taskId.slice(0, 16)}...</div>
|
|
90
90
|
</div>
|
|
91
|
-
|
|
91
|
+
{/* R16 of #190: same chat-panel close pattern — was ~32 px
|
|
92
|
+
tap target; lift to a uniform 44 x 44 hit zone. */}
|
|
93
|
+
<button onClick={onClose} aria-label="Close task drawer" className="inline-flex min-h-[44px] min-w-[44px] items-center justify-center text-gray-500 hover:text-white rounded-lg hover:bg-[#1a1a2a]">
|
|
92
94
|
<svg className="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2}>
|
|
93
95
|
<path strokeLinecap="round" strokeLinejoin="round" d="M6 18L18 6M6 6l12 12" />
|
|
94
96
|
</svg>
|
|
@@ -1,89 +1,20 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { useEffect
|
|
3
|
+
import { useEffect } from 'react';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
] as const;
|
|
5
|
+
// Cleanup (issue #4) — less is more. The dashboard is designed dark/cyber;
|
|
6
|
+
// the light / mint / sunset themes were never verified and the picker just
|
|
7
|
+
// added a knob nobody validated. We lock to the single cyber theme and drop
|
|
8
|
+
// the switcher control. (The unused [data-theme] CSS branches in globals.css
|
|
9
|
+
// are now dead but harmless — left for a later dedicated CSS sweep.)
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
const THEME_KEY = 'anet-theme';
|
|
14
|
-
|
|
15
|
-
function applyTheme(theme: ThemeId) {
|
|
16
|
-
if (typeof document !== 'undefined') {
|
|
17
|
-
document.documentElement.setAttribute('data-theme', theme);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
11
|
+
const THEME = 'cyber';
|
|
20
12
|
|
|
21
13
|
export function ThemeProvider({ children }: { children: React.ReactNode }) {
|
|
22
|
-
// Apply persisted theme on first render so we don't flash dark before
|
|
23
|
-
// user-selected light. Initial value comes from cookie/localStorage.
|
|
24
14
|
useEffect(() => {
|
|
25
|
-
|
|
26
|
-
|
|
15
|
+
if (typeof document !== 'undefined') {
|
|
16
|
+
document.documentElement.setAttribute('data-theme', THEME);
|
|
17
|
+
}
|
|
27
18
|
}, []);
|
|
28
19
|
return <>{children}</>;
|
|
29
20
|
}
|
|
30
|
-
|
|
31
|
-
export function ThemeSwitcher({ compact = false }: { compact?: boolean }) {
|
|
32
|
-
const [theme, setTheme] = useState<ThemeId>('cyber');
|
|
33
|
-
const [open, setOpen] = useState(false);
|
|
34
|
-
|
|
35
|
-
useEffect(() => {
|
|
36
|
-
const stored = (localStorage.getItem(THEME_KEY) as ThemeId) || 'cyber';
|
|
37
|
-
setTheme(stored);
|
|
38
|
-
applyTheme(stored);
|
|
39
|
-
}, []);
|
|
40
|
-
|
|
41
|
-
function pick(next: ThemeId) {
|
|
42
|
-
setTheme(next);
|
|
43
|
-
localStorage.setItem(THEME_KEY, next);
|
|
44
|
-
applyTheme(next);
|
|
45
|
-
setOpen(false);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const current = THEMES.find(t => t.id === theme) || THEMES[0];
|
|
49
|
-
|
|
50
|
-
return (
|
|
51
|
-
<div className="relative">
|
|
52
|
-
<button
|
|
53
|
-
aria-label="切换主题"
|
|
54
|
-
onClick={() => setOpen(!open)}
|
|
55
|
-
className="px-2.5 py-1.5 rounded-md text-xs flex items-center gap-1.5 hover:opacity-80 transition-opacity"
|
|
56
|
-
style={{ background: 'var(--bg-elevated)', color: 'var(--fg)', border: '1px solid var(--border)' }}
|
|
57
|
-
>
|
|
58
|
-
<span aria-hidden>{current.emoji}</span>
|
|
59
|
-
{!compact && <span>{current.label}</span>}
|
|
60
|
-
</button>
|
|
61
|
-
{open && (
|
|
62
|
-
<>
|
|
63
|
-
<div className="fixed inset-0 z-40" onClick={() => setOpen(false)} />
|
|
64
|
-
<div
|
|
65
|
-
className="absolute right-0 top-full mt-1 z-50 rounded-md min-w-[160px] py-1 shadow-lg"
|
|
66
|
-
style={{ background: 'var(--bg-secondary)', border: '1px solid var(--border)' }}
|
|
67
|
-
>
|
|
68
|
-
{THEMES.map(t => (
|
|
69
|
-
<button
|
|
70
|
-
key={t.id}
|
|
71
|
-
onClick={() => pick(t.id)}
|
|
72
|
-
className="w-full px-3 py-2 text-left text-xs flex items-center gap-2 hover:opacity-80"
|
|
73
|
-
style={{
|
|
74
|
-
background: t.id === theme ? 'var(--bg-elevated)' : 'transparent',
|
|
75
|
-
color: 'var(--fg)',
|
|
76
|
-
}}
|
|
77
|
-
>
|
|
78
|
-
<span aria-hidden>{t.emoji}</span>
|
|
79
|
-
<span className="flex-1">{t.label}</span>
|
|
80
|
-
<span style={{ color: 'var(--fg-dim)' }} className="text-[10px]">{t.desc}</span>
|
|
81
|
-
{t.id === theme && <span style={{ color: 'var(--accent)' }}>•</span>}
|
|
82
|
-
</button>
|
|
83
|
-
))}
|
|
84
|
-
</div>
|
|
85
|
-
</>
|
|
86
|
-
)}
|
|
87
|
-
</div>
|
|
88
|
-
);
|
|
89
|
-
}
|
|
@@ -133,7 +133,7 @@ export function UserBar() {
|
|
|
133
133
|
setNetworkId(e.target.value);
|
|
134
134
|
sessionStorage.setItem('anet_v3_auth', JSON.stringify(updated));
|
|
135
135
|
}}
|
|
136
|
-
className="bg-[#0a0a15] border border-[#2a2a4a] rounded px-2 py-1 text-xs text-white focus:outline-none"
|
|
136
|
+
className="bg-[#0a0a15] border border-[#2a2a4a] rounded px-2 py-1 text-base sm:text-xs text-white focus:outline-none"
|
|
137
137
|
>
|
|
138
138
|
{auth.networks.map(n => (
|
|
139
139
|
<option key={n.network_id} value={n.network_id}>{n.network_name}</option>
|
|
@@ -160,9 +160,9 @@ export function UserBar() {
|
|
|
160
160
|
{editing && (
|
|
161
161
|
<div className="flex flex-wrap items-center gap-2 mt-2 pt-2 border-t border-[#2a2a4a]">
|
|
162
162
|
<input type="text" value={editName} onChange={e => setEditName(e.target.value)} placeholder="Display name"
|
|
163
|
-
className="bg-[#0a0a15] border border-[#2a2a4a] rounded px-2 py-1 text-xs text-white placeholder-gray-600 focus:outline-none w-32" />
|
|
163
|
+
className="bg-[#0a0a15] border border-[#2a2a4a] rounded px-2 py-1 text-base sm:text-xs text-white placeholder-gray-600 focus:outline-none w-32" />
|
|
164
164
|
<input type="email" value={editEmail} onChange={e => setEditEmail(e.target.value)} placeholder="Email"
|
|
165
|
-
className="bg-[#0a0a15] border border-[#2a2a4a] rounded px-2 py-1 text-xs text-white placeholder-gray-600 focus:outline-none w-40" />
|
|
165
|
+
className="bg-[#0a0a15] border border-[#2a2a4a] rounded px-2 py-1 text-base sm:text-xs text-white placeholder-gray-600 focus:outline-none w-40" />
|
|
166
166
|
<button onClick={updateProfile} className="px-2 py-1 bg-cyan-600 hover:bg-cyan-500 text-white text-xs rounded">Save</button>
|
|
167
167
|
</div>
|
|
168
168
|
)}
|