@principal-ai/subsystems-react 0.56.31 → 0.56.33
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/graphify/anchor.d.ts +1 -44
- package/dist/graphify/anchor.d.ts.map +1 -1
- package/dist/graphify/anchor.js +1 -172
- package/dist/graphify/anchor.js.map +1 -1
- package/dist/graphify/consolidated.d.ts +1 -258
- package/dist/graphify/consolidated.d.ts.map +1 -1
- package/dist/graphify/consolidated.js +1 -10
- package/dist/graphify/consolidated.js.map +1 -1
- package/dist/graphify/construct.d.ts +1 -40
- package/dist/graphify/construct.d.ts.map +1 -1
- package/dist/graphify/construct.js +1 -99
- package/dist/graphify/construct.js.map +1 -1
- package/dist/graphify/ids.d.ts +1 -18
- package/dist/graphify/ids.d.ts.map +1 -1
- package/dist/graphify/ids.js +1 -45
- package/dist/graphify/ids.js.map +1 -1
- package/dist/graphify/resolve.d.ts +1 -47
- package/dist/graphify/resolve.d.ts.map +1 -1
- package/dist/graphify/resolve.js +1 -82
- package/dist/graphify/resolve.js.map +1 -1
- package/dist/graphify/signature.d.ts +1 -86
- package/dist/graphify/signature.d.ts.map +1 -1
- package/dist/graphify/signature.js +1 -275
- package/dist/graphify/signature.js.map +1 -1
- package/dist/graphify/types.d.ts +1 -140
- package/dist/graphify/types.d.ts.map +1 -1
- package/dist/graphify/types.js +1 -7
- package/dist/graphify/types.js.map +1 -1
- package/dist/subsystem/IssueList.d.ts.map +1 -1
- package/dist/subsystem/IssueList.js +5 -2
- package/dist/subsystem/IssueList.js.map +1 -1
- package/dist/subsystem/SubsystemComponentGraph.d.ts.map +1 -1
- package/dist/subsystem/SubsystemComponentGraph.js +33 -19
- package/dist/subsystem/SubsystemComponentGraph.js.map +1 -1
- package/dist/subsystem/containerCard.d.ts +6 -0
- package/dist/subsystem/containerCard.d.ts.map +1 -1
- package/dist/subsystem/containerCard.js +16 -1
- package/dist/subsystem/containerCard.js.map +1 -1
- package/dist/utils/elkLayout.d.ts +22 -0
- package/dist/utils/elkLayout.d.ts.map +1 -1
- package/dist/utils/elkLayout.js +55 -0
- package/dist/utils/elkLayout.js.map +1 -1
- package/package.json +3 -3
- package/src/graphify/anchor.ts +1 -206
- package/src/graphify/consolidated.ts +1 -298
- package/src/graphify/construct.ts +1 -153
- package/src/graphify/ids.ts +1 -48
- package/src/graphify/resolve.ts +1 -115
- package/src/graphify/signature.ts +1 -354
- package/src/graphify/types.ts +1 -164
- package/src/stories/Canvases/Subsystem/FocusReset.stories.tsx +55 -0
- package/src/stories/Canvases/Subsystem/fixtures/focus-reset-case.json +479 -0
- package/src/subsystem/IssueList.category.test.ts +11 -0
- package/src/subsystem/IssueList.tsx +5 -2
- package/src/subsystem/SubsystemComponentGraph.tsx +47 -19
- package/src/subsystem/containerCard.test.ts +30 -0
- package/src/subsystem/containerCard.tsx +34 -1
- package/src/utils/elkLayout.test.ts +33 -0
- package/src/utils/elkLayout.ts +75 -0
|
@@ -0,0 +1,479 @@
|
|
|
1
|
+
{
|
|
2
|
+
"components": [
|
|
3
|
+
{
|
|
4
|
+
"alias": "subsystem-model-view",
|
|
5
|
+
"name": "SubsystemModelView",
|
|
6
|
+
"construct": "function",
|
|
7
|
+
"framework": "react",
|
|
8
|
+
"stereotype": "component",
|
|
9
|
+
"role": "entry",
|
|
10
|
+
"process": "subsystems-studio/renderer",
|
|
11
|
+
"module": "packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx",
|
|
12
|
+
"file": "packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx",
|
|
13
|
+
"purl": "pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx",
|
|
14
|
+
"symbol": "SubsystemModelView",
|
|
15
|
+
"purpose": "Renders the subsystem graph tab and loads the persisted audit into its diagnostics list."
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"alias": "audit-issues",
|
|
19
|
+
"name": "auditReportToIssues",
|
|
20
|
+
"construct": "function",
|
|
21
|
+
"process": "subsystems-studio/renderer",
|
|
22
|
+
"module": "packages/subsystems-studio/src/mainview/subsystemIssues.ts",
|
|
23
|
+
"file": "packages/subsystems-studio/src/mainview/subsystemIssues.ts",
|
|
24
|
+
"purl": "pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/subsystemIssues.ts",
|
|
25
|
+
"symbol": "auditReportToIssues",
|
|
26
|
+
"purpose": "Maps a persisted audit report into the presentational issues the diagnostics list renders."
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"alias": "regular-audit-subscribers",
|
|
30
|
+
"name": "regularAuditChangeSubscribers",
|
|
31
|
+
"construct": "store",
|
|
32
|
+
"process": "subsystems-studio/renderer",
|
|
33
|
+
"module": "packages/subsystems-studio/src/mainview/rpc.ts",
|
|
34
|
+
"file": "packages/subsystems-studio/src/mainview/rpc.ts",
|
|
35
|
+
"purl": "pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/rpc.ts",
|
|
36
|
+
"symbol": "regularAuditChangeSubscribers",
|
|
37
|
+
"purpose": "Holds renderer callbacks registered for regular-audit status pushes."
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"alias": "audit-model",
|
|
41
|
+
"name": "auditSubsystemModel",
|
|
42
|
+
"construct": "function",
|
|
43
|
+
"process": "subsystems-studio/host",
|
|
44
|
+
"module": "packages/subsystems-studio/src/bun/verify-subsystem-component.ts",
|
|
45
|
+
"file": "packages/subsystems-studio/src/bun/verify-subsystem-component.ts",
|
|
46
|
+
"purl": "pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/verify-subsystem-component.ts",
|
|
47
|
+
"symbol": "auditSubsystemModel",
|
|
48
|
+
"purpose": "Runs the dry-run deterministic audit: graphify caches, files, per-component construct and signature, and mechanical boundary membership."
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"alias": "verify-files",
|
|
52
|
+
"name": "verifyModelFiles",
|
|
53
|
+
"construct": "function",
|
|
54
|
+
"process": "subsystems-studio/host",
|
|
55
|
+
"module": "packages/subsystems-studio/src/bun/subsystem-model-store.ts",
|
|
56
|
+
"file": "packages/subsystems-studio/src/bun/subsystem-model-store.ts",
|
|
57
|
+
"purl": "pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/subsystem-model-store.ts",
|
|
58
|
+
"symbol": "verifyModelFiles",
|
|
59
|
+
"purpose": "Checks every component file exists and resolves each trail site against its repo checkout."
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"alias": "verify-component",
|
|
63
|
+
"name": "verifySubsystemComponent",
|
|
64
|
+
"construct": "function",
|
|
65
|
+
"process": "subsystems-studio/host",
|
|
66
|
+
"module": "packages/subsystems-studio/src/bun/verify-subsystem-component.ts",
|
|
67
|
+
"file": "packages/subsystems-studio/src/bun/verify-subsystem-component.ts",
|
|
68
|
+
"purl": "pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/verify-subsystem-component.ts",
|
|
69
|
+
"symbol": "verifySubsystemComponent",
|
|
70
|
+
"purpose": "Verifies one component against disk plus its graphify anchor."
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"alias": "ensure-graphify-caches",
|
|
74
|
+
"name": "ensureCurrentGraphifyCachesForModel",
|
|
75
|
+
"construct": "function",
|
|
76
|
+
"process": "subsystems-studio/host",
|
|
77
|
+
"module": "packages/subsystems-studio/src/bun/graphify-store.ts",
|
|
78
|
+
"file": "packages/subsystems-studio/src/bun/graphify-store.ts",
|
|
79
|
+
"purl": "pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/graphify-store.ts",
|
|
80
|
+
"symbol": "ensureCurrentGraphifyCachesForModel",
|
|
81
|
+
"purpose": "Ensures each component purl has a graphify cache at the current HEAD slot."
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"alias": "graphify-readiness",
|
|
85
|
+
"name": "assessSubsystemGraphifyReadiness",
|
|
86
|
+
"construct": "function",
|
|
87
|
+
"process": "subsystems-studio/host",
|
|
88
|
+
"module": "packages/subsystems-studio/src/bun/graphify-store.ts",
|
|
89
|
+
"file": "packages/subsystems-studio/src/bun/graphify-store.ts",
|
|
90
|
+
"purl": "pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/graphify-store.ts",
|
|
91
|
+
"symbol": "assessSubsystemGraphifyReadiness",
|
|
92
|
+
"purpose": "Reports current-slot graphify cache readiness for each distinct component purl."
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"alias": "build-fingerprint",
|
|
96
|
+
"name": "buildAuditFingerprint",
|
|
97
|
+
"construct": "function",
|
|
98
|
+
"process": "subsystems-studio/host",
|
|
99
|
+
"module": "packages/subsystems-studio/src/bun/audit-report-store.ts",
|
|
100
|
+
"file": "packages/subsystems-studio/src/bun/audit-report-store.ts",
|
|
101
|
+
"purl": "pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/audit-report-store.ts",
|
|
102
|
+
"symbol": "buildAuditFingerprint",
|
|
103
|
+
"purpose": "Builds a stable fingerprint of the model's claims plus the current graphify slot identity."
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"alias": "save-audit",
|
|
107
|
+
"name": "saveSubsystemModelAudit",
|
|
108
|
+
"construct": "function",
|
|
109
|
+
"process": "subsystems-studio/host",
|
|
110
|
+
"module": "packages/subsystems-studio/src/bun/audit-report-store.ts",
|
|
111
|
+
"file": "packages/subsystems-studio/src/bun/audit-report-store.ts",
|
|
112
|
+
"purl": "pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/audit-report-store.ts",
|
|
113
|
+
"symbol": "saveSubsystemModelAudit",
|
|
114
|
+
"purpose": "Persists the audit report with its fingerprint so badges and the issues list survive relaunches."
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"alias": "load-audit",
|
|
118
|
+
"name": "loadSubsystemModelAudit",
|
|
119
|
+
"construct": "function",
|
|
120
|
+
"process": "subsystems-studio/host",
|
|
121
|
+
"module": "packages/subsystems-studio/src/bun/audit-report-store.ts",
|
|
122
|
+
"file": "packages/subsystems-studio/src/bun/audit-report-store.ts",
|
|
123
|
+
"purl": "pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/audit-report-store.ts",
|
|
124
|
+
"symbol": "loadSubsystemModelAudit",
|
|
125
|
+
"purpose": "Reads the persisted audit report for a model."
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"alias": "apply-fix",
|
|
129
|
+
"name": "applySubsystemModelAuditFix",
|
|
130
|
+
"construct": "function",
|
|
131
|
+
"process": "subsystems-studio/host",
|
|
132
|
+
"module": "packages/subsystems-studio/src/bun/verify-subsystem-component.ts",
|
|
133
|
+
"file": "packages/subsystems-studio/src/bun/verify-subsystem-component.ts",
|
|
134
|
+
"purl": "pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/verify-subsystem-component.ts",
|
|
135
|
+
"symbol": "applySubsystemModelAuditFix",
|
|
136
|
+
"purpose": "Applies a deterministic one-click audit fix, then re-audits the model."
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"alias": "regular-audit-scheduler",
|
|
140
|
+
"name": "createRegularAuditScheduler",
|
|
141
|
+
"construct": "function",
|
|
142
|
+
"role": "entry",
|
|
143
|
+
"process": "subsystems-studio/host",
|
|
144
|
+
"module": "packages/subsystems-studio/src/bun/regular-audit.ts",
|
|
145
|
+
"file": "packages/subsystems-studio/src/bun/regular-audit.ts",
|
|
146
|
+
"purl": "pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/regular-audit.ts",
|
|
147
|
+
"symbol": "createRegularAuditScheduler",
|
|
148
|
+
"purpose": "Runs the dry-run audit over every stored model on a timeout chain while Studio is open."
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"alias": "regular-audit-run",
|
|
152
|
+
"name": "reauditSubsystemModelQuietly",
|
|
153
|
+
"construct": "function",
|
|
154
|
+
"process": "subsystems-studio/host",
|
|
155
|
+
"module": "packages/subsystems-studio/src/bun/index.ts",
|
|
156
|
+
"file": "packages/subsystems-studio/src/bun/index.ts",
|
|
157
|
+
"purl": "pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts",
|
|
158
|
+
"symbol": "reauditSubsystemModelQuietly",
|
|
159
|
+
"purpose": "Quietly re-audits one model and tells every surface its audit changed."
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"alias": "audit-stage-fixes",
|
|
163
|
+
"name": "auditAndStageOneClickFixes",
|
|
164
|
+
"construct": "function",
|
|
165
|
+
"process": "subsystems-studio/host",
|
|
166
|
+
"module": "packages/subsystems-studio/src/bun/index.ts",
|
|
167
|
+
"file": "packages/subsystems-studio/src/bun/index.ts",
|
|
168
|
+
"purl": "pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts",
|
|
169
|
+
"symbol": "auditAndStageOneClickFixes",
|
|
170
|
+
"purpose": "Audits a model, then stages any one-click fixes it found for user confirmation."
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"alias": "regular-audit-status",
|
|
174
|
+
"name": "broadcastRegularAuditChanged",
|
|
175
|
+
"construct": "function",
|
|
176
|
+
"process": "subsystems-studio/host",
|
|
177
|
+
"module": "packages/subsystems-studio/src/bun/index.ts",
|
|
178
|
+
"file": "packages/subsystems-studio/src/bun/index.ts",
|
|
179
|
+
"purl": "pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts",
|
|
180
|
+
"symbol": "broadcastRegularAuditChanged",
|
|
181
|
+
"purpose": "Pushes the scheduler's live status to the renderer over RPC."
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"alias": "broadcast-changed",
|
|
185
|
+
"name": "broadcastSubsystemModelChanged",
|
|
186
|
+
"construct": "function",
|
|
187
|
+
"process": "subsystems-studio/host",
|
|
188
|
+
"module": "packages/subsystems-studio/src/bun/index.ts",
|
|
189
|
+
"file": "packages/subsystems-studio/src/bun/index.ts",
|
|
190
|
+
"purl": "pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts",
|
|
191
|
+
"symbol": "broadcastSubsystemModelChanged",
|
|
192
|
+
"purpose": "Tells every surface a model changed so the canvas and lists reload."
|
|
193
|
+
}
|
|
194
|
+
],
|
|
195
|
+
"trails": [
|
|
196
|
+
{
|
|
197
|
+
"id": "tl-host-audit",
|
|
198
|
+
"title": "Run the deterministic host audit",
|
|
199
|
+
"steps": [
|
|
200
|
+
{
|
|
201
|
+
"from": "audit-model",
|
|
202
|
+
"to": "ensure-graphify-caches",
|
|
203
|
+
"mechanism": "calls",
|
|
204
|
+
"file": "packages/subsystems-studio/src/bun/verify-subsystem-component.ts",
|
|
205
|
+
"purl": "pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/verify-subsystem-component.ts",
|
|
206
|
+
"symbol": "auditSubsystemModel",
|
|
207
|
+
"annotation": "Ensure the current-HEAD graphify cache for every component purl.",
|
|
208
|
+
"span": {
|
|
209
|
+
"startLine": 1003,
|
|
210
|
+
"endLine": 1003,
|
|
211
|
+
"contentHash": "storybook-fixture"
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"from": "audit-model",
|
|
216
|
+
"to": "verify-files",
|
|
217
|
+
"mechanism": "calls",
|
|
218
|
+
"file": "packages/subsystems-studio/src/bun/verify-subsystem-component.ts",
|
|
219
|
+
"purl": "pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/verify-subsystem-component.ts",
|
|
220
|
+
"symbol": "auditSubsystemModel",
|
|
221
|
+
"annotation": "Check every component file and trail site resolves.",
|
|
222
|
+
"span": {
|
|
223
|
+
"startLine": 1216,
|
|
224
|
+
"endLine": 1216,
|
|
225
|
+
"contentHash": "22c9e227add5fcdace4ffc6789afad07"
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"from": "audit-model",
|
|
230
|
+
"to": "verify-component",
|
|
231
|
+
"mechanism": "calls",
|
|
232
|
+
"file": "packages/subsystems-studio/src/bun/verify-subsystem-component.ts",
|
|
233
|
+
"purl": "pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/verify-subsystem-component.ts",
|
|
234
|
+
"symbol": "auditSubsystemModel",
|
|
235
|
+
"annotation": "Dry-run each source component against its graphify anchor.",
|
|
236
|
+
"span": {
|
|
237
|
+
"startLine": 1159,
|
|
238
|
+
"endLine": 1159,
|
|
239
|
+
"contentHash": "storybook-fixture"
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"from": "verify-component",
|
|
244
|
+
"to": "graphify-readiness",
|
|
245
|
+
"mechanism": "calls",
|
|
246
|
+
"file": "packages/subsystems-studio/src/bun/verify-subsystem-component.ts",
|
|
247
|
+
"purl": "pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/verify-subsystem-component.ts",
|
|
248
|
+
"symbol": "verifySubsystemComponent",
|
|
249
|
+
"annotation": "Read the current-slot cache readiness for the component's purl.",
|
|
250
|
+
"span": {
|
|
251
|
+
"startLine": 586,
|
|
252
|
+
"endLine": 588,
|
|
253
|
+
"contentHash": "fd0883df22210fd04a4054c2620a68d2"
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
]
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"id": "tl-persist-audit",
|
|
260
|
+
"title": "Persist the audit report and its fingerprint",
|
|
261
|
+
"steps": [
|
|
262
|
+
{
|
|
263
|
+
"from": "audit-model",
|
|
264
|
+
"to": "graphify-readiness",
|
|
265
|
+
"mechanism": "calls",
|
|
266
|
+
"file": "packages/subsystems-studio/src/bun/verify-subsystem-component.ts",
|
|
267
|
+
"purl": "pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/verify-subsystem-component.ts",
|
|
268
|
+
"symbol": "auditSubsystemModel",
|
|
269
|
+
"annotation": "Capture current readiness to feed the fingerprint.",
|
|
270
|
+
"span": {
|
|
271
|
+
"startLine": 1643,
|
|
272
|
+
"endLine": 1643,
|
|
273
|
+
"contentHash": "storybook-fixture"
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
"from": "audit-model",
|
|
278
|
+
"to": "build-fingerprint",
|
|
279
|
+
"mechanism": "calls",
|
|
280
|
+
"file": "packages/subsystems-studio/src/bun/verify-subsystem-component.ts",
|
|
281
|
+
"purl": "pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/verify-subsystem-component.ts",
|
|
282
|
+
"symbol": "auditSubsystemModel",
|
|
283
|
+
"annotation": "Fingerprint the claims plus the graphify slot identity.",
|
|
284
|
+
"span": {
|
|
285
|
+
"startLine": 2002,
|
|
286
|
+
"endLine": 2006,
|
|
287
|
+
"contentHash": "5ffb36a0e2c7e4e8fc5b1b10bce2ff01"
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
"from": "audit-model",
|
|
292
|
+
"to": "save-audit",
|
|
293
|
+
"mechanism": "writes",
|
|
294
|
+
"file": "packages/subsystems-studio/src/bun/verify-subsystem-component.ts",
|
|
295
|
+
"purl": "pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/verify-subsystem-component.ts",
|
|
296
|
+
"symbol": "auditSubsystemModel",
|
|
297
|
+
"annotation": "Persist the report so badges and the issues list survive a relaunch.",
|
|
298
|
+
"span": {
|
|
299
|
+
"startLine": 1650,
|
|
300
|
+
"endLine": 1650,
|
|
301
|
+
"contentHash": "storybook-fixture"
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
]
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"id": "wt-regular-audit",
|
|
308
|
+
"title": "Background regular audit pass",
|
|
309
|
+
"steps": [
|
|
310
|
+
{
|
|
311
|
+
"from": "regular-audit-scheduler",
|
|
312
|
+
"to": "regular-audit-run",
|
|
313
|
+
"mechanism": "calls",
|
|
314
|
+
"file": "packages/subsystems-studio/src/bun/index.ts",
|
|
315
|
+
"purl": "pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts",
|
|
316
|
+
"symbol": "auditOne",
|
|
317
|
+
"annotation": "Hand the next stored model to the quiet re-audit once the timer fires.",
|
|
318
|
+
"span": {
|
|
319
|
+
"startLine": 3146,
|
|
320
|
+
"endLine": 3146,
|
|
321
|
+
"contentHash": "f3504f402572afd5f91f48a25cda389c"
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
"from": "regular-audit-run",
|
|
326
|
+
"to": "audit-stage-fixes",
|
|
327
|
+
"mechanism": "calls",
|
|
328
|
+
"file": "packages/subsystems-studio/src/bun/index.ts",
|
|
329
|
+
"purl": "pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts",
|
|
330
|
+
"symbol": "reauditSubsystemModelQuietly",
|
|
331
|
+
"annotation": "Run the audit then stage any one-click fixes it found.",
|
|
332
|
+
"span": {
|
|
333
|
+
"startLine": 3098,
|
|
334
|
+
"endLine": 3098,
|
|
335
|
+
"contentHash": "5c7b11e69cf79b1cf4c5ecb8f522ce4d"
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"from": "audit-stage-fixes",
|
|
340
|
+
"to": "audit-model",
|
|
341
|
+
"mechanism": "calls",
|
|
342
|
+
"file": "packages/subsystems-studio/src/bun/index.ts",
|
|
343
|
+
"purl": "pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts",
|
|
344
|
+
"symbol": "auditAndStageOneClickFixes",
|
|
345
|
+
"annotation": "Re-run the deterministic dry-run audit.",
|
|
346
|
+
"span": {
|
|
347
|
+
"startLine": 2954,
|
|
348
|
+
"endLine": 2954,
|
|
349
|
+
"contentHash": "storybook-fixture"
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
"from": "regular-audit-run",
|
|
354
|
+
"to": "broadcast-changed",
|
|
355
|
+
"mechanism": "calls",
|
|
356
|
+
"file": "packages/subsystems-studio/src/bun/index.ts",
|
|
357
|
+
"purl": "pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts",
|
|
358
|
+
"symbol": "reauditSubsystemModelQuietly",
|
|
359
|
+
"annotation": "Tell every surface the model changed so badges and the canvas reload.",
|
|
360
|
+
"span": {
|
|
361
|
+
"startLine": 2996,
|
|
362
|
+
"endLine": 2996,
|
|
363
|
+
"contentHash": "storybook-fixture"
|
|
364
|
+
}
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
"from": "regular-audit-scheduler",
|
|
368
|
+
"to": "regular-audit-status",
|
|
369
|
+
"mechanism": "produces",
|
|
370
|
+
"file": "packages/subsystems-studio/src/bun/index.ts",
|
|
371
|
+
"purl": "pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/index.ts",
|
|
372
|
+
"symbol": "onStatusChange",
|
|
373
|
+
"annotation": "Emit scheduler status on every enable, tick and pass finish.",
|
|
374
|
+
"span": {
|
|
375
|
+
"startLine": 3149,
|
|
376
|
+
"endLine": 3149,
|
|
377
|
+
"contentHash": "59a09a10b075afa60fe37cbc25c75a5d"
|
|
378
|
+
}
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
"from": "regular-audit-status",
|
|
382
|
+
"to": "regular-audit-subscribers",
|
|
383
|
+
"mechanism": "feeds",
|
|
384
|
+
"file": "packages/subsystems-studio/src/mainview/rpc.ts",
|
|
385
|
+
"purl": "pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/rpc.ts",
|
|
386
|
+
"symbol": "regularAuditChanged",
|
|
387
|
+
"annotation": "Fan the pushed status out to every registered renderer callback.",
|
|
388
|
+
"span": {
|
|
389
|
+
"startLine": 168,
|
|
390
|
+
"endLine": 168,
|
|
391
|
+
"contentHash": "storybook-fixture"
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
]
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
"id": "tl-renderer-issues",
|
|
398
|
+
"title": "Load the persisted audit into diagnostics",
|
|
399
|
+
"steps": [
|
|
400
|
+
{
|
|
401
|
+
"from": "subsystem-model-view",
|
|
402
|
+
"to": "load-audit",
|
|
403
|
+
"mechanism": "calls",
|
|
404
|
+
"file": "packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx",
|
|
405
|
+
"purl": "pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx",
|
|
406
|
+
"symbol": "loadAudit",
|
|
407
|
+
"annotation": "Read the persisted report and its live staleness over RPC.",
|
|
408
|
+
"span": {
|
|
409
|
+
"startLine": 170,
|
|
410
|
+
"endLine": 170,
|
|
411
|
+
"contentHash": "storybook-fixture"
|
|
412
|
+
}
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
"from": "subsystem-model-view",
|
|
416
|
+
"to": "audit-issues",
|
|
417
|
+
"mechanism": "uses",
|
|
418
|
+
"file": "packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx",
|
|
419
|
+
"purl": "pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx",
|
|
420
|
+
"symbol": "SubsystemModelView",
|
|
421
|
+
"annotation": "Map report findings into the diagnostics issues list.",
|
|
422
|
+
"span": {
|
|
423
|
+
"startLine": 485,
|
|
424
|
+
"endLine": 485,
|
|
425
|
+
"contentHash": "storybook-fixture"
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
]
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
"id": "tl-apply-fix",
|
|
432
|
+
"title": "Apply a one-click audit fix",
|
|
433
|
+
"steps": [
|
|
434
|
+
{
|
|
435
|
+
"from": "subsystem-model-view",
|
|
436
|
+
"to": "apply-fix",
|
|
437
|
+
"mechanism": "calls",
|
|
438
|
+
"file": "packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx",
|
|
439
|
+
"purl": "pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/mainview/views/SubsystemModelView.tsx",
|
|
440
|
+
"symbol": "onApplyIssueFix",
|
|
441
|
+
"annotation": "Apply the deterministic fix for a finding.",
|
|
442
|
+
"span": {
|
|
443
|
+
"startLine": 536,
|
|
444
|
+
"endLine": 536,
|
|
445
|
+
"contentHash": "storybook-fixture"
|
|
446
|
+
}
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
"from": "apply-fix",
|
|
450
|
+
"to": "verify-component",
|
|
451
|
+
"mechanism": "calls",
|
|
452
|
+
"file": "packages/subsystems-studio/src/bun/verify-subsystem-component.ts",
|
|
453
|
+
"purl": "pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/verify-subsystem-component.ts",
|
|
454
|
+
"symbol": "applySubsystemModelAuditFix",
|
|
455
|
+
"annotation": "Re-verify the component to re-derive the fix premise.",
|
|
456
|
+
"span": {
|
|
457
|
+
"startLine": 1733,
|
|
458
|
+
"endLine": 1733,
|
|
459
|
+
"contentHash": "storybook-fixture"
|
|
460
|
+
}
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
"from": "apply-fix",
|
|
464
|
+
"to": "audit-model",
|
|
465
|
+
"mechanism": "calls",
|
|
466
|
+
"file": "packages/subsystems-studio/src/bun/verify-subsystem-component.ts",
|
|
467
|
+
"purl": "pkg:github/principal-ai/subsystem-modeling#packages/subsystems-studio/src/bun/verify-subsystem-component.ts",
|
|
468
|
+
"symbol": "applySubsystemModelAuditFix",
|
|
469
|
+
"annotation": "Re-audit after the fix lands so the report is fresh.",
|
|
470
|
+
"span": {
|
|
471
|
+
"startLine": 1769,
|
|
472
|
+
"endLine": 1769,
|
|
473
|
+
"contentHash": "storybook-fixture"
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
]
|
|
477
|
+
}
|
|
478
|
+
]
|
|
479
|
+
}
|
|
@@ -37,3 +37,14 @@ describe('issueCategory — C4 process kinds', () => {
|
|
|
37
37
|
);
|
|
38
38
|
});
|
|
39
39
|
});
|
|
40
|
+
|
|
41
|
+
describe('issueCategory — unconnected components', () => {
|
|
42
|
+
test('files unconnected components under Trail', () => {
|
|
43
|
+
expect(
|
|
44
|
+
issueCategory({ id: 'x', severity: 'info', kind: 'component_unconnected', message: '' }),
|
|
45
|
+
).toBe('trail');
|
|
46
|
+
expect(
|
|
47
|
+
issueKindLabel({ id: 'x', severity: 'info', kind: 'component_unconnected', message: '' }),
|
|
48
|
+
).toBe('Component has no trail edges');
|
|
49
|
+
});
|
|
50
|
+
});
|
|
@@ -99,6 +99,7 @@ export const SUBSYSTEM_ISSUE_CATEGORY_LABEL: Record<
|
|
|
99
99
|
|
|
100
100
|
/** Default `kind` → layer. Module containment is static; process nest is dynamic. */
|
|
101
101
|
const KIND_CATEGORY: Record<string, SubsystemIssueCategory> = {
|
|
102
|
+
component_unconnected: 'trail',
|
|
102
103
|
missing_file: 'construct',
|
|
103
104
|
symbol_ambiguous: 'construct',
|
|
104
105
|
symbol_unmatched: 'construct',
|
|
@@ -279,6 +280,7 @@ export function humanizeIssueKind(kind: string): string {
|
|
|
279
280
|
* scopes them. Explicit `issue.kindLabel` wins.
|
|
280
281
|
*/
|
|
281
282
|
const KIND_LABEL: Record<string, string> = {
|
|
283
|
+
component_unconnected: 'Component has no trail edges',
|
|
282
284
|
missing_file: 'Construct declaration file missing',
|
|
283
285
|
symbol_ambiguous: 'Multiple construct symbol matches',
|
|
284
286
|
symbol_unmatched: 'Construct symbol missing',
|
|
@@ -289,7 +291,7 @@ const KIND_LABEL: Record<string, string> = {
|
|
|
289
291
|
signature_mismatch: 'Construct signature mismatch',
|
|
290
292
|
signature_unconfirmed: 'Construct signature unconfirmed',
|
|
291
293
|
repo_unresolved: 'No repository clone',
|
|
292
|
-
graphify_unavailable: '
|
|
294
|
+
graphify_unavailable: 'Source verification unavailable',
|
|
293
295
|
boundary_module_file_mismatch: 'Declaration file outside module',
|
|
294
296
|
boundary_process_nest_disagree: 'Module spans multiple process contexts',
|
|
295
297
|
// C4 process verification (labels read as boundary states, since the layer
|
|
@@ -345,7 +347,8 @@ const KIND_ORDER: Record<string, number> = {
|
|
|
345
347
|
boundary_process_unbacked: 33,
|
|
346
348
|
boundary_process_proposed: 34,
|
|
347
349
|
boundary_process_rejected: 35,
|
|
348
|
-
// Trail — mechanical issues
|
|
350
|
+
// Trail — graph-level completeness, then mechanical issues and step verification
|
|
351
|
+
component_unconnected: 39,
|
|
349
352
|
trail: 40,
|
|
350
353
|
step_span_unconfirmed: 41,
|
|
351
354
|
step_span_stale: 42,
|
|
@@ -112,6 +112,7 @@ import {
|
|
|
112
112
|
EDGE_LABEL_CLOUD_PATH,
|
|
113
113
|
EDGE_LABEL_CLOUD_EXTRA_TOP,
|
|
114
114
|
} from '../utils/edgeLabel';
|
|
115
|
+
import { graphGeometryBounds } from '../utils/elkLayout';
|
|
115
116
|
|
|
116
117
|
/** Context passed to `renderTrailViewer` when a flow/step is focused. */
|
|
117
118
|
export interface TrailViewerContext {
|
|
@@ -778,6 +779,43 @@ function Inner({ components, trails, graphifyRelations, orderByLine, layoutDirec
|
|
|
778
779
|
edges: [],
|
|
779
780
|
absoluteRects: new Map(),
|
|
780
781
|
});
|
|
782
|
+
const fitGraphContents = useCallback(
|
|
783
|
+
(duration = 300) => {
|
|
784
|
+
const edges = built.edges.map((edge) => {
|
|
785
|
+
const data = edge.data as
|
|
786
|
+
| {
|
|
787
|
+
labelX?: number;
|
|
788
|
+
labelY?: number;
|
|
789
|
+
elkPathPoints?: { x: number; y: number }[];
|
|
790
|
+
}
|
|
791
|
+
| undefined;
|
|
792
|
+
return {
|
|
793
|
+
points: data?.elkPathPoints,
|
|
794
|
+
labelCenter:
|
|
795
|
+
data?.labelX != null && data.labelY != null
|
|
796
|
+
? { x: data.labelX, y: data.labelY }
|
|
797
|
+
: undefined,
|
|
798
|
+
};
|
|
799
|
+
});
|
|
800
|
+
const bounds = graphGeometryBounds(
|
|
801
|
+
built.absoluteRects.values(),
|
|
802
|
+
edges,
|
|
803
|
+
{ width: EDGE_LABEL_WIDTH, height: EDGE_LABEL_HEIGHT },
|
|
804
|
+
);
|
|
805
|
+
if (!bounds) {
|
|
806
|
+
fitView({
|
|
807
|
+
padding: 0.1,
|
|
808
|
+
includeHiddenNodes: false,
|
|
809
|
+
minZoom: 0.05,
|
|
810
|
+
maxZoom: 2,
|
|
811
|
+
duration,
|
|
812
|
+
});
|
|
813
|
+
return;
|
|
814
|
+
}
|
|
815
|
+
fitBounds(bounds, { padding: 0.1, duration });
|
|
816
|
+
},
|
|
817
|
+
[built.absoluteRects, built.edges, fitBounds, fitView],
|
|
818
|
+
);
|
|
781
819
|
const [layoutReady, setLayoutReady] = useState(false);
|
|
782
820
|
const transparentCanvas = canvasBackground === 'transparent';
|
|
783
821
|
|
|
@@ -993,15 +1031,9 @@ function Inner({ components, trails, graphifyRelations, orderByLine, layoutDirec
|
|
|
993
1031
|
if (!layoutReady || !refitAfterLayoutRef.current) return;
|
|
994
1032
|
refitAfterLayoutRef.current = false;
|
|
995
1033
|
requestAnimationFrame(() => {
|
|
996
|
-
|
|
997
|
-
padding: 0.1,
|
|
998
|
-
includeHiddenNodes: false,
|
|
999
|
-
minZoom: 0.05,
|
|
1000
|
-
maxZoom: 2,
|
|
1001
|
-
duration: LAYOUT_FLIP_NODE_MS,
|
|
1002
|
-
});
|
|
1034
|
+
fitGraphContents(LAYOUT_FLIP_NODE_MS);
|
|
1003
1035
|
});
|
|
1004
|
-
}, [built, layoutReady,
|
|
1036
|
+
}, [built, layoutReady, fitGraphContents]);
|
|
1005
1037
|
|
|
1006
1038
|
// Persist the choice so a model reopens the way it was left.
|
|
1007
1039
|
useEffect(() => {
|
|
@@ -2104,10 +2136,10 @@ function Inner({ components, trails, graphifyRelations, orderByLine, layoutDirec
|
|
|
2104
2136
|
// mount/edit fit would otherwise fire mid-flip and fight it.
|
|
2105
2137
|
if (layoutFlipping) return;
|
|
2106
2138
|
const t = setTimeout(() => {
|
|
2107
|
-
|
|
2139
|
+
fitGraphContents(200);
|
|
2108
2140
|
}, 200);
|
|
2109
2141
|
return () => clearTimeout(t);
|
|
2110
|
-
}, [baseNodesKey, baseEdgesKey,
|
|
2142
|
+
}, [baseNodesKey, baseEdgesKey, fitGraphContents, layoutFlipping]);
|
|
2111
2143
|
|
|
2112
2144
|
// When the file drawer opens or closes the canvas is resized but the
|
|
2113
2145
|
// camera stays put — no refit/zoom. Spotlight + dimming already convey
|
|
@@ -2477,17 +2509,13 @@ function Inner({ components, trails, graphifyRelations, orderByLine, layoutDirec
|
|
|
2477
2509
|
);
|
|
2478
2510
|
|
|
2479
2511
|
// Zoom back out to the full diagram after the last expanded trail
|
|
2480
|
-
// closes (visibility restores non-flow nodes that were hidden).
|
|
2512
|
+
// closes (visibility restores non-flow nodes that were hidden). `fitView`
|
|
2513
|
+
// only considers node rectangles, but routed edges and their label chips can
|
|
2514
|
+
// extend beyond those rectangles; include their ELK geometry in the frame.
|
|
2481
2515
|
const fitOverview = useCallback(() => {
|
|
2482
2516
|
if (!zoomOnTrailFocus) return;
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
includeHiddenNodes: false,
|
|
2486
|
-
minZoom: 0.05,
|
|
2487
|
-
maxZoom: 2,
|
|
2488
|
-
duration: 300,
|
|
2489
|
-
});
|
|
2490
|
-
}, [fitView, zoomOnTrailFocus]);
|
|
2517
|
+
fitGraphContents(300);
|
|
2518
|
+
}, [fitGraphContents, zoomOnTrailFocus]);
|
|
2491
2519
|
|
|
2492
2520
|
// Focus an entire flow: hide everything but the flow's nodes and edges, and
|
|
2493
2521
|
// frame the flow on the canvas. Selection state is cleared — the graph now
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { describe, expect, test } from 'bun:test';
|
|
2
|
+
import { containerLabelChunks } from './containerCard';
|
|
3
|
+
|
|
4
|
+
describe('containerLabelChunks', () => {
|
|
5
|
+
test('keeps slash-delimited path segments intact and offers a break after slash', () => {
|
|
6
|
+
expect(containerLabelChunks('subsystems-studio/host')).toEqual([
|
|
7
|
+
{ text: 'subsystems-studio/', pathSegment: true, breakAfter: true },
|
|
8
|
+
{ text: 'host', pathSegment: true, breakAfter: false },
|
|
9
|
+
]);
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
test('supports multiple slash boundaries', () => {
|
|
13
|
+
expect(containerLabelChunks('packages/foo-bar/baz-qux')).toEqual([
|
|
14
|
+
{ text: 'packages/', pathSegment: true, breakAfter: true },
|
|
15
|
+
{ text: 'foo-bar/', pathSegment: true, breakAfter: true },
|
|
16
|
+
{ text: 'baz-qux', pathSegment: true, breakAfter: false },
|
|
17
|
+
]);
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
test('preserves ordinary labels and whitespace', () => {
|
|
21
|
+
expect(containerLabelChunks('foo-bar ordinary label/path-name')).toEqual([
|
|
22
|
+
{ text: 'foo-bar', pathSegment: false, breakAfter: false },
|
|
23
|
+
{ text: ' ', pathSegment: false, breakAfter: false },
|
|
24
|
+
{ text: 'ordinary', pathSegment: false, breakAfter: false },
|
|
25
|
+
{ text: ' ', pathSegment: false, breakAfter: false },
|
|
26
|
+
{ text: 'label/', pathSegment: true, breakAfter: true },
|
|
27
|
+
{ text: 'path-name', pathSegment: true, breakAfter: false },
|
|
28
|
+
]);
|
|
29
|
+
});
|
|
30
|
+
});
|