@agent-relay/dashboard 2.0.80 → 2.0.82

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.
Files changed (244) hide show
  1. package/out/404.html +1 -1
  2. package/out/_next/static/chunks/{118-4c8241b0218335de.js → 118-ae2b650136a5a5fc.js} +1 -1
  3. package/out/_next/static/chunks/407-0c82986cf79c8ecb.js +1 -0
  4. package/out/_next/static/chunks/app/app/[[...slug]]/{page-1e81c047cff17212.js → page-f7eca1b66fb4249b.js} +1 -1
  5. package/out/_next/static/chunks/app/{page-6892fe2dd07fb48b.js → page-0ee604f7070d14c0.js} +1 -1
  6. package/out/_next/static/css/8968d98ed4c4d33f.css +1 -0
  7. package/out/about.html +2 -2
  8. package/out/about.txt +1 -1
  9. package/out/app/onboarding.html +1 -1
  10. package/out/app/onboarding.txt +1 -1
  11. package/out/app.html +1 -1
  12. package/out/app.txt +2 -2
  13. package/out/blog/go-to-bed-wake-up-to-a-finished-product.html +2 -2
  14. package/out/blog/go-to-bed-wake-up-to-a-finished-product.txt +1 -1
  15. package/out/blog/let-them-cook-multi-agent-orchestration.html +2 -2
  16. package/out/blog/let-them-cook-multi-agent-orchestration.txt +2 -2
  17. package/out/blog.html +2 -2
  18. package/out/blog.txt +1 -1
  19. package/out/careers.html +2 -2
  20. package/out/careers.txt +1 -1
  21. package/out/changelog.html +2 -2
  22. package/out/changelog.txt +1 -1
  23. package/out/cloud/link.html +1 -1
  24. package/out/cloud/link.txt +2 -2
  25. package/out/complete-profile.html +2 -2
  26. package/out/complete-profile.txt +1 -1
  27. package/out/connect-repos.html +1 -1
  28. package/out/connect-repos.txt +1 -1
  29. package/out/contact.html +2 -2
  30. package/out/contact.txt +1 -1
  31. package/out/docs.html +2 -2
  32. package/out/docs.txt +1 -1
  33. package/out/history.html +1 -1
  34. package/out/history.txt +2 -2
  35. package/out/index.html +1 -1
  36. package/out/index.txt +2 -2
  37. package/out/login.html +2 -2
  38. package/out/login.txt +1 -1
  39. package/out/metrics.html +1 -1
  40. package/out/metrics.txt +2 -2
  41. package/out/pricing.html +2 -2
  42. package/out/pricing.txt +1 -1
  43. package/out/privacy.html +2 -2
  44. package/out/privacy.txt +1 -1
  45. package/out/providers/setup/claude.html +1 -1
  46. package/out/providers/setup/claude.txt +1 -1
  47. package/out/providers/setup/codex.html +1 -1
  48. package/out/providers/setup/codex.txt +1 -1
  49. package/out/providers/setup/cursor.html +1 -1
  50. package/out/providers/setup/cursor.txt +1 -1
  51. package/out/providers.html +1 -1
  52. package/out/providers.txt +1 -1
  53. package/out/security.html +2 -2
  54. package/out/security.txt +1 -1
  55. package/out/signup.html +2 -2
  56. package/out/signup.txt +1 -1
  57. package/out/terms.html +2 -2
  58. package/out/terms.txt +1 -1
  59. package/package.json +7 -1
  60. package/src/app/about/page.tsx +7 -0
  61. package/src/app/app/[[...slug]]/DashboardPageClient.tsx +853 -0
  62. package/src/app/app/[[...slug]]/page.tsx +23 -0
  63. package/src/app/app/onboarding/page.tsx +394 -0
  64. package/src/app/apple-icon.png +0 -0
  65. package/src/app/blog/go-to-bed-wake-up-to-a-finished-product/page.tsx +88 -0
  66. package/src/app/blog/let-them-cook-multi-agent-orchestration/page.tsx +93 -0
  67. package/src/app/blog/page.tsx +15 -0
  68. package/src/app/careers/page.tsx +7 -0
  69. package/src/app/changelog/page.tsx +7 -0
  70. package/src/app/cloud/link/page.tsx +464 -0
  71. package/src/app/complete-profile/page.tsx +204 -0
  72. package/src/app/connect-repos/page.tsx +410 -0
  73. package/src/app/contact/page.tsx +7 -0
  74. package/src/app/docs/page.tsx +7 -0
  75. package/src/app/favicon.png +0 -0
  76. package/src/app/globals.css +200 -0
  77. package/src/app/history/page.tsx +658 -0
  78. package/src/app/layout.tsx +25 -0
  79. package/src/app/login/page.tsx +424 -0
  80. package/src/app/metrics/page.tsx +781 -0
  81. package/src/app/page.tsx +59 -0
  82. package/src/app/pricing/page.tsx +7 -0
  83. package/src/app/privacy/page.tsx +7 -0
  84. package/src/app/providers/page.tsx +193 -0
  85. package/src/app/providers/setup/[provider]/ProviderSetupClient.tsx +197 -0
  86. package/src/app/providers/setup/[provider]/constants.ts +35 -0
  87. package/src/app/providers/setup/[provider]/page.tsx +42 -0
  88. package/src/app/security/page.tsx +7 -0
  89. package/src/app/signup/page.tsx +533 -0
  90. package/src/app/terms/page.tsx +7 -0
  91. package/src/components/ActivityFeed.tsx +216 -0
  92. package/src/components/AddWorkspaceModal.tsx +170 -0
  93. package/src/components/AgentCard.test.tsx +134 -0
  94. package/src/components/AgentCard.tsx +585 -0
  95. package/src/components/AgentList.test.tsx +147 -0
  96. package/src/components/AgentList.tsx +419 -0
  97. package/src/components/AgentLogPreview.tsx +173 -0
  98. package/src/components/AgentProfilePanel.tsx +569 -0
  99. package/src/components/App.tsx +3424 -0
  100. package/src/components/BillingPanel.tsx +922 -0
  101. package/src/components/BillingResult.tsx +447 -0
  102. package/src/components/BroadcastComposer.tsx +690 -0
  103. package/src/components/ChannelAdminPanel.tsx +773 -0
  104. package/src/components/ChannelBrowser.tsx +385 -0
  105. package/src/components/ChannelChat.tsx +261 -0
  106. package/src/components/ChannelSidebar.tsx +399 -0
  107. package/src/components/CloudSessionProvider.tsx +130 -0
  108. package/src/components/CommandPalette.tsx +815 -0
  109. package/src/components/ConfirmationDialog.tsx +133 -0
  110. package/src/components/ConversationHistory.tsx +518 -0
  111. package/src/components/CoordinatorPanel.tsx +956 -0
  112. package/src/components/DecisionQueue.tsx +717 -0
  113. package/src/components/DirectMessageView.tsx +164 -0
  114. package/src/components/FileAutocomplete.tsx +368 -0
  115. package/src/components/FleetOverview.tsx +278 -0
  116. package/src/components/LogViewer.tsx +310 -0
  117. package/src/components/LogViewerPanel.tsx +482 -0
  118. package/src/components/Logo.tsx +284 -0
  119. package/src/components/MentionAutocomplete.tsx +384 -0
  120. package/src/components/MessageComposer.tsx +473 -0
  121. package/src/components/MessageList.tsx +725 -0
  122. package/src/components/MessageSenderName.tsx +91 -0
  123. package/src/components/MessageStatusIndicator.tsx +142 -0
  124. package/src/components/NewConversationModal.tsx +400 -0
  125. package/src/components/NotificationToast.tsx +488 -0
  126. package/src/components/OnlineUsersIndicator.tsx +164 -0
  127. package/src/components/Pagination.tsx +124 -0
  128. package/src/components/PricingPlans.tsx +386 -0
  129. package/src/components/ProjectList.tsx +711 -0
  130. package/src/components/ProviderAuthFlow.tsx +343 -0
  131. package/src/components/ProviderConnectionList.tsx +375 -0
  132. package/src/components/ProvisioningProgress.tsx +730 -0
  133. package/src/components/ReactionChips.tsx +70 -0
  134. package/src/components/ReactionPicker.tsx +121 -0
  135. package/src/components/RepoAccessPanel.tsx +787 -0
  136. package/src/components/RepositoriesPanel.tsx +901 -0
  137. package/src/components/ServerCard.tsx +202 -0
  138. package/src/components/SessionExpiredModal.tsx +128 -0
  139. package/src/components/SpawnModal.test.tsx +190 -0
  140. package/src/components/SpawnModal.tsx +1001 -0
  141. package/src/components/TaskAssignmentUI.tsx +375 -0
  142. package/src/components/TerminalProviderSetup.tsx +517 -0
  143. package/src/components/ThemeProvider.tsx +159 -0
  144. package/src/components/ThinkingIndicator.tsx +231 -0
  145. package/src/components/ThreadList.tsx +198 -0
  146. package/src/components/ThreadPanel.tsx +405 -0
  147. package/src/components/TrajectoryViewer.tsx +698 -0
  148. package/src/components/TypingIndicator.tsx +69 -0
  149. package/src/components/UsageBanner.tsx +231 -0
  150. package/src/components/UserProfilePanel.tsx +233 -0
  151. package/src/components/WorkspaceContext.tsx +95 -0
  152. package/src/components/WorkspaceSelector.tsx +234 -0
  153. package/src/components/WorkspaceStatusIndicator.tsx +396 -0
  154. package/src/components/XTermInteractive.tsx +516 -0
  155. package/src/components/XTermLogViewer.tsx +719 -0
  156. package/src/components/channels/ChannelDialogs.tsx +1411 -0
  157. package/src/components/channels/ChannelHeader.tsx +317 -0
  158. package/src/components/channels/ChannelMessageList.tsx +463 -0
  159. package/src/components/channels/ChannelViewV1.tsx +146 -0
  160. package/src/components/channels/MessageInput.tsx +302 -0
  161. package/src/components/channels/SearchInput.tsx +172 -0
  162. package/src/components/channels/SearchResults.tsx +336 -0
  163. package/src/components/channels/api.test.ts +1527 -0
  164. package/src/components/channels/api.ts +703 -0
  165. package/src/components/channels/index.ts +76 -0
  166. package/src/components/channels/mockApi.ts +344 -0
  167. package/src/components/channels/types.ts +566 -0
  168. package/src/components/hooks/index.ts +58 -0
  169. package/src/components/hooks/useAgentLogs.ts +504 -0
  170. package/src/components/hooks/useAgents.ts +127 -0
  171. package/src/components/hooks/useBroadcastDedup.test.ts +371 -0
  172. package/src/components/hooks/useBroadcastDedup.ts +86 -0
  173. package/src/components/hooks/useChannelAdmin.ts +329 -0
  174. package/src/components/hooks/useChannelBrowser.ts +239 -0
  175. package/src/components/hooks/useChannelCommands.ts +138 -0
  176. package/src/components/hooks/useChannels.ts +367 -0
  177. package/src/components/hooks/useDebounce.ts +29 -0
  178. package/src/components/hooks/useDirectMessage.test.ts +952 -0
  179. package/src/components/hooks/useDirectMessage.ts +141 -0
  180. package/src/components/hooks/useMessages.ts +310 -0
  181. package/src/components/hooks/useOrchestrator.test.ts +165 -0
  182. package/src/components/hooks/useOrchestrator.ts +424 -0
  183. package/src/components/hooks/usePinnedAgents.test.ts +356 -0
  184. package/src/components/hooks/usePinnedAgents.ts +140 -0
  185. package/src/components/hooks/usePresence.test.ts +245 -0
  186. package/src/components/hooks/usePresence.ts +377 -0
  187. package/src/components/hooks/useRecentRepos.ts +130 -0
  188. package/src/components/hooks/useSession.ts +209 -0
  189. package/src/components/hooks/useThread.ts +138 -0
  190. package/src/components/hooks/useTrajectory.ts +265 -0
  191. package/src/components/hooks/useWebSocket.ts +290 -0
  192. package/src/components/hooks/useWorkspaceMembers.ts +132 -0
  193. package/src/components/hooks/useWorkspaceRepos.ts +73 -0
  194. package/src/components/hooks/useWorkspaceStatus.ts +237 -0
  195. package/src/components/index.ts +81 -0
  196. package/src/components/layout/Header.tsx +311 -0
  197. package/src/components/layout/RepoContextHeader.tsx +361 -0
  198. package/src/components/layout/Sidebar.archive.test.tsx +126 -0
  199. package/src/components/layout/Sidebar.test.tsx +691 -0
  200. package/src/components/layout/Sidebar.tsx +900 -0
  201. package/src/components/layout/index.ts +7 -0
  202. package/src/components/settings/BillingSettingsPanel.tsx +564 -0
  203. package/src/components/settings/SettingsPage.tsx +683 -0
  204. package/src/components/settings/TeamSettingsPanel.tsx +560 -0
  205. package/src/components/settings/WorkspaceSettingsPanel.tsx +1368 -0
  206. package/src/components/settings/index.ts +11 -0
  207. package/src/components/settings/types.ts +79 -0
  208. package/src/components/utils/messageFormatting.test.tsx +331 -0
  209. package/src/components/utils/messageFormatting.tsx +597 -0
  210. package/src/index.ts +63 -0
  211. package/src/landing/AboutPage.tsx +77 -0
  212. package/src/landing/BlogContent.tsx +187 -0
  213. package/src/landing/BlogPage.tsx +47 -0
  214. package/src/landing/CareersPage.tsx +53 -0
  215. package/src/landing/ChangelogPage.tsx +33 -0
  216. package/src/landing/ContactPage.tsx +41 -0
  217. package/src/landing/DocsPage.tsx +43 -0
  218. package/src/landing/LandingPage.tsx +702 -0
  219. package/src/landing/PricingPage.tsx +549 -0
  220. package/src/landing/PrivacyPage.tsx +117 -0
  221. package/src/landing/SecurityPage.tsx +42 -0
  222. package/src/landing/StaticPage.tsx +165 -0
  223. package/src/landing/TermsPage.tsx +125 -0
  224. package/src/landing/blogData.ts +312 -0
  225. package/src/landing/index.ts +18 -0
  226. package/src/landing/styles.css +3673 -0
  227. package/src/lib/agent-merge.test.ts +43 -0
  228. package/src/lib/agent-merge.ts +35 -0
  229. package/src/lib/api.ts +1294 -0
  230. package/src/lib/cloudApi.ts +893 -0
  231. package/src/lib/colors.test.ts +175 -0
  232. package/src/lib/colors.ts +218 -0
  233. package/src/lib/config.ts +109 -0
  234. package/src/lib/hierarchy.ts +242 -0
  235. package/src/lib/stuckDetection.ts +142 -0
  236. package/src/lib/useUrlRouting.ts +190 -0
  237. package/src/types/index.ts +317 -0
  238. package/src/types/threading.ts +7 -0
  239. package/out/_next/static/chunks/285-dc644487a8d6500d.js +0 -1
  240. package/out/_next/static/css/4c58d9cf493aa626.css +0 -1
  241. /package/out/_next/static/{AqelRhy1vr2nBUcU0Iqcp → IxfA6RZu4trcsEMYlkQra}/_buildManifest.js +0 -0
  242. /package/out/_next/static/{AqelRhy1vr2nBUcU0Iqcp → IxfA6RZu4trcsEMYlkQra}/_ssgManifest.js +0 -0
  243. /package/out/_next/static/chunks/{528-d375bc8b46912d2c.js → 528-f5f676996d613c25.js} +0 -0
  244. /package/out/_next/static/chunks/app/blog/let-them-cook-multi-agent-orchestration/{page-a58308f43557b908.js → page-b194f207fbd91862.js} +0 -0
@@ -0,0 +1,900 @@
1
+ /**
2
+ * Sidebar Component - Mission Control Theme
3
+ *
4
+ * Main navigation sidebar with channels, agents, and projects in unified view.
5
+ * Channels are collapsed by default.
6
+ */
7
+
8
+ import React, { useState, useEffect } from 'react';
9
+ import type { Agent, Project } from '../../types';
10
+ import type { ThreadInfo } from '../hooks/useMessages';
11
+ import { usePinnedAgents } from '../hooks/usePinnedAgents';
12
+ import { useWorkspaceStatus } from '../hooks/useWorkspaceStatus';
13
+ import { AgentList } from '../AgentList';
14
+ import { ProjectList } from '../ProjectList';
15
+ import { ThreadList } from '../ThreadList';
16
+ import { LogoIcon } from '../Logo';
17
+
18
+ const THREADS_COLLAPSED_KEY = 'agent-relay-threads-collapsed';
19
+ const SIDEBAR_TAB_KEY = 'agent-relay-sidebar-tab';
20
+ const CHANNELS_COLLAPSED_KEY = 'agent-relay-channels-collapsed';
21
+
22
+ /** Channel type for sidebar display */
23
+ export interface SidebarChannel {
24
+ id: string;
25
+ name: string;
26
+ unreadCount: number;
27
+ hasMentions?: boolean;
28
+ }
29
+
30
+ export type SidebarTab = 'agents' | 'team';
31
+
32
+ export interface SidebarProps {
33
+ agents: Agent[];
34
+ /** Bridge-level agents like Architect that span multiple projects */
35
+ bridgeAgents?: Agent[];
36
+ projects?: Project[];
37
+ /** Current signed-in human (to hide from Human Users list) */
38
+ currentUserName?: string;
39
+ /** Unread DM counts keyed by human username */
40
+ humanUnreadCounts?: Record<string, number>;
41
+ currentProject?: string;
42
+ selectedAgent?: string;
43
+ viewMode: 'local' | 'fleet' | 'channels';
44
+ isFleetAvailable: boolean;
45
+ isConnected: boolean;
46
+ /** Mobile: whether sidebar is open */
47
+ isOpen?: boolean;
48
+ /** Active threads for the threads section */
49
+ activeThreads?: ThreadInfo[];
50
+ /** Currently selected thread */
51
+ currentThread?: string | null;
52
+ /** Total unread thread count for notification badge */
53
+ totalUnreadThreadCount?: number;
54
+ /** Whether Activity feed is selected */
55
+ isActivitySelected?: boolean;
56
+ /** Unread count for Activity (broadcasts) */
57
+ activityUnreadCount?: number;
58
+ /** Handler when Activity is selected */
59
+ onActivitySelect?: () => void;
60
+ /** Channels for the collapsible channels section */
61
+ channels?: SidebarChannel[];
62
+ /** Archived channels for the collapsible archived section */
63
+ archivedChannels?: SidebarChannel[];
64
+ /** Currently selected channel ID */
65
+ selectedChannelId?: string;
66
+ /** Handler when a channel is selected */
67
+ onChannelSelect?: (channel: SidebarChannel) => void;
68
+ /** Handler to archive a channel */
69
+ onArchiveChannel?: (channel: SidebarChannel) => void;
70
+ /** Handler to unarchive a channel */
71
+ onUnarchiveChannel?: (channel: SidebarChannel) => void;
72
+ /** Handler to create a new channel */
73
+ onCreateChannel?: () => void;
74
+ /** Handler to invite members to a channel */
75
+ onInviteToChannel?: (channel: SidebarChannel) => void;
76
+ onAgentSelect?: (agent: Agent, project?: Project) => void;
77
+ /** Handler when a human user is selected (opens DM) */
78
+ onHumanSelect?: (human: Agent) => void;
79
+ onProjectSelect?: (project: Project) => void;
80
+ onViewModeChange?: (mode: 'local' | 'fleet' | 'channels') => void;
81
+ onSpawnClick?: () => void;
82
+ onReleaseClick?: (agent: Agent) => void;
83
+ onLogsClick?: (agent: Agent) => void;
84
+ /** Handler to view agent profile */
85
+ onProfileClick?: (agent: Agent) => void;
86
+ onThreadSelect?: (threadId: string) => void;
87
+ /** Mobile: close sidebar handler */
88
+ onClose?: () => void;
89
+ /** Handler for opening settings */
90
+ onSettingsClick?: () => void;
91
+ /** Mobile nav: Trajectory viewer toggle */
92
+ onTrajectoryClick?: () => void;
93
+ /** Mobile nav: Whether there's an active trajectory */
94
+ hasActiveTrajectory?: boolean;
95
+ /** Mobile nav: Fleet view toggle */
96
+ onFleetClick?: () => void;
97
+ /** Mobile nav: Whether fleet view is active */
98
+ isFleetViewActive?: boolean;
99
+ }
100
+
101
+ export function Sidebar({
102
+ agents,
103
+ bridgeAgents = [],
104
+ projects = [],
105
+ currentUserName,
106
+ humanUnreadCounts = {},
107
+ currentProject,
108
+ selectedAgent,
109
+ viewMode,
110
+ isFleetAvailable,
111
+ isConnected,
112
+ isOpen = false,
113
+ activeThreads = [],
114
+ currentThread,
115
+ totalUnreadThreadCount = 0,
116
+ isActivitySelected = false,
117
+ activityUnreadCount = 0,
118
+ onActivitySelect,
119
+ channels = [],
120
+ archivedChannels = [],
121
+ selectedChannelId,
122
+ onChannelSelect,
123
+ onArchiveChannel,
124
+ onUnarchiveChannel,
125
+ onCreateChannel,
126
+ onInviteToChannel,
127
+ onAgentSelect,
128
+ onHumanSelect,
129
+ onProjectSelect,
130
+ onViewModeChange,
131
+ onSpawnClick,
132
+ onReleaseClick,
133
+ onLogsClick,
134
+ onProfileClick,
135
+ onThreadSelect,
136
+ onClose,
137
+ onSettingsClick,
138
+ onTrajectoryClick,
139
+ hasActiveTrajectory,
140
+ onFleetClick,
141
+ isFleetViewActive,
142
+ }: SidebarProps) {
143
+ const [searchQuery, setSearchQuery] = useState('');
144
+ const [activeTab, setActiveTab] = useState<SidebarTab>(() => {
145
+ // Initialize from localStorage
146
+ try {
147
+ const stored = localStorage.getItem(SIDEBAR_TAB_KEY);
148
+ return (stored === 'team' ? 'team' : 'agents') as SidebarTab;
149
+ } catch {
150
+ return 'agents';
151
+ }
152
+ });
153
+ const [isThreadsCollapsed, setIsThreadsCollapsed] = useState(() => {
154
+ // Initialize from localStorage
155
+ try {
156
+ const stored = localStorage.getItem(THREADS_COLLAPSED_KEY);
157
+ return stored === 'true';
158
+ } catch {
159
+ return false;
160
+ }
161
+ });
162
+ const [isChannelsCollapsed, setIsChannelsCollapsed] = useState(() => {
163
+ // Initialize from localStorage - default to collapsed
164
+ try {
165
+ const stored = localStorage.getItem(CHANNELS_COLLAPSED_KEY);
166
+ return stored === null ? true : stored === 'true';
167
+ } catch {
168
+ return true;
169
+ }
170
+ });
171
+
172
+ // Persist tab state to localStorage
173
+ useEffect(() => {
174
+ try {
175
+ localStorage.setItem(SIDEBAR_TAB_KEY, activeTab);
176
+ } catch {
177
+ // localStorage not available
178
+ }
179
+ }, [activeTab]);
180
+
181
+ // Persist collapsed state to localStorage
182
+ useEffect(() => {
183
+ try {
184
+ localStorage.setItem(THREADS_COLLAPSED_KEY, String(isThreadsCollapsed));
185
+ } catch {
186
+ // localStorage not available
187
+ }
188
+ }, [isThreadsCollapsed]);
189
+
190
+ // Persist channels collapsed state
191
+ useEffect(() => {
192
+ try {
193
+ localStorage.setItem(CHANNELS_COLLAPSED_KEY, String(isChannelsCollapsed));
194
+ } catch {
195
+ // localStorage not available
196
+ }
197
+ }, [isChannelsCollapsed]);
198
+
199
+ // Total unread count for channels
200
+ const totalChannelUnread = channels.reduce((sum, c) => sum + c.unreadCount, 0);
201
+ const hasChannels = channels.length > 0;
202
+ // Keep channels section open when empty so the create button is visible
203
+ const isChannelsSectionCollapsed = hasChannels ? isChannelsCollapsed : false;
204
+ const hasArchivedChannels = archivedChannels.length > 0;
205
+ const [isArchivedCollapsed, setIsArchivedCollapsed] = useState(true);
206
+ const [openChannelMenuId, setOpenChannelMenuId] = useState<string | null>(null);
207
+
208
+ // Close menus when channel selection changes
209
+ useEffect(() => {
210
+ setOpenChannelMenuId(null);
211
+ }, [selectedChannelId]);
212
+
213
+ // Separate AI agents from human team members
214
+ // Also filter out system agents like Dashboard
215
+ const aiAgents = agents.filter(a => !a.isHuman && a.name !== 'Dashboard');
216
+ const humanMembers = agents.filter(
217
+ a => a.isHuman &&
218
+ a.name !== 'Dashboard' &&
219
+ (!currentUserName || a.name.toLowerCase() !== currentUserName.toLowerCase())
220
+ );
221
+ const filteredHumanMembers = humanMembers.filter(
222
+ (m) => !searchQuery || m.name.toLowerCase().includes(searchQuery.toLowerCase())
223
+ );
224
+
225
+ // Pinned agents for quick access
226
+ const { pinnedAgents, togglePin, isMaxPinned } = usePinnedAgents();
227
+
228
+ // Check if workspace is stopped - hide channels when stopped
229
+ const { workspace } = useWorkspaceStatus();
230
+ const isWorkspaceStopped = workspace?.isStopped ?? false;
231
+
232
+ // Determine if we should show unified project view
233
+ const hasProjects = projects.length > 0;
234
+
235
+ return (
236
+ <aside
237
+ className="flex-1 flex flex-col overflow-hidden"
238
+ >
239
+ {/* Header */}
240
+ <div className="p-3 sm:p-4 border-b border-border-subtle">
241
+ <div className="flex items-center gap-2 sm:gap-3">
242
+ <LogoIcon size={24} withGlow={true} />
243
+ <h1 className="text-base sm:text-lg font-display font-semibold m-0 text-text-primary">Agent Relay</h1>
244
+ <ConnectionIndicator isConnected={isConnected} />
245
+ {/* Mobile close button */}
246
+ <button
247
+ className="md:hidden ml-auto p-2 -mr-1 sm:-mr-2 bg-transparent border-none text-text-muted cursor-pointer rounded-lg transition-colors hover:bg-bg-hover hover:text-text-primary active:bg-bg-hover"
248
+ onClick={onClose}
249
+ aria-label="Close sidebar"
250
+ >
251
+ <CloseIcon />
252
+ </button>
253
+ </div>
254
+ </div>
255
+
256
+ {/* Agents/Team Tabs */}
257
+ {humanMembers.length > 0 && (
258
+ <div className="flex bg-bg-tertiary rounded-lg p-1 mx-3 mt-3">
259
+ <button
260
+ className={`
261
+ flex-1 py-2 px-4 bg-transparent border-none text-xs font-medium cursor-pointer rounded-md transition-all duration-150 flex items-center justify-center gap-1.5
262
+ ${activeTab === 'agents'
263
+ ? 'bg-bg-elevated text-accent-cyan shadow-sm'
264
+ : 'text-text-muted hover:text-text-secondary'}
265
+ `}
266
+ onClick={() => setActiveTab('agents')}
267
+ >
268
+ <RobotIcon />
269
+ Agents
270
+ {aiAgents.length > 0 && (
271
+ <span className="text-[10px] opacity-70">({aiAgents.length})</span>
272
+ )}
273
+ </button>
274
+ <button
275
+ className={`
276
+ flex-1 py-2 px-4 bg-transparent border-none text-xs font-medium cursor-pointer rounded-md transition-all duration-150 flex items-center justify-center gap-1.5
277
+ ${activeTab === 'team'
278
+ ? 'bg-bg-elevated text-accent-cyan shadow-sm'
279
+ : 'text-text-muted hover:text-text-secondary'}
280
+ `}
281
+ onClick={() => setActiveTab('team')}
282
+ >
283
+ <UsersIcon />
284
+ Team
285
+ {humanMembers.length > 0 && (
286
+ <span className="text-[10px] opacity-70">({humanMembers.length})</span>
287
+ )}
288
+ </button>
289
+ </div>
290
+ )}
291
+
292
+ {/* Search */}
293
+ <div className="flex items-center gap-2 py-2 sm:py-2.5 px-2 sm:px-3 bg-bg-tertiary m-2 sm:m-3 rounded-lg border border-border-subtle focus-within:border-accent-cyan/50 transition-colors">
294
+ <SearchIcon />
295
+ <input
296
+ type="text"
297
+ placeholder={activeTab === 'agents' ? 'Search agents...' : 'Search team...'}
298
+ value={searchQuery}
299
+ onChange={(e) => setSearchQuery(e.target.value)}
300
+ className="flex-1 bg-transparent border-none text-text-primary text-sm outline-none placeholder:text-text-muted"
301
+ />
302
+ {searchQuery && (
303
+ <button
304
+ className="bg-transparent border-none text-text-muted cursor-pointer p-1 flex items-center justify-center hover:text-text-secondary rounded transition-colors active:text-text-secondary"
305
+ onClick={() => setSearchQuery('')}
306
+ >
307
+ <ClearIcon />
308
+ </button>
309
+ )}
310
+ </div>
311
+
312
+ {/* Threads Section */}
313
+ {activeThreads.length > 0 && (
314
+ <div className="border-b border-border-subtle">
315
+ <ThreadList
316
+ threads={activeThreads}
317
+ currentThread={currentThread}
318
+ onThreadSelect={(threadId) => onThreadSelect?.(threadId)}
319
+ totalUnreadCount={totalUnreadThreadCount}
320
+ isCollapsed={isThreadsCollapsed}
321
+ onToggleCollapse={() => setIsThreadsCollapsed(!isThreadsCollapsed)}
322
+ />
323
+ </div>
324
+ )}
325
+
326
+ {/* Activity Section - Broadcasts */}
327
+ <div className="border-b border-border-subtle px-2 py-2">
328
+ <button
329
+ onClick={onActivitySelect}
330
+ className={`
331
+ w-full flex items-center gap-2 px-2 py-2 rounded-lg text-left text-sm transition-colors
332
+ ${isActivitySelected
333
+ ? 'bg-accent-cyan/10 text-text-primary border border-accent-cyan/30'
334
+ : 'hover:bg-bg-hover text-text-secondary hover:text-text-primary border border-transparent'}
335
+ `}
336
+ >
337
+ <ActivityIcon />
338
+ <span className={`flex-1 ${activityUnreadCount > 0 ? 'font-semibold text-text-primary' : ''}`}>
339
+ Activity
340
+ </span>
341
+ {activityUnreadCount > 0 && (
342
+ <span className="text-[11px] font-semibold px-1.5 py-0.5 rounded-full bg-accent-cyan/20 text-accent-cyan">
343
+ {activityUnreadCount}
344
+ </span>
345
+ )}
346
+ </button>
347
+ </div>
348
+
349
+ {/* Channels Section - Collapsible (hidden when workspace stopped) */}
350
+ {!isWorkspaceStopped && (
351
+ <div className="border-b border-border-subtle">
352
+ <button
353
+ className="w-full flex items-center justify-between px-3 py-2 text-xs font-semibold text-text-muted uppercase tracking-wide hover:bg-bg-hover transition-colors"
354
+ onClick={() => setIsChannelsCollapsed(!isChannelsCollapsed)}
355
+ >
356
+ <span className="flex items-center gap-2">
357
+ <HashIcon />
358
+ Channels
359
+ {totalChannelUnread > 0 && (
360
+ <span className="text-[10px] font-semibold px-1.5 py-0.5 rounded-full bg-accent-cyan/20 text-accent-cyan">
361
+ {totalChannelUnread}
362
+ </span>
363
+ )}
364
+ </span>
365
+ <ChevronIcon className={`transition-transform ${isChannelsSectionCollapsed ? '' : 'rotate-180'}`} />
366
+ </button>
367
+ {!isChannelsSectionCollapsed && (
368
+ <div className="px-2 pb-2 space-y-0.5 max-h-40 md:max-h-none overflow-y-auto">
369
+ {channels.map(channel => (
370
+ <div key={channel.id} className="group relative">
371
+ <button
372
+ onClick={() => onChannelSelect?.(channel)}
373
+ className={`
374
+ w-full flex items-center gap-2 px-2 py-1.5 rounded-md text-left text-sm transition-colors
375
+ ${selectedChannelId === channel.id
376
+ ? 'bg-accent-cyan/10 text-text-primary'
377
+ : 'hover:bg-bg-hover text-text-secondary hover:text-text-primary'}
378
+ `}
379
+ >
380
+ <span className="text-text-muted">#</span>
381
+ <span className={`flex-1 truncate ${channel.unreadCount > 0 ? 'font-semibold text-text-primary' : ''}`}>
382
+ {channel.name}
383
+ </span>
384
+ {channel.unreadCount > 0 && (
385
+ <span className={`
386
+ text-[11px] font-semibold px-1.5 py-0.5 rounded-full min-w-[18px] text-center
387
+ ${channel.hasMentions ? 'bg-red-500/20 text-red-400' : 'bg-accent-cyan/20 text-accent-cyan'}
388
+ `}>
389
+ {channel.unreadCount}
390
+ </span>
391
+ )}
392
+ </button>
393
+ {(onInviteToChannel || onArchiveChannel) && (
394
+ <button
395
+ onClick={(e) => {
396
+ e.stopPropagation();
397
+ setOpenChannelMenuId(openChannelMenuId === channel.id ? null : channel.id);
398
+ }}
399
+ title="Channel actions"
400
+ className="absolute right-1 top-1/2 -translate-y-1/2 p-1 rounded opacity-0 group-hover:opacity-100 hover:bg-bg-tertiary text-text-muted hover:text-text-primary transition-all"
401
+ >
402
+ <MoreIcon />
403
+ </button>
404
+ )}
405
+ {openChannelMenuId === channel.id && (
406
+ <div className="absolute right-0 top-full mt-1 z-30 bg-bg-elevated border border-border-subtle rounded-lg shadow-lg py-1 min-w-[160px]">
407
+ {onInviteToChannel && (
408
+ <MenuButton
409
+ onClick={() => {
410
+ onInviteToChannel(channel);
411
+ setOpenChannelMenuId(null);
412
+ }}
413
+ >
414
+ <UserPlusIcon />
415
+ <span>Invite members</span>
416
+ </MenuButton>
417
+ )}
418
+ {onArchiveChannel && (
419
+ <MenuButton
420
+ onClick={() => {
421
+ onArchiveChannel(channel);
422
+ setOpenChannelMenuId(null);
423
+ }}
424
+ >
425
+ <ArchiveIcon />
426
+ <span>Archive</span>
427
+ </MenuButton>
428
+ )}
429
+ </div>
430
+ )}
431
+ </div>
432
+ ))}
433
+ {onCreateChannel && (
434
+ <button
435
+ onClick={onCreateChannel}
436
+ className="w-full flex items-center gap-2 px-2 py-1.5 rounded-md text-left text-sm text-text-muted hover:bg-bg-hover hover:text-text-secondary transition-colors"
437
+ >
438
+ <PlusIcon />
439
+ <span>{hasChannels ? 'Add channel' : 'Create your first channel'}</span>
440
+ </button>
441
+ )}
442
+ </div>
443
+ )}
444
+
445
+ {hasArchivedChannels && (
446
+ <div className="mt-1 border-t border-border-subtle">
447
+ <button
448
+ className="w-full flex items-center justify-between px-3 py-2 text-xs font-semibold text-text-muted uppercase tracking-wide hover:bg-bg-hover transition-colors"
449
+ onClick={() => setIsArchivedCollapsed(!isArchivedCollapsed)}
450
+ >
451
+ <span className="flex items-center gap-2">
452
+ <ArchiveIcon />
453
+ Archived
454
+ <span className="text-[10px] opacity-80">({archivedChannels.length})</span>
455
+ </span>
456
+ <ChevronIcon className={`transition-transform ${isArchivedCollapsed ? '' : 'rotate-180'}`} />
457
+ </button>
458
+ {!isArchivedCollapsed && (
459
+ <div className="px-2 pb-2 space-y-0.5 max-h-32 md:max-h-none overflow-y-auto">
460
+ {archivedChannels.map((channel) => (
461
+ <div key={channel.id} className="group relative">
462
+ <button
463
+ onClick={() => onChannelSelect?.(channel)}
464
+ className={`
465
+ w-full flex items-center gap-2 px-2 py-1.5 rounded-md text-left text-sm transition-colors
466
+ ${selectedChannelId === channel.id
467
+ ? 'bg-bg-tertiary text-text-primary'
468
+ : 'hover:bg-bg-hover text-text-secondary hover:text-text-primary'}
469
+ `}
470
+ >
471
+ <span className="text-text-muted">#</span>
472
+ <span className="flex-1 truncate">{channel.name}</span>
473
+ <span className="text-[10px] font-medium px-1.5 py-0.5 rounded-full bg-border-subtle text-text-muted">
474
+ Archived
475
+ </span>
476
+ </button>
477
+ {onUnarchiveChannel && (
478
+ <button
479
+ onClick={(e) => {
480
+ e.stopPropagation();
481
+ onUnarchiveChannel(channel);
482
+ }}
483
+ title="Unarchive channel"
484
+ className="absolute right-1 top-1/2 -translate-y-1/2 px-2 py-1 rounded-md bg-bg-tertiary text-text-secondary hover:text-text-primary hover:bg-bg-hover transition-colors text-xs flex items-center gap-1"
485
+ >
486
+ <UnarchiveIcon />
487
+ <span>Unarchive</span>
488
+ </button>
489
+ )}
490
+ </div>
491
+ ))}
492
+ </div>
493
+ )}
494
+ </div>
495
+ )}
496
+ </div>
497
+ )}
498
+
499
+ {/* Agent/Project List */}
500
+ <div className="flex-1 overflow-y-auto px-2">
501
+ {activeTab === 'team' && humanMembers.length > 0 ? (
502
+ /* Team Members List */
503
+ <div className="flex flex-col gap-1 py-2">
504
+ {filteredHumanMembers.map((member) => (
505
+ <button
506
+ key={member.name}
507
+ onClick={() => onHumanSelect ? onHumanSelect(member) : onAgentSelect?.(member)}
508
+ className={`
509
+ flex items-center gap-3 p-3 rounded-lg border transition-all duration-150 text-left w-full
510
+ ${selectedAgent === member.name
511
+ ? 'bg-accent-cyan/10 border-accent-cyan/30'
512
+ : 'bg-bg-tertiary border-border-subtle hover:border-accent-cyan/30 hover:bg-bg-hover'}
513
+ `}
514
+ >
515
+ {member.avatarUrl ? (
516
+ <img
517
+ src={member.avatarUrl}
518
+ alt={member.name}
519
+ className="w-9 h-9 rounded-full object-cover"
520
+ />
521
+ ) : (
522
+ <div className="w-9 h-9 rounded-full bg-gradient-to-br from-purple-500 to-pink-500 flex items-center justify-center text-white font-medium text-sm">
523
+ {member.name.charAt(0).toUpperCase()}
524
+ </div>
525
+ )}
526
+ <div className="flex-1 min-w-0">
527
+ <p className="text-sm font-medium text-text-primary truncate">{member.name}</p>
528
+ <p className="text-xs text-text-muted truncate">{member.role || 'Team Member'}</p>
529
+ </div>
530
+ {humanUnreadCounts[member.name] > 0 && (
531
+ <span className="text-[11px] font-semibold px-2 py-0.5 rounded-full bg-accent-cyan/20 text-accent-cyan">
532
+ {humanUnreadCounts[member.name]}
533
+ </span>
534
+ )}
535
+ <div className={`w-2 h-2 rounded-full ${member.status === 'online' ? 'bg-success' : 'bg-text-dim'}`} />
536
+ </button>
537
+ ))}
538
+ {filteredHumanMembers.length === 0 && (
539
+ <div className="flex flex-col items-center justify-center py-10 px-5 text-text-muted text-center">
540
+ <SearchIcon />
541
+ <p className="mt-3">No team members match "{searchQuery}"</p>
542
+ </div>
543
+ )}
544
+ </div>
545
+ ) : hasProjects ? (
546
+ <ProjectList
547
+ projects={projects}
548
+ localAgents={aiAgents}
549
+ bridgeAgents={bridgeAgents}
550
+ currentProject={currentProject}
551
+ selectedAgent={selectedAgent}
552
+ searchQuery={searchQuery}
553
+ pinnedAgents={pinnedAgents}
554
+ isMaxPinned={isMaxPinned}
555
+ onProjectSelect={onProjectSelect}
556
+ onAgentSelect={onAgentSelect}
557
+ onReleaseClick={onReleaseClick}
558
+ onLogsClick={onLogsClick}
559
+ onProfileClick={onProfileClick}
560
+ onPinToggle={(agent) => togglePin(agent.name)}
561
+ compact={true}
562
+ />
563
+ ) : (
564
+ <AgentList
565
+ agents={aiAgents}
566
+ selectedAgent={selectedAgent}
567
+ searchQuery={searchQuery}
568
+ pinnedAgents={pinnedAgents}
569
+ isMaxPinned={isMaxPinned}
570
+ onAgentSelect={(agent) => onAgentSelect?.(agent)}
571
+ onReleaseClick={onReleaseClick}
572
+ onLogsClick={onLogsClick}
573
+ onProfileClick={onProfileClick}
574
+ onPinToggle={(agent) => togglePin(agent.name)}
575
+ compact={true}
576
+ showGroupStats={true}
577
+ />
578
+ )}
579
+
580
+ {/* Optional human section when viewing agents/projects */}
581
+ {activeTab === 'agents' && humanMembers.length > 0 && (
582
+ <div className="mt-4 mb-2 pt-3 border-t border-border-subtle">
583
+ <div className="flex items-center justify-between px-1 pb-2">
584
+ <p className="text-xs uppercase tracking-wide text-text-muted font-semibold m-0">Direct messages</p>
585
+ <span className="text-[11px] text-text-muted">{filteredHumanMembers.length} member{filteredHumanMembers.length === 1 ? '' : 's'}</span>
586
+ </div>
587
+ <div className="flex flex-col gap-1">
588
+ {filteredHumanMembers.length > 0 ? (
589
+ filteredHumanMembers.map((member) => (
590
+ <button
591
+ key={member.name}
592
+ onClick={() => onHumanSelect ? onHumanSelect(member) : onAgentSelect?.(member)}
593
+ className={`
594
+ flex items-center gap-3 p-2.5 rounded-lg border transition-all duration-150 text-left w-full
595
+ ${selectedAgent === member.name
596
+ ? 'bg-accent-cyan/10 border-accent-cyan/30'
597
+ : 'bg-bg-tertiary border-border-subtle hover:border-accent-cyan/30 hover:bg-bg-hover'}
598
+ `}
599
+ >
600
+ {member.avatarUrl ? (
601
+ <img
602
+ src={member.avatarUrl}
603
+ alt={member.name}
604
+ className="w-8 h-8 rounded-full object-cover"
605
+ />
606
+ ) : (
607
+ <div className="w-8 h-8 rounded-full bg-gradient-to-br from-purple-500 to-pink-500 flex items-center justify-center text-white font-medium text-xs">
608
+ {member.name.charAt(0).toUpperCase()}
609
+ </div>
610
+ )}
611
+ <div className="flex-1 min-w-0">
612
+ <p className="text-sm font-medium text-text-primary truncate">{member.name}</p>
613
+ <p className="text-[11px] text-text-muted truncate">{member.role || 'Team Member'}</p>
614
+ </div>
615
+ {humanUnreadCounts[member.name] > 0 && (
616
+ <span className="text-[11px] font-semibold px-2 py-0.5 rounded-full bg-accent-cyan/20 text-accent-cyan">
617
+ {humanUnreadCounts[member.name]}
618
+ </span>
619
+ )}
620
+ <div className={`w-2 h-2 rounded-full ${member.status === 'online' ? 'bg-success' : 'bg-text-dim'}`} />
621
+ </button>
622
+ ))
623
+ ) : (
624
+ <div className="flex flex-col items-center justify-center py-6 px-3 text-text-muted text-center">
625
+ <SearchIcon />
626
+ <p className="mt-2 text-xs">No team members match "{searchQuery}"</p>
627
+ </div>
628
+ )}
629
+ </div>
630
+ </div>
631
+ )}
632
+ </div>
633
+
634
+ {/* Mobile Navigation - shows items hidden in header on mobile */}
635
+ <div className="md:hidden border-t border-border-subtle p-3">
636
+ <p className="text-xs text-text-muted font-medium mb-2 px-1">Quick Actions</p>
637
+ <div className="grid grid-cols-2 gap-2">
638
+ {onFleetClick && (
639
+ <button
640
+ className={`flex items-center gap-2 p-2.5 rounded-lg border text-sm transition-all duration-150 ${
641
+ isFleetViewActive
642
+ ? 'bg-accent-cyan/20 border-accent-cyan text-accent-cyan'
643
+ : 'bg-bg-tertiary border-border-subtle text-text-secondary hover:bg-bg-hover hover:text-text-primary'
644
+ }`}
645
+ onClick={() => {
646
+ onFleetClick();
647
+ onClose?.();
648
+ }}
649
+ >
650
+ <FleetIcon />
651
+ <span>Fleet</span>
652
+ </button>
653
+ )}
654
+ {onTrajectoryClick && (
655
+ <button
656
+ className={`flex items-center gap-2 p-2.5 rounded-lg border text-sm transition-all duration-150 relative ${
657
+ hasActiveTrajectory
658
+ ? 'bg-accent-cyan/20 border-accent-cyan text-accent-cyan'
659
+ : 'bg-bg-tertiary border-border-subtle text-text-secondary hover:bg-bg-hover hover:text-text-primary'
660
+ }`}
661
+ onClick={() => {
662
+ onTrajectoryClick();
663
+ onClose?.();
664
+ }}
665
+ >
666
+ <TrajectoryIcon />
667
+ <span>Trajectory</span>
668
+ {hasActiveTrajectory && (
669
+ <span className="absolute top-1 right-1 w-2 h-2 bg-accent-cyan rounded-full animate-pulse" />
670
+ )}
671
+ </button>
672
+ )}
673
+ <a
674
+ href="/metrics"
675
+ className="flex items-center gap-2 p-2.5 bg-bg-tertiary border border-border-subtle rounded-lg text-text-secondary text-sm transition-all duration-150 hover:bg-bg-hover hover:text-accent-orange no-underline"
676
+ onClick={() => onClose?.()}
677
+ >
678
+ <MetricsIcon />
679
+ <span>Metrics</span>
680
+ </a>
681
+ </div>
682
+ </div>
683
+
684
+ {/* Footer Actions */}
685
+ <div className="p-3 sm:p-4 border-t border-border-subtle space-y-2">
686
+ <button
687
+ className="w-full py-2.5 sm:py-3 px-3 sm:px-4 bg-gradient-to-r from-accent-cyan to-[#00b8d9] text-bg-deep font-semibold text-sm cursor-pointer flex items-center justify-center gap-2 rounded-lg transition-all duration-150 hover:shadow-glow-cyan hover:-translate-y-0.5 active:scale-[0.98]"
688
+ onClick={onSpawnClick}
689
+ >
690
+ <PlusIcon />
691
+ Spawn Agent
692
+ </button>
693
+ <button
694
+ className="w-full py-2 sm:py-2.5 px-3 sm:px-4 bg-bg-tertiary text-text-secondary text-sm cursor-pointer flex items-center justify-center gap-2 rounded-lg border border-border-subtle transition-all duration-150 hover:bg-bg-hover hover:text-text-primary hover:border-border-subtle active:bg-bg-hover"
695
+ onClick={onSettingsClick}
696
+ >
697
+ <SettingsIcon />
698
+ Settings
699
+ </button>
700
+ </div>
701
+ </aside>
702
+ );
703
+ }
704
+
705
+ function ConnectionIndicator({ isConnected }: { isConnected: boolean }) {
706
+ return (
707
+ <div className="flex items-center gap-1.5 ml-auto">
708
+ <div
709
+ className={`w-2 h-2 rounded-full ${
710
+ isConnected
711
+ ? 'bg-success animate-pulse-glow'
712
+ : 'bg-text-dim'
713
+ }`}
714
+ />
715
+ <span className="text-xs text-text-muted">
716
+ {isConnected ? 'Live' : 'Offline'}
717
+ </span>
718
+ </div>
719
+ );
720
+ }
721
+
722
+ function SearchIcon() {
723
+ return (
724
+ <svg className="text-text-muted" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
725
+ <circle cx="11" cy="11" r="8" />
726
+ <line x1="21" y1="21" x2="16.65" y2="16.65" />
727
+ </svg>
728
+ );
729
+ }
730
+
731
+ function ClearIcon() {
732
+ return (
733
+ <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
734
+ <line x1="18" y1="6" x2="6" y2="18" />
735
+ <line x1="6" y1="6" x2="18" y2="18" />
736
+ </svg>
737
+ );
738
+ }
739
+
740
+ function MenuButton({ onClick, children }: { onClick: () => void; children: React.ReactNode }) {
741
+ return (
742
+ <button
743
+ onClick={onClick}
744
+ className="w-full flex items-center gap-2 px-3 py-2 text-sm text-text-secondary hover:bg-bg-hover hover:text-text-primary transition-colors"
745
+ >
746
+ {children}
747
+ </button>
748
+ );
749
+ }
750
+
751
+ function PlusIcon() {
752
+ return (
753
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5">
754
+ <line x1="12" y1="5" x2="12" y2="19" />
755
+ <line x1="5" y1="12" x2="19" y2="12" />
756
+ </svg>
757
+ );
758
+ }
759
+
760
+ function UserPlusIcon() {
761
+ return (
762
+ <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
763
+ <path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" />
764
+ <circle cx="8.5" cy="7" r="4" />
765
+ <line x1="20" y1="8" x2="20" y2="14" />
766
+ <line x1="23" y1="11" x2="17" y2="11" />
767
+ </svg>
768
+ );
769
+ }
770
+
771
+ function ArchiveIcon() {
772
+ return (
773
+ <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
774
+ <path d="M3 7h18" />
775
+ <path d="M5 7v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7" />
776
+ <rect x="3" y="3" width="18" height="4" rx="1" />
777
+ <line x1="10" y1="12" x2="14" y2="12" />
778
+ </svg>
779
+ );
780
+ }
781
+
782
+ function UnarchiveIcon() {
783
+ return (
784
+ <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
785
+ <path d="M3 7h18" />
786
+ <path d="M5 7v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7" />
787
+ <rect x="3" y="3" width="18" height="4" rx="1" />
788
+ <path d="M12 11v6" />
789
+ <path d="M9 14l3-3 3 3" />
790
+ </svg>
791
+ );
792
+ }
793
+
794
+ function HashIcon() {
795
+ return (
796
+ <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
797
+ <line x1="4" y1="9" x2="20" y2="9" />
798
+ <line x1="4" y1="15" x2="20" y2="15" />
799
+ <line x1="10" y1="3" x2="8" y2="21" />
800
+ <line x1="16" y1="3" x2="14" y2="21" />
801
+ </svg>
802
+ );
803
+ }
804
+
805
+ function ChevronIcon({ className }: { className?: string }) {
806
+ return (
807
+ <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" className={className}>
808
+ <polyline points="6 9 12 15 18 9" />
809
+ </svg>
810
+ );
811
+ }
812
+
813
+ function MoreIcon() {
814
+ return (
815
+ <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
816
+ <circle cx="5" cy="12" r="1" />
817
+ <circle cx="12" cy="12" r="1" />
818
+ <circle cx="19" cy="12" r="1" />
819
+ </svg>
820
+ );
821
+ }
822
+
823
+ function CloseIcon() {
824
+ return (
825
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
826
+ <line x1="18" y1="6" x2="6" y2="18" />
827
+ <line x1="6" y1="6" x2="18" y2="18" />
828
+ </svg>
829
+ );
830
+ }
831
+
832
+ function SettingsIcon() {
833
+ return (
834
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
835
+ <circle cx="12" cy="12" r="3" />
836
+ <path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" />
837
+ </svg>
838
+ );
839
+ }
840
+
841
+ function RobotIcon() {
842
+ return (
843
+ <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
844
+ <rect x="3" y="11" width="18" height="10" rx="2" />
845
+ <circle cx="12" cy="5" r="2" />
846
+ <path d="M12 7v4" />
847
+ <line x1="8" y1="16" x2="8" y2="16" />
848
+ <line x1="16" y1="16" x2="16" y2="16" />
849
+ </svg>
850
+ );
851
+ }
852
+
853
+ function UsersIcon() {
854
+ return (
855
+ <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
856
+ <path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" />
857
+ <circle cx="9" cy="7" r="4" />
858
+ <path d="M23 21v-2a4 4 0 0 0-3-3.87" />
859
+ <path d="M16 3.13a4 4 0 0 1 0 7.75" />
860
+ </svg>
861
+ );
862
+ }
863
+
864
+ function FleetIcon() {
865
+ return (
866
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
867
+ <rect x="2" y="3" width="20" height="14" rx="2" ry="2" />
868
+ <line x1="8" y1="21" x2="16" y2="21" />
869
+ <line x1="12" y1="17" x2="12" y2="21" />
870
+ </svg>
871
+ );
872
+ }
873
+
874
+ function TrajectoryIcon() {
875
+ return (
876
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
877
+ <path d="M3 12h4l3 9 4-18 3 9h4" />
878
+ </svg>
879
+ );
880
+ }
881
+
882
+
883
+ function MetricsIcon() {
884
+ return (
885
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
886
+ <path d="M3 3v18h18" />
887
+ <path d="M18 17V9" />
888
+ <path d="M13 17V5" />
889
+ <path d="M8 17v-3" />
890
+ </svg>
891
+ );
892
+ }
893
+
894
+ function ActivityIcon() {
895
+ return (
896
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
897
+ <path d="M22 12h-4l-3 9L9 3l-3 9H2" />
898
+ </svg>
899
+ );
900
+ }