@grackle-ai/web-components 0.107.2

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 (279) hide show
  1. package/.rush/temp/3ae72563f781afd72723475938136f113846603e.untar.log +10 -0
  2. package/.rush/temp/bc1d5bf9201ce71abeaeaddd096deb9b0805d703.untar.log +10 -0
  3. package/.rush/temp/operation/_phase_build/all.log +18 -0
  4. package/.rush/temp/operation/_phase_build/log-chunks.jsonl +18 -0
  5. package/.rush/temp/operation/_phase_build/state.json +3 -0
  6. package/.rush/temp/operation/_phase_test/all.log +121 -0
  7. package/.rush/temp/operation/_phase_test/log-chunks.jsonl +121 -0
  8. package/.rush/temp/operation/_phase_test/state.json +3 -0
  9. package/.rush/temp/shrinkwrap-deps.json +938 -0
  10. package/.storybook/main.ts +22 -0
  11. package/.storybook/preview.tsx +30 -0
  12. package/config/rig.json +4 -0
  13. package/config/rush-project.json +12 -0
  14. package/dist/index.css +1 -0
  15. package/dist/index.js +39221 -0
  16. package/eslint.config.cjs +5 -0
  17. package/package.json +83 -0
  18. package/rush-logs/web-components._phase_build.cache.log +4 -0
  19. package/rush-logs/web-components._phase_test.cache.log +4 -0
  20. package/src/components/chat/ChatInput.module.scss +81 -0
  21. package/src/components/chat/ChatInput.stories.tsx +91 -0
  22. package/src/components/chat/ChatInput.tsx +168 -0
  23. package/src/components/chat/index.ts +6 -0
  24. package/src/components/dag/DagView.module.scss +149 -0
  25. package/src/components/dag/DagView.stories.tsx +125 -0
  26. package/src/components/dag/DagView.tsx +109 -0
  27. package/src/components/dag/TaskNode.stories.tsx +133 -0
  28. package/src/components/dag/TaskNode.tsx +40 -0
  29. package/src/components/dag/useDagLayout.ts +139 -0
  30. package/src/components/display/Breadcrumbs.module.scss +71 -0
  31. package/src/components/display/Breadcrumbs.stories.tsx +80 -0
  32. package/src/components/display/Breadcrumbs.tsx +46 -0
  33. package/src/components/display/Button.module.scss +110 -0
  34. package/src/components/display/Button.stories.tsx +88 -0
  35. package/src/components/display/Button.tsx +40 -0
  36. package/src/components/display/ConfirmDialog.module.scss +67 -0
  37. package/src/components/display/ConfirmDialog.stories.tsx +81 -0
  38. package/src/components/display/ConfirmDialog.tsx +88 -0
  39. package/src/components/display/CopyButton.module.scss +41 -0
  40. package/src/components/display/CopyButton.stories.tsx +78 -0
  41. package/src/components/display/CopyButton.tsx +64 -0
  42. package/src/components/display/DemoBanner.module.scss +37 -0
  43. package/src/components/display/DemoBanner.stories.tsx +40 -0
  44. package/src/components/display/DemoBanner.tsx +23 -0
  45. package/src/components/display/EventHoverRow.module.scss +102 -0
  46. package/src/components/display/EventHoverRow.stories.tsx +99 -0
  47. package/src/components/display/EventHoverRow.tsx +154 -0
  48. package/src/components/display/EventRenderer.module.scss +272 -0
  49. package/src/components/display/EventRenderer.stories.tsx +186 -0
  50. package/src/components/display/EventRenderer.tsx +271 -0
  51. package/src/components/display/EventStream.module.scss +93 -0
  52. package/src/components/display/EventStream.stories.tsx +249 -0
  53. package/src/components/display/EventStream.tsx +369 -0
  54. package/src/components/display/FloatingActionBar.module.scss +107 -0
  55. package/src/components/display/FloatingActionBar.stories.tsx +122 -0
  56. package/src/components/display/FloatingActionBar.tsx +119 -0
  57. package/src/components/display/SessionAttemptSelector.module.scss +50 -0
  58. package/src/components/display/SessionAttemptSelector.stories.tsx +78 -0
  59. package/src/components/display/SessionAttemptSelector.tsx +49 -0
  60. package/src/components/display/SessionPicker.module.scss +200 -0
  61. package/src/components/display/SessionPicker.stories.tsx +169 -0
  62. package/src/components/display/SessionPicker.tsx +214 -0
  63. package/src/components/display/Skeleton.module.scss +58 -0
  64. package/src/components/display/Skeleton.stories.tsx +94 -0
  65. package/src/components/display/Skeleton.tsx +127 -0
  66. package/src/components/display/Spinner.module.scss +41 -0
  67. package/src/components/display/Spinner.stories.tsx +66 -0
  68. package/src/components/display/Spinner.tsx +32 -0
  69. package/src/components/display/SplashScreen.module.scss +20 -0
  70. package/src/components/display/SplashScreen.stories.tsx +26 -0
  71. package/src/components/display/SplashScreen.tsx +16 -0
  72. package/src/components/display/SplitButton.module.scss +166 -0
  73. package/src/components/display/SplitButton.stories.tsx +95 -0
  74. package/src/components/display/SplitButton.tsx +128 -0
  75. package/src/components/display/Tooltip.module.scss +84 -0
  76. package/src/components/display/Tooltip.stories.tsx +240 -0
  77. package/src/components/display/Tooltip.tsx +184 -0
  78. package/src/components/display/extractText.test.tsx +48 -0
  79. package/src/components/display/index.ts +20 -0
  80. package/src/components/editable/EditableCheckbox.stories.tsx +54 -0
  81. package/src/components/editable/EditableCheckbox.tsx +39 -0
  82. package/src/components/editable/EditableField.module.scss +135 -0
  83. package/src/components/editable/EditableSelect.tsx +164 -0
  84. package/src/components/editable/EditableTextArea.stories.tsx +50 -0
  85. package/src/components/editable/EditableTextArea.tsx +148 -0
  86. package/src/components/editable/EditableTextField.stories.tsx +62 -0
  87. package/src/components/editable/EditableTextField.tsx +153 -0
  88. package/src/components/editable/EnvironmentSelect.module.scss +17 -0
  89. package/src/components/editable/EnvironmentSelect.stories.tsx +61 -0
  90. package/src/components/editable/EnvironmentSelect.tsx +87 -0
  91. package/src/components/editable/index.ts +13 -0
  92. package/src/components/editable/useEditableField.test.tsx +233 -0
  93. package/src/components/editable/useEditableField.ts +173 -0
  94. package/src/components/index.ts +20 -0
  95. package/src/components/knowledge/KnowledgeDetailPanel.module.scss +162 -0
  96. package/src/components/knowledge/KnowledgeDetailPanel.stories.tsx +208 -0
  97. package/src/components/knowledge/KnowledgeDetailPanel.tsx +122 -0
  98. package/src/components/knowledge/KnowledgeGraph.module.scss +110 -0
  99. package/src/components/knowledge/KnowledgeGraph.stories.tsx +180 -0
  100. package/src/components/knowledge/KnowledgeGraph.tsx +455 -0
  101. package/src/components/knowledge/KnowledgeNav.module.scss +130 -0
  102. package/src/components/knowledge/KnowledgeNav.stories.tsx +108 -0
  103. package/src/components/knowledge/KnowledgeNav.tsx +138 -0
  104. package/src/components/knowledge/index.ts +3 -0
  105. package/src/components/layout/AppNav.module.scss +82 -0
  106. package/src/components/layout/AppNav.stories.tsx +115 -0
  107. package/src/components/layout/AppNav.tsx +133 -0
  108. package/src/components/layout/BottomStatusBar.module.scss +58 -0
  109. package/src/components/layout/BottomStatusBar.stories.tsx +35 -0
  110. package/src/components/layout/BottomStatusBar.tsx +206 -0
  111. package/src/components/layout/Sidebar.module.scss +60 -0
  112. package/src/components/layout/Sidebar.stories.tsx +46 -0
  113. package/src/components/layout/Sidebar.tsx +84 -0
  114. package/src/components/layout/StatusBar.module.scss +108 -0
  115. package/src/components/layout/StatusBar.stories.tsx +119 -0
  116. package/src/components/layout/StatusBar.tsx +70 -0
  117. package/src/components/layout/index.ts +9 -0
  118. package/src/components/lists/EnvironmentNav.module.scss +118 -0
  119. package/src/components/lists/EnvironmentNav.stories.tsx +121 -0
  120. package/src/components/lists/EnvironmentNav.tsx +133 -0
  121. package/src/components/lists/FindingsNav.module.scss +126 -0
  122. package/src/components/lists/FindingsNav.tsx +146 -0
  123. package/src/components/lists/TaskList.module.scss +206 -0
  124. package/src/components/lists/TaskList.stories.tsx +401 -0
  125. package/src/components/lists/TaskList.tsx +509 -0
  126. package/src/components/lists/index.ts +6 -0
  127. package/src/components/lists/listHelpers.tsx +130 -0
  128. package/src/components/notifications/Callout.module.scss +83 -0
  129. package/src/components/notifications/Callout.stories.tsx +81 -0
  130. package/src/components/notifications/Callout.tsx +64 -0
  131. package/src/components/notifications/Toast.module.scss +86 -0
  132. package/src/components/notifications/Toast.stories.tsx +71 -0
  133. package/src/components/notifications/Toast.tsx +51 -0
  134. package/src/components/notifications/ToastContainer.module.scss +23 -0
  135. package/src/components/notifications/ToastContainer.stories.tsx +66 -0
  136. package/src/components/notifications/ToastContainer.tsx +29 -0
  137. package/src/components/notifications/UpdateBanner.stories.tsx +77 -0
  138. package/src/components/notifications/UpdateBanner.test.tsx +64 -0
  139. package/src/components/notifications/UpdateBanner.tsx +44 -0
  140. package/src/components/notifications/index.ts +8 -0
  141. package/src/components/panels/AboutPanel.stories.tsx +70 -0
  142. package/src/components/panels/AboutPanel.tsx +66 -0
  143. package/src/components/panels/AppearancePanel.stories.tsx +45 -0
  144. package/src/components/panels/AppearancePanel.tsx +97 -0
  145. package/src/components/panels/CredentialProvidersPanel.stories.tsx +62 -0
  146. package/src/components/panels/CredentialProvidersPanel.tsx +111 -0
  147. package/src/components/panels/EnvironmentEditPanel.module.scss +170 -0
  148. package/src/components/panels/EnvironmentEditPanel.stories.tsx +206 -0
  149. package/src/components/panels/EnvironmentEditPanel.tsx +785 -0
  150. package/src/components/panels/FindingsPanel.module.scss +94 -0
  151. package/src/components/panels/FindingsPanel.stories.tsx +109 -0
  152. package/src/components/panels/FindingsPanel.tsx +76 -0
  153. package/src/components/panels/KeyboardShortcutsPanel.module.scss +65 -0
  154. package/src/components/panels/KeyboardShortcutsPanel.stories.tsx +40 -0
  155. package/src/components/panels/KeyboardShortcutsPanel.tsx +104 -0
  156. package/src/components/panels/PluginsPanel.tsx +77 -0
  157. package/src/components/panels/SettingsPanel.module.scss +336 -0
  158. package/src/components/panels/TaskActionButtons.module.scss +22 -0
  159. package/src/components/panels/TaskActionButtons.stories.tsx +125 -0
  160. package/src/components/panels/TaskActionButtons.tsx +87 -0
  161. package/src/components/panels/TaskEditPanel.module.scss +202 -0
  162. package/src/components/panels/TaskEditPanel.stories.tsx +75 -0
  163. package/src/components/panels/TaskEditPanel.tsx +328 -0
  164. package/src/components/panels/TaskOverviewPanel.module.scss +236 -0
  165. package/src/components/panels/TaskOverviewPanel.stories.tsx +219 -0
  166. package/src/components/panels/TaskOverviewPanel.tsx +270 -0
  167. package/src/components/panels/TokensPanel.stories.tsx +131 -0
  168. package/src/components/panels/TokensPanel.tsx +143 -0
  169. package/src/components/panels/WorkpadPanel.module.scss +39 -0
  170. package/src/components/panels/WorkpadPanel.stories.tsx +56 -0
  171. package/src/components/panels/WorkpadPanel.tsx +63 -0
  172. package/src/components/panels/index.ts +13 -0
  173. package/src/components/personas/McpToolSelector.module.scss +109 -0
  174. package/src/components/personas/McpToolSelector.stories.tsx +129 -0
  175. package/src/components/personas/McpToolSelector.tsx +180 -0
  176. package/src/components/personas/PersonaManager.module.scss +233 -0
  177. package/src/components/personas/PersonaManager.stories.tsx +139 -0
  178. package/src/components/personas/PersonaManager.tsx +122 -0
  179. package/src/components/schedules/ScheduleManager.module.scss +98 -0
  180. package/src/components/schedules/ScheduleManager.stories.tsx +78 -0
  181. package/src/components/schedules/ScheduleManager.tsx +160 -0
  182. package/src/components/settings/SettingsNav.module.scss +82 -0
  183. package/src/components/settings/SettingsNav.stories.tsx +83 -0
  184. package/src/components/settings/SettingsNav.tsx +104 -0
  185. package/src/components/streams/StreamDetailPanel.module.scss +206 -0
  186. package/src/components/streams/StreamDetailPanel.stories.tsx +132 -0
  187. package/src/components/streams/StreamDetailPanel.tsx +119 -0
  188. package/src/components/streams/StreamList.module.scss +92 -0
  189. package/src/components/streams/StreamList.stories.tsx +99 -0
  190. package/src/components/streams/StreamList.tsx +114 -0
  191. package/src/components/streams/index.ts +10 -0
  192. package/src/components/tools/AgentToolCard.module.scss +118 -0
  193. package/src/components/tools/AgentToolCard.stories.tsx +304 -0
  194. package/src/components/tools/AgentToolCard.tsx +247 -0
  195. package/src/components/tools/FileEditCard.stories.tsx +138 -0
  196. package/src/components/tools/FileEditCard.tsx +160 -0
  197. package/src/components/tools/FileReadCard.stories.tsx +120 -0
  198. package/src/components/tools/FileReadCard.tsx +106 -0
  199. package/src/components/tools/FindingCard.stories.tsx +124 -0
  200. package/src/components/tools/FindingCard.tsx +178 -0
  201. package/src/components/tools/GenericToolCard.stories.tsx +80 -0
  202. package/src/components/tools/GenericToolCard.tsx +111 -0
  203. package/src/components/tools/IpcCard.stories.tsx +129 -0
  204. package/src/components/tools/IpcCard.tsx +178 -0
  205. package/src/components/tools/KnowledgeCard.stories.tsx +112 -0
  206. package/src/components/tools/KnowledgeCard.tsx +165 -0
  207. package/src/components/tools/MetadataCard.stories.tsx +32 -0
  208. package/src/components/tools/MetadataCard.tsx +39 -0
  209. package/src/components/tools/SearchCard.stories.tsx +74 -0
  210. package/src/components/tools/SearchCard.tsx +86 -0
  211. package/src/components/tools/ShellCard.stories.tsx +112 -0
  212. package/src/components/tools/ShellCard.tsx +106 -0
  213. package/src/components/tools/TaskCard.stories.tsx +123 -0
  214. package/src/components/tools/TaskCard.tsx +203 -0
  215. package/src/components/tools/TodoCard.module.scss +131 -0
  216. package/src/components/tools/TodoCard.stories.tsx +202 -0
  217. package/src/components/tools/TodoCard.tsx +200 -0
  218. package/src/components/tools/ToolCard.stories.tsx +177 -0
  219. package/src/components/tools/ToolCard.tsx +60 -0
  220. package/src/components/tools/ToolCardProps.ts +20 -0
  221. package/src/components/tools/ToolSearchCard.stories.tsx +81 -0
  222. package/src/components/tools/ToolSearchCard.tsx +86 -0
  223. package/src/components/tools/WorkpadCard.stories.tsx +106 -0
  224. package/src/components/tools/WorkpadCard.tsx +125 -0
  225. package/src/components/tools/classifyTool.test.ts +44 -0
  226. package/src/components/tools/classifyTool.ts +134 -0
  227. package/src/components/tools/parseDiff.ts +95 -0
  228. package/src/components/tools/parseShellOutput.ts +28 -0
  229. package/src/components/tools/toolCardHelpers.test.ts +53 -0
  230. package/src/components/tools/toolCards.module.scss +234 -0
  231. package/src/components/workspace/WorkspaceBoard.module.scss +238 -0
  232. package/src/components/workspace/WorkspaceBoard.stories.tsx +240 -0
  233. package/src/components/workspace/WorkspaceBoard.tsx +232 -0
  234. package/src/components/workspace/WorkspaceFormFields.module.scss +79 -0
  235. package/src/components/workspace/WorkspaceFormFields.stories.tsx +133 -0
  236. package/src/components/workspace/WorkspaceFormFields.tsx +185 -0
  237. package/src/context/GrackleContext.ts +28 -0
  238. package/src/context/GrackleContextTypes.ts +64 -0
  239. package/src/context/SidebarContext.tsx +53 -0
  240. package/src/context/ThemeContext.tsx +21 -0
  241. package/src/context/ToastContext.tsx +56 -0
  242. package/src/hooks/types.ts +864 -0
  243. package/src/hooks/useEventSelection.test.ts +204 -0
  244. package/src/hooks/useEventSelection.ts +158 -0
  245. package/src/hooks/useSmartScroll.ts +151 -0
  246. package/src/hooks/useTheme.ts +228 -0
  247. package/src/index.ts +210 -0
  248. package/src/mocks/MockGrackleProvider.tsx +1397 -0
  249. package/src/mocks/mockData.ts +1966 -0
  250. package/src/mocks/mockKnowledgeData.ts +294 -0
  251. package/src/scss.d.ts +12 -0
  252. package/src/styles/global.scss +244 -0
  253. package/src/styles/mixins.scss +278 -0
  254. package/src/styles/prism-theme.scss +148 -0
  255. package/src/styles/theme.scss +1102 -0
  256. package/src/test-utils/storybook-decorators.tsx +50 -0
  257. package/src/test-utils/storybook-helpers.ts +262 -0
  258. package/src/themes.ts +142 -0
  259. package/src/utils/boardColumns.ts +141 -0
  260. package/src/utils/breadcrumbs.test.ts +285 -0
  261. package/src/utils/breadcrumbs.ts +222 -0
  262. package/src/utils/dashboard.test.ts +156 -0
  263. package/src/utils/dashboard.ts +195 -0
  264. package/src/utils/eventContent.test.ts +353 -0
  265. package/src/utils/eventContent.ts +209 -0
  266. package/src/utils/findingCategory.ts +33 -0
  267. package/src/utils/format.ts +27 -0
  268. package/src/utils/iconSize.ts +18 -0
  269. package/src/utils/navigation.ts +205 -0
  270. package/src/utils/route-config.test.ts +128 -0
  271. package/src/utils/scrollUtils.test.ts +65 -0
  272. package/src/utils/scrollUtils.ts +49 -0
  273. package/src/utils/sessionEvents.test.ts +302 -0
  274. package/src/utils/sessionEvents.ts +233 -0
  275. package/src/utils/taskStatus.tsx +137 -0
  276. package/src/utils/time.ts +92 -0
  277. package/tsconfig.json +8 -0
  278. package/vite.config.ts +20 -0
  279. package/vitest.config.ts +10 -0
@@ -0,0 +1,234 @@
1
+ @use '../../styles/mixins' as *;
2
+
3
+ // =============================================================================
4
+ // Shared Tool Card Styles
5
+ // =============================================================================
6
+ // Common styles used across all tool card sub-components.
7
+ // Each card variant uses @use './toolCards.module.scss' for shared classes
8
+ // and defines its own module for card-specific styles.
9
+
10
+ // --- Card container (used by all cards except MetadataCard) ---
11
+
12
+ .card {
13
+ @include surface-card;
14
+ padding: var(--space-sm) var(--space-md);
15
+ margin: var(--space-xs) 0;
16
+ font-size: var(--font-size-sm);
17
+
18
+ @include mobile {
19
+ padding: var(--space-xs) var(--space-sm);
20
+ }
21
+ }
22
+
23
+ .cardBlue { border-left: 3px solid var(--accent-blue); }
24
+ .cardOrange { border-left: 3px solid var(--accent-yellow); }
25
+ .cardGreen { border-left: 3px solid var(--accent-green); }
26
+ .cardPurple { border-left: 3px solid var(--accent-purple, #a78bfa); }
27
+ .cardNeutral { border-left: 3px solid var(--border-subtle); }
28
+ .cardRed { border-left: 3px solid var(--accent-red); }
29
+ .cardTeal { border-left: 3px solid var(--accent-teal, #2dd4bf); }
30
+
31
+ // --- Header row ---
32
+
33
+ .header {
34
+ display: flex;
35
+ align-items: center;
36
+ gap: var(--space-sm);
37
+ min-height: 20px;
38
+ }
39
+
40
+ .icon {
41
+ flex-shrink: 0;
42
+ display: inline-flex;
43
+ align-items: center;
44
+ justify-content: center;
45
+ width: 16px;
46
+ font-size: var(--font-size-sm); // fallback for text icons (e.g. ShellCard "$")
47
+ }
48
+
49
+ .toolName {
50
+ font-weight: var(--font-weight-bold);
51
+ font-family: var(--font-mono);
52
+ font-size: var(--font-size-sm);
53
+ flex-shrink: 0;
54
+ }
55
+
56
+ .fileName {
57
+ color: var(--text-secondary);
58
+ font-family: var(--font-mono);
59
+ font-size: 11px;
60
+ overflow: hidden;
61
+ text-overflow: ellipsis;
62
+ white-space: nowrap;
63
+ }
64
+
65
+ .badge {
66
+ font-size: 10px;
67
+ font-family: var(--font-mono);
68
+ color: var(--text-tertiary);
69
+ flex-shrink: 0;
70
+ }
71
+
72
+ .spacer {
73
+ flex: 1;
74
+ }
75
+
76
+ // --- Expandable body ---
77
+
78
+ .bodyToggle {
79
+ display: flex;
80
+ align-items: center;
81
+ gap: var(--space-xs);
82
+ background: none;
83
+ border: none;
84
+ padding: 2px 0;
85
+ color: var(--text-tertiary);
86
+ font-size: 11px;
87
+ font-family: var(--font-mono);
88
+ cursor: pointer;
89
+ border-radius: var(--radius-sm);
90
+ transition: color var(--transition-fast);
91
+
92
+ &:hover {
93
+ color: var(--text-secondary);
94
+ }
95
+ }
96
+
97
+ .chevron {
98
+ display: inline-flex;
99
+ align-items: center;
100
+ transition: transform var(--transition-fast);
101
+ }
102
+
103
+ .chevronExpanded {
104
+ transform: rotate(90deg);
105
+ }
106
+
107
+ .pre {
108
+ @include surface-inset;
109
+ padding: var(--space-sm);
110
+ margin: var(--space-xs) 0 0;
111
+ overflow: auto;
112
+ max-height: 400px;
113
+ font-size: 11px;
114
+ font-family: var(--font-mono);
115
+ white-space: pre-wrap;
116
+ word-break: break-word;
117
+ line-height: 1.5;
118
+
119
+ @include mobile {
120
+ max-height: 250px;
121
+ font-size: 10px;
122
+ }
123
+ }
124
+
125
+ // --- Diff lines ---
126
+
127
+ .diffAdd {
128
+ background: rgba(46, 160, 67, 0.15);
129
+ color: var(--accent-green);
130
+
131
+ &::before {
132
+ content: '+';
133
+ display: inline-block;
134
+ width: 14px;
135
+ color: var(--accent-green);
136
+ flex-shrink: 0;
137
+ }
138
+ }
139
+
140
+ .diffRemove {
141
+ background: rgba(248, 81, 73, 0.15);
142
+ color: var(--accent-red);
143
+
144
+ &::before {
145
+ content: '−';
146
+ display: inline-block;
147
+ width: 14px;
148
+ color: var(--accent-red);
149
+ flex-shrink: 0;
150
+ }
151
+ }
152
+
153
+ .diffContext {
154
+ color: var(--text-secondary);
155
+
156
+ &::before {
157
+ content: ' ';
158
+ display: inline-block;
159
+ width: 14px;
160
+ }
161
+ }
162
+
163
+ .diffHeader {
164
+ color: var(--accent-blue);
165
+ font-weight: var(--font-weight-bold);
166
+ font-size: 10px;
167
+ }
168
+
169
+ .diffLine {
170
+ display: block;
171
+ padding: 0 var(--space-xs);
172
+ min-height: 1.5em;
173
+ }
174
+
175
+ // --- Exit code badges ---
176
+
177
+ .exitOk {
178
+ font-size: 10px;
179
+ font-weight: var(--font-weight-bold);
180
+ color: var(--accent-green);
181
+ }
182
+
183
+ .exitError {
184
+ font-size: 10px;
185
+ font-weight: var(--font-weight-bold);
186
+ color: var(--accent-red);
187
+ }
188
+
189
+ .exitPending {
190
+ font-size: 10px;
191
+ color: var(--text-tertiary);
192
+ animation: pulse 1.5s ease-in-out infinite;
193
+ }
194
+
195
+ @keyframes pulse {
196
+ 0%, 100% { opacity: 0.4; }
197
+ 50% { opacity: 1; }
198
+ }
199
+
200
+ // --- Copy button (inline in header row) ---
201
+
202
+ .copyButtonInline {
203
+ position: static !important;
204
+ flex-shrink: 0;
205
+ opacity: 0.4 !important;
206
+
207
+ &:hover {
208
+ opacity: 1 !important;
209
+ }
210
+
211
+ @include mobile {
212
+ opacity: 1 !important;
213
+ }
214
+ }
215
+
216
+ // --- In-progress / dimmed state ---
217
+
218
+ .inProgress {
219
+ opacity: 0.6;
220
+ }
221
+
222
+ // --- Metadata (inline, no card) ---
223
+
224
+ .metadata {
225
+ font-size: var(--font-size-sm);
226
+ color: var(--text-tertiary);
227
+ padding: 2px 0;
228
+ font-family: var(--font-mono);
229
+ }
230
+
231
+ .metadataPrefix {
232
+ color: var(--text-tertiary);
233
+ margin-right: var(--space-xs);
234
+ }
@@ -0,0 +1,238 @@
1
+ @use '../../styles/mixins' as *;
2
+
3
+ // =============================================================================
4
+ // WorkspaceBoard — Kanban-style board view
5
+ // =============================================================================
6
+
7
+ .boardContainer {
8
+ display: flex;
9
+ gap: var(--space-md);
10
+ padding: var(--space-md);
11
+ overflow-x: auto;
12
+ flex: 1;
13
+ min-height: 0;
14
+ align-items: flex-start;
15
+
16
+ @include mobile {
17
+ padding: var(--space-sm);
18
+ gap: var(--space-sm);
19
+ }
20
+ }
21
+
22
+ // ---------------------------------------------------------------------------
23
+ // Column
24
+ // ---------------------------------------------------------------------------
25
+
26
+ .column {
27
+ display: flex;
28
+ flex-direction: column;
29
+ min-width: 220px;
30
+ max-width: 300px;
31
+ flex: 1;
32
+ background: var(--bg-surface);
33
+ border-radius: var(--radius-md, 8px);
34
+ border: 1px solid var(--border-subtle);
35
+ overflow: hidden;
36
+
37
+ @include mobile {
38
+ min-width: 200px;
39
+ }
40
+ }
41
+
42
+ .columnHeader {
43
+ display: flex;
44
+ align-items: center;
45
+ gap: var(--space-xs);
46
+ padding: var(--space-sm) var(--space-md);
47
+ border-bottom: 1px solid var(--border-subtle);
48
+ font-family: var(--font-ui);
49
+ font-size: var(--font-size-sm);
50
+ font-weight: var(--font-weight-bold, 600);
51
+ color: var(--text-secondary);
52
+ user-select: none;
53
+ }
54
+
55
+ .columnIcon {
56
+ font-size: var(--font-size-base, 14px);
57
+ flex-shrink: 0;
58
+ }
59
+
60
+ .columnLabel {
61
+ flex: 1;
62
+ white-space: nowrap;
63
+ }
64
+
65
+ .columnCount {
66
+ font-size: var(--font-size-xs, 11px);
67
+ color: var(--text-tertiary);
68
+ background: var(--bg-overlay);
69
+ border-radius: var(--radius-sm, 4px);
70
+ padding: 1px 6px;
71
+ min-width: 20px;
72
+ text-align: center;
73
+ }
74
+
75
+ // ---------------------------------------------------------------------------
76
+ // Card list
77
+ // ---------------------------------------------------------------------------
78
+
79
+ .cardList {
80
+ display: flex;
81
+ flex-direction: column;
82
+ gap: var(--space-xs);
83
+ padding: var(--space-sm);
84
+ overflow-y: auto;
85
+ min-height: 40px;
86
+ }
87
+
88
+ // ---------------------------------------------------------------------------
89
+ // Empty column placeholder
90
+ // ---------------------------------------------------------------------------
91
+
92
+ .emptyPlaceholder {
93
+ display: flex;
94
+ align-items: center;
95
+ justify-content: center;
96
+ color: var(--text-tertiary);
97
+ font-size: var(--font-size-xs, 11px);
98
+ font-style: italic;
99
+ padding: var(--space-md) var(--space-sm);
100
+ }
101
+
102
+ // ---------------------------------------------------------------------------
103
+ // Card
104
+ // ---------------------------------------------------------------------------
105
+
106
+ .card {
107
+ display: flex;
108
+ flex-direction: column;
109
+ gap: var(--space-xs);
110
+ padding: var(--space-sm) var(--space-md);
111
+ background: var(--bg-panel);
112
+ border-radius: var(--radius-sm, 4px);
113
+ border: 1px solid var(--border-subtle);
114
+ cursor: pointer;
115
+ transition: background var(--transition-fast),
116
+ border-color var(--transition-fast),
117
+ box-shadow var(--transition-fast);
118
+ outline: none;
119
+
120
+ &:hover {
121
+ background: var(--bg-overlay);
122
+ border-color: var(--border-default);
123
+ }
124
+
125
+ &:focus-visible {
126
+ border-color: var(--accent-green);
127
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-green) 30%, transparent);
128
+ }
129
+ }
130
+
131
+ .cardHeader {
132
+ display: flex;
133
+ align-items: flex-start;
134
+ gap: var(--space-xs);
135
+ }
136
+
137
+ .cardStatusIcon {
138
+ flex-shrink: 0;
139
+ margin-top: 2px;
140
+ font-size: var(--font-size-sm, 13px);
141
+ }
142
+
143
+ .cardTitle {
144
+ font-size: var(--font-size-sm, 13px);
145
+ font-weight: var(--font-weight-medium, 500);
146
+ color: var(--text-primary);
147
+ word-break: break-word;
148
+ line-height: 1.3;
149
+ }
150
+
151
+ // ---------------------------------------------------------------------------
152
+ // Card badges
153
+ // ---------------------------------------------------------------------------
154
+
155
+ .cardBadges {
156
+ display: flex;
157
+ flex-wrap: wrap;
158
+ gap: var(--space-xs);
159
+ align-items: center;
160
+ }
161
+
162
+ .badge {
163
+ display: inline-flex;
164
+ align-items: center;
165
+ gap: 3px;
166
+ font-size: var(--font-size-xs, 11px);
167
+ padding: 1px 6px;
168
+ border-radius: var(--radius-sm, 4px);
169
+ background: var(--bg-overlay);
170
+ color: var(--text-secondary);
171
+ white-space: nowrap;
172
+ }
173
+
174
+ .blockedBadge {
175
+ color: var(--accent-yellow);
176
+ background: color-mix(in srgb, var(--accent-yellow) 12%, transparent);
177
+ }
178
+
179
+ .childBadge {
180
+ color: var(--text-tertiary);
181
+ }
182
+
183
+ .depBadge {
184
+ color: var(--text-tertiary);
185
+ }
186
+
187
+ .parentBadge {
188
+ color: var(--text-tertiary);
189
+ max-width: 120px;
190
+ overflow: hidden;
191
+ text-overflow: ellipsis;
192
+ }
193
+
194
+ .pausedSubBadge {
195
+ font-style: italic;
196
+ }
197
+
198
+ .personaBadge {
199
+ color: var(--accent-blue, var(--text-secondary));
200
+ }
201
+
202
+ .envBadge {
203
+ color: var(--text-tertiary);
204
+ }
205
+
206
+ // ---------------------------------------------------------------------------
207
+ // Empty workspace CTA (mirrors DagView/WorkspacePage pattern)
208
+ // ---------------------------------------------------------------------------
209
+
210
+ .emptyCta {
211
+ flex: 1;
212
+ display: flex;
213
+ flex-direction: column;
214
+ align-items: center;
215
+ justify-content: center;
216
+ gap: var(--space-sm);
217
+ animation: fadeIn 300ms ease;
218
+ }
219
+
220
+ .ctaButton {
221
+ @include surface-card;
222
+ padding: var(--space-sm) var(--space-lg);
223
+ border-radius: var(--radius-md, 8px);
224
+ color: var(--text-primary);
225
+ font-weight: var(--font-weight-medium, 500);
226
+ cursor: pointer;
227
+ border: 1px solid var(--border-subtle);
228
+ }
229
+
230
+ .ctaDescription {
231
+ color: var(--text-tertiary);
232
+ font-size: var(--font-size-sm);
233
+ }
234
+
235
+ @keyframes fadeIn {
236
+ from { opacity: 0; }
237
+ to { opacity: 1; }
238
+ }
@@ -0,0 +1,240 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { expect, userEvent } from "@storybook/test";
3
+ import { WorkspaceBoard } from "./WorkspaceBoard.js";
4
+ import { buildTask, buildEnvironment } from "../../test-utils/storybook-helpers.js";
5
+
6
+ const WORKSPACE_ID: string = "ws-board";
7
+ const ENVIRONMENT_ID: string = "env-board";
8
+
9
+ const meta: Meta<typeof WorkspaceBoard> = {
10
+ title: "Grackle/Workspace/WorkspaceBoard",
11
+ tags: ["autodocs"],
12
+ component: WorkspaceBoard,
13
+ args: {
14
+ workspaceId: WORKSPACE_ID,
15
+ environmentId: ENVIRONMENT_ID,
16
+ tasks: [],
17
+ sessions: [],
18
+ personas: [],
19
+ environments: [buildEnvironment({ id: ENVIRONMENT_ID })],
20
+ },
21
+ };
22
+
23
+ export default meta;
24
+
25
+ type Story = StoryObj<typeof WorkspaceBoard>;
26
+
27
+ /**
28
+ * When there are no tasks, the board shows an empty CTA with a "Create Task" button.
29
+ * Migrated from board-view.spec.ts: "empty workspace shows CTA on board view".
30
+ */
31
+ export const EmptyCta: Story = {
32
+ name: "Empty workspace shows CTA",
33
+ args: {
34
+ tasks: [],
35
+ },
36
+ play: async ({ canvas }) => {
37
+ const cta = canvas.getByTestId("board-empty-cta");
38
+ await expect(cta).toBeInTheDocument();
39
+
40
+ const createButton = canvas.getByRole("button", { name: "Create Task" });
41
+ await expect(createButton).toBeInTheDocument();
42
+ },
43
+ };
44
+
45
+ /**
46
+ * All five board columns are rendered even when only one has tasks.
47
+ * Migrated from board-view.spec.ts: "all five columns are always rendered".
48
+ */
49
+ export const AllFiveColumns: Story = {
50
+ name: "All five columns are rendered",
51
+ args: {
52
+ tasks: [
53
+ buildTask({ id: "t1", workspaceId: WORKSPACE_ID, title: "Only task", status: "not_started", sortOrder: 1 }),
54
+ ],
55
+ },
56
+ play: async ({ canvas }) => {
57
+ await expect(canvas.getByTestId("board-column-not_started")).toBeInTheDocument();
58
+ await expect(canvas.getByTestId("board-column-working")).toBeInTheDocument();
59
+ await expect(canvas.getByTestId("board-column-paused")).toBeInTheDocument();
60
+ await expect(canvas.getByTestId("board-column-complete")).toBeInTheDocument();
61
+ await expect(canvas.getByTestId("board-column-failed")).toBeInTheDocument();
62
+ },
63
+ };
64
+
65
+ /**
66
+ * Tasks appear in the correct column based on their status, with count badges.
67
+ * Migrated from board-view.spec.ts: "tasks appear in correct columns based on status".
68
+ */
69
+ export const TasksInCorrectColumns: Story = {
70
+ name: "Tasks in correct columns by status",
71
+ args: {
72
+ tasks: [
73
+ buildTask({ id: "t1", workspaceId: WORKSPACE_ID, title: "col-task-a", status: "not_started", sortOrder: 1 }),
74
+ buildTask({ id: "t2", workspaceId: WORKSPACE_ID, title: "col-task-b", status: "not_started", sortOrder: 2 }),
75
+ ],
76
+ },
77
+ play: async ({ canvas }) => {
78
+ const container = canvas.getByTestId("board-container");
79
+ await expect(container).toBeInTheDocument();
80
+
81
+ // Not Started column should exist and show count of 2
82
+ await expect(canvas.getByTestId("board-column-not_started")).toBeInTheDocument();
83
+ await expect(canvas.getByTestId("board-count-not_started")).toHaveTextContent("2");
84
+
85
+ // Other columns should show 0
86
+ await expect(canvas.getByTestId("board-count-working")).toHaveTextContent("0");
87
+ await expect(canvas.getByTestId("board-count-complete")).toHaveTextContent("0");
88
+ },
89
+ };
90
+
91
+ /**
92
+ * Clicking a board card triggers navigation (the onClick handler fires).
93
+ * Migrated from board-view.spec.ts: "clicking a card navigates to task detail".
94
+ */
95
+ export const CardClick: Story = {
96
+ name: "Card click triggers navigation",
97
+ args: {
98
+ tasks: [
99
+ buildTask({ id: "t-nav", workspaceId: WORKSPACE_ID, title: "board-nav-task", status: "not_started", sortOrder: 1 }),
100
+ ],
101
+ },
102
+ play: async ({ canvas }) => {
103
+ const container = canvas.getByTestId("board-container");
104
+ await expect(container).toBeInTheDocument();
105
+
106
+ // Click the card — in Storybook we verify the card element is clickable
107
+ const card = canvas.getByTestId("board-card-t-nav");
108
+ await expect(card).toBeInTheDocument();
109
+ await userEvent.click(card);
110
+ },
111
+ };
112
+
113
+ /**
114
+ * Board cards are focusable via keyboard and respond to Enter key.
115
+ * Migrated from board-view.spec.ts: "card is focusable via keyboard".
116
+ */
117
+ export const KeyboardFocus: Story = {
118
+ name: "Card is focusable via keyboard",
119
+ args: {
120
+ tasks: [
121
+ buildTask({ id: "t-focus", workspaceId: WORKSPACE_ID, title: "focus-task", status: "not_started", sortOrder: 1 }),
122
+ ],
123
+ },
124
+ play: async ({ canvas }) => {
125
+ const card = canvas.getByTestId("board-card-t-focus");
126
+ await expect(card).toBeInTheDocument();
127
+
128
+ // Card should have tabIndex and role="button"
129
+ await expect(card).toHaveAttribute("role", "button");
130
+
131
+ // Focus the card and verify it received focus
132
+ card.focus();
133
+ await expect(card).toHaveFocus();
134
+ },
135
+ };
136
+
137
+ /**
138
+ * Pressing Enter or Space on a focused card activates it.
139
+ */
140
+ export const KeyboardActivation: Story = {
141
+ name: "Enter/Space activates focused card",
142
+ args: {
143
+ tasks: [
144
+ buildTask({ id: "t-kb", workspaceId: WORKSPACE_ID, title: "kb-task", status: "not_started", sortOrder: 1 }),
145
+ ],
146
+ },
147
+ play: async ({ canvas }) => {
148
+ const card = canvas.getByTestId("board-card-t-kb");
149
+ card.focus();
150
+ await expect(card).toHaveFocus();
151
+
152
+ // Enter key should activate the card (trigger click handler)
153
+ await userEvent.keyboard("{Enter}");
154
+
155
+ // Space key should also activate the card
156
+ card.focus();
157
+ await userEvent.keyboard(" ");
158
+ },
159
+ };
160
+
161
+ /**
162
+ * A task with unresolved dependencies shows a "blocked" badge on its card.
163
+ * Migrated from board-view.spec.ts: "blocked task shows blocked badge in its status column".
164
+ */
165
+ export const BlockedBadge: Story = {
166
+ name: "Blocked task shows blocked badge",
167
+ args: {
168
+ tasks: [
169
+ buildTask({
170
+ id: "t-blocker",
171
+ workspaceId: WORKSPACE_ID,
172
+ title: "blocker-task",
173
+ status: "not_started",
174
+ sortOrder: 1,
175
+ }),
176
+ buildTask({
177
+ id: "t-blocked",
178
+ workspaceId: WORKSPACE_ID,
179
+ title: "blocked-task",
180
+ status: "not_started",
181
+ dependsOn: ["t-blocker"],
182
+ sortOrder: 2,
183
+ }),
184
+ ],
185
+ },
186
+ play: async ({ canvas }) => {
187
+ // Both tasks should be in Not Started column
188
+ await expect(canvas.getByTestId("board-count-not_started")).toHaveTextContent("2");
189
+
190
+ // The blocked task card should display a "blocked" badge
191
+ const blockedCard = canvas.getByTestId("board-card-t-blocked");
192
+ await expect(blockedCard).toBeInTheDocument();
193
+ await expect(blockedCard).toHaveTextContent(/blocked/);
194
+ },
195
+ };
196
+
197
+ /**
198
+ * A parent task with children shows a child progress badge like "0/2".
199
+ * Migrated from board-view.spec.ts: "child progress badge shows on parent cards".
200
+ */
201
+ export const ChildProgressBadge: Story = {
202
+ name: "Child progress badge on parent cards",
203
+ args: {
204
+ tasks: [
205
+ buildTask({
206
+ id: "t-parent",
207
+ workspaceId: WORKSPACE_ID,
208
+ title: "parent-task",
209
+ status: "not_started",
210
+ canDecompose: true,
211
+ childTaskIds: ["t-child-1", "t-child-2"],
212
+ sortOrder: 1,
213
+ }),
214
+ buildTask({
215
+ id: "t-child-1",
216
+ workspaceId: WORKSPACE_ID,
217
+ title: "child-1",
218
+ status: "not_started",
219
+ parentTaskId: "t-parent",
220
+ depth: 1,
221
+ sortOrder: 1,
222
+ }),
223
+ buildTask({
224
+ id: "t-child-2",
225
+ workspaceId: WORKSPACE_ID,
226
+ title: "child-2",
227
+ status: "not_started",
228
+ parentTaskId: "t-parent",
229
+ depth: 1,
230
+ sortOrder: 2,
231
+ }),
232
+ ],
233
+ },
234
+ play: async ({ canvas }) => {
235
+ // Parent card should show child progress badge "0/2"
236
+ const parentCard = canvas.getByTestId("board-card-t-parent");
237
+ await expect(parentCard).toBeInTheDocument();
238
+ await expect(parentCard).toHaveTextContent("0/2");
239
+ },
240
+ };