@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.
- package/.rush/temp/3ae72563f781afd72723475938136f113846603e.untar.log +10 -0
- package/.rush/temp/bc1d5bf9201ce71abeaeaddd096deb9b0805d703.untar.log +10 -0
- package/.rush/temp/operation/_phase_build/all.log +18 -0
- package/.rush/temp/operation/_phase_build/log-chunks.jsonl +18 -0
- package/.rush/temp/operation/_phase_build/state.json +3 -0
- package/.rush/temp/operation/_phase_test/all.log +121 -0
- package/.rush/temp/operation/_phase_test/log-chunks.jsonl +121 -0
- package/.rush/temp/operation/_phase_test/state.json +3 -0
- package/.rush/temp/shrinkwrap-deps.json +938 -0
- package/.storybook/main.ts +22 -0
- package/.storybook/preview.tsx +30 -0
- package/config/rig.json +4 -0
- package/config/rush-project.json +12 -0
- package/dist/index.css +1 -0
- package/dist/index.js +39221 -0
- package/eslint.config.cjs +5 -0
- package/package.json +83 -0
- package/rush-logs/web-components._phase_build.cache.log +4 -0
- package/rush-logs/web-components._phase_test.cache.log +4 -0
- package/src/components/chat/ChatInput.module.scss +81 -0
- package/src/components/chat/ChatInput.stories.tsx +91 -0
- package/src/components/chat/ChatInput.tsx +168 -0
- package/src/components/chat/index.ts +6 -0
- package/src/components/dag/DagView.module.scss +149 -0
- package/src/components/dag/DagView.stories.tsx +125 -0
- package/src/components/dag/DagView.tsx +109 -0
- package/src/components/dag/TaskNode.stories.tsx +133 -0
- package/src/components/dag/TaskNode.tsx +40 -0
- package/src/components/dag/useDagLayout.ts +139 -0
- package/src/components/display/Breadcrumbs.module.scss +71 -0
- package/src/components/display/Breadcrumbs.stories.tsx +80 -0
- package/src/components/display/Breadcrumbs.tsx +46 -0
- package/src/components/display/Button.module.scss +110 -0
- package/src/components/display/Button.stories.tsx +88 -0
- package/src/components/display/Button.tsx +40 -0
- package/src/components/display/ConfirmDialog.module.scss +67 -0
- package/src/components/display/ConfirmDialog.stories.tsx +81 -0
- package/src/components/display/ConfirmDialog.tsx +88 -0
- package/src/components/display/CopyButton.module.scss +41 -0
- package/src/components/display/CopyButton.stories.tsx +78 -0
- package/src/components/display/CopyButton.tsx +64 -0
- package/src/components/display/DemoBanner.module.scss +37 -0
- package/src/components/display/DemoBanner.stories.tsx +40 -0
- package/src/components/display/DemoBanner.tsx +23 -0
- package/src/components/display/EventHoverRow.module.scss +102 -0
- package/src/components/display/EventHoverRow.stories.tsx +99 -0
- package/src/components/display/EventHoverRow.tsx +154 -0
- package/src/components/display/EventRenderer.module.scss +272 -0
- package/src/components/display/EventRenderer.stories.tsx +186 -0
- package/src/components/display/EventRenderer.tsx +271 -0
- package/src/components/display/EventStream.module.scss +93 -0
- package/src/components/display/EventStream.stories.tsx +249 -0
- package/src/components/display/EventStream.tsx +369 -0
- package/src/components/display/FloatingActionBar.module.scss +107 -0
- package/src/components/display/FloatingActionBar.stories.tsx +122 -0
- package/src/components/display/FloatingActionBar.tsx +119 -0
- package/src/components/display/SessionAttemptSelector.module.scss +50 -0
- package/src/components/display/SessionAttemptSelector.stories.tsx +78 -0
- package/src/components/display/SessionAttemptSelector.tsx +49 -0
- package/src/components/display/SessionPicker.module.scss +200 -0
- package/src/components/display/SessionPicker.stories.tsx +169 -0
- package/src/components/display/SessionPicker.tsx +214 -0
- package/src/components/display/Skeleton.module.scss +58 -0
- package/src/components/display/Skeleton.stories.tsx +94 -0
- package/src/components/display/Skeleton.tsx +127 -0
- package/src/components/display/Spinner.module.scss +41 -0
- package/src/components/display/Spinner.stories.tsx +66 -0
- package/src/components/display/Spinner.tsx +32 -0
- package/src/components/display/SplashScreen.module.scss +20 -0
- package/src/components/display/SplashScreen.stories.tsx +26 -0
- package/src/components/display/SplashScreen.tsx +16 -0
- package/src/components/display/SplitButton.module.scss +166 -0
- package/src/components/display/SplitButton.stories.tsx +95 -0
- package/src/components/display/SplitButton.tsx +128 -0
- package/src/components/display/Tooltip.module.scss +84 -0
- package/src/components/display/Tooltip.stories.tsx +240 -0
- package/src/components/display/Tooltip.tsx +184 -0
- package/src/components/display/extractText.test.tsx +48 -0
- package/src/components/display/index.ts +20 -0
- package/src/components/editable/EditableCheckbox.stories.tsx +54 -0
- package/src/components/editable/EditableCheckbox.tsx +39 -0
- package/src/components/editable/EditableField.module.scss +135 -0
- package/src/components/editable/EditableSelect.tsx +164 -0
- package/src/components/editable/EditableTextArea.stories.tsx +50 -0
- package/src/components/editable/EditableTextArea.tsx +148 -0
- package/src/components/editable/EditableTextField.stories.tsx +62 -0
- package/src/components/editable/EditableTextField.tsx +153 -0
- package/src/components/editable/EnvironmentSelect.module.scss +17 -0
- package/src/components/editable/EnvironmentSelect.stories.tsx +61 -0
- package/src/components/editable/EnvironmentSelect.tsx +87 -0
- package/src/components/editable/index.ts +13 -0
- package/src/components/editable/useEditableField.test.tsx +233 -0
- package/src/components/editable/useEditableField.ts +173 -0
- package/src/components/index.ts +20 -0
- package/src/components/knowledge/KnowledgeDetailPanel.module.scss +162 -0
- package/src/components/knowledge/KnowledgeDetailPanel.stories.tsx +208 -0
- package/src/components/knowledge/KnowledgeDetailPanel.tsx +122 -0
- package/src/components/knowledge/KnowledgeGraph.module.scss +110 -0
- package/src/components/knowledge/KnowledgeGraph.stories.tsx +180 -0
- package/src/components/knowledge/KnowledgeGraph.tsx +455 -0
- package/src/components/knowledge/KnowledgeNav.module.scss +130 -0
- package/src/components/knowledge/KnowledgeNav.stories.tsx +108 -0
- package/src/components/knowledge/KnowledgeNav.tsx +138 -0
- package/src/components/knowledge/index.ts +3 -0
- package/src/components/layout/AppNav.module.scss +82 -0
- package/src/components/layout/AppNav.stories.tsx +115 -0
- package/src/components/layout/AppNav.tsx +133 -0
- package/src/components/layout/BottomStatusBar.module.scss +58 -0
- package/src/components/layout/BottomStatusBar.stories.tsx +35 -0
- package/src/components/layout/BottomStatusBar.tsx +206 -0
- package/src/components/layout/Sidebar.module.scss +60 -0
- package/src/components/layout/Sidebar.stories.tsx +46 -0
- package/src/components/layout/Sidebar.tsx +84 -0
- package/src/components/layout/StatusBar.module.scss +108 -0
- package/src/components/layout/StatusBar.stories.tsx +119 -0
- package/src/components/layout/StatusBar.tsx +70 -0
- package/src/components/layout/index.ts +9 -0
- package/src/components/lists/EnvironmentNav.module.scss +118 -0
- package/src/components/lists/EnvironmentNav.stories.tsx +121 -0
- package/src/components/lists/EnvironmentNav.tsx +133 -0
- package/src/components/lists/FindingsNav.module.scss +126 -0
- package/src/components/lists/FindingsNav.tsx +146 -0
- package/src/components/lists/TaskList.module.scss +206 -0
- package/src/components/lists/TaskList.stories.tsx +401 -0
- package/src/components/lists/TaskList.tsx +509 -0
- package/src/components/lists/index.ts +6 -0
- package/src/components/lists/listHelpers.tsx +130 -0
- package/src/components/notifications/Callout.module.scss +83 -0
- package/src/components/notifications/Callout.stories.tsx +81 -0
- package/src/components/notifications/Callout.tsx +64 -0
- package/src/components/notifications/Toast.module.scss +86 -0
- package/src/components/notifications/Toast.stories.tsx +71 -0
- package/src/components/notifications/Toast.tsx +51 -0
- package/src/components/notifications/ToastContainer.module.scss +23 -0
- package/src/components/notifications/ToastContainer.stories.tsx +66 -0
- package/src/components/notifications/ToastContainer.tsx +29 -0
- package/src/components/notifications/UpdateBanner.stories.tsx +77 -0
- package/src/components/notifications/UpdateBanner.test.tsx +64 -0
- package/src/components/notifications/UpdateBanner.tsx +44 -0
- package/src/components/notifications/index.ts +8 -0
- package/src/components/panels/AboutPanel.stories.tsx +70 -0
- package/src/components/panels/AboutPanel.tsx +66 -0
- package/src/components/panels/AppearancePanel.stories.tsx +45 -0
- package/src/components/panels/AppearancePanel.tsx +97 -0
- package/src/components/panels/CredentialProvidersPanel.stories.tsx +62 -0
- package/src/components/panels/CredentialProvidersPanel.tsx +111 -0
- package/src/components/panels/EnvironmentEditPanel.module.scss +170 -0
- package/src/components/panels/EnvironmentEditPanel.stories.tsx +206 -0
- package/src/components/panels/EnvironmentEditPanel.tsx +785 -0
- package/src/components/panels/FindingsPanel.module.scss +94 -0
- package/src/components/panels/FindingsPanel.stories.tsx +109 -0
- package/src/components/panels/FindingsPanel.tsx +76 -0
- package/src/components/panels/KeyboardShortcutsPanel.module.scss +65 -0
- package/src/components/panels/KeyboardShortcutsPanel.stories.tsx +40 -0
- package/src/components/panels/KeyboardShortcutsPanel.tsx +104 -0
- package/src/components/panels/PluginsPanel.tsx +77 -0
- package/src/components/panels/SettingsPanel.module.scss +336 -0
- package/src/components/panels/TaskActionButtons.module.scss +22 -0
- package/src/components/panels/TaskActionButtons.stories.tsx +125 -0
- package/src/components/panels/TaskActionButtons.tsx +87 -0
- package/src/components/panels/TaskEditPanel.module.scss +202 -0
- package/src/components/panels/TaskEditPanel.stories.tsx +75 -0
- package/src/components/panels/TaskEditPanel.tsx +328 -0
- package/src/components/panels/TaskOverviewPanel.module.scss +236 -0
- package/src/components/panels/TaskOverviewPanel.stories.tsx +219 -0
- package/src/components/panels/TaskOverviewPanel.tsx +270 -0
- package/src/components/panels/TokensPanel.stories.tsx +131 -0
- package/src/components/panels/TokensPanel.tsx +143 -0
- package/src/components/panels/WorkpadPanel.module.scss +39 -0
- package/src/components/panels/WorkpadPanel.stories.tsx +56 -0
- package/src/components/panels/WorkpadPanel.tsx +63 -0
- package/src/components/panels/index.ts +13 -0
- package/src/components/personas/McpToolSelector.module.scss +109 -0
- package/src/components/personas/McpToolSelector.stories.tsx +129 -0
- package/src/components/personas/McpToolSelector.tsx +180 -0
- package/src/components/personas/PersonaManager.module.scss +233 -0
- package/src/components/personas/PersonaManager.stories.tsx +139 -0
- package/src/components/personas/PersonaManager.tsx +122 -0
- package/src/components/schedules/ScheduleManager.module.scss +98 -0
- package/src/components/schedules/ScheduleManager.stories.tsx +78 -0
- package/src/components/schedules/ScheduleManager.tsx +160 -0
- package/src/components/settings/SettingsNav.module.scss +82 -0
- package/src/components/settings/SettingsNav.stories.tsx +83 -0
- package/src/components/settings/SettingsNav.tsx +104 -0
- package/src/components/streams/StreamDetailPanel.module.scss +206 -0
- package/src/components/streams/StreamDetailPanel.stories.tsx +132 -0
- package/src/components/streams/StreamDetailPanel.tsx +119 -0
- package/src/components/streams/StreamList.module.scss +92 -0
- package/src/components/streams/StreamList.stories.tsx +99 -0
- package/src/components/streams/StreamList.tsx +114 -0
- package/src/components/streams/index.ts +10 -0
- package/src/components/tools/AgentToolCard.module.scss +118 -0
- package/src/components/tools/AgentToolCard.stories.tsx +304 -0
- package/src/components/tools/AgentToolCard.tsx +247 -0
- package/src/components/tools/FileEditCard.stories.tsx +138 -0
- package/src/components/tools/FileEditCard.tsx +160 -0
- package/src/components/tools/FileReadCard.stories.tsx +120 -0
- package/src/components/tools/FileReadCard.tsx +106 -0
- package/src/components/tools/FindingCard.stories.tsx +124 -0
- package/src/components/tools/FindingCard.tsx +178 -0
- package/src/components/tools/GenericToolCard.stories.tsx +80 -0
- package/src/components/tools/GenericToolCard.tsx +111 -0
- package/src/components/tools/IpcCard.stories.tsx +129 -0
- package/src/components/tools/IpcCard.tsx +178 -0
- package/src/components/tools/KnowledgeCard.stories.tsx +112 -0
- package/src/components/tools/KnowledgeCard.tsx +165 -0
- package/src/components/tools/MetadataCard.stories.tsx +32 -0
- package/src/components/tools/MetadataCard.tsx +39 -0
- package/src/components/tools/SearchCard.stories.tsx +74 -0
- package/src/components/tools/SearchCard.tsx +86 -0
- package/src/components/tools/ShellCard.stories.tsx +112 -0
- package/src/components/tools/ShellCard.tsx +106 -0
- package/src/components/tools/TaskCard.stories.tsx +123 -0
- package/src/components/tools/TaskCard.tsx +203 -0
- package/src/components/tools/TodoCard.module.scss +131 -0
- package/src/components/tools/TodoCard.stories.tsx +202 -0
- package/src/components/tools/TodoCard.tsx +200 -0
- package/src/components/tools/ToolCard.stories.tsx +177 -0
- package/src/components/tools/ToolCard.tsx +60 -0
- package/src/components/tools/ToolCardProps.ts +20 -0
- package/src/components/tools/ToolSearchCard.stories.tsx +81 -0
- package/src/components/tools/ToolSearchCard.tsx +86 -0
- package/src/components/tools/WorkpadCard.stories.tsx +106 -0
- package/src/components/tools/WorkpadCard.tsx +125 -0
- package/src/components/tools/classifyTool.test.ts +44 -0
- package/src/components/tools/classifyTool.ts +134 -0
- package/src/components/tools/parseDiff.ts +95 -0
- package/src/components/tools/parseShellOutput.ts +28 -0
- package/src/components/tools/toolCardHelpers.test.ts +53 -0
- package/src/components/tools/toolCards.module.scss +234 -0
- package/src/components/workspace/WorkspaceBoard.module.scss +238 -0
- package/src/components/workspace/WorkspaceBoard.stories.tsx +240 -0
- package/src/components/workspace/WorkspaceBoard.tsx +232 -0
- package/src/components/workspace/WorkspaceFormFields.module.scss +79 -0
- package/src/components/workspace/WorkspaceFormFields.stories.tsx +133 -0
- package/src/components/workspace/WorkspaceFormFields.tsx +185 -0
- package/src/context/GrackleContext.ts +28 -0
- package/src/context/GrackleContextTypes.ts +64 -0
- package/src/context/SidebarContext.tsx +53 -0
- package/src/context/ThemeContext.tsx +21 -0
- package/src/context/ToastContext.tsx +56 -0
- package/src/hooks/types.ts +864 -0
- package/src/hooks/useEventSelection.test.ts +204 -0
- package/src/hooks/useEventSelection.ts +158 -0
- package/src/hooks/useSmartScroll.ts +151 -0
- package/src/hooks/useTheme.ts +228 -0
- package/src/index.ts +210 -0
- package/src/mocks/MockGrackleProvider.tsx +1397 -0
- package/src/mocks/mockData.ts +1966 -0
- package/src/mocks/mockKnowledgeData.ts +294 -0
- package/src/scss.d.ts +12 -0
- package/src/styles/global.scss +244 -0
- package/src/styles/mixins.scss +278 -0
- package/src/styles/prism-theme.scss +148 -0
- package/src/styles/theme.scss +1102 -0
- package/src/test-utils/storybook-decorators.tsx +50 -0
- package/src/test-utils/storybook-helpers.ts +262 -0
- package/src/themes.ts +142 -0
- package/src/utils/boardColumns.ts +141 -0
- package/src/utils/breadcrumbs.test.ts +285 -0
- package/src/utils/breadcrumbs.ts +222 -0
- package/src/utils/dashboard.test.ts +156 -0
- package/src/utils/dashboard.ts +195 -0
- package/src/utils/eventContent.test.ts +353 -0
- package/src/utils/eventContent.ts +209 -0
- package/src/utils/findingCategory.ts +33 -0
- package/src/utils/format.ts +27 -0
- package/src/utils/iconSize.ts +18 -0
- package/src/utils/navigation.ts +205 -0
- package/src/utils/route-config.test.ts +128 -0
- package/src/utils/scrollUtils.test.ts +65 -0
- package/src/utils/scrollUtils.ts +49 -0
- package/src/utils/sessionEvents.test.ts +302 -0
- package/src/utils/sessionEvents.ts +233 -0
- package/src/utils/taskStatus.tsx +137 -0
- package/src/utils/time.ts +92 -0
- package/tsconfig.json +8 -0
- package/vite.config.ts +20 -0
- package/vitest.config.ts +10 -0
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
@use '../../styles/mixins' as *;
|
|
2
|
+
|
|
3
|
+
.overviewDashboard {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
gap: var(--space-lg);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.overviewHero {
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
gap: var(--space-sm);
|
|
13
|
+
flex-wrap: wrap;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// Status badge
|
|
17
|
+
.statusBadge {
|
|
18
|
+
display: inline-block;
|
|
19
|
+
padding: var(--space-xs) var(--space-md);
|
|
20
|
+
border-radius: var(--radius-full);
|
|
21
|
+
font-size: var(--font-size-sm);
|
|
22
|
+
font-family: var(--font-sans);
|
|
23
|
+
font-weight: var(--font-weight-bold);
|
|
24
|
+
letter-spacing: 0.04em;
|
|
25
|
+
text-transform: uppercase;
|
|
26
|
+
border: 1px solid currentColor;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.statusPending {
|
|
30
|
+
color: var(--text-tertiary);
|
|
31
|
+
background: rgba(107, 122, 141, 0.12);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.statusAssigned {
|
|
35
|
+
color: var(--accent-yellow);
|
|
36
|
+
background: var(--accent-yellow-dim);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.statusInProgress {
|
|
40
|
+
color: var(--accent-blue);
|
|
41
|
+
background: var(--accent-blue-dim);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.statusReview {
|
|
45
|
+
color: var(--accent-purple);
|
|
46
|
+
background: var(--accent-purple-dim);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.statusDone {
|
|
50
|
+
color: var(--accent-green);
|
|
51
|
+
background: var(--accent-green-dim);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.statusFailed {
|
|
55
|
+
color: var(--accent-red);
|
|
56
|
+
background: var(--accent-red-dim);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.statusWaitingInput {
|
|
60
|
+
color: var(--accent-yellow);
|
|
61
|
+
background: var(--accent-yellow-dim);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// Branch pill
|
|
65
|
+
.overviewBranchPill {
|
|
66
|
+
@include surface-inset;
|
|
67
|
+
display: inline-flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
padding: 2px var(--space-sm);
|
|
70
|
+
font-size: var(--font-size-sm);
|
|
71
|
+
font-family: var(--font-mono);
|
|
72
|
+
color: var(--text-secondary);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.branchLink {
|
|
76
|
+
color: var(--accent-blue);
|
|
77
|
+
text-decoration: none;
|
|
78
|
+
font-family: var(--font-mono);
|
|
79
|
+
font-size: var(--font-size-sm);
|
|
80
|
+
|
|
81
|
+
&:hover {
|
|
82
|
+
text-decoration: underline;
|
|
83
|
+
color: var(--accent-cyan);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// Sections
|
|
88
|
+
.overviewSection {
|
|
89
|
+
display: flex;
|
|
90
|
+
flex-direction: column;
|
|
91
|
+
gap: var(--space-xs);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.overviewLabel {
|
|
95
|
+
font-size: 11px;
|
|
96
|
+
color: var(--text-tertiary);
|
|
97
|
+
text-transform: uppercase;
|
|
98
|
+
letter-spacing: 0.05em;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.overviewValue {
|
|
102
|
+
font-size: var(--font-size-sm);
|
|
103
|
+
color: var(--text-secondary);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.overviewMuted {
|
|
107
|
+
font-size: var(--font-size-sm);
|
|
108
|
+
color: var(--text-tertiary);
|
|
109
|
+
font-style: italic;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// Markdown description
|
|
113
|
+
.overviewMarkdown {
|
|
114
|
+
font-size: var(--font-size-sm);
|
|
115
|
+
color: var(--text-secondary);
|
|
116
|
+
line-height: 1.6;
|
|
117
|
+
|
|
118
|
+
p { margin: 0 0 var(--space-sm) 0; }
|
|
119
|
+
p:last-child { margin-bottom: 0; }
|
|
120
|
+
ul, ol { margin: 0 0 var(--space-sm) var(--space-lg); padding: 0; }
|
|
121
|
+
li { margin-bottom: var(--space-xs); }
|
|
122
|
+
code {
|
|
123
|
+
@include surface-inset;
|
|
124
|
+
padding: 1px var(--space-xs);
|
|
125
|
+
font-family: var(--font-mono);
|
|
126
|
+
font-size: 0.9em;
|
|
127
|
+
color: var(--accent-cyan);
|
|
128
|
+
}
|
|
129
|
+
pre {
|
|
130
|
+
@include surface-inset;
|
|
131
|
+
padding: var(--space-sm) var(--space-md);
|
|
132
|
+
overflow: auto;
|
|
133
|
+
margin: var(--space-xs) 0;
|
|
134
|
+
code { background: none; border: none; padding: 0; color: inherit; }
|
|
135
|
+
}
|
|
136
|
+
blockquote {
|
|
137
|
+
border-left: 3px solid var(--border-primary);
|
|
138
|
+
margin: 0 0 var(--space-sm) 0;
|
|
139
|
+
padding-left: var(--space-md);
|
|
140
|
+
color: var(--text-tertiary);
|
|
141
|
+
}
|
|
142
|
+
h1, h2, h3, h4, h5, h6 {
|
|
143
|
+
color: var(--text-primary);
|
|
144
|
+
margin: var(--space-sm) 0 var(--space-xs) 0;
|
|
145
|
+
font-size: var(--font-size-sm);
|
|
146
|
+
}
|
|
147
|
+
strong { color: var(--text-primary); }
|
|
148
|
+
a { color: var(--accent-blue); text-decoration: none;
|
|
149
|
+
&:hover { text-decoration: underline; }
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// Environment row with status dot
|
|
154
|
+
.envRow {
|
|
155
|
+
display: flex;
|
|
156
|
+
align-items: center;
|
|
157
|
+
gap: var(--space-sm);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.envDot {
|
|
161
|
+
width: 8px;
|
|
162
|
+
height: 8px;
|
|
163
|
+
border-radius: 50%;
|
|
164
|
+
flex-shrink: 0;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.envDotGreen { background: var(--accent-green); }
|
|
168
|
+
.envDotYellow { background: var(--accent-yellow); }
|
|
169
|
+
.envDotRed { background: var(--accent-red); }
|
|
170
|
+
.envDotGray { background: var(--text-disabled); }
|
|
171
|
+
|
|
172
|
+
// Dependencies
|
|
173
|
+
.depList {
|
|
174
|
+
display: flex;
|
|
175
|
+
flex-direction: column;
|
|
176
|
+
gap: var(--space-xs);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.depItem {
|
|
180
|
+
display: flex;
|
|
181
|
+
align-items: center;
|
|
182
|
+
gap: var(--space-sm);
|
|
183
|
+
font-size: var(--font-size-sm);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.depBlocked {
|
|
187
|
+
color: var(--accent-yellow);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.depDone {
|
|
191
|
+
color: var(--accent-green);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
// Timeline
|
|
195
|
+
.timeline {
|
|
196
|
+
display: flex;
|
|
197
|
+
flex-direction: column;
|
|
198
|
+
gap: var(--space-xs);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.timelineRow {
|
|
202
|
+
display: flex;
|
|
203
|
+
align-items: baseline;
|
|
204
|
+
gap: var(--space-sm);
|
|
205
|
+
font-size: var(--font-size-sm);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.timelineKey {
|
|
209
|
+
color: var(--text-tertiary);
|
|
210
|
+
min-width: 72px;
|
|
211
|
+
flex-shrink: 0;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.timelineValue {
|
|
215
|
+
color: var(--text-secondary);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.timelineDelta {
|
|
219
|
+
color: var(--text-tertiary);
|
|
220
|
+
font-size: 11px;
|
|
221
|
+
|
|
222
|
+
&::before { content: "("; }
|
|
223
|
+
&::after { content: ")"; }
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
// Review notes
|
|
227
|
+
.reviewNotes {
|
|
228
|
+
font-size: var(--font-size-sm);
|
|
229
|
+
color: var(--accent-yellow);
|
|
230
|
+
background: var(--accent-yellow-dim);
|
|
231
|
+
border: 1px solid var(--accent-yellow-border);
|
|
232
|
+
border-radius: var(--radius-sm);
|
|
233
|
+
padding: var(--space-sm) var(--space-md);
|
|
234
|
+
white-space: pre-wrap;
|
|
235
|
+
line-height: 1.5;
|
|
236
|
+
}
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { expect } from "@storybook/test";
|
|
3
|
+
import { TaskOverviewPanel } from "./TaskOverviewPanel.js";
|
|
4
|
+
import type { TaskData, Workspace, Environment, Session } from "../../hooks/types.js";
|
|
5
|
+
import { makeTask, makeEnvironment, makeSession, makeWorkspace } from "../../test-utils/storybook-helpers.js";
|
|
6
|
+
|
|
7
|
+
const defaultTask: TaskData = makeTask({
|
|
8
|
+
id: "t-1",
|
|
9
|
+
workspaceId: "ws-1",
|
|
10
|
+
title: "Implement auth",
|
|
11
|
+
description: "Add **OAuth2** login flow with refresh tokens.",
|
|
12
|
+
status: "working",
|
|
13
|
+
branch: "feat/auth",
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
const workspace: Workspace = makeWorkspace({
|
|
17
|
+
id: "ws-1",
|
|
18
|
+
name: "My Workspace",
|
|
19
|
+
repoUrl: "https://github.com/example/repo",
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
const env: Environment = makeEnvironment({ id: "env-1", displayName: "Local Dev", status: "connected" });
|
|
23
|
+
const session: Session = makeSession({ id: "sess-1", environmentId: "env-1" });
|
|
24
|
+
|
|
25
|
+
const meta: Meta<typeof TaskOverviewPanel> = {
|
|
26
|
+
title: "Grackle/Panels/TaskOverviewPanel",
|
|
27
|
+
component: TaskOverviewPanel,
|
|
28
|
+
tags: ["autodocs"],
|
|
29
|
+
args: {
|
|
30
|
+
task: defaultTask,
|
|
31
|
+
tasksById: new Map([[defaultTask.id, defaultTask]]),
|
|
32
|
+
environments: [env],
|
|
33
|
+
workspaces: [workspace],
|
|
34
|
+
taskSessions: [session],
|
|
35
|
+
selectedEnvId: "env-1",
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export default meta;
|
|
40
|
+
type Story = StoryObj<typeof TaskOverviewPanel>;
|
|
41
|
+
|
|
42
|
+
/** Renders status badge, branch link (with repo URL), and markdown description. */
|
|
43
|
+
export const BasicOverview: Story = {
|
|
44
|
+
play: async ({ canvas }) => {
|
|
45
|
+
await expect(canvas.getByTestId("task-overview-panel")).toBeInTheDocument();
|
|
46
|
+
await expect(canvas.getByTestId("task-overview-status-badge")).toBeInTheDocument();
|
|
47
|
+
// Branch pill should contain a link since workspace has repoUrl
|
|
48
|
+
const branchPill = canvas.getByTestId("task-overview-branch");
|
|
49
|
+
await expect(branchPill).toBeInTheDocument();
|
|
50
|
+
const link = branchPill.querySelector("a");
|
|
51
|
+
await expect(link).not.toBeNull();
|
|
52
|
+
// Markdown bold renders
|
|
53
|
+
await expect(canvas.getByText("OAuth2")).toBeInTheDocument();
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/** All four timeline timestamps render with delta labels. */
|
|
58
|
+
export const WithTimeline: Story = {
|
|
59
|
+
args: {
|
|
60
|
+
task: makeTask({
|
|
61
|
+
id: "t-tl",
|
|
62
|
+
status: "complete",
|
|
63
|
+
createdAt: "2026-01-01T10:00:00Z",
|
|
64
|
+
assignedAt: "2026-01-01T10:05:00Z",
|
|
65
|
+
startedAt: "2026-01-01T10:06:00Z",
|
|
66
|
+
completedAt: "2026-01-01T10:36:00Z",
|
|
67
|
+
}),
|
|
68
|
+
taskSessions: [],
|
|
69
|
+
},
|
|
70
|
+
play: async ({ canvas }) => {
|
|
71
|
+
const timeline = canvas.getByTestId("task-overview-timeline");
|
|
72
|
+
await expect(timeline).toBeInTheDocument();
|
|
73
|
+
await expect(canvas.getByText("Created")).toBeInTheDocument();
|
|
74
|
+
await expect(canvas.getByText("Assigned")).toBeInTheDocument();
|
|
75
|
+
await expect(canvas.getByText("Started")).toBeInTheDocument();
|
|
76
|
+
await expect(canvas.getByText("Completed")).toBeInTheDocument();
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
/** Only created and started timestamps render when others are missing. */
|
|
81
|
+
export const PartialTimeline: Story = {
|
|
82
|
+
args: {
|
|
83
|
+
task: makeTask({
|
|
84
|
+
id: "t-pt",
|
|
85
|
+
status: "working",
|
|
86
|
+
createdAt: "2026-01-01T10:00:00Z",
|
|
87
|
+
startedAt: "2026-01-01T10:10:00Z",
|
|
88
|
+
}),
|
|
89
|
+
taskSessions: [],
|
|
90
|
+
},
|
|
91
|
+
play: async ({ canvas }) => {
|
|
92
|
+
await expect(canvas.getByText("Created")).toBeInTheDocument();
|
|
93
|
+
await expect(canvas.getByText("Started")).toBeInTheDocument();
|
|
94
|
+
await expect(canvas.queryByText("Assigned")).toBeNull();
|
|
95
|
+
await expect(canvas.queryByText("Completed")).toBeNull();
|
|
96
|
+
},
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
/** Shows "No timing data" when no timestamps are set. */
|
|
100
|
+
export const NoTimeline: Story = {
|
|
101
|
+
args: {
|
|
102
|
+
task: makeTask({
|
|
103
|
+
id: "t-nt",
|
|
104
|
+
status: "not_started",
|
|
105
|
+
createdAt: "",
|
|
106
|
+
}),
|
|
107
|
+
taskSessions: [],
|
|
108
|
+
},
|
|
109
|
+
play: async ({ canvas }) => {
|
|
110
|
+
await expect(canvas.getByText("No timing data")).toBeInTheDocument();
|
|
111
|
+
},
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
/** Dependencies render with check/circle status indicators. */
|
|
115
|
+
export const WithDependencies: Story = {
|
|
116
|
+
args: {
|
|
117
|
+
task: makeTask({
|
|
118
|
+
id: "t-dep",
|
|
119
|
+
status: "not_started",
|
|
120
|
+
dependsOn: ["dep-a", "dep-b"],
|
|
121
|
+
}),
|
|
122
|
+
tasksById: new Map([
|
|
123
|
+
["dep-a", makeTask({ id: "dep-a", title: "Setup DB", status: "complete" })],
|
|
124
|
+
["dep-b", makeTask({ id: "dep-b", title: "Deploy infra", status: "working" })],
|
|
125
|
+
]),
|
|
126
|
+
taskSessions: [],
|
|
127
|
+
},
|
|
128
|
+
play: async ({ canvas }) => {
|
|
129
|
+
const deps = canvas.getByTestId("task-overview-dependencies");
|
|
130
|
+
await expect(deps).toBeInTheDocument();
|
|
131
|
+
await expect(canvas.getByText("Setup DB")).toBeInTheDocument();
|
|
132
|
+
await expect(canvas.getByText("Deploy infra")).toBeInTheDocument();
|
|
133
|
+
},
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
/** Empty dependencies show "None". */
|
|
137
|
+
export const NoDependencies: Story = {
|
|
138
|
+
args: {
|
|
139
|
+
task: makeTask({ id: "t-nd", dependsOn: [] }),
|
|
140
|
+
taskSessions: [],
|
|
141
|
+
},
|
|
142
|
+
play: async ({ canvas }) => {
|
|
143
|
+
await expect(canvas.getByText("None")).toBeInTheDocument();
|
|
144
|
+
},
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
/** Usage section renders when taskUsage has a positive cost. */
|
|
148
|
+
export const WithUsage: Story = {
|
|
149
|
+
args: {
|
|
150
|
+
taskUsage: { inputTokens: 1000, outputTokens: 500, costMillicents: 15_000, sessionCount: 2 },
|
|
151
|
+
},
|
|
152
|
+
play: async ({ canvas }) => {
|
|
153
|
+
const usage = canvas.getByTestId("task-overview-usage");
|
|
154
|
+
await expect(usage).toBeInTheDocument();
|
|
155
|
+
await expect(canvas.getByText("Cost")).toBeInTheDocument();
|
|
156
|
+
},
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
/** Tree usage row appears when treeUsage cost exceeds taskUsage cost. */
|
|
160
|
+
export const WithTreeUsage: Story = {
|
|
161
|
+
args: {
|
|
162
|
+
task: makeTask({ id: "t-tu", childTaskIds: ["child-1"] }),
|
|
163
|
+
taskUsage: { inputTokens: 1000, outputTokens: 500, costMillicents: 15_000, sessionCount: 2 },
|
|
164
|
+
treeUsage: { inputTokens: 5000, outputTokens: 2000, costMillicents: 85_000, sessionCount: 6 },
|
|
165
|
+
},
|
|
166
|
+
play: async ({ canvas }) => {
|
|
167
|
+
await expect(canvas.getByText("Cost")).toBeInTheDocument();
|
|
168
|
+
await expect(canvas.getByText("Total (incl. subtasks)")).toBeInTheDocument();
|
|
169
|
+
},
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
/** Review notes section renders when present. */
|
|
173
|
+
export const WithReviewNotes: Story = {
|
|
174
|
+
args: {
|
|
175
|
+
task: makeTask({ id: "t-rn", reviewNotes: "Needs refactoring before merge" }),
|
|
176
|
+
taskSessions: [],
|
|
177
|
+
},
|
|
178
|
+
play: async ({ canvas }) => {
|
|
179
|
+
const notes = canvas.getByTestId("task-overview-review-notes");
|
|
180
|
+
await expect(notes).toBeInTheDocument();
|
|
181
|
+
await expect(canvas.getByText("Needs refactoring before merge")).toBeInTheDocument();
|
|
182
|
+
},
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
/** Environment row shows the session's environment name and status. */
|
|
186
|
+
export const WithEnvironment: Story = {
|
|
187
|
+
play: async ({ canvas }) => {
|
|
188
|
+
const envRow = canvas.getByTestId("task-overview-environment");
|
|
189
|
+
await expect(envRow).toBeInTheDocument();
|
|
190
|
+
await expect(canvas.getByText("Local Dev")).toBeInTheDocument();
|
|
191
|
+
},
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
/** Falls back to workspace default environment with label. */
|
|
195
|
+
export const FallbackToWorkspaceDefault: Story = {
|
|
196
|
+
args: {
|
|
197
|
+
taskSessions: [],
|
|
198
|
+
selectedEnvId: "env-1",
|
|
199
|
+
},
|
|
200
|
+
play: async ({ canvas }) => {
|
|
201
|
+
await expect(canvas.getByText("Local Dev")).toBeInTheDocument();
|
|
202
|
+
await expect(canvas.getByText("(workspace default)")).toBeInTheDocument();
|
|
203
|
+
},
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
/** Branch renders as plain text when workspace has no repoUrl. */
|
|
207
|
+
export const BranchWithoutRepoUrl: Story = {
|
|
208
|
+
args: {
|
|
209
|
+
task: makeTask({ id: "t-br", branch: "fix/typo" }),
|
|
210
|
+
workspaces: [makeWorkspace({ id: "ws-1", repoUrl: "" })],
|
|
211
|
+
taskSessions: [],
|
|
212
|
+
},
|
|
213
|
+
play: async ({ canvas }) => {
|
|
214
|
+
const branchPill = canvas.getByTestId("task-overview-branch");
|
|
215
|
+
await expect(branchPill).toBeInTheDocument();
|
|
216
|
+
const link = branchPill.querySelector("a");
|
|
217
|
+
await expect(link).toBeNull();
|
|
218
|
+
},
|
|
219
|
+
};
|