@polderlabs/bizar 7.0.4 → 8.0.0

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 (489) hide show
  1. package/.claude/settings.local.json +8 -0
  2. package/bizar-dash/DESIGN.md +729 -969
  3. package/bizar-dash/GLYPH.md +418 -0
  4. package/bizar-dash/PLAN.md +1135 -0
  5. package/bizar-dash/dist/assets/ActivityFeed-BRBtQOHB.js +6 -0
  6. package/bizar-dash/dist/assets/ActivityFeed-BRBtQOHB.js.map +1 -0
  7. package/bizar-dash/dist/assets/ActivityView-CwqhxBfh.js +1 -0
  8. package/bizar-dash/dist/assets/ActivityView-CwqhxBfh.js.map +1 -0
  9. package/bizar-dash/dist/assets/AgentActivity-6MxU-a9F.js +1 -0
  10. package/bizar-dash/dist/assets/AgentActivity-6MxU-a9F.js.map +1 -0
  11. package/bizar-dash/dist/assets/AgentsView-BYrOFdwl.js +8 -0
  12. package/bizar-dash/dist/assets/AgentsView-BYrOFdwl.js.map +1 -0
  13. package/bizar-dash/dist/assets/Badge-Cd61wsBa.js +1 -0
  14. package/bizar-dash/dist/assets/Badge-Cd61wsBa.js.map +1 -0
  15. package/bizar-dash/dist/assets/Card-C_bvqXdQ.js +1 -0
  16. package/bizar-dash/dist/assets/Card-C_bvqXdQ.js.map +1 -0
  17. package/bizar-dash/dist/assets/EmptyState-BWQuKnk9.js +1 -0
  18. package/bizar-dash/dist/assets/EmptyState-BWQuKnk9.js.map +1 -0
  19. package/bizar-dash/dist/assets/GoalsView-Dok0yt9S.js +11 -0
  20. package/bizar-dash/dist/assets/GoalsView-Dok0yt9S.js.map +1 -0
  21. package/bizar-dash/dist/assets/Grid-C62gCPqt.js +1 -0
  22. package/bizar-dash/dist/assets/Grid-C62gCPqt.js.map +1 -0
  23. package/bizar-dash/dist/assets/KanbanCard-CtTKP6ZX.js +21 -0
  24. package/bizar-dash/dist/assets/KanbanCard-CtTKP6ZX.js.map +1 -0
  25. package/bizar-dash/dist/assets/LibrariesView-BcyBQXiY.js +67 -0
  26. package/bizar-dash/dist/assets/LibrariesView-BcyBQXiY.js.map +1 -0
  27. package/bizar-dash/dist/assets/MemoryView-49wR4u-y.js +13 -0
  28. package/bizar-dash/dist/assets/MemoryView-49wR4u-y.js.map +1 -0
  29. package/bizar-dash/dist/assets/OverviewView-BtQ_UWYj.js +1 -0
  30. package/bizar-dash/dist/assets/OverviewView-BtQ_UWYj.js.map +1 -0
  31. package/bizar-dash/dist/assets/ProgressBar-CpvDeq9F.js +1 -0
  32. package/bizar-dash/dist/assets/ProgressBar-CpvDeq9F.js.map +1 -0
  33. package/bizar-dash/dist/assets/SettingsRow-DmIe5OUu.js +30 -0
  34. package/bizar-dash/dist/assets/SettingsRow-DmIe5OUu.js.map +1 -0
  35. package/bizar-dash/dist/assets/SettingsView-D1KmGWbi.js +48 -0
  36. package/bizar-dash/dist/assets/SettingsView-D1KmGWbi.js.map +1 -0
  37. package/bizar-dash/dist/assets/StatTile-BkIP32gG.js +11 -0
  38. package/bizar-dash/dist/assets/StatTile-BkIP32gG.js.map +1 -0
  39. package/bizar-dash/dist/assets/TasksView-Cba3GJ42.js +1 -0
  40. package/bizar-dash/dist/assets/TasksView-Cba3GJ42.js.map +1 -0
  41. package/bizar-dash/dist/assets/ViewHeader-D6c2cw1b.js +6 -0
  42. package/bizar-dash/dist/assets/ViewHeader-D6c2cw1b.js.map +1 -0
  43. package/bizar-dash/dist/assets/brain-DeoXNDE2.js +6 -0
  44. package/bizar-dash/dist/assets/brain-DeoXNDE2.js.map +1 -0
  45. package/bizar-dash/dist/assets/calendar-DRlQkGJc.js +6 -0
  46. package/bizar-dash/dist/assets/calendar-DRlQkGJc.js.map +1 -0
  47. package/bizar-dash/dist/assets/circle-check-DmYQ3vGp.js +6 -0
  48. package/bizar-dash/dist/assets/circle-check-DmYQ3vGp.js.map +1 -0
  49. package/bizar-dash/dist/assets/cmdk-BwN8hcKQ.js +80 -0
  50. package/bizar-dash/dist/assets/cmdk-BwN8hcKQ.js.map +1 -0
  51. package/bizar-dash/dist/assets/dnd-kit-DR2Qzzxk.js +5 -0
  52. package/bizar-dash/dist/assets/dnd-kit-DR2Qzzxk.js.map +1 -0
  53. package/bizar-dash/dist/assets/git-merge-OoqBKQer.js +6 -0
  54. package/bizar-dash/dist/assets/git-merge-OoqBKQer.js.map +1 -0
  55. package/bizar-dash/dist/assets/git-pull-request-CXBQTR2f.js +6 -0
  56. package/bizar-dash/dist/assets/git-pull-request-CXBQTR2f.js.map +1 -0
  57. package/bizar-dash/dist/assets/main-COdgjqbZ.css +1 -0
  58. package/bizar-dash/dist/assets/main-Cw6gybzS.js +109 -0
  59. package/bizar-dash/dist/assets/main-Cw6gybzS.js.map +1 -0
  60. package/bizar-dash/dist/assets/message-square-DUTeIQAR.js +6 -0
  61. package/bizar-dash/dist/assets/message-square-DUTeIQAR.js.map +1 -0
  62. package/bizar-dash/dist/assets/minus-CrStJTZ7.js +6 -0
  63. package/bizar-dash/dist/assets/minus-CrStJTZ7.js.map +1 -0
  64. package/bizar-dash/dist/assets/wrench-BJ1WIC4u.js +6 -0
  65. package/bizar-dash/dist/assets/wrench-BJ1WIC4u.js.map +1 -0
  66. package/bizar-dash/dist/{mobile.html → v8.html} +6 -9
  67. package/bizar-dash/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
  68. package/bizar-dash/src/server/server.mjs +1 -57
  69. package/bizar-dash/src/web/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -0
  70. package/bizar-dash/src/web/v8/App.tsx +188 -0
  71. package/bizar-dash/src/web/v8/__tests__/App.test.tsx +102 -0
  72. package/bizar-dash/src/web/v8/__tests__/AppShell.test.tsx +79 -0
  73. package/bizar-dash/src/web/v8/__tests__/PageSkeleton.test.tsx +12 -0
  74. package/bizar-dash/src/web/v8/__tests__/SettingsView.test.tsx +84 -0
  75. package/bizar-dash/src/web/v8/__tests__/Sidebar.test.tsx +95 -0
  76. package/bizar-dash/src/web/v8/__tests__/activity.test.tsx +63 -0
  77. package/bizar-dash/src/web/v8/__tests__/agents.test.tsx +90 -0
  78. package/bizar-dash/src/web/v8/__tests__/controls.test.tsx +135 -0
  79. package/bizar-dash/src/web/v8/__tests__/cx.test.ts +25 -0
  80. package/bizar-dash/src/web/v8/__tests__/data.test.tsx +293 -0
  81. package/bizar-dash/src/web/v8/__tests__/feedback.test.tsx +213 -0
  82. package/bizar-dash/src/web/v8/__tests__/goals.test.tsx +105 -0
  83. package/bizar-dash/src/web/v8/__tests__/kanban.test.tsx +176 -0
  84. package/bizar-dash/src/web/v8/__tests__/libraries.test.tsx +70 -0
  85. package/bizar-dash/src/web/v8/__tests__/memory.test.tsx +60 -0
  86. package/bizar-dash/src/web/v8/__tests__/navigation.test.tsx +137 -0
  87. package/bizar-dash/src/web/v8/__tests__/settings.test.tsx +104 -0
  88. package/bizar-dash/src/web/v8/__tests__/theme.test.tsx +98 -0
  89. package/bizar-dash/src/web/v8/__tests__/views.test.tsx +112 -0
  90. package/bizar-dash/src/web/v8/main.tsx +28 -0
  91. package/bizar-dash/src/web/v8/shell/AppShell.tsx +90 -0
  92. package/bizar-dash/src/web/v8/shell/PageSkeleton.tsx +29 -0
  93. package/bizar-dash/src/web/v8/shell/Sidebar.tsx +361 -0
  94. package/bizar-dash/src/web/v8/shell/StatusBar.tsx +63 -0
  95. package/bizar-dash/src/web/v8/shell/Topbar.tsx +113 -0
  96. package/bizar-dash/src/web/v8/shell/index.ts +15 -0
  97. package/bizar-dash/src/web/v8/ui/activity/ActivityFeed.tsx +137 -0
  98. package/bizar-dash/src/web/v8/ui/agents/AgentActivity.tsx +101 -0
  99. package/bizar-dash/src/web/v8/ui/agents/AgentCard.tsx +158 -0
  100. package/bizar-dash/src/web/v8/ui/controls/Button.tsx +141 -0
  101. package/bizar-dash/src/web/v8/ui/controls/ButtonGroup.tsx +32 -0
  102. package/bizar-dash/src/web/v8/ui/controls/Checkbox.tsx +49 -0
  103. package/bizar-dash/src/web/v8/ui/controls/Field.tsx +78 -0
  104. package/bizar-dash/src/web/v8/ui/controls/Form.tsx +23 -0
  105. package/bizar-dash/src/web/v8/ui/controls/IconButton.tsx +112 -0
  106. package/bizar-dash/src/web/v8/ui/controls/Input.tsx +94 -0
  107. package/bizar-dash/src/web/v8/ui/controls/RadioGroup.tsx +74 -0
  108. package/bizar-dash/src/web/v8/ui/controls/Select.tsx +171 -0
  109. package/bizar-dash/src/web/v8/ui/controls/Slider.tsx +68 -0
  110. package/bizar-dash/src/web/v8/ui/controls/Switch.tsx +56 -0
  111. package/bizar-dash/src/web/v8/ui/controls/Textarea.tsx +64 -0
  112. package/bizar-dash/src/web/v8/ui/controls/Toggle.tsx +36 -0
  113. package/bizar-dash/src/web/v8/ui/controls/ToggleGroup.tsx +85 -0
  114. package/bizar-dash/src/web/v8/ui/data/Accordion.tsx +134 -0
  115. package/bizar-dash/src/web/v8/ui/data/Avatar.tsx +175 -0
  116. package/bizar-dash/src/web/v8/ui/data/Badge.tsx +93 -0
  117. package/bizar-dash/src/web/v8/ui/data/BarList.tsx +101 -0
  118. package/bizar-dash/src/web/v8/ui/data/Card.tsx +140 -0
  119. package/bizar-dash/src/web/v8/ui/data/Chip.tsx +96 -0
  120. package/bizar-dash/src/web/v8/ui/data/Kbd.tsx +42 -0
  121. package/bizar-dash/src/web/v8/ui/data/ProgressBar.tsx +93 -0
  122. package/bizar-dash/src/web/v8/ui/data/Sparkline.tsx +98 -0
  123. package/bizar-dash/src/web/v8/ui/data/StatTile.tsx +150 -0
  124. package/bizar-dash/src/web/v8/ui/data/Table.tsx +170 -0
  125. package/bizar-dash/src/web/v8/ui/data/Timeline.tsx +130 -0
  126. package/bizar-dash/src/web/v8/ui/data/ViewHeader.tsx +122 -0
  127. package/bizar-dash/src/web/v8/ui/feedback/Alert.tsx +95 -0
  128. package/bizar-dash/src/web/v8/ui/feedback/Banner.tsx +39 -0
  129. package/bizar-dash/src/web/v8/ui/feedback/ContextMenu.tsx +143 -0
  130. package/bizar-dash/src/web/v8/ui/feedback/Dialog.tsx +149 -0
  131. package/bizar-dash/src/web/v8/ui/feedback/Drawer.tsx +8 -0
  132. package/bizar-dash/src/web/v8/ui/feedback/DropdownMenu.tsx +231 -0
  133. package/bizar-dash/src/web/v8/ui/feedback/EmptyState.tsx +48 -0
  134. package/bizar-dash/src/web/v8/ui/feedback/Popover.tsx +56 -0
  135. package/bizar-dash/src/web/v8/ui/feedback/Sheet.tsx +103 -0
  136. package/bizar-dash/src/web/v8/ui/feedback/Skeleton.tsx +67 -0
  137. package/bizar-dash/src/web/v8/ui/feedback/Spinner.tsx +30 -0
  138. package/bizar-dash/src/web/v8/ui/feedback/Toast.tsx +66 -0
  139. package/bizar-dash/src/web/v8/ui/feedback/Tooltip.tsx +89 -0
  140. package/bizar-dash/src/web/v8/ui/goals/GoalCard.tsx +176 -0
  141. package/bizar-dash/src/web/v8/ui/goals/KeyResult.tsx +115 -0
  142. package/bizar-dash/src/web/v8/ui/index.ts +322 -0
  143. package/bizar-dash/src/web/v8/ui/kanban/KanbanBoard.tsx +80 -0
  144. package/bizar-dash/src/web/v8/ui/kanban/KanbanCard.tsx +247 -0
  145. package/bizar-dash/src/web/v8/ui/kanban/KanbanColumn.tsx +181 -0
  146. package/bizar-dash/src/web/v8/ui/kanban/KanbanContextMenu.tsx +122 -0
  147. package/bizar-dash/src/web/v8/ui/kanban/KanbanQuickAdd.tsx +141 -0
  148. package/bizar-dash/src/web/v8/ui/libraries/LibraryGrid.tsx +30 -0
  149. package/bizar-dash/src/web/v8/ui/libraries/LibraryItem.tsx +161 -0
  150. package/bizar-dash/src/web/v8/ui/memory/MemoryVault.tsx +144 -0
  151. package/bizar-dash/src/web/v8/ui/navigation/CommandPalette.tsx +224 -0
  152. package/bizar-dash/src/web/v8/ui/navigation/NavLink.tsx +81 -0
  153. package/bizar-dash/src/web/v8/ui/navigation/Pagination.tsx +164 -0
  154. package/bizar-dash/src/web/v8/ui/navigation/Tabs.tsx +128 -0
  155. package/bizar-dash/src/web/v8/ui/navigation/useCommandPaletteHotkey.test.ts +79 -0
  156. package/bizar-dash/src/web/v8/ui/primitives/Box.tsx +144 -0
  157. package/bizar-dash/src/web/v8/ui/primitives/Center.tsx +40 -0
  158. package/bizar-dash/src/web/v8/ui/primitives/Cluster.tsx +67 -0
  159. package/bizar-dash/src/web/v8/ui/primitives/Grid.tsx +104 -0
  160. package/bizar-dash/src/web/v8/ui/primitives/Inline.tsx +77 -0
  161. package/bizar-dash/src/web/v8/ui/primitives/Portal.tsx +33 -0
  162. package/bizar-dash/src/web/v8/ui/primitives/ScrollArea.tsx +62 -0
  163. package/bizar-dash/src/web/v8/ui/primitives/Separator.tsx +42 -0
  164. package/bizar-dash/src/web/v8/ui/primitives/Stack.tsx +73 -0
  165. package/bizar-dash/src/web/v8/ui/primitives/VisuallyHidden.tsx +49 -0
  166. package/bizar-dash/src/web/v8/ui/settings/SettingsNav.tsx +91 -0
  167. package/bizar-dash/src/web/v8/ui/settings/SettingsRow.tsx +88 -0
  168. package/bizar-dash/src/web/v8/ui/settings/SettingsSection.tsx +109 -0
  169. package/bizar-dash/src/web/v8/ui/styles/globals.css +220 -0
  170. package/bizar-dash/src/web/v8/ui/styles/reset.css +57 -0
  171. package/bizar-dash/src/web/v8/ui/styles/tokens.css +217 -0
  172. package/bizar-dash/src/web/v8/ui/theme/DensityProvider.test.tsx +74 -0
  173. package/bizar-dash/src/web/v8/ui/theme/DensityProvider.tsx +66 -0
  174. package/bizar-dash/src/web/v8/ui/theme/ThemeProvider.test.tsx +86 -0
  175. package/bizar-dash/src/web/v8/ui/theme/ThemeProvider.tsx +94 -0
  176. package/bizar-dash/src/web/v8/ui/theme/ThemeToggle.tsx +88 -0
  177. package/bizar-dash/src/web/v8/ui/theme/useDensity.ts +15 -0
  178. package/bizar-dash/src/web/v8/ui/theme/useTheme.ts +16 -0
  179. package/bizar-dash/src/web/v8/ui/utils/cx.ts +19 -0
  180. package/bizar-dash/src/web/v8/views/Activity/ActivityView.tsx +33 -0
  181. package/bizar-dash/src/web/v8/views/Agents/AgentsView.tsx +108 -0
  182. package/bizar-dash/src/web/v8/views/CommandPalette/AppCommandPalette.test.tsx +142 -0
  183. package/bizar-dash/src/web/v8/views/CommandPalette/AppCommandPalette.tsx +144 -0
  184. package/bizar-dash/src/web/v8/views/Goals/GoalsView.tsx +84 -0
  185. package/bizar-dash/src/web/v8/views/Libraries/LibrariesView.tsx +41 -0
  186. package/bizar-dash/src/web/v8/views/Memory/MemoryView.tsx +61 -0
  187. package/bizar-dash/src/web/v8/views/Overview/OverviewView.tsx +92 -0
  188. package/bizar-dash/src/web/v8/views/Router.tsx +96 -0
  189. package/bizar-dash/src/web/v8/views/Settings/SettingsView.tsx +305 -0
  190. package/bizar-dash/src/web/v8/views/Tasks/CommandPalettePlaceholder.tsx +106 -0
  191. package/bizar-dash/src/web/v8/views/Tasks/TasksKanbanPlaceholder.tsx +62 -0
  192. package/bizar-dash/src/web/v8/views/Tasks/TasksView.tsx +74 -0
  193. package/bizar-dash/src/web/v8/vite-env.d.ts +15 -0
  194. package/bizar-dash/src/web/{mobile.html → v8.html} +4 -7
  195. package/bizar-dash/tests/setup.ts +26 -0
  196. package/bizar-dash/vite.config.ts +26 -2
  197. package/bizar-dash/vitest.config.ts +5 -3
  198. package/package.json +36 -3
  199. package/bizar-dash/dist/assets/EnvVarsSection-BfhAz3ax.js +0 -114
  200. package/bizar-dash/dist/assets/EnvVarsSection-BfhAz3ax.js.map +0 -1
  201. package/bizar-dash/dist/assets/MobileChat-DLWdv6tQ.js +0 -1
  202. package/bizar-dash/dist/assets/MobileChat-DLWdv6tQ.js.map +0 -1
  203. package/bizar-dash/dist/assets/MobileSettings-Bxv62uPY.js +0 -1
  204. package/bizar-dash/dist/assets/MobileSettings-Bxv62uPY.js.map +0 -1
  205. package/bizar-dash/dist/assets/Toast-ATSAmbdi.js +0 -26
  206. package/bizar-dash/dist/assets/Toast-ATSAmbdi.js.map +0 -1
  207. package/bizar-dash/dist/assets/__vite-browser-external-BIHI7g3E.js +0 -1
  208. package/bizar-dash/dist/assets/__vite-browser-external-BIHI7g3E.js.map +0 -1
  209. package/bizar-dash/dist/assets/main-CJAtrosO.css +0 -1
  210. package/bizar-dash/dist/assets/main-DKKj9dsq.js +0 -430
  211. package/bizar-dash/dist/assets/main-DKKj9dsq.js.map +0 -1
  212. package/bizar-dash/dist/assets/mobile-C_naUN91.js +0 -1
  213. package/bizar-dash/dist/assets/mobile-C_naUN91.js.map +0 -1
  214. package/bizar-dash/dist/assets/mobile-layout-BWLtwtfQ.css +0 -1
  215. package/bizar-dash/dist/assets/mobile-layout-GZ3bE8L6.js +0 -211
  216. package/bizar-dash/dist/assets/mobile-layout-GZ3bE8L6.js.map +0 -1
  217. package/bizar-dash/dist/assets/useSlashCommands-BOwD7lNb.js +0 -65
  218. package/bizar-dash/dist/assets/useSlashCommands-BOwD7lNb.js.map +0 -1
  219. package/bizar-dash/dist/index.html +0 -43
  220. package/bizar-dash/src/web/App.tsx +0 -915
  221. package/bizar-dash/src/web/MobileApp.tsx +0 -414
  222. package/bizar-dash/src/web/components/ArtifactCreateDialog.tsx +0 -95
  223. package/bizar-dash/src/web/components/ArtifactListDialog.tsx +0 -55
  224. package/bizar-dash/src/web/components/ArtifactViewer.tsx +0 -144
  225. package/bizar-dash/src/web/components/AuditDialog.tsx +0 -79
  226. package/bizar-dash/src/web/components/AutosaveField.tsx +0 -50
  227. package/bizar-dash/src/web/components/BackupRestore.tsx +0 -330
  228. package/bizar-dash/src/web/components/BgStatusBadge.tsx +0 -32
  229. package/bizar-dash/src/web/components/Button.tsx +0 -56
  230. package/bizar-dash/src/web/components/CanvasContextMenu.tsx +0 -68
  231. package/bizar-dash/src/web/components/Card.tsx +0 -40
  232. package/bizar-dash/src/web/components/CollapsibleSection.tsx +0 -72
  233. package/bizar-dash/src/web/components/CommandDialog.tsx +0 -66
  234. package/bizar-dash/src/web/components/DoctorPanel.tsx +0 -160
  235. package/bizar-dash/src/web/components/EmptyState.tsx +0 -30
  236. package/bizar-dash/src/web/components/EnvVarManager.tsx +0 -430
  237. package/bizar-dash/src/web/components/EvalDiff.tsx +0 -157
  238. package/bizar-dash/src/web/components/EvalExportButton.tsx +0 -27
  239. package/bizar-dash/src/web/components/EvalRunCard.tsx +0 -78
  240. package/bizar-dash/src/web/components/FileBrowser.tsx +0 -633
  241. package/bizar-dash/src/web/components/HeadroomSettings.tsx +0 -418
  242. package/bizar-dash/src/web/components/HeadroomStatus.tsx +0 -158
  243. package/bizar-dash/src/web/components/HelpDialog.tsx +0 -55
  244. package/bizar-dash/src/web/components/InviteDialog.tsx +0 -205
  245. package/bizar-dash/src/web/components/KillConfirmDialog.tsx +0 -88
  246. package/bizar-dash/src/web/components/MobileBottomNav.tsx +0 -38
  247. package/bizar-dash/src/web/components/MobileDrawer.tsx +0 -68
  248. package/bizar-dash/src/web/components/MobileHeader.tsx +0 -50
  249. package/bizar-dash/src/web/components/MobileLayout.tsx +0 -63
  250. package/bizar-dash/src/web/components/Modal.tsx +0 -215
  251. package/bizar-dash/src/web/components/Notifications.tsx +0 -242
  252. package/bizar-dash/src/web/components/ScheduleTemplateCard.tsx +0 -72
  253. package/bizar-dash/src/web/components/ScreenshotCapture.tsx +0 -138
  254. package/bizar-dash/src/web/components/ScreenshotOCR.tsx +0 -42
  255. package/bizar-dash/src/web/components/SearchModal.tsx +0 -227
  256. package/bizar-dash/src/web/components/SettingsNav.tsx +0 -117
  257. package/bizar-dash/src/web/components/SettingsSearch.tsx +0 -328
  258. package/bizar-dash/src/web/components/Sidebar.tsx +0 -89
  259. package/bizar-dash/src/web/components/Spinner.tsx +0 -19
  260. package/bizar-dash/src/web/components/StatusBadge.tsx +0 -56
  261. package/bizar-dash/src/web/components/Tag.tsx +0 -41
  262. package/bizar-dash/src/web/components/TailscaleSettings.tsx +0 -161
  263. package/bizar-dash/src/web/components/TaskCard.tsx +0 -69
  264. package/bizar-dash/src/web/components/TaskCreateSheet.tsx +0 -76
  265. package/bizar-dash/src/web/components/Toast.tsx +0 -150
  266. package/bizar-dash/src/web/components/Toggle.tsx +0 -31
  267. package/bizar-dash/src/web/components/Topbar.tsx +0 -455
  268. package/bizar-dash/src/web/components/UsageChart.tsx +0 -250
  269. package/bizar-dash/src/web/components/UsageTable.tsx +0 -90
  270. package/bizar-dash/src/web/components/VirtualList.tsx +0 -53
  271. package/bizar-dash/src/web/components/VisualPlanDialog.tsx +0 -58
  272. package/bizar-dash/src/web/components/VoiceNotesPanel.tsx +0 -211
  273. package/bizar-dash/src/web/components/VoiceRecorder.tsx +0 -105
  274. package/bizar-dash/src/web/components/WorkspaceSelector.tsx +0 -158
  275. package/bizar-dash/src/web/components/agents/CommunicationLog.tsx +0 -126
  276. package/bizar-dash/src/web/components/agents/DependencyGraph.tsx +0 -163
  277. package/bizar-dash/src/web/components/agents/QualityGates.tsx +0 -123
  278. package/bizar-dash/src/web/components/agents/RealTimeEventLog.tsx +0 -127
  279. package/bizar-dash/src/web/components/agents/RoutingDecisions.test.tsx +0 -148
  280. package/bizar-dash/src/web/components/agents/RoutingDecisions.tsx +0 -160
  281. package/bizar-dash/src/web/components/background/AttachButton.tsx +0 -96
  282. package/bizar-dash/src/web/components/background/TmuxAttachCard.tsx +0 -122
  283. package/bizar-dash/src/web/components/chat/AgentChip.tsx +0 -68
  284. package/bizar-dash/src/web/components/chat/AgentNode.tsx +0 -127
  285. package/bizar-dash/src/web/components/chat/AgentTree.tsx +0 -80
  286. package/bizar-dash/src/web/components/chat/ChatBubble.tsx +0 -60
  287. package/bizar-dash/src/web/components/chat/ChatComposer.tsx +0 -72
  288. package/bizar-dash/src/web/components/chat/ChatInfoPanel.tsx +0 -370
  289. package/bizar-dash/src/web/components/chat/ChatRail.tsx +0 -387
  290. package/bizar-dash/src/web/components/chat/ChatThread.tsx +0 -127
  291. package/bizar-dash/src/web/components/chat/ChatTopBar.tsx +0 -50
  292. package/bizar-dash/src/web/components/chat/Composer.tsx +0 -166
  293. package/bizar-dash/src/web/components/chat/ConfirmModal.tsx +0 -54
  294. package/bizar-dash/src/web/components/chat/EmptyState.tsx +0 -21
  295. package/bizar-dash/src/web/components/chat/FirstRunGreeting.tsx +0 -18
  296. package/bizar-dash/src/web/components/chat/FloatingComposer.tsx +0 -38
  297. package/bizar-dash/src/web/components/chat/InfoPanel.tsx +0 -184
  298. package/bizar-dash/src/web/components/chat/JumpToLatest.tsx +0 -58
  299. package/bizar-dash/src/web/components/chat/LoadingSkeleton.tsx +0 -19
  300. package/bizar-dash/src/web/components/chat/MessageBlock.tsx +0 -260
  301. package/bizar-dash/src/web/components/chat/MessageBubble.tsx +0 -60
  302. package/bizar-dash/src/web/components/chat/SessionList.tsx +0 -163
  303. package/bizar-dash/src/web/components/chat/SessionRowMenu.tsx +0 -206
  304. package/bizar-dash/src/web/components/chat/StreamingIndicator.tsx +0 -37
  305. package/bizar-dash/src/web/components/chat/SuggestionCards.tsx +0 -55
  306. package/bizar-dash/src/web/components/chat/WelcomeScreen.tsx +0 -36
  307. package/bizar-dash/src/web/components/chat/_legacy.ts +0 -30
  308. package/bizar-dash/src/web/components/chat/index.ts +0 -31
  309. package/bizar-dash/src/web/components/chat/useAutoGrowTextarea.ts +0 -18
  310. package/bizar-dash/src/web/components/chat/useChat.ts +0 -1190
  311. package/bizar-dash/src/web/components/chat/useSlashCommands.ts +0 -47
  312. package/bizar-dash/src/web/components/goals/GoalInput.tsx +0 -86
  313. package/bizar-dash/src/web/components/goals/PlanVisualization.tsx +0 -111
  314. package/bizar-dash/src/web/components/tasks/BacklogPanel.css +0 -109
  315. package/bizar-dash/src/web/components/tasks/BacklogPanel.tsx +0 -209
  316. package/bizar-dash/src/web/hooks/useAutosave.ts +0 -107
  317. package/bizar-dash/src/web/hooks/useI18n.ts +0 -13
  318. package/bizar-dash/src/web/index.html +0 -37
  319. package/bizar-dash/src/web/lib/api.ts +0 -237
  320. package/bizar-dash/src/web/lib/goapPlanner.ts +0 -614
  321. package/bizar-dash/src/web/lib/i18n.ts +0 -25
  322. package/bizar-dash/src/web/lib/logger.ts +0 -30
  323. package/bizar-dash/src/web/lib/markdown.tsx +0 -59
  324. package/bizar-dash/src/web/lib/search.ts +0 -115
  325. package/bizar-dash/src/web/lib/types.ts +0 -894
  326. package/bizar-dash/src/web/lib/utils.ts +0 -114
  327. package/bizar-dash/src/web/lib/ws.ts +0 -177
  328. package/bizar-dash/src/web/locales/en.json +0 -52
  329. package/bizar-dash/src/web/main.tsx +0 -43
  330. package/bizar-dash/src/web/mobile/MobileApp.tsx +0 -309
  331. package/bizar-dash/src/web/mobile/MobileBottomNav.tsx +0 -38
  332. package/bizar-dash/src/web/mobile/MobileChat.tsx +0 -138
  333. package/bizar-dash/src/web/mobile/MobileDoctor.tsx +0 -80
  334. package/bizar-dash/src/web/mobile/MobileEval.tsx +0 -167
  335. package/bizar-dash/src/web/mobile/MobileMemory.tsx +0 -108
  336. package/bizar-dash/src/web/mobile/MobileOverview.tsx +0 -213
  337. package/bizar-dash/src/web/mobile/MobileSettings.tsx +0 -251
  338. package/bizar-dash/src/web/mobile/MobileTasks.tsx +0 -94
  339. package/bizar-dash/src/web/mobile/MobileTopbar.tsx +0 -115
  340. package/bizar-dash/src/web/mobile/components/MobileBottomSheet.tsx +0 -182
  341. package/bizar-dash/src/web/mobile/components/MobileListItem.tsx +0 -64
  342. package/bizar-dash/src/web/mobile/components/MobileModal.tsx +0 -123
  343. package/bizar-dash/src/web/mobile/views/MobileActivity.tsx +0 -273
  344. package/bizar-dash/src/web/mobile/views/MobileAgents.tsx +0 -374
  345. package/bizar-dash/src/web/mobile/views/MobileArtifactCanvas.tsx +0 -439
  346. package/bizar-dash/src/web/mobile/views/MobileArtifacts.tsx +0 -143
  347. package/bizar-dash/src/web/mobile/views/MobileChat.tsx +0 -257
  348. package/bizar-dash/src/web/mobile/views/MobileConfig.tsx +0 -175
  349. package/bizar-dash/src/web/mobile/views/MobileHistory.tsx +0 -191
  350. package/bizar-dash/src/web/mobile/views/MobileMods.tsx +0 -149
  351. package/bizar-dash/src/web/mobile/views/MobileMore.tsx +0 -121
  352. package/bizar-dash/src/web/mobile/views/MobileNotifications.tsx +0 -137
  353. package/bizar-dash/src/web/mobile/views/MobilePlans.tsx +0 -26
  354. package/bizar-dash/src/web/mobile/views/MobileSchedules.tsx +0 -685
  355. package/bizar-dash/src/web/mobile/views/MobileSearchModal.tsx +0 -172
  356. package/bizar-dash/src/web/mobile/views/MobileSettings.tsx +0 -363
  357. package/bizar-dash/src/web/mobile/views/MobileSkills.tsx +0 -153
  358. package/bizar-dash/src/web/mobile/views/MobileTasks.tsx +0 -564
  359. package/bizar-dash/src/web/mobile/views/QrCodePanel.tsx +0 -69
  360. package/bizar-dash/src/web/mobile.tsx +0 -14
  361. package/bizar-dash/src/web/styles/agents-redesign.css +0 -311
  362. package/bizar-dash/src/web/styles/chat.css +0 -1740
  363. package/bizar-dash/src/web/styles/glyphs.css +0 -960
  364. package/bizar-dash/src/web/styles/main.css +0 -10389
  365. package/bizar-dash/src/web/styles/memory.css +0 -1177
  366. package/bizar-dash/src/web/styles/minimax-usage.css +0 -842
  367. package/bizar-dash/src/web/styles/mobile-chat.css +0 -5
  368. package/bizar-dash/src/web/styles/mobile-layout.css +0 -233
  369. package/bizar-dash/src/web/styles/mobile.css +0 -2181
  370. package/bizar-dash/src/web/styles/settings.css +0 -775
  371. package/bizar-dash/src/web/styles/skills.css +0 -302
  372. package/bizar-dash/src/web/styles/tasks-redesign.css +0 -253
  373. package/bizar-dash/src/web/styles/tasks.css +0 -605
  374. package/bizar-dash/src/web/ui/controls/Button.tsx +0 -77
  375. package/bizar-dash/src/web/ui/controls/Checkbox.tsx +0 -95
  376. package/bizar-dash/src/web/ui/controls/IconButton.tsx +0 -66
  377. package/bizar-dash/src/web/ui/controls/Kbd.tsx +0 -24
  378. package/bizar-dash/src/web/ui/controls/NumberInput.tsx +0 -77
  379. package/bizar-dash/src/web/ui/controls/RadioGroup.tsx +0 -109
  380. package/bizar-dash/src/web/ui/controls/SearchInput.tsx +0 -91
  381. package/bizar-dash/src/web/ui/controls/Select.tsx +0 -92
  382. package/bizar-dash/src/web/ui/controls/Slider.tsx +0 -70
  383. package/bizar-dash/src/web/ui/controls/TextInput.tsx +0 -67
  384. package/bizar-dash/src/web/ui/controls/Textarea.tsx +0 -56
  385. package/bizar-dash/src/web/ui/controls/Toggle.tsx +0 -79
  386. package/bizar-dash/src/web/ui/controls/controls.css +0 -476
  387. package/bizar-dash/src/web/ui/controls/index.ts +0 -35
  388. package/bizar-dash/src/web/ui/data/BarChart.tsx +0 -60
  389. package/bizar-dash/src/web/ui/data/DataTable.tsx +0 -216
  390. package/bizar-dash/src/web/ui/data/EmptyState.tsx +0 -60
  391. package/bizar-dash/src/web/ui/data/ErrorState.tsx +0 -56
  392. package/bizar-dash/src/web/ui/data/KeyValueList.tsx +0 -106
  393. package/bizar-dash/src/web/ui/data/LoadingState.tsx +0 -65
  394. package/bizar-dash/src/web/ui/data/Sparkline.tsx +0 -87
  395. package/bizar-dash/src/web/ui/data/StatTile.tsx +0 -87
  396. package/bizar-dash/src/web/ui/data/data.css +0 -540
  397. package/bizar-dash/src/web/ui/data/index.ts +0 -31
  398. package/bizar-dash/src/web/ui/feedback/Badge.tsx +0 -49
  399. package/bizar-dash/src/web/ui/feedback/Dialog.tsx +0 -209
  400. package/bizar-dash/src/web/ui/feedback/ProgressBar.tsx +0 -69
  401. package/bizar-dash/src/web/ui/feedback/StatusDot.tsx +0 -50
  402. package/bizar-dash/src/web/ui/feedback/Toast.tsx +0 -200
  403. package/bizar-dash/src/web/ui/feedback/Tooltip.tsx +0 -126
  404. package/bizar-dash/src/web/ui/feedback/feedback.css +0 -314
  405. package/bizar-dash/src/web/ui/feedback/index.ts +0 -43
  406. package/bizar-dash/src/web/ui/index.ts +0 -57
  407. package/bizar-dash/src/web/ui/layout/AppShell.tsx +0 -51
  408. package/bizar-dash/src/web/ui/layout/Breadcrumbs.tsx +0 -97
  409. package/bizar-dash/src/web/ui/layout/Panel.tsx +0 -73
  410. package/bizar-dash/src/web/ui/layout/PanelHeader.tsx +0 -39
  411. package/bizar-dash/src/web/ui/layout/Sidebar.tsx +0 -131
  412. package/bizar-dash/src/web/ui/layout/Tabs.tsx +0 -133
  413. package/bizar-dash/src/web/ui/layout/Topbar.tsx +0 -42
  414. package/bizar-dash/src/web/ui/layout/ViewHeader.tsx +0 -48
  415. package/bizar-dash/src/web/ui/layout/index.ts +0 -34
  416. package/bizar-dash/src/web/ui/layout/layout.css +0 -464
  417. package/bizar-dash/src/web/ui/navigation/CommandPalette.tsx +0 -199
  418. package/bizar-dash/src/web/ui/navigation/NavGroup.tsx +0 -95
  419. package/bizar-dash/src/web/ui/navigation/NavLink.tsx +0 -93
  420. package/bizar-dash/src/web/ui/navigation/index.ts +0 -17
  421. package/bizar-dash/src/web/ui/navigation/navigation.css +0 -343
  422. package/bizar-dash/src/web/ui/primitives/Box.tsx +0 -91
  423. package/bizar-dash/src/web/ui/primitives/Grid.tsx +0 -49
  424. package/bizar-dash/src/web/ui/primitives/Inline.tsx +0 -55
  425. package/bizar-dash/src/web/ui/primitives/Separator.tsx +0 -46
  426. package/bizar-dash/src/web/ui/primitives/Stack.tsx +0 -54
  427. package/bizar-dash/src/web/ui/primitives/VisuallyHidden.tsx +0 -26
  428. package/bizar-dash/src/web/ui/primitives/index.ts +0 -23
  429. package/bizar-dash/src/web/ui/primitives/primitives.css +0 -183
  430. package/bizar-dash/src/web/ui/styles/globals.css +0 -86
  431. package/bizar-dash/src/web/ui/styles/reset.css +0 -125
  432. package/bizar-dash/src/web/ui/styles/tokens.css +0 -208
  433. package/bizar-dash/src/web/ui/theme/ThemeProvider.tsx +0 -142
  434. package/bizar-dash/src/web/ui/theme/tokens.ts +0 -131
  435. package/bizar-dash/src/web/ui/theme/useTheme.ts +0 -22
  436. package/bizar-dash/src/web/ui/utils/cx.ts +0 -42
  437. package/bizar-dash/src/web/views/Activity.tsx +0 -1221
  438. package/bizar-dash/src/web/views/Agents.tsx +0 -964
  439. package/bizar-dash/src/web/views/Artifacts.tsx +0 -1494
  440. package/bizar-dash/src/web/views/BackgroundAgents.tsx +0 -822
  441. package/bizar-dash/src/web/views/Chat.tsx +0 -532
  442. package/bizar-dash/src/web/views/Config.tsx +0 -3
  443. package/bizar-dash/src/web/views/Doctor.tsx +0 -317
  444. package/bizar-dash/src/web/views/Eval.tsx +0 -372
  445. package/bizar-dash/src/web/views/EvalReport.tsx +0 -353
  446. package/bizar-dash/src/web/views/GoalPlanner.tsx +0 -158
  447. package/bizar-dash/src/web/views/Harness.tsx +0 -306
  448. package/bizar-dash/src/web/views/History.tsx +0 -353
  449. package/bizar-dash/src/web/views/Memory.tsx +0 -193
  450. package/bizar-dash/src/web/views/MiniMaxUsage.tsx +0 -942
  451. package/bizar-dash/src/web/views/ModView.tsx +0 -207
  452. package/bizar-dash/src/web/views/Mods.tsx +0 -706
  453. package/bizar-dash/src/web/views/Overview.tsx +0 -1343
  454. package/bizar-dash/src/web/views/Providers.tsx +0 -302
  455. package/bizar-dash/src/web/views/Schedules.tsx +0 -902
  456. package/bizar-dash/src/web/views/Settings.tsx +0 -308
  457. package/bizar-dash/src/web/views/Skills.tsx +0 -383
  458. package/bizar-dash/src/web/views/SpawnAgentModal.tsx +0 -221
  459. package/bizar-dash/src/web/views/Tasks.tsx +0 -789
  460. package/bizar-dash/src/web/views/Workspace.tsx +0 -294
  461. package/bizar-dash/src/web/views/glyphs/GlyphRenderer.tsx +0 -844
  462. package/bizar-dash/src/web/views/glyphs/components.tsx +0 -1098
  463. package/bizar-dash/src/web/views/memory/ConfigPanel.tsx +0 -426
  464. package/bizar-dash/src/web/views/memory/FromScreenshotPanel.tsx +0 -23
  465. package/bizar-dash/src/web/views/memory/GitSyncPanel.tsx +0 -220
  466. package/bizar-dash/src/web/views/memory/LightragPanel.tsx +0 -310
  467. package/bizar-dash/src/web/views/memory/MemoryGraphLegend.tsx +0 -29
  468. package/bizar-dash/src/web/views/memory/MemoryGraphPanel.tsx +0 -192
  469. package/bizar-dash/src/web/views/memory/MemoryGraphView.tsx +0 -336
  470. package/bizar-dash/src/web/views/memory/MemoryOverview.tsx +0 -367
  471. package/bizar-dash/src/web/views/memory/MemoryStatusCard.tsx +0 -160
  472. package/bizar-dash/src/web/views/memory/ObsidianPanel.tsx +0 -650
  473. package/bizar-dash/src/web/views/memory/SemanticSearchPanel.tsx +0 -197
  474. package/bizar-dash/src/web/views/memory/VaultFromClipboardPanel.tsx +0 -101
  475. package/bizar-dash/src/web/views/settings/ActivitySection.tsx +0 -205
  476. package/bizar-dash/src/web/views/settings/AgentSection.tsx +0 -305
  477. package/bizar-dash/src/web/views/settings/AuthSection.tsx +0 -159
  478. package/bizar-dash/src/web/views/settings/EnvVarsSection.tsx +0 -15
  479. package/bizar-dash/src/web/views/settings/GeneralSection.tsx +0 -128
  480. package/bizar-dash/src/web/views/settings/HeadroomSection.tsx +0 -39
  481. package/bizar-dash/src/web/views/settings/MemorySection.tsx +0 -154
  482. package/bizar-dash/src/web/views/settings/NetworkSection.tsx +0 -87
  483. package/bizar-dash/src/web/views/settings/NotificationsSection.tsx +0 -34
  484. package/bizar-dash/src/web/views/settings/SystemLlmSection.tsx +0 -81
  485. package/bizar-dash/src/web/views/settings/ThemeSection.tsx +0 -168
  486. package/bizar-dash/src/web/views/settings/UpdatesSection.tsx +0 -256
  487. package/bizar-dash/src/web/views/settings/WorkspacesSection.tsx +0 -189
  488. package/packages/sdk/.harness/agents.json +0 -17
  489. package/packages/sdk/.harness/topology.json +0 -4
@@ -1,964 +0,0 @@
1
- // src/views/Agents.tsx — Agent roster view (Wave 3 redesign).
2
- //
3
- // Wave 3 migrates the legacy card-grid agent roster to the Bizar design
4
- // system: a split-pane layout with a sortable DataTable on the left and a
5
- // detail Panel on the right that surfaces the selected agent's metadata,
6
- // actions (Edit / Delete / Restart) and system prompt. Modals still use the
7
- // legacy Modal component (the design-system Dialog will land in a later
8
- // wave), and the public function signature, export name, API paths, and
9
- // WS event subscriptions remain unchanged so callers and the server are
10
- // not disturbed by this UI-only refactor.
11
- import { useEffect, useMemo, useState } from 'react';
12
- import {
13
- Bot,
14
- Plus,
15
- RefreshCw,
16
- Pencil,
17
- Trash2,
18
- Play,
19
- Save,
20
- RotateCw,
21
- CircleAlert,
22
- } from 'lucide-react';
23
- import { Button } from '../components/Button';
24
- import { useModal } from '../components/Modal';
25
- import { useToast } from '../components/Toast';
26
- import { api } from '../lib/api';
27
- import { formatRelative, truncate } from '../lib/utils';
28
- import type { Agent, Settings, Snapshot } from '../lib/types';
29
-
30
- // Design-system consumers — Wave 3 first real view to use them.
31
- import { Stack, Inline, Box } from '../ui/primitives';
32
- import {
33
- DataTable,
34
- KeyValueList,
35
- EmptyState,
36
- LoadingState,
37
- type DataTableColumn,
38
- type KeyValueItem,
39
- } from '../ui/data';
40
- import { Button as UIButton } from '../ui/controls';
41
- import { Badge, StatusDot } from '../ui/feedback';
42
- import { Panel } from '../ui/layout';
43
- import { cx } from '../ui/utils/cx';
44
-
45
- import '../styles/agents-redesign.css';
46
-
47
- type Props = {
48
- snapshot: Snapshot;
49
- settings: Settings;
50
- activeTab: string;
51
- setActiveTab: (id: string) => void;
52
- refreshSnapshot: () => Promise<void>;
53
- };
54
-
55
- const TOOL_OPTIONS = ['bash', 'read', 'edit', 'write', 'webfetch', 'websearch', 'task', 'glob', 'grep'];
56
- const MODELS = [
57
- 'anthropic/claude-3-5-sonnet',
58
- 'anthropic/claude-3-5-haiku',
59
- 'openai/gpt-4o',
60
- 'openai/gpt-4o-mini',
61
- 'openrouter/minimax/minimax-m3',
62
- 'openrouter/minimax/minimax-m2.7',
63
- ];
64
-
65
- // Default agent swatch — the only place in the dashboard where a
66
- // literal hex appears. HTML <input type="color"> requires CSS Color
67
- // Module Level 3 hex format (no `oklch()`, no `var(--token)`). Keep
68
- // this in sync with --default-agent-swatch in ui/styles/tokens.css;
69
- // the token is what every CSS-side swatch reads, this is just the
70
- // native color-input seed value.
71
- const DEFAULT_AGENT_SWATCH_HEX = '#8b5cf6';
72
-
73
- const CATEGORIES = [
74
- { id: 'reasoning', label: 'Reasoning', variant: 'accent' as const },
75
- { id: 'code', label: 'Code', variant: 'info' as const },
76
- { id: 'design', label: 'Design', variant: 'success' as const },
77
- { id: 'planning', label: 'Planning', variant: 'warning' as const },
78
- { id: 'gitops', label: 'GitOps', variant: 'danger' as const },
79
- { id: 'analysis', label: 'Analysis', variant: 'neutral' as const },
80
- ];
81
-
82
- function categoryMeta(cat: string | undefined): { label: string; variant: 'neutral' | 'info' | 'success' | 'warning' | 'danger' | 'accent' } {
83
- if (!cat) return { label: '—', variant: 'neutral' };
84
- const found = CATEGORIES.find((c) => c.id === cat);
85
- return found
86
- ? { label: found.label, variant: found.variant }
87
- : { label: cat, variant: 'neutral' };
88
- }
89
-
90
- type StatusKind = 'idle' | 'working' | 'error' | 'stuck';
91
-
92
- function statusKind(agent: Agent): StatusKind {
93
- if (agent.isStuck) return 'stuck';
94
- const s = (agent.status || 'idle') as string;
95
- if (s === 'working') return 'working';
96
- if (s === 'error') return 'error';
97
- return 'idle';
98
- }
99
-
100
- function statusLabel(kind: StatusKind): string {
101
- if (kind === 'stuck') return 'stuck';
102
- return kind;
103
- }
104
-
105
- function statusDotVariant(kind: StatusKind): 'neutral' | 'info' | 'danger' {
106
- if (kind === 'working') return 'info';
107
- if (kind === 'error' || kind === 'stuck') return 'danger';
108
- return 'neutral';
109
- }
110
-
111
- function lastSeenTs(agent: Agent): number | undefined {
112
- // The Agent type exposes `lastSeen` (legacy) and a future `lastSeenAt`.
113
- // Either is acceptable; missing fields render as "—".
114
- const a = agent as unknown as { lastSeenAt?: number };
115
- return a.lastSeenAt ?? agent.lastSeen;
116
- }
117
-
118
- function tagsToString(tags: string[] | undefined, max = 4): string {
119
- if (!tags || tags.length === 0) return '—';
120
- const shown = tags.slice(0, max).join(', ');
121
- return tags.length > max ? `${shown} +${tags.length - max}` : shown;
122
- }
123
-
124
- export function Agents({ snapshot, refreshSnapshot }: Props) {
125
- const toast = useToast();
126
- const modal = useModal();
127
- const [agents, setAgents] = useState<Agent[]>(snapshot.agents || []);
128
- const [loading, setLoading] = useState(!snapshot.agents);
129
- const [categoryFilter, setCategoryFilter] = useState<string>('');
130
- const [search, setSearch] = useState('');
131
- const [selectedName, setSelectedName] = useState<string | null>(null);
132
-
133
- useEffect(() => {
134
- setAgents(snapshot.agents || []);
135
- setLoading(!snapshot.agents);
136
- }, [snapshot.agents]);
137
-
138
- // If the selected agent disappears from the list (deleted elsewhere, WS
139
- // swap), clear the selection so the detail panel reverts to the placeholder.
140
- useEffect(() => {
141
- if (selectedName && !agents.some((a) => a.name === selectedName)) {
142
- setSelectedName(null);
143
- }
144
- }, [agents, selectedName]);
145
-
146
- const reload = async (): Promise<void> => {
147
- try {
148
- const d = await api.get<{ agents: Agent[] }>('/agents');
149
- setAgents(d.agents || []);
150
- } catch (err) {
151
- toast.error(`Agents load failed: ${(err as Error).message}`);
152
- } finally {
153
- setLoading(false);
154
- }
155
- };
156
-
157
- const sorted = useMemo(() => {
158
- let out = [...agents];
159
- if (categoryFilter) {
160
- out = out.filter((a) =>
161
- categoryFilter === '__none__'
162
- ? !(a.category || '')
163
- : (a.category || '') === categoryFilter,
164
- );
165
- }
166
- if (search) {
167
- const q = search.toLowerCase();
168
- out = out.filter(
169
- (a) =>
170
- a.name.toLowerCase().includes(q) ||
171
- (a.description || '').toLowerCase().includes(q) ||
172
- (a.tags || []).some((t) => t.toLowerCase().includes(q)),
173
- );
174
- }
175
- return out.sort((a, b) => a.name.localeCompare(b.name));
176
- }, [agents, categoryFilter, search]);
177
-
178
- const hasLastSeen = sorted.some((a) => typeof lastSeenTs(a) === 'number');
179
-
180
- const selected = useMemo(
181
- () => sorted.find((a) => a.name === selectedName) || null,
182
- [sorted, selectedName],
183
- );
184
-
185
- // ─── Handlers (modal flows kept on the legacy Modal) ───────────────────
186
-
187
- const onCreate = (): void => {
188
- let nameEl: HTMLInputElement | null = null;
189
- let descEl: HTMLInputElement | null = null;
190
- let modelEl: HTMLSelectElement | null = null;
191
- let modeEl: HTMLSelectElement | null = null;
192
- let colorEl: HTMLInputElement | null = null;
193
- let promptEl: HTMLTextAreaElement | null = null;
194
- let toolsContainer: HTMLDivElement | null = null;
195
- let tagsEl: HTMLInputElement | null = null;
196
- let categoryEl: HTMLSelectElement | null = null;
197
-
198
- modal.open({
199
- title: 'New agent',
200
- width: 640,
201
- children: (
202
- <div className="agent-form">
203
- <label className="field-label" htmlFor="agent-new-name">Name (a-z, 0-9, dashes)</label>
204
- <input
205
- id="agent-new-name"
206
- ref={(el) => (nameEl = el)}
207
- className="input"
208
- type="text"
209
- placeholder="my-agent"
210
- autoFocus
211
- />
212
- <label className="field-label" htmlFor="agent-new-desc">Description</label>
213
- <input
214
- id="agent-new-desc"
215
- ref={(el) => { descEl = el; }}
216
- className="input"
217
- type="text"
218
- placeholder="What does this agent do?"
219
- />
220
- <div className="task-form-row">
221
- <div className="task-form-field">
222
- <label className="field-label" htmlFor="agent-new-model">Model</label>
223
- <select id="agent-new-model" ref={(el) => (modelEl = el)} className="select" defaultValue="">
224
- <option value="">(provider default)</option>
225
- {MODELS.map((m) => (
226
- <option key={m} value={m}>{m}</option>
227
- ))}
228
- </select>
229
- </div>
230
- <div className="task-form-field">
231
- <label className="field-label" htmlFor="agent-new-mode">Mode</label>
232
- <select id="agent-new-mode" ref={(el) => (modeEl = el)} className="select" defaultValue="subagent">
233
- <option value="primary">primary</option>
234
- <option value="subagent">subagent</option>
235
- <option value="all">all</option>
236
- </select>
237
- </div>
238
- <div className="task-form-field" style={{ flex: '0 0 80px' }}>
239
- <label className="field-label" htmlFor="agent-new-color">Color</label>
240
- <input id="agent-new-color" ref={(el) => (colorEl = el)} className="input" type="color" defaultValue={DEFAULT_AGENT_SWATCH_HEX} />
241
- </div>
242
- </div>
243
- <div className="task-form-row">
244
- <div className="task-form-field" style={{ flex: 1 }}>
245
- <label className="field-label" htmlFor="agent-new-category">Category</label>
246
- <select id="agent-new-category" ref={(el) => (categoryEl = el)} className="select" defaultValue="">
247
- <option value="">(none)</option>
248
- {CATEGORIES.map((c) => (
249
- <option key={c.id} value={c.id}>{c.label}</option>
250
- ))}
251
- </select>
252
- </div>
253
- <div className="task-form-field" style={{ flex: 2 }}>
254
- <label className="field-label" htmlFor="agent-new-tags">Tags (comma-separated)</label>
255
- <input id="agent-new-tags" ref={(el) => (tagsEl = el)} className="input" type="text" placeholder="reasoning, code, planning" />
256
- </div>
257
- </div>
258
- <fieldset>
259
- <legend className="field-label" style={{ padding: 0 }}>Tools</legend>
260
- <div ref={(el) => (toolsContainer = el)} className="agent-tools">
261
- {TOOL_OPTIONS.map((t) => (
262
- <label key={t} className="checkbox-row">
263
- <input type="checkbox" value={t} aria-label={t} />
264
- <span>{t}</span>
265
- </label>
266
- ))}
267
- </div>
268
- </fieldset>
269
- <label className="field-label" htmlFor="agent-new-prompt">System prompt</label>
270
- <textarea
271
- id="agent-new-prompt"
272
- ref={(el) => (promptEl = el)}
273
- className="textarea"
274
- rows={6}
275
- placeholder="You are a..."
276
- />
277
- </div>
278
- ),
279
- footer: (
280
- <div className="modal-footer-actions">
281
- <Button variant="ghost" onClick={() => modal.close()}>Cancel</Button>
282
- <Button
283
- variant="primary"
284
- onClick={async () => {
285
- const name = (nameEl?.value || '').trim();
286
- if (!/^[a-z0-9][a-z0-9-]{0,63}$/i.test(name)) {
287
- toast.warning('Invalid name (a-z, 0-9, dashes).');
288
- return;
289
- }
290
- const tools: string[] = [];
291
- if (toolsContainer) {
292
- toolsContainer.querySelectorAll<HTMLInputElement>('input[type="checkbox"]:checked').forEach((cb) => {
293
- tools.push(cb.value);
294
- });
295
- }
296
- const tags = (tagsEl?.value || '').split(',').map((t) => t.trim()).filter(Boolean);
297
- try {
298
- const created = await api.post<Agent>('/agents', {
299
- name,
300
- description: (descEl?.value || '').trim(),
301
- model: modelEl?.value || '',
302
- mode: modeEl?.value || 'subagent',
303
- color: colorEl?.value || '',
304
- tools,
305
- tags,
306
- category: categoryEl?.value || '',
307
- prompt: promptEl?.value || '',
308
- });
309
- setAgents((cur) => [...cur, created]);
310
- setSelectedName(created.name);
311
- toast.success('Agent created.');
312
- modal.close();
313
- await refreshSnapshot();
314
- } catch (err) {
315
- toast.error(`Create failed: ${(err as Error).message}`);
316
- }
317
- }}
318
- >
319
- <Save size={12} /> Create
320
- </Button>
321
- </div>
322
- ),
323
- });
324
- };
325
-
326
- const onEdit = async (a: Agent): Promise<void> => {
327
- let descEl: HTMLInputElement | null = null;
328
- let modelEl: HTMLSelectElement | null = null;
329
- let modeEl: HTMLSelectElement | null = null;
330
- let colorEl: HTMLInputElement | null = null;
331
- let promptEl: HTMLTextAreaElement | null = null;
332
- let toolsContainer: HTMLDivElement | null = null;
333
- let tagsEl: HTMLInputElement | null = null;
334
- let categoryEl: HTMLSelectElement | null = null;
335
- try {
336
- const full = await api.get<Agent>(`/agents/${encodeURIComponent(a.name)}`);
337
- modal.open({
338
- title: `Edit ${a.name}`,
339
- width: 640,
340
- children: (
341
- <div className="agent-form">
342
- <div className="muted">
343
- File: <code>{full.path}</code>
344
- </div>
345
- <label className="field-label" htmlFor="agent-edit-desc">Description</label>
346
- <input
347
- id="agent-edit-desc"
348
- ref={(el) => { descEl = el; }}
349
- className="input"
350
- type="text"
351
- defaultValue={full.description}
352
- />
353
- <div className="task-form-row">
354
- <div className="task-form-field">
355
- <label className="field-label" htmlFor="agent-edit-model">Model</label>
356
- <select id="agent-edit-model" ref={(el) => (modelEl = el)} className="select" defaultValue={full.model}>
357
- <option value="">(provider default)</option>
358
- {MODELS.map((m) => (
359
- <option key={m} value={m}>{m}</option>
360
- ))}
361
- </select>
362
- </div>
363
- <div className="task-form-field">
364
- <label className="field-label" htmlFor="agent-edit-mode">Mode</label>
365
- <select id="agent-edit-mode" ref={(el) => (modeEl = el)} className="select" defaultValue={full.mode || 'subagent'}>
366
- <option value="primary">primary</option>
367
- <option value="subagent">subagent</option>
368
- <option value="all">all</option>
369
- </select>
370
- </div>
371
- <div className="task-form-field" style={{ flex: '0 0 80px' }}>
372
- <label className="field-label" htmlFor="agent-edit-color">Color</label>
373
- <input id="agent-edit-color" ref={(el) => (colorEl = el)} className="input" type="color" defaultValue={full.color || DEFAULT_AGENT_SWATCH_HEX} />
374
- </div>
375
- </div>
376
- <div className="task-form-row">
377
- <div className="task-form-field" style={{ flex: 1 }}>
378
- <label className="field-label" htmlFor="agent-edit-category">Category</label>
379
- <select id="agent-edit-category" ref={(el) => (categoryEl = el)} className="select" defaultValue={full.category || ''}>
380
- <option value="">(none)</option>
381
- {CATEGORIES.map((c) => (
382
- <option key={c.id} value={c.id}>{c.label}</option>
383
- ))}
384
- </select>
385
- </div>
386
- <div className="task-form-field" style={{ flex: 2 }}>
387
- <label className="field-label" htmlFor="agent-edit-tags">Tags (comma-separated)</label>
388
- <input
389
- id="agent-edit-tags"
390
- ref={(el) => (tagsEl = el)}
391
- className="input"
392
- type="text"
393
- defaultValue={(full.tags || []).join(', ')}
394
- />
395
- </div>
396
- </div>
397
- <fieldset>
398
- <legend className="field-label" style={{ padding: 0 }}>Tools</legend>
399
- <div ref={(el) => (toolsContainer = el)} className="agent-tools">
400
- {TOOL_OPTIONS.map((t) => (
401
- <label key={t} className="checkbox-row">
402
- <input type="checkbox" value={t} aria-label={t} defaultChecked={full.tools?.includes(t)} />
403
- <span>{t}</span>
404
- </label>
405
- ))}
406
- </div>
407
- </fieldset>
408
- <label className="field-label" htmlFor="agent-edit-prompt">System prompt</label>
409
- <textarea
410
- id="agent-edit-prompt"
411
- ref={(el) => (promptEl = el)}
412
- className="textarea"
413
- rows={8}
414
- defaultValue={full.prompt || ''}
415
- />
416
- </div>
417
- ),
418
- footer: (
419
- <div className="modal-footer-actions">
420
- <Button variant="ghost" onClick={() => modal.close()}>Cancel</Button>
421
- <Button
422
- variant="primary"
423
- onClick={async () => {
424
- const tools: string[] = [];
425
- if (toolsContainer) {
426
- toolsContainer.querySelectorAll<HTMLInputElement>('input[type="checkbox"]:checked').forEach((cb) => {
427
- tools.push(cb.value);
428
- });
429
- }
430
- const tags = (tagsEl?.value || '').split(',').map((t) => t.trim()).filter(Boolean);
431
- try {
432
- const updated = await api.put<Agent>(
433
- `/agents/${encodeURIComponent(a.name)}`,
434
- {
435
- description: (descEl?.value || '').trim(),
436
- model: modelEl?.value || '',
437
- mode: modeEl?.value || 'subagent',
438
- color: colorEl?.value || '',
439
- tools,
440
- tags,
441
- category: categoryEl?.value || '',
442
- prompt: promptEl?.value || '',
443
- },
444
- );
445
- setAgents((cur) => cur.map((x) => (x.name === a.name ? updated : x)));
446
- toast.success('Agent saved.');
447
- modal.close();
448
- await refreshSnapshot();
449
- } catch (err) {
450
- toast.error(`Save failed: ${(err as Error).message}`);
451
- }
452
- }}
453
- >
454
- <Save size={12} /> Save
455
- </Button>
456
- </div>
457
- ),
458
- });
459
- } catch (err) {
460
- toast.error(`Load failed: ${(err as Error).message}`);
461
- }
462
- };
463
-
464
- const onDelete = async (a: Agent): Promise<void> => {
465
- if (!confirm(`Delete agent "${a.name}"? This removes ${a.path}.`)) return;
466
- try {
467
- await api.del(`/agents/${encodeURIComponent(a.name)}`);
468
- setAgents((cur) => cur.filter((x) => x.name !== a.name));
469
- toast.success('Agent deleted.');
470
- } catch (err) {
471
- toast.error(`Delete failed: ${(err as Error).message}`);
472
- }
473
- };
474
-
475
- const onInvoke = (a: Agent): void => {
476
- let promptEl: HTMLTextAreaElement | null = null;
477
- modal.open({
478
- title: `Invoke ${a.name}`,
479
- children: (
480
- <div className="invoke-form">
481
- <p className="muted invoke-form-meta mono">{a.model || '—'} · {a.path}</p>
482
- <p className="invoke-form-desc">{a.description}</p>
483
- <label className="field-label" htmlFor="invoke-prompt">Prompt</label>
484
- <textarea
485
- ref={(el) => (promptEl = el)}
486
- id="invoke-prompt"
487
- className="textarea"
488
- rows={5}
489
- placeholder="What should this agent do?"
490
- autoFocus
491
- />
492
- </div>
493
- ),
494
- footer: (
495
- <div className="modal-footer-actions">
496
- <Button variant="ghost" onClick={() => modal.close()}>Cancel</Button>
497
- <Button
498
- variant="primary"
499
- onClick={async () => {
500
- const prompt = (promptEl?.value || '').trim();
501
- if (!prompt) {
502
- toast.warning('Prompt is required.');
503
- return;
504
- }
505
- try {
506
- await api.post(`/agents/${encodeURIComponent(a.name)}/invoke`, { prompt });
507
- toast.success(`Invoked ${a.name}.`);
508
- modal.close();
509
- } catch (err) {
510
- toast.error(`Invoke failed: ${(err as Error).message}`);
511
- }
512
- }}
513
- >
514
- <Play size={14} /> Invoke
515
- </Button>
516
- </div>
517
- ),
518
- });
519
- };
520
-
521
- const onRestart = async (a: Agent): Promise<void> => {
522
- try {
523
- const updated = await api.post<Agent>(`/agents/${encodeURIComponent(a.name)}/restart`);
524
- setAgents((cur) => cur.map((x) => (x.name === a.name ? updated : x)));
525
- toast.success(`${a.name} restarted.`);
526
- } catch (err) {
527
- toast.error(`Restart failed: ${(err as Error).message}`);
528
- }
529
- };
530
-
531
- const onSetStatus = async (a: Agent, status: 'idle' | 'working' | 'error'): Promise<void> => {
532
- try {
533
- const updated = await api.post<Agent>(`/agents/${encodeURIComponent(a.name)}/status`, { status });
534
- setAgents((cur) => cur.map((x) => (x.name === a.name ? updated : x)));
535
- } catch (err) {
536
- toast.error(`Status update failed: ${(err as Error).message}`);
537
- }
538
- };
539
-
540
- // ─── Table column definitions ──────────────────────────────────────────
541
-
542
- type Col = DataTableColumn<Agent>;
543
-
544
- const columns: Col[] = [
545
- {
546
- key: 'name',
547
- header: 'Name',
548
- sortable: true,
549
- accessor: (a) => a.name,
550
- render: (a) => (
551
- <span className="agents-name-cell">
552
- <span
553
- className={cx(
554
- 'agents-name-cell__swatch',
555
- !a.color && 'agents-name-cell__swatch--empty',
556
- )}
557
- style={a.color ? { background: a.color } : undefined}
558
- aria-hidden="true"
559
- />
560
- {a.name}
561
- </span>
562
- ),
563
- },
564
- {
565
- key: 'status',
566
- header: 'Status',
567
- sortable: true,
568
- accessor: (a) => statusKind(a),
569
- render: (a) => {
570
- const kind = statusKind(a);
571
- return (
572
- <span className="agents-status-cell">
573
- <StatusDot
574
- variant={statusDotVariant(kind)}
575
- size="sm"
576
- pulse={kind === 'stuck'}
577
- label={statusLabel(kind)}
578
- />
579
- <span
580
- className={cx(
581
- 'agents-status-cell__label',
582
- kind === 'stuck' && 'agents-status-cell__label--stuck',
583
- )}
584
- >
585
- {statusLabel(kind)}
586
- </span>
587
- </span>
588
- );
589
- },
590
- },
591
- {
592
- key: 'category',
593
- header: 'Category',
594
- sortable: true,
595
- accessor: (a) => a.category || '',
596
- render: (a) => {
597
- const meta = categoryMeta(a.category);
598
- if (!a.category) return <span className="muted">—</span>;
599
- return (
600
- <span className="agents-category-cell">
601
- <Badge variant={meta.variant} size="sm">{meta.label}</Badge>
602
- </span>
603
- );
604
- },
605
- },
606
- {
607
- key: 'tags',
608
- header: 'Tags',
609
- accessor: (a) => (a.tags || []).join(','),
610
- render: (a) => (
611
- <span className="agents-tags-cell" title={(a.tags || []).join(', ')}>
612
- {tagsToString(a.tags)}
613
- </span>
614
- ),
615
- },
616
- ];
617
-
618
- if (hasLastSeen) {
619
- columns.push({
620
- key: 'lastSeen',
621
- header: 'Last seen',
622
- sortable: true,
623
- accessor: (a) => lastSeenTs(a) || 0,
624
- render: (a) => {
625
- const ts = lastSeenTs(a);
626
- return <span className="muted tabular-nums">{ts ? formatRelative(ts) : '—'}</span>;
627
- },
628
- });
629
- }
630
-
631
- // ─── Detail panel ─────────────────────────────────────────────────────
632
-
633
- function renderDetailBody(): React.JSX.Element {
634
- if (!selected) {
635
- return (
636
- <div className="agents-detail__placeholder">
637
- <span className="agents-detail__placeholder-icon" aria-hidden="true">
638
- <Bot size={28} />
639
- </span>
640
- <span className="agents-detail__placeholder-title">No agent selected</span>
641
- <span>Pick a row from the table to see its metadata, actions, and prompt.</span>
642
- </div>
643
- );
644
- }
645
-
646
- const a = selected;
647
- const kind = statusKind(a);
648
- const catMeta = categoryMeta(a.category);
649
- const canRestart = a.isStuck || a.status === 'working' || a.status === 'error';
650
-
651
- const metaItems: KeyValueItem[] = [
652
- {
653
- key: 'status',
654
- label: 'Status',
655
- value: (
656
- <span className="agents-status-cell">
657
- <StatusDot
658
- variant={statusDotVariant(kind)}
659
- size="sm"
660
- pulse={kind === 'stuck'}
661
- label={statusLabel(kind)}
662
- />
663
- <span className="agents-status-cell__label">{statusLabel(kind)}</span>
664
- </span>
665
- ),
666
- },
667
- {
668
- key: 'category',
669
- label: 'Category',
670
- value: a.category
671
- ? <Badge variant={catMeta.variant} size="sm">{catMeta.label}</Badge>
672
- : <span className="muted">—</span>,
673
- },
674
- {
675
- key: 'tags',
676
- label: 'Tags',
677
- value: a.tags && a.tags.length > 0 ? (
678
- <Inline gap={1} className="agents-detail__tags">
679
- {a.tags.map((t) => (
680
- <Badge key={t} variant="neutral" size="sm">{t}</Badge>
681
- ))}
682
- </Inline>
683
- ) : <span className="muted">—</span>,
684
- },
685
- {
686
- key: 'tools',
687
- label: 'Tools',
688
- value: a.tools && a.tools.length > 0 ? (
689
- <Inline gap={1} className="agents-detail__tools">
690
- {a.tools.map((t) => (
691
- <Badge key={t} variant="info" size="sm">{t}</Badge>
692
- ))}
693
- </Inline>
694
- ) : <span className="muted">—</span>,
695
- },
696
- {
697
- key: 'model',
698
- label: 'Model',
699
- mono: true,
700
- copyable: true,
701
- value: a.model || '—',
702
- },
703
- {
704
- key: 'mode',
705
- label: 'Mode',
706
- value: a.mode || 'subagent',
707
- },
708
- {
709
- key: 'color',
710
- label: 'Color',
711
- value: a.color ? (
712
- <Inline gap={2} align="center">
713
- <span
714
- className="agents-detail__name-swatch"
715
- style={{ background: a.color }}
716
- aria-hidden="true"
717
- />
718
- <code className="mono">{a.color}</code>
719
- </Inline>
720
- ) : <span className="muted">—</span>,
721
- },
722
- {
723
- key: 'description',
724
- label: 'Description',
725
- value: a.description
726
- ? <div className="agents-detail__description">{truncate(a.description, 600)}</div>
727
- : <span className="muted">—</span>,
728
- },
729
- ];
730
-
731
- if (typeof lastSeenTs(a) === 'number') {
732
- metaItems.push({
733
- key: 'lastSeen',
734
- label: 'Last seen',
735
- mono: true,
736
- value: formatRelative(lastSeenTs(a) as number),
737
- });
738
- }
739
-
740
- if (a.lastError?.message) {
741
- metaItems.push({
742
- key: 'lastError',
743
- label: 'Last error',
744
- value: (
745
- <div className="agents-detail__error">{a.lastError.message}</div>
746
- ),
747
- });
748
- }
749
-
750
- return (
751
- <Stack gap={4} className="agents-detail__meta">
752
- <KeyValueList items={metaItems} orientation="horizontal" />
753
-
754
- <Box className="agents-detail__prompt">
755
- <span className="agents-detail__prompt-label">System prompt</span>
756
- {a.prompt ? (
757
- <pre className="agents-detail__prompt-body">{a.prompt}</pre>
758
- ) : (
759
- <span className="agents-detail__prompt-empty">No prompt configured.</span>
760
- )}
761
- </Box>
762
-
763
- <Inline gap={2} wrap className="agents-detail__actions">
764
- <UIButton
765
- variant="secondary"
766
- size="sm"
767
- icon={<Pencil size={12} />}
768
- onClick={() => onEdit(a)}
769
- aria-label={`Edit ${a.name}`}
770
- data-testid={`agents-detail-edit-${a.name}`}
771
- >
772
- Edit
773
- </UIButton>
774
- <UIButton
775
- variant="secondary"
776
- size="sm"
777
- icon={<Play size={12} />}
778
- onClick={() => onInvoke(a)}
779
- aria-label={`Invoke ${a.name}`}
780
- data-testid={`agents-detail-invoke-${a.name}`}
781
- >
782
- Invoke
783
- </UIButton>
784
- {canRestart && (
785
- <UIButton
786
- variant="ghost"
787
- size="sm"
788
- icon={<RotateCw size={12} />}
789
- onClick={() => onRestart(a)}
790
- aria-label={`Restart ${a.name}`}
791
- data-testid={`agents-detail-restart-${a.name}`}
792
- >
793
- Restart
794
- </UIButton>
795
- )}
796
- <UIButton
797
- variant="danger"
798
- size="sm"
799
- icon={<Trash2 size={12} />}
800
- onClick={() => onDelete(a)}
801
- aria-label={`Delete ${a.name}`}
802
- data-testid={`agents-detail-delete-${a.name}`}
803
- >
804
- Delete
805
- </UIButton>
806
- </Inline>
807
-
808
- {a.isStuck && (
809
- <Inline gap={2} align="center" className="agents-detail__error">
810
- <CircleAlert size={12} />
811
- <span>
812
- Agent is stuck — restart to reset state.
813
- </span>
814
- </Inline>
815
- )}
816
- </Stack>
817
- );
818
- }
819
-
820
- // ─── Render ────────────────────────────────────────────────────────────
821
-
822
- const categoryOptions = [
823
- { value: '', label: 'All categories' },
824
- ...CATEGORIES.map((c) => ({ value: c.id, label: c.label })),
825
- { value: '__none__', label: '(no category)' },
826
- ];
827
-
828
- return (
829
- <div className="agents-redesign" data-testid="agents-view">
830
- <header className="agents-redesign__header">
831
- <div className="agents-redesign__header-text">
832
- <h2 className="agents-redesign__title">
833
- <Bot size={18} aria-hidden="true" />
834
- <span>Agents</span>
835
- <span className="agents-redesign__title-count" data-testid="agents-count">
836
- ({sorted.length})
837
- </span>
838
- </h2>
839
- <p className="agents-redesign__subtitle">
840
- The Norse pantheon — pick a row to inspect, <kbd>Edit</kbd> to modify, <kbd>Invoke</kbd> to dispatch.
841
- </p>
842
- </div>
843
- <div className="agents-redesign__controls">
844
- <span className="agents-redesign__control" style={{ minWidth: 180 }}>
845
- <label htmlFor="agents-search" className="vh">Search agents</label>
846
- <input
847
- id="agents-search"
848
- className="input"
849
- type="search"
850
- placeholder="Search name, description, tag…"
851
- value={search}
852
- onChange={(e) => setSearch(e.target.value)}
853
- aria-label="Search agents"
854
- data-testid="agents-search"
855
- />
856
- </span>
857
- <span className="agents-redesign__control" style={{ minWidth: 180 }}>
858
- <label htmlFor="agents-category-filter" className="vh">Filter by category</label>
859
- <select
860
- id="agents-category-filter"
861
- className="select"
862
- value={categoryFilter}
863
- onChange={(e) => setCategoryFilter(e.target.value)}
864
- data-testid="agents-category-filter"
865
- >
866
- {categoryOptions.map((opt) => (
867
- <option key={opt.value || '__all__'} value={opt.value}>{opt.label}</option>
868
- ))}
869
- </select>
870
- </span>
871
- <UIButton
872
- variant="ghost"
873
- size="sm"
874
- icon={<RefreshCw size={12} />}
875
- onClick={reload}
876
- aria-label="Refresh"
877
- data-testid="agents-refresh"
878
- >
879
- Refresh
880
- </UIButton>
881
- <UIButton
882
- variant="primary"
883
- size="sm"
884
- icon={<Plus size={12} />}
885
- onClick={onCreate}
886
- aria-label="New agent"
887
- data-testid="agents-new"
888
- >
889
- New agent
890
- </UIButton>
891
- </div>
892
- </header>
893
-
894
- <div className="agents-redesign__body">
895
- <Box className="agents-roster">
896
- {loading ? (
897
- <LoadingState label="Loading agents…" rows={3} />
898
- ) : sorted.length === 0 ? (
899
- <EmptyState
900
- icon={<Bot size={32} />}
901
- title="No agents found"
902
- description={
903
- agents.length === 0
904
- ? 'Run bizar in the terminal to install Bizar.'
905
- : 'No agents match the current filters — try clearing the search or category.'
906
- }
907
- action={
908
- agents.length === 0
909
- ? undefined
910
- : {
911
- label: 'Clear filters',
912
- onClick: () => {
913
- setSearch('');
914
- setCategoryFilter('');
915
- },
916
- }
917
- }
918
- />
919
- ) : (
920
- <div className="agents-roster__table" data-testid="agents-table">
921
- <DataTable<Agent>
922
- columns={columns}
923
- data={sorted}
924
- rowKey={(a) => a.name}
925
- compact
926
- onRowClick={(a) => setSelectedName(a.name)}
927
- />
928
- </div>
929
- )}
930
- </Box>
931
-
932
- <Panel
933
- title={
934
- selected ? (
935
- <span className="agents-detail__name">
936
- <span
937
- className={cx(
938
- 'agents-detail__name-swatch',
939
- !selected.color && 'agents-detail__name-swatch--empty',
940
- )}
941
- style={selected.color ? { background: selected.color } : undefined}
942
- aria-hidden="true"
943
- />
944
- <span>{selected.name}</span>
945
- </span>
946
- ) : (
947
- 'Agent detail'
948
- )
949
- }
950
- description={
951
- selected
952
- ? selected.path
953
- : 'Select an agent from the roster to see its metadata.'
954
- }
955
- padding={4}
956
- variant="outlined"
957
- className="agents-detail"
958
- >
959
- {renderDetailBody()}
960
- </Panel>
961
- </div>
962
- </div>
963
- );
964
- }