@principal-ai/subsystems-react 0.38.0 → 0.40.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.
- package/dist/components/maintain-events/MaintainEventLog.d.ts +35 -0
- package/dist/components/maintain-events/MaintainEventLog.d.ts.map +1 -0
- package/dist/components/maintain-events/MaintainEventLog.js +66 -0
- package/dist/components/maintain-events/MaintainEventLog.js.map +1 -0
- package/dist/components/maintain-events/MaintainLivePanel.d.ts +15 -0
- package/dist/components/maintain-events/MaintainLivePanel.d.ts.map +1 -0
- package/dist/components/maintain-events/MaintainLivePanel.js +49 -0
- package/dist/components/maintain-events/MaintainLivePanel.js.map +1 -0
- package/dist/components/maintain-events/index.d.ts +8 -0
- package/dist/components/maintain-events/index.d.ts.map +1 -0
- package/dist/components/maintain-events/index.js +6 -0
- package/dist/components/maintain-events/index.js.map +1 -0
- package/dist/graphify/consolidated.d.ts +8 -0
- package/dist/graphify/consolidated.d.ts.map +1 -1
- package/dist/graphify/construct.d.ts +18 -0
- package/dist/graphify/construct.d.ts.map +1 -1
- package/dist/graphify/construct.js +23 -0
- package/dist/graphify/construct.js.map +1 -1
- package/dist/graphify/index.d.ts +2 -2
- package/dist/graphify/index.d.ts.map +1 -1
- package/dist/graphify/index.js +1 -1
- package/dist/graphify/index.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/subsystem/IssueList.d.ts +49 -3
- package/dist/subsystem/IssueList.d.ts.map +1 -1
- package/dist/subsystem/IssueList.js +180 -79
- package/dist/subsystem/IssueList.js.map +1 -1
- package/dist/subsystem/SubsystemComponentGraph.d.ts +15 -1
- package/dist/subsystem/SubsystemComponentGraph.d.ts.map +1 -1
- package/dist/subsystem/SubsystemComponentGraph.js +464 -14
- package/dist/subsystem/SubsystemComponentGraph.js.map +1 -1
- package/dist/subsystem/formatDeclaration.js +19 -5
- package/dist/subsystem/formatDeclaration.js.map +1 -1
- package/dist/subsystem/model.d.ts +38 -0
- package/dist/subsystem/model.d.ts.map +1 -1
- package/dist/subsystem/model.js.map +1 -1
- package/dist/subsystem/nodes.d.ts.map +1 -1
- package/dist/subsystem/nodes.js +124 -67
- package/dist/subsystem/nodes.js.map +1 -1
- package/dist/subsystem/symbolRefs.d.ts.map +1 -1
- package/dist/subsystem/symbolRefs.js +2 -0
- package/dist/subsystem/symbolRefs.js.map +1 -1
- package/package.json +3 -3
- package/src/components/maintain-events/MaintainEventLog.tsx +152 -0
- package/src/components/maintain-events/MaintainLivePanel.tsx +99 -0
- package/src/components/maintain-events/index.ts +10 -0
- package/src/graphify/consolidated.ts +8 -0
- package/src/graphify/construct.test.ts +61 -1
- package/src/graphify/construct.ts +33 -0
- package/src/graphify/index.ts +6 -1
- package/src/index.ts +9 -0
- package/src/stories/MaintainEvents/MaintainEventLog.stories.tsx +66 -0
- package/src/stories/MaintainEvents/MaintainLivePanel.stories.tsx +77 -0
- package/src/stories/Subsystem/ComponentGraph/IssueOverlay.stories.tsx +625 -0
- package/src/stories/Subsystem/ComponentGraph/Issues.stories.tsx +7 -1
- package/src/stories/Subsystem/ComponentGraph/NodeAnatomy.stories.tsx +40 -73
- package/src/stories/Subsystem/ComponentGraph/StoreValueType.stories.tsx +261 -0
- package/src/stories/Subsystem/StoreValueTypeDeclaration.stories.tsx +182 -0
- package/src/stories/data/maintain-live-events.json +554 -0
- package/src/subsystem/IssueList.focus.test.tsx +113 -0
- package/src/subsystem/IssueList.icon.test.tsx +95 -0
- package/src/subsystem/IssueList.tsx +267 -111
- package/src/subsystem/SubsystemComponentGraph.tsx +541 -13
- package/src/subsystem/formatDeclaration.test.ts +64 -0
- package/src/subsystem/formatDeclaration.ts +20 -5
- package/src/subsystem/model.ts +46 -0
- package/src/subsystem/nodes.group.test.tsx +52 -0
- package/src/subsystem/nodes.tsx +102 -2
- package/src/subsystem/symbolRefs.ts +2 -0
|
@@ -0,0 +1,554 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"at": null,
|
|
4
|
+
"type": "server.connected",
|
|
5
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
6
|
+
"summary": "connected"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"at": 1785251893442,
|
|
10
|
+
"type": "session.status",
|
|
11
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
12
|
+
"summary": "busy"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"at": 1785251893692,
|
|
16
|
+
"type": "session.next.prompted",
|
|
17
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
18
|
+
"summary": "user prompt"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"at": 1785251893942,
|
|
22
|
+
"type": "session.next.text.delta",
|
|
23
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
24
|
+
"summary": "Explore the project at /Users/griever/Developer/visual-validation/principal-view-core-library thoroughly.\n\nI need to understand:\n1. The full directory tree (pac"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"at": 1785251894192,
|
|
28
|
+
"type": "session.next.prompted",
|
|
29
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
30
|
+
"summary": "assistant prompt"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"at": 1785251894442,
|
|
34
|
+
"type": "session.next.prompted",
|
|
35
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
36
|
+
"summary": "user prompt"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"at": 1785251894692,
|
|
40
|
+
"type": "session.next.step.started",
|
|
41
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
42
|
+
"summary": "step started"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"at": 1785251895192,
|
|
46
|
+
"type": "session.next.reasoning.delta",
|
|
47
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
48
|
+
"summary": "Let me explore the project at /Users/griever/Developer/visual-validation/principal-view-core-library thoroughly. I'll start by understanding the overall structu"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"at": 1785251895692,
|
|
52
|
+
"type": "session.next.tool.called",
|
|
53
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
54
|
+
"summary": "read"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"at": 1785251895942,
|
|
58
|
+
"type": "session.next.tool.called",
|
|
59
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
60
|
+
"summary": "read"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"at": 1785251896192,
|
|
64
|
+
"type": "session.next.tool.called",
|
|
65
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
66
|
+
"summary": "glob"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"at": 1785251896442,
|
|
70
|
+
"type": "session.next.tool.called",
|
|
71
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
72
|
+
"summary": "glob"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"at": 1785251896692,
|
|
76
|
+
"type": "session.next.tool.called",
|
|
77
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
78
|
+
"summary": "glob"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"at": 1785251896942,
|
|
82
|
+
"type": "session.next.tool.called",
|
|
83
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
84
|
+
"summary": "glob"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"at": 1785251897192,
|
|
88
|
+
"type": "session.next.text.delta",
|
|
89
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
90
|
+
"summary": "I'll start by exploring the top-level structure and then dive into each area systematically."
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"at": 1785251897442,
|
|
94
|
+
"type": "session.next.tool.called",
|
|
95
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
96
|
+
"summary": "read"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"at": 1785251897692,
|
|
100
|
+
"type": "session.next.tool.called",
|
|
101
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
102
|
+
"summary": "glob"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"at": 1785251897942,
|
|
106
|
+
"type": "session.next.tool.called",
|
|
107
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
108
|
+
"summary": "glob"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"at": 1785251898192,
|
|
112
|
+
"type": "session.next.step.ended",
|
|
113
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
114
|
+
"summary": "step ended"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"at": 1785251898442,
|
|
118
|
+
"type": "session.next.prompted",
|
|
119
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
120
|
+
"summary": "assistant prompt"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"at": 1785251898692,
|
|
124
|
+
"type": "session.next.prompted",
|
|
125
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
126
|
+
"summary": "assistant prompt"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"at": 1785251898942,
|
|
130
|
+
"type": "session.next.prompted",
|
|
131
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
132
|
+
"summary": "assistant prompt"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"at": 1785251899192,
|
|
136
|
+
"type": "session.next.prompted",
|
|
137
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
138
|
+
"summary": "user prompt"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"at": 1785251899442,
|
|
142
|
+
"type": "session.next.step.started",
|
|
143
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
144
|
+
"summary": "step started"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"at": 1785251899942,
|
|
148
|
+
"type": "session.next.reasoning.delta",
|
|
149
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
150
|
+
"summary": "Good, I have a clear picture of the packages. Let me now read the root package.json, each package's package.json, tsconfig files, and explore the directory stru"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"at": 1785251900442,
|
|
154
|
+
"type": "session.next.tool.called",
|
|
155
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
156
|
+
"summary": "read"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"at": 1785251900692,
|
|
160
|
+
"type": "session.next.tool.called",
|
|
161
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
162
|
+
"summary": "read"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"at": 1785251900942,
|
|
166
|
+
"type": "session.next.tool.called",
|
|
167
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
168
|
+
"summary": "read"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"at": 1785251901192,
|
|
172
|
+
"type": "session.next.tool.called",
|
|
173
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
174
|
+
"summary": "read"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"at": 1785251901442,
|
|
178
|
+
"type": "session.next.tool.called",
|
|
179
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
180
|
+
"summary": "read"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"at": 1785251901692,
|
|
184
|
+
"type": "session.next.tool.called",
|
|
185
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
186
|
+
"summary": "read"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"at": 1785251901942,
|
|
190
|
+
"type": "session.next.tool.called",
|
|
191
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
192
|
+
"summary": "read"
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"at": 1785251902192,
|
|
196
|
+
"type": "session.next.tool.called",
|
|
197
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
198
|
+
"summary": "read"
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"at": 1785251902442,
|
|
202
|
+
"type": "session.next.tool.called",
|
|
203
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
204
|
+
"summary": "read"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"at": 1785251902692,
|
|
208
|
+
"type": "session.next.tool.called",
|
|
209
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
210
|
+
"summary": "read"
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"at": 1785251902942,
|
|
214
|
+
"type": "session.next.tool.called",
|
|
215
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
216
|
+
"summary": "read"
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"at": 1785251903192,
|
|
220
|
+
"type": "session.next.tool.called",
|
|
221
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
222
|
+
"summary": "read"
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"at": 1785251903442,
|
|
226
|
+
"type": "session.next.tool.called",
|
|
227
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
228
|
+
"summary": "read"
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"at": 1785251903692,
|
|
232
|
+
"type": "session.next.tool.called",
|
|
233
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
234
|
+
"summary": "read"
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"at": 1785251903942,
|
|
238
|
+
"type": "session.next.tool.called",
|
|
239
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
240
|
+
"summary": "read"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"at": 1785251904192,
|
|
244
|
+
"type": "session.next.tool.called",
|
|
245
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
246
|
+
"summary": "read"
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
"at": 1785251904442,
|
|
250
|
+
"type": "session.next.tool.called",
|
|
251
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
252
|
+
"summary": "read"
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"at": 1785251904692,
|
|
256
|
+
"type": "session.next.tool.called",
|
|
257
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
258
|
+
"summary": "read"
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"at": 1785251904942,
|
|
262
|
+
"type": "session.next.tool.called",
|
|
263
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
264
|
+
"summary": "read"
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"at": 1785251905192,
|
|
268
|
+
"type": "session.next.tool.called",
|
|
269
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
270
|
+
"summary": "read"
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"at": 1785251905442,
|
|
274
|
+
"type": "session.next.tool.called",
|
|
275
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
276
|
+
"summary": "read"
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"at": 1785251905692,
|
|
280
|
+
"type": "session.next.text.delta",
|
|
281
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
282
|
+
"summary": "Now let me read all package.json files and tsconfig files:"
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"at": 1785251905942,
|
|
286
|
+
"type": "session.next.step.ended",
|
|
287
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
288
|
+
"summary": "step ended"
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
"at": 1785251906192,
|
|
292
|
+
"type": "session.next.prompted",
|
|
293
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
294
|
+
"summary": "assistant prompt"
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
"at": 1785251906442,
|
|
298
|
+
"type": "session.next.prompted",
|
|
299
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
300
|
+
"summary": "assistant prompt"
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"at": 1785251906692,
|
|
304
|
+
"type": "session.next.prompted",
|
|
305
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
306
|
+
"summary": "assistant prompt"
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
"at": 1785251906942,
|
|
310
|
+
"type": "session.next.prompted",
|
|
311
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
312
|
+
"summary": "user prompt"
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"at": 1785251907192,
|
|
316
|
+
"type": "session.next.step.started",
|
|
317
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
318
|
+
"summary": "step started"
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
"at": 1785251907692,
|
|
322
|
+
"type": "session.next.reasoning.delta",
|
|
323
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
324
|
+
"summary": "Now let me read the tsconfig files and explore the source directories of each package."
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"at": 1785251908192,
|
|
328
|
+
"type": "session.next.tool.called",
|
|
329
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
330
|
+
"summary": "read"
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
"at": 1785251908442,
|
|
334
|
+
"type": "session.next.tool.called",
|
|
335
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
336
|
+
"summary": "read"
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"at": 1785251908692,
|
|
340
|
+
"type": "session.next.tool.called",
|
|
341
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
342
|
+
"summary": "read"
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
"at": 1785251908942,
|
|
346
|
+
"type": "session.next.tool.called",
|
|
347
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
348
|
+
"summary": "read"
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
"at": 1785251909192,
|
|
352
|
+
"type": "session.next.tool.called",
|
|
353
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
354
|
+
"summary": "read"
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
"at": 1785251909442,
|
|
358
|
+
"type": "session.next.tool.called",
|
|
359
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
360
|
+
"summary": "read"
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
"at": 1785251909692,
|
|
364
|
+
"type": "session.next.tool.called",
|
|
365
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
366
|
+
"summary": "read"
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
"at": 1785251909942,
|
|
370
|
+
"type": "session.next.tool.called",
|
|
371
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
372
|
+
"summary": "read"
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
"at": 1785251910192,
|
|
376
|
+
"type": "session.next.tool.called",
|
|
377
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
378
|
+
"summary": "read"
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
"at": 1785251910442,
|
|
382
|
+
"type": "session.next.tool.called",
|
|
383
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
384
|
+
"summary": "read"
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
"at": 1785251910692,
|
|
388
|
+
"type": "session.next.tool.called",
|
|
389
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
390
|
+
"summary": "read"
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
"at": 1785251910942,
|
|
394
|
+
"type": "session.next.tool.called",
|
|
395
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
396
|
+
"summary": "read"
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
"at": 1785251911192,
|
|
400
|
+
"type": "session.next.tool.called",
|
|
401
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
402
|
+
"summary": "read"
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
"at": 1785251911442,
|
|
406
|
+
"type": "session.next.tool.called",
|
|
407
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
408
|
+
"summary": "read"
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
"at": 1785251911692,
|
|
412
|
+
"type": "session.next.tool.called",
|
|
413
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
414
|
+
"summary": "read"
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
"at": 1785251911942,
|
|
418
|
+
"type": "session.next.tool.called",
|
|
419
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
420
|
+
"summary": "read"
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
"at": 1785251912192,
|
|
424
|
+
"type": "session.next.tool.called",
|
|
425
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
426
|
+
"summary": "read"
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
"at": 1785251912442,
|
|
430
|
+
"type": "session.next.tool.called",
|
|
431
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
432
|
+
"summary": "read"
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
"at": 1785251912692,
|
|
436
|
+
"type": "session.next.tool.called",
|
|
437
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
438
|
+
"summary": "read"
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
"at": 1785251912942,
|
|
442
|
+
"type": "session.next.tool.called",
|
|
443
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
444
|
+
"summary": "read"
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
"at": 1785251913192,
|
|
448
|
+
"type": "session.next.tool.called",
|
|
449
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
450
|
+
"summary": "read"
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
"at": 1785251913442,
|
|
454
|
+
"type": "session.next.tool.called",
|
|
455
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
456
|
+
"summary": "read"
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
"at": 1785251913692,
|
|
460
|
+
"type": "session.next.tool.called",
|
|
461
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
462
|
+
"summary": "read"
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
"at": 1785251913942,
|
|
466
|
+
"type": "session.next.tool.called",
|
|
467
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
468
|
+
"summary": "read"
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
"at": 1785251914192,
|
|
472
|
+
"type": "session.next.tool.called",
|
|
473
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
474
|
+
"summary": "read"
|
|
475
|
+
},
|
|
476
|
+
{
|
|
477
|
+
"at": 1785251914442,
|
|
478
|
+
"type": "session.next.tool.called",
|
|
479
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
480
|
+
"summary": "read"
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
"at": 1785251914692,
|
|
484
|
+
"type": "session.next.tool.called",
|
|
485
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
486
|
+
"summary": "read"
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
"at": 1785251914942,
|
|
490
|
+
"type": "session.next.text.delta",
|
|
491
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
492
|
+
"summary": "Now let me read tsconfig files and explore each package's source structure:"
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
"at": 1785251915192,
|
|
496
|
+
"type": "session.next.step.ended",
|
|
497
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
498
|
+
"summary": "step ended"
|
|
499
|
+
},
|
|
500
|
+
{
|
|
501
|
+
"at": 1785251915442,
|
|
502
|
+
"type": "session.next.prompted",
|
|
503
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
504
|
+
"summary": "assistant prompt"
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
"at": 1785251915692,
|
|
508
|
+
"type": "session.next.prompted",
|
|
509
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
510
|
+
"summary": "assistant prompt"
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
"at": 1785251915942,
|
|
514
|
+
"type": "session.next.prompted",
|
|
515
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
516
|
+
"summary": "assistant prompt"
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
"at": 1785251916192,
|
|
520
|
+
"type": "session.next.prompted",
|
|
521
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
522
|
+
"summary": "user prompt"
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
"at": 1785251916442,
|
|
526
|
+
"type": "session.next.step.started",
|
|
527
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
528
|
+
"summary": "step started"
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
"at": 1785251916942,
|
|
532
|
+
"type": "session.next.reasoning.delta",
|
|
533
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
534
|
+
"summary": "Now let me explore the source directories of each package."
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
"at": 1785251917442,
|
|
538
|
+
"type": "session.next.tool.called",
|
|
539
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
540
|
+
"summary": "read"
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
"at": 1785251917692,
|
|
544
|
+
"type": "session.next.tool.called",
|
|
545
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
546
|
+
"summary": "read"
|
|
547
|
+
},
|
|
548
|
+
{
|
|
549
|
+
"at": 1785251917942,
|
|
550
|
+
"type": "session.next.tool.called",
|
|
551
|
+
"sessionId": "ses_056b1f037ffeu1d00DzvJBrHq9",
|
|
552
|
+
"summary": "read"
|
|
553
|
+
}
|
|
554
|
+
]
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { afterEach, describe, expect, test } from 'bun:test';
|
|
2
|
+
import { createElement } from 'react';
|
|
3
|
+
import { Window } from 'happy-dom';
|
|
4
|
+
import { cleanup, fireEvent, render } from '@testing-library/react/pure';
|
|
5
|
+
import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
|
|
6
|
+
import { SubsystemIssueList, type SubsystemIssue } from './IssueList';
|
|
7
|
+
|
|
8
|
+
// Bun's happy-dom test environment isn't registered (no @happy-dom/global-
|
|
9
|
+
// registrator), so wire the DOM primitives React DOM needs before rendering.
|
|
10
|
+
const dom = new Window();
|
|
11
|
+
const globals = globalThis as unknown as Record<string, unknown>;
|
|
12
|
+
globals.window = dom;
|
|
13
|
+
globals.document = dom.document;
|
|
14
|
+
globals.navigator = dom.navigator;
|
|
15
|
+
globals.HTMLElement = dom.HTMLElement;
|
|
16
|
+
globals.Node = dom.Node;
|
|
17
|
+
globals.Element = dom.Element;
|
|
18
|
+
globals.Event = dom.Event;
|
|
19
|
+
globals.getComputedStyle = dom.getComputedStyle.bind(dom);
|
|
20
|
+
globals.requestAnimationFrame = dom.requestAnimationFrame.bind(dom);
|
|
21
|
+
globals.cancelAnimationFrame = dom.cancelAnimationFrame.bind(dom);
|
|
22
|
+
globals.localStorage = dom.localStorage;
|
|
23
|
+
globals.matchMedia = dom.matchMedia.bind(dom);
|
|
24
|
+
|
|
25
|
+
afterEach(cleanup);
|
|
26
|
+
|
|
27
|
+
const issues: SubsystemIssue[] = [
|
|
28
|
+
{
|
|
29
|
+
id: 'ct',
|
|
30
|
+
severity: 'error',
|
|
31
|
+
kind: 'missing_file',
|
|
32
|
+
message: 'construct finding',
|
|
33
|
+
target: { kind: 'component', id: 'alpha', label: 'Alpha' },
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
id: 'wl',
|
|
37
|
+
severity: 'info',
|
|
38
|
+
kind: 'walkthrough',
|
|
39
|
+
message: 'walkthrough finding',
|
|
40
|
+
target: { kind: 'walkthrough', id: 'w', label: 'Walkthrough' },
|
|
41
|
+
},
|
|
42
|
+
];
|
|
43
|
+
|
|
44
|
+
function setup() {
|
|
45
|
+
const events: string[] = [];
|
|
46
|
+
const view = render(
|
|
47
|
+
createElement(
|
|
48
|
+
ThemeProvider,
|
|
49
|
+
{ theme: defaultEditorTheme },
|
|
50
|
+
createElement(SubsystemIssueList, {
|
|
51
|
+
issues,
|
|
52
|
+
onSelectIssue: (i) => events.push(`select:${i.id}`),
|
|
53
|
+
onDeselectIssue: (i) => events.push(`deselect:${i.id}`),
|
|
54
|
+
}),
|
|
55
|
+
),
|
|
56
|
+
);
|
|
57
|
+
const category = (name: string) =>
|
|
58
|
+
[...view.container.querySelectorAll('button')].find((b) =>
|
|
59
|
+
b.textContent?.includes(name),
|
|
60
|
+
) as HTMLElement;
|
|
61
|
+
const card = (label: string) =>
|
|
62
|
+
[...view.container.querySelectorAll('[role="button"]')].find((b) =>
|
|
63
|
+
b.textContent?.includes(label),
|
|
64
|
+
) as HTMLElement;
|
|
65
|
+
return { ...view, events, category, card };
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
describe('collapsing a category retracts the focus it established', () => {
|
|
69
|
+
// Closing a CATEGORY unmounts its cards, so a card stops being expanded
|
|
70
|
+
// without ever toggling itself. A host that framed a target on expand has to
|
|
71
|
+
// hear about it, or the canvas stays parked on a target the list no longer
|
|
72
|
+
// shows as open.
|
|
73
|
+
test('clicking the open category emits a deselect for its expanded card', () => {
|
|
74
|
+
const { events, category, card } = setup();
|
|
75
|
+
fireEvent.click(category('Constructs'));
|
|
76
|
+
fireEvent.click(card('Alpha'));
|
|
77
|
+
expect(events).toEqual(['select:ct']);
|
|
78
|
+
|
|
79
|
+
fireEvent.click(category('Constructs'));
|
|
80
|
+
expect(events).toEqual(['select:ct', 'deselect:ct']);
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
test('opening a sibling layer retracts the other layer’s card', () => {
|
|
84
|
+
// The accordion closes every other layer, so that layer's cards unmount
|
|
85
|
+
// on this click — same obligation as collapsing the layer directly.
|
|
86
|
+
const { events, category, card } = setup();
|
|
87
|
+
fireEvent.click(category('Constructs'));
|
|
88
|
+
fireEvent.click(card('Alpha'));
|
|
89
|
+
|
|
90
|
+
fireEvent.click(category('Walkthrough'));
|
|
91
|
+
expect(events).toEqual(['select:ct', 'deselect:ct']);
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
test('collapsing a layer with nothing expanded emits no deselect', () => {
|
|
95
|
+
const { events, category } = setup();
|
|
96
|
+
fireEvent.click(category('Constructs'));
|
|
97
|
+
fireEvent.click(category('Constructs'));
|
|
98
|
+
expect(events).toEqual([]);
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
test('collapsing the card itself still emits exactly one deselect', () => {
|
|
102
|
+
// The ref is cleared by the card's own collapse, so closing the layer
|
|
103
|
+
// afterwards must not re-report it.
|
|
104
|
+
const { events, category, card } = setup();
|
|
105
|
+
fireEvent.click(category('Constructs'));
|
|
106
|
+
fireEvent.click(card('Alpha'));
|
|
107
|
+
fireEvent.click(card('Alpha'));
|
|
108
|
+
expect(events).toEqual(['select:ct', 'deselect:ct']);
|
|
109
|
+
|
|
110
|
+
fireEvent.click(category('Constructs'));
|
|
111
|
+
expect(events).toEqual(['select:ct', 'deselect:ct']);
|
|
112
|
+
});
|
|
113
|
+
});
|