@principal-ai/subsystems-react 0.25.1 → 0.26.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/index.d.ts +2 -0
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +1 -0
  4. package/dist/index.js.map +1 -1
  5. package/dist/stories/Subsystem/ComponentGraph/aggregateViewFixture.d.ts +5 -0
  6. package/dist/stories/Subsystem/ComponentGraph/aggregateViewFixture.d.ts.map +1 -0
  7. package/dist/stories/Subsystem/ComponentGraph/aggregateViewFixture.js +4 -0
  8. package/dist/stories/Subsystem/ComponentGraph/aggregateViewFixture.js.map +1 -0
  9. package/dist/subsystem/SubsystemAggregateGraph.d.ts +70 -0
  10. package/dist/subsystem/SubsystemAggregateGraph.d.ts.map +1 -0
  11. package/dist/subsystem/SubsystemAggregateGraph.js +386 -0
  12. package/dist/subsystem/SubsystemAggregateGraph.js.map +1 -0
  13. package/dist/subsystem/SubsystemComponentGraph.d.ts +8 -0
  14. package/dist/subsystem/SubsystemComponentGraph.d.ts.map +1 -1
  15. package/dist/subsystem/SubsystemComponentGraph.js +25 -4
  16. package/dist/subsystem/SubsystemComponentGraph.js.map +1 -1
  17. package/dist/subsystem/graphChrome.d.ts +27 -0
  18. package/dist/subsystem/graphChrome.d.ts.map +1 -0
  19. package/dist/subsystem/graphChrome.js +30 -0
  20. package/dist/subsystem/graphChrome.js.map +1 -0
  21. package/dist/subsystem/model.d.ts +7 -0
  22. package/dist/subsystem/model.d.ts.map +1 -1
  23. package/dist/subsystem/model.js +35 -0
  24. package/dist/subsystem/model.js.map +1 -1
  25. package/package.json +1 -1
  26. package/src/index.ts +8 -0
  27. package/src/stories/Subsystem/ComponentGraph/AggregateFrameGraph.stories.tsx +61 -0
  28. package/src/stories/Subsystem/ComponentGraph/aggregateViewFixture.ts +8 -0
  29. package/src/subsystem/SubsystemAggregateGraph.tsx +610 -0
  30. package/src/subsystem/SubsystemComponentGraph.tsx +29 -18
  31. package/src/subsystem/graphChrome.tsx +41 -0
  32. package/src/subsystem/model.test.ts +17 -0
  33. package/src/subsystem/model.ts +34 -0
@@ -0,0 +1,386 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * SubsystemAggregateGraph — frame-level overview canvas.
4
+ *
5
+ * Same stack and interaction language as SubsystemComponentGraph
6
+ * (React Flow + ELK + custom nodes + select/hover), but purpose-built for
7
+ * composed views: nodes are process / module frames (plus one ungrouped
8
+ * bucket), edges are the deduped walkthrough flows between them.
9
+ *
10
+ * Deliberately leaner than the component graph: fixed node sizes (no
11
+ * measurement passes), flat ELK layout (no compound groups, so the
12
+ * double-parent failure mode is structurally impossible), no edge labels,
13
+ * no walkthrough playback, no drawers. Frame detail (members, models)
14
+ * renders in a side panel.
15
+ */
16
+ import { useCallback, useEffect, useMemo, useState } from 'react';
17
+ import { Handle, MarkerType, Position, ReactFlow, ReactFlowProvider, useReactFlow, } from '@xyflow/react';
18
+ import { useTheme } from '@principal-ade/industry-theme';
19
+ import { computeElkLayout } from '../utils/elkLayout';
20
+ import { describeConstructBreakdown, MECHANISM_COLOR } from './model';
21
+ import { GRAPH_NAV_PROPS, GraphChrome } from './graphChrome';
22
+ const NODE_W = 232;
23
+ const NODE_H = 78;
24
+ function edgeColor(mechanism, fallback) {
25
+ if (!mechanism)
26
+ return fallback;
27
+ return MECHANISM_COLOR[mechanism] ?? fallback;
28
+ }
29
+ function AggregateFrameGroupView(props) {
30
+ const { theme } = useTheme();
31
+ const external = props.data.kind === 'external';
32
+ const border = external
33
+ ? (theme.colors.warning ?? theme.colors.accent ?? theme.colors.info)
34
+ : (theme.colors.border ?? '#333');
35
+ return (_jsx("div", { style: {
36
+ width: '100%',
37
+ height: '100%',
38
+ boxSizing: 'border-box',
39
+ borderRadius: 12,
40
+ border: `2px ${external ? 'solid' : 'dashed'} ${border}`,
41
+ background: 'transparent',
42
+ pointerEvents: 'none',
43
+ }, children: _jsx("span", { style: {
44
+ position: 'absolute',
45
+ top: -11,
46
+ left: 12,
47
+ fontFamily: theme.fonts.monospace,
48
+ fontSize: theme.fontSizes[1],
49
+ letterSpacing: 0.5,
50
+ textTransform: 'uppercase',
51
+ color: external
52
+ ? border
53
+ : (theme.colors.textMuted ?? theme.colors.textSecondary),
54
+ background: theme.colors.background,
55
+ padding: '0 8px',
56
+ whiteSpace: 'nowrap',
57
+ }, children: props.data.label }) }));
58
+ }
59
+ const HUB_W = 96;
60
+ const HUB_H = 30;
61
+ function AggregateHubNodeView(props) {
62
+ const { theme } = useTheme();
63
+ const { hub } = props.data;
64
+ const color = hub.group.kind === 'external'
65
+ ? (theme.colors.warning ?? theme.colors.accent ?? theme.colors.info)
66
+ : (theme.colors.border ?? '#333');
67
+ return (_jsxs("div", { style: {
68
+ width: HUB_W,
69
+ height: HUB_H,
70
+ boxSizing: 'border-box',
71
+ display: 'flex',
72
+ alignItems: 'center',
73
+ justifyContent: 'center',
74
+ borderRadius: HUB_H / 2,
75
+ border: `1px solid ${color}`,
76
+ background: theme.colors.background,
77
+ color: theme.colors.textMuted ?? theme.colors.textSecondary,
78
+ fontFamily: theme.fonts.monospace,
79
+ fontSize: theme.fontSizes[0],
80
+ letterSpacing: 0.4,
81
+ whiteSpace: 'nowrap',
82
+ overflow: 'hidden',
83
+ textOverflow: 'ellipsis',
84
+ }, title: hub.label, children: [hub.kind === 'intake' ? '▸ in' : 'out ▸', _jsx(Handle, { type: "target", position: Position.Left, style: { opacity: 0 } }), _jsx(Handle, { type: "source", position: Position.Right, style: { opacity: 0 } })] }));
85
+ }
86
+ function AggregateFrameNodeView(props) {
87
+ const { theme } = useTheme();
88
+ const { data } = props;
89
+ const f = data.frame;
90
+ const muted = theme.colors.textMuted ?? theme.colors.textSecondary;
91
+ // Process buckets read as sub-regions, not entities: dashed boundary
92
+ // chrome and a flat fill, mirroring the group frames. Externals are real
93
+ // systems — solid chrome like other nodes, just without a module tag.
94
+ // Module/ungrouped boxes keep solid node chrome.
95
+ const boundaryStyled = f.kind === 'process';
96
+ // A process box nested inside its own process boundary would otherwise
97
+ // repeat the boundary's name — it holds that process's module-less
98
+ // members, so it says so. Root-level boxes keep their key for context.
99
+ // External boxes never nest in a same-named frame (their boundary is the
100
+ // shared `external` one), so they always keep their system name.
101
+ const title = f.kind === 'process' && data.nested ? 'unframed' : f.label;
102
+ const fullTitle = f.kind === 'process' && data.nested ? `${f.label} · unframed members` : f.label;
103
+ return (_jsxs("div", { style: {
104
+ width: NODE_W,
105
+ height: NODE_H,
106
+ boxSizing: 'border-box',
107
+ display: 'flex',
108
+ flexDirection: 'column',
109
+ justifyContent: 'center',
110
+ gap: 2,
111
+ padding: '8px 12px',
112
+ borderRadius: 8,
113
+ // The unframed bucket paints the canvas background rather than
114
+ // staying transparent, so routed edges don't show through its label.
115
+ background: boundaryStyled
116
+ ? theme.colors.background
117
+ : (theme.colors.backgroundSecondary ?? theme.colors.background),
118
+ border: `2px ${boundaryStyled ? 'dashed' : 'solid'} ${data.selected ? theme.colors.primary : (theme.colors.border ?? '#333')}`,
119
+ boxShadow: boundaryStyled ? 'none' : '0 1px 4px rgba(0,0,0,0.25)',
120
+ opacity: data.dimmed ? 0.35 : 1,
121
+ transition: 'opacity 120ms ease, border-color 120ms ease',
122
+ cursor: 'pointer',
123
+ fontFamily: theme.fonts.body,
124
+ }, children: [f.kind === 'module' && (_jsx("span", { style: {
125
+ fontFamily: theme.fonts.monospace,
126
+ fontSize: theme.fontSizes[0],
127
+ letterSpacing: 0.5,
128
+ textTransform: 'uppercase',
129
+ color: theme.colors.accent ?? theme.colors.info,
130
+ whiteSpace: 'nowrap',
131
+ overflow: 'hidden',
132
+ textOverflow: 'ellipsis',
133
+ }, children: "module" })), _jsx("span", { style: {
134
+ fontWeight: 600,
135
+ fontSize: theme.fontSizes[2],
136
+ color: theme.colors.text,
137
+ whiteSpace: 'nowrap',
138
+ overflow: 'hidden',
139
+ textOverflow: 'ellipsis',
140
+ }, title: fullTitle, children: title }), _jsxs("span", { style: {
141
+ fontFamily: theme.fonts.monospace,
142
+ fontSize: theme.fontSizes[0],
143
+ color: muted,
144
+ whiteSpace: 'nowrap',
145
+ overflow: 'hidden',
146
+ textOverflow: 'ellipsis',
147
+ }, children: [describeConstructBreakdown(f.members.map((m) => m.construct)), f.models.length > 0 ? ` · ${f.models.length} model${f.models.length === 1 ? '' : 's'}` : ''] }), _jsx(Handle, { type: "target", position: Position.Left, style: { opacity: 0 } }), _jsx(Handle, { type: "source", position: Position.Right, style: { opacity: 0 } })] }));
148
+ }
149
+ const nodeTypes = {
150
+ 'aggregate-frame': AggregateFrameNodeView,
151
+ 'aggregate-frame-group': AggregateFrameGroupView,
152
+ 'aggregate-hub': AggregateHubNodeView,
153
+ };
154
+ function Inner({ frames, edges, hubs = [], title, onSelectFrame, onOpenFile, }) {
155
+ const { theme } = useTheme();
156
+ const { fitView } = useReactFlow();
157
+ const muted = theme.colors.textMuted ?? theme.colors.textSecondary;
158
+ const [nodes, setNodes] = useState([]);
159
+ const [rfEdges, setRfEdges] = useState([]);
160
+ const [ready, setReady] = useState(false);
161
+ const [selectedId, setSelectedId] = useState(null);
162
+ const [hoveredId, setHoveredId] = useState(null);
163
+ const layoutKey = useMemo(() => [
164
+ ...frames.map((f) => f.id).sort(),
165
+ ...edges.map((e) => `${e.from}\0${e.to}\0${e.steps}`).sort(),
166
+ ].join('\n'), [frames, edges, hubs]);
167
+ useEffect(() => {
168
+ let alive = true;
169
+ setReady(false);
170
+ setSelectedId(null);
171
+ // Compound process frames: each box is parented to exactly one process
172
+ // group (its majority process); process member-boxes to their own
173
+ // process; the rest stays root-level. Exclusive assignment by
174
+ // construction — the double-parent failure mode cannot occur here.
175
+ const groupIdFor = (kind, key) => `frame:${kind}:${key}`;
176
+ const groupDefs = new Map();
177
+ for (const f of frames) {
178
+ if (!f.group)
179
+ continue;
180
+ const id = groupIdFor(f.group.kind, f.group.key);
181
+ if (!groupDefs.has(id))
182
+ groupDefs.set(id, { id, ...f.group });
183
+ }
184
+ const rfNodes = [
185
+ ...frames.map((f, i) => ({
186
+ id: f.id,
187
+ type: 'aggregate-frame',
188
+ // Pre-ELK grid slot; replaced by ELK positions below.
189
+ position: { x: (i % 4) * (NODE_W + 60), y: Math.floor(i / 4) * (NODE_H + 40) },
190
+ width: NODE_W,
191
+ height: NODE_H,
192
+ ...(f.group ? { parentId: groupIdFor(f.group.kind, f.group.key) } : {}),
193
+ data: { frame: f, selected: false, dimmed: false },
194
+ })),
195
+ ...hubs.map((h) => ({
196
+ id: h.id,
197
+ type: 'aggregate-hub',
198
+ position: { x: 0, y: 0 },
199
+ width: HUB_W,
200
+ height: HUB_H,
201
+ parentId: groupIdFor(h.group.kind, h.group.key),
202
+ data: { hub: h },
203
+ })),
204
+ ];
205
+ const groups = [...groupDefs.values()].map((g) => ({
206
+ id: g.id,
207
+ memberIds: [
208
+ ...frames
209
+ .filter((f) => f.group?.kind === g.kind && f.group?.key === g.key)
210
+ .map((f) => f.id),
211
+ ...hubs
212
+ .filter((h) => h.group.kind === g.kind && h.group.key === g.key)
213
+ .map((h) => h.id),
214
+ ],
215
+ }));
216
+ const rfEdges = edges
217
+ .filter((e) => e.from !== e.to)
218
+ .map((e) => ({
219
+ id: `${e.from}\0${e.to}`,
220
+ source: e.from,
221
+ target: e.to,
222
+ style: {
223
+ stroke: edgeColor(e.mechanisms[0], muted),
224
+ strokeWidth: 1 + Math.min(e.steps, 6) * 0.5,
225
+ },
226
+ markerEnd: {
227
+ type: MarkerType.ArrowClosed,
228
+ color: edgeColor(e.mechanisms[0], muted),
229
+ width: 20,
230
+ height: 20,
231
+ },
232
+ data: { edge: e },
233
+ }));
234
+ void computeElkLayout(rfNodes, rfEdges, {
235
+ direction: 'RIGHT',
236
+ // Reposition (never keep the placeholder grid) and lay out compound
237
+ // process frames.
238
+ preserveNodePositions: false,
239
+ groups,
240
+ })
241
+ .then((result) => {
242
+ if (!alive)
243
+ return;
244
+ const positioned = new Map(result.nodes.map((n) => [n.id, n]));
245
+ const builtGroups = new Set(result.groupBounds.keys());
246
+ const shells = [];
247
+ for (const [id, b] of result.groupBounds) {
248
+ const def = groupDefs.get(id);
249
+ shells.push({
250
+ id,
251
+ type: 'aggregate-frame-group',
252
+ position: { x: b.x, y: b.y },
253
+ width: Math.max(200, b.width),
254
+ height: Math.max(120, b.height),
255
+ draggable: false,
256
+ selectable: false,
257
+ data: {
258
+ label: def?.key ?? id,
259
+ kind: def?.kind ?? 'process',
260
+ },
261
+ });
262
+ }
263
+ // Clear leaf parentIds that point at groups ELK dropped.
264
+ const leaves = rfNodes.map((n) => {
265
+ const p = positioned.get(n.id);
266
+ const node = p ? { ...n, position: { x: p.position.x, y: p.position.y } } : n;
267
+ const parentId = node.parentId;
268
+ if (parentId && !builtGroups.has(parentId)) {
269
+ const { parentId: _drop, ...rest } = node;
270
+ return rest;
271
+ }
272
+ return node;
273
+ });
274
+ setNodes([...shells, ...leaves]);
275
+ setRfEdges(rfEdges);
276
+ setReady(true);
277
+ requestAnimationFrame(() => fitView({ padding: 0.15 }));
278
+ })
279
+ .catch((err) => {
280
+ if (!alive)
281
+ return;
282
+ console.warn('[subsystem-aggregate-graph] ELK layout failed, using grid:', err);
283
+ setNodes(rfNodes);
284
+ setRfEdges(rfEdges);
285
+ setReady(true);
286
+ requestAnimationFrame(() => fitView({ padding: 0.15 }));
287
+ });
288
+ return () => {
289
+ alive = false;
290
+ };
291
+ // eslint-disable-next-line react-hooks/exhaustive-deps
292
+ }, [layoutKey]);
293
+ const neighborIds = useMemo(() => {
294
+ const focus = hoveredId ?? selectedId;
295
+ if (!focus)
296
+ return null;
297
+ const set = new Set([focus]);
298
+ for (const e of edges) {
299
+ if (e.from === focus)
300
+ set.add(e.to);
301
+ if (e.to === focus)
302
+ set.add(e.from);
303
+ }
304
+ return set;
305
+ }, [hoveredId, selectedId, edges]);
306
+ const selected = selectedId ? (frames.find((f) => f.id === selectedId) ?? null) : null;
307
+ const onNodeClick = useCallback((_e, node) => {
308
+ const next = selectedId === node.id ? null : node.id;
309
+ setSelectedId(next);
310
+ onSelectFrame?.(next);
311
+ }, [selectedId, onSelectFrame]);
312
+ const displayNodes = useMemo(() => nodes.map((n) => ({
313
+ ...n,
314
+ data: {
315
+ ...n.data,
316
+ selected: selectedId === n.id,
317
+ dimmed: neighborIds ? !neighborIds.has(n.id) : false,
318
+ // Surviving parentId means ELK built this node's process frame —
319
+ // the node renders nested, so a process box drops its redundant name.
320
+ nested: n.parentId != null,
321
+ },
322
+ })), [nodes, selectedId, neighborIds]);
323
+ const displayEdges = useMemo(() => rfEdges.map((e) => {
324
+ const dimmed = neighborIds != null &&
325
+ !(neighborIds.has(e.source) && neighborIds.has(e.target));
326
+ return {
327
+ ...e,
328
+ style: { ...e.style, opacity: dimmed ? 0.12 : 0.9 },
329
+ };
330
+ }), [rfEdges, neighborIds]);
331
+ return (_jsxs("div", { style: { position: 'relative', width: '100%', height: '100%', background: theme.colors.background }, children: [_jsx(ReactFlow, { nodes: displayNodes, edges: displayEdges, nodeTypes: nodeTypes, ...GRAPH_NAV_PROPS, onNodeClick: onNodeClick, onNodeMouseEnter: (_e, node) => setHoveredId(node.id), onNodeMouseLeave: () => setHoveredId(null), onPaneClick: () => {
332
+ setSelectedId(null);
333
+ onSelectFrame?.(null);
334
+ }, proOptions: { hideAttribution: true }, children: _jsx(GraphChrome, {}) }), !ready && (_jsx("div", { style: {
335
+ position: 'absolute',
336
+ inset: 0,
337
+ display: 'flex',
338
+ alignItems: 'center',
339
+ justifyContent: 'center',
340
+ background: theme.colors.background,
341
+ color: muted,
342
+ fontFamily: theme.fonts.monospace,
343
+ fontSize: theme.fontSizes[0],
344
+ }, children: "Laying out frames\u2026" })), title && (_jsx("div", { style: {
345
+ position: 'absolute',
346
+ top: 12,
347
+ left: 12,
348
+ fontSize: theme.fontSizes[2],
349
+ fontWeight: 600,
350
+ color: theme.colors.text,
351
+ background: theme.colors.backgroundSecondary ?? theme.colors.background,
352
+ border: `1px solid ${theme.colors.border ?? '#333'}`,
353
+ borderRadius: 6,
354
+ padding: '4px 10px',
355
+ }, children: title })), selected && (_jsxs("div", { style: {
356
+ position: 'absolute',
357
+ top: 12,
358
+ right: 12,
359
+ width: 280,
360
+ maxHeight: 'calc(100% - 24px)',
361
+ overflowY: 'auto',
362
+ background: theme.colors.backgroundSecondary ?? theme.colors.background,
363
+ border: `1px solid ${theme.colors.border ?? '#333'}`,
364
+ borderRadius: 8,
365
+ padding: '10px 12px',
366
+ }, children: [_jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 8 }, children: [_jsx("span", { style: { fontWeight: 600, color: theme.colors.text, flex: 1, minWidth: 0, overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }, children: selected.label }), _jsx("button", { type: "button", onClick: () => {
367
+ setSelectedId(null);
368
+ onSelectFrame?.(null);
369
+ }, "aria-label": "Clear selection", style: { border: 'none', background: 'transparent', color: muted, cursor: 'pointer', fontSize: theme.fontSizes[2], lineHeight: 1 }, children: "\u00D7" })] }), _jsxs("div", { style: { fontFamily: theme.fonts.monospace, fontSize: theme.fontSizes[0], color: muted, margin: '4px 0 8px' }, children: [selected.kind, " \u00B7 ", selected.members.length, " member", selected.members.length === 1 ? '' : 's', selected.models.length > 0 ? ` · ${selected.models.length} model${selected.models.length === 1 ? '' : 's'}` : ''] }), _jsx("div", { style: { display: 'flex', flexDirection: 'column', gap: 2 }, children: selected.members.map((m) => (_jsx("button", { type: "button", title: `${m.alias}${m.file ? ` — ${m.file}` : ''}`, disabled: !m.file || !onOpenFile, onClick: () => m.file && onOpenFile?.(m.file), style: {
370
+ border: 'none',
371
+ background: 'transparent',
372
+ color: m.file ? theme.colors.text : muted,
373
+ cursor: m.file && onOpenFile ? 'pointer' : 'default',
374
+ fontFamily: theme.fonts.monospace,
375
+ fontSize: theme.fontSizes[0],
376
+ textAlign: 'left',
377
+ padding: '2px 0',
378
+ overflow: 'hidden',
379
+ textOverflow: 'ellipsis',
380
+ whiteSpace: 'nowrap',
381
+ }, children: m.alias }, m.alias))) })] }))] }));
382
+ }
383
+ export function SubsystemAggregateGraph(props) {
384
+ return (_jsx(ReactFlowProvider, { children: _jsx(Inner, { ...props }) }));
385
+ }
386
+ //# sourceMappingURL=SubsystemAggregateGraph.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SubsystemAggregateGraph.js","sourceRoot":"","sources":["../../src/subsystem/SubsystemAggregateGraph.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAClE,OAAO,EAEL,MAAM,EACN,UAAU,EAGV,QAAQ,EACR,SAAS,EACT,iBAAiB,EACjB,YAAY,GACb,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,0BAA0B,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAsD7D,MAAM,MAAM,GAAG,GAAG,CAAC;AACnB,MAAM,MAAM,GAAG,EAAE,CAAC;AAElB,SAAS,SAAS,CAAC,SAA6B,EAAE,QAAgB;IAChE,IAAI,CAAC,SAAS;QAAE,OAAO,QAAQ,CAAC;IAChC,OAAQ,eAA0C,CAAC,SAAS,CAAC,IAAI,QAAQ,CAAC;AAC5E,CAAC;AAED,SAAS,uBAAuB,CAC9B,KAAuE;IAEvE,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,EAAE,CAAC;IAC7B,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC;IAChD,MAAM,MAAM,GAAG,QAAQ;QACrB,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,O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G,CACP,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,KAAmC;IACzE,OAAO,CACL,KAAC,iBAAiB,cAChB,KAAC,KAAK,OAAK,KAAK,GAAI,GACF,CACrB,CAAC;AACJ,CAAC"}
@@ -42,6 +42,14 @@ export interface SubsystemComponentGraphProps {
42
42
  * (unselected ones dimmed); everything else is hidden.
43
43
  */
44
44
  walkthroughs?: SubsystemWalkthrough[];
45
+ /**
46
+ * Deep-link target: when set, the matching walkthrough is selected on mount
47
+ * — its steps expanded and its flow focused on the canvas. Hosts use this
48
+ * when opening the graph from a walkthrough row in a list. Re-applies on a
49
+ * new id (or a remount); in-tab selection afterwards stays owned by the
50
+ * graph.
51
+ */
52
+ initialWalkthroughId?: string | null;
45
53
  onSelect?: (componentAlias: string) => void;
46
54
  /** Called when an edge is clicked (relationship / mechanism + refs seam). */
47
55
  onEdgeSelect?: (edge: SubsystemComponentEdge) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"SubsystemComponentGraph.d.ts","sourceRoot":"","sources":["../../src/subsystem/SubsystemComponentGraph.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,KAAK,EAAiC,SAAS,EAAE,MAAM,OAAO,CAAC;AAqBtE,OAAO,EAUL,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EAEtB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EAC1B,MAAM,SAAS,CAAC;AAEjB,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAEjE,OAAO,EAA6B,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzF,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAItE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AAYzE,+EAA+E;AAC/E,MAAM,WAAW,wBAAwB;IACvC,WAAW,EAAE,oBAAoB,CA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BAAwB,KAAK,SAAS,CAAC;IACvE;;;;OAIG;IACH,cAAc,CAAC,EAAE,CAAC,SAAS,EAAE,kBAAkB,KAAK,SAAS,CAAC;IAC9D;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,0EAA0E;IAC1E,iBAAiB,CAAC,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,IAAI,CAAC;IACrD,2DAA2D;IAC3D,qBAAqB,CAAC,EAAE,0BAA0B,GAAG,IAAI,CAAC;CAC3D;AAmwED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,4BAA4B,+BA8D1E"}
@@ -16,7 +16,7 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
16
16
  * injection, onNodeClick) adapted to the subsystem model — read-only.
17
17
  */
18
18
  import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';
19
- import { ReactFlow, ReactFlowProvider, Background, BackgroundVariant, Controls, useReactFlow, useViewport, applyNodeChanges, } from '@xyflow/react';
19
+ import { ReactFlow, ReactFlowProvider, useReactFlow, useViewport, applyNodeChanges, } from '@xyflow/react';
20
20
  import { useTheme } from '@principal-ade/industry-theme';
21
21
  import { FileText, Pause, Play, X } from 'lucide-react';
22
22
  import { IndustryMarkdownSlide } from 'themed-markdown';
@@ -27,6 +27,7 @@ import { SubsystemDiagnosticToggle } from './DiagnosticToggle';
27
27
  import { SubsystemIssueList } from './IssueList';
28
28
  import { SubsystemFileTree } from './SubsystemFileTree';
29
29
  import { GraphLayoutCover } from './GraphLayoutCover';
30
+ import { GRAPH_NAV_PROPS, GraphChrome } from './graphChrome';
30
31
  import { ComponentDeclaration } from './ComponentDeclaration';
31
32
  import { FileDrawer, FILE_DRAWER_HEIGHT_MS } from './FileDrawer';
32
33
  import { buildRepoGroups, repoAvatarUrl } from './paths';
@@ -75,7 +76,7 @@ function FileOverlayCloseButton({ onClose }) {
75
76
  const WalkthroughDrawerContent = memo(function WalkthroughDrawerContent({ render, walkthrough, stepIndex, onOpenFile, }) {
76
77
  return _jsx(_Fragment, { children: render({ walkthrough, stepIndex, onOpenFile }) });
77
78
  });
78
- function Inner({ components, relations, walkthroughs, onSelect, onEdgeSelect, measured: _measured, maxNodeWidth, showEdgeLabels, edgeView, title, hideSidebar, walkthroughStepMode = 'focus', autoPlayWalkthroughs = false, walkthroughAutoPlayIntervalMs = WALKTHROUGH_PLAY_PAUSE_MS, zoomOnWalkthroughFocus = true, graphTitle, showWalkthroughTitle = false, description, canvasOverlay, sidebarExtra, sidebarAfterDescription, diagnostic, issues, showIssues, onSelectIssue, onApplyIssueFix, onHoverIssue, renderFileView, renderFileViewer, renderWalkthroughViewer, onFileSelect, onVerifyComponent, componentVerification }) {
79
+ function Inner({ components, relations, walkthroughs, initialWalkthroughId, onSelect, onEdgeSelect, measured: _measured, maxNodeWidth, showEdgeLabels, edgeView, title, hideSidebar, walkthroughStepMode = 'focus', autoPlayWalkthroughs = false, walkthroughAutoPlayIntervalMs = WALKTHROUGH_PLAY_PAUSE_MS, zoomOnWalkthroughFocus = true, graphTitle, showWalkthroughTitle = false, description, canvasOverlay, sidebarExtra, sidebarAfterDescription, diagnostic, issues, showIssues, onSelectIssue, onApplyIssueFix, onHoverIssue, renderFileView, renderFileViewer, renderWalkthroughViewer, onFileSelect, onVerifyComponent, componentVerification }) {
79
80
  const { theme } = useTheme();
80
81
  const { fitView } = useReactFlow();
81
82
  const viewport = useViewport();
@@ -839,6 +840,26 @@ function Inner({ components, relations, walkthroughs, onSelect, onEdgeSelect, me
839
840
  setHoveredWalkthroughStep(null);
840
841
  setDrawerTarget((prev) => (prev?.kind === 'walkthrough' ? null : prev));
841
842
  }, []);
843
+ // Host deep-link: opening the graph from a walkthrough row selects that
844
+ // flow — expand its steps, focus its edges, and switch the sidebar to
845
+ // Walkthroughs. Guarded by a ref so a later in-tab selection isn't yanked
846
+ // back; a remount (or a new id) re-applies it.
847
+ const appliedInitialWalkthroughRef = useRef(null);
848
+ useEffect(() => {
849
+ if (!initialWalkthroughId)
850
+ return;
851
+ if (appliedInitialWalkthroughRef.current === initialWalkthroughId)
852
+ return;
853
+ if (!layoutReady || !walkthroughs?.length)
854
+ return;
855
+ const tl = walkthroughs.find((t) => t.id === initialWalkthroughId);
856
+ if (!tl)
857
+ return;
858
+ appliedInitialWalkthroughRef.current = initialWalkthroughId;
859
+ setSidebarView('walkthroughs');
860
+ setExpandedWalkthroughs((prev) => new Set(prev).add(tl.id));
861
+ focusWalkthroughEdges(tl);
862
+ }, [initialWalkthroughId, layoutReady, walkthroughs, focusWalkthroughEdges]);
842
863
  // Switching sidebar panels also switches the edge vocabulary. Leaving the
843
864
  // Walkthroughs panel drops its canvas state (focus, expanded flows, selected
844
865
  // edge) so the Files view's topology edges aren't gated by a flow the user
@@ -1304,13 +1325,13 @@ function Inner({ components, relations, walkthroughs, onSelect, onEdgeSelect, me
1304
1325
  opacity: lbl.dimmed ? 0.15 : 1,
1305
1326
  whiteSpace: 'nowrap',
1306
1327
  }, children: text }, lbl.id));
1307
- }) })), _jsxs(ReactFlow, { nodes: dispNodes, edges: dispEdges, nodeTypes: nodeTypes, edgeTypes: edgeTypes, minZoom: 0.05, maxZoom: 4, onNodeClick: onNodeClick, onEdgeClick: onEdgeClick, onNodesChange: onNodesChange, onEdgesChange: onEdgesChange, proOptions: { hideAttribution: true }, nodesDraggable: false, elementsSelectable: true, selectNodesOnDrag: false, nodesConnectable: false, edgesReconnectable: false, onPaneClick: onPaneClick, panOnDrag: true, panOnScroll: true, zoomOnScroll: false, zoomOnPinch: true, zoomOnDoubleClick: false, style: {
1328
+ }) })), _jsx(ReactFlow, { nodes: dispNodes, edges: dispEdges, nodeTypes: nodeTypes, edgeTypes: edgeTypes, ...GRAPH_NAV_PROPS, onNodeClick: onNodeClick, onEdgeClick: onEdgeClick, onNodesChange: onNodesChange, onEdgesChange: onEdgesChange, proOptions: { hideAttribution: true }, onPaneClick: onPaneClick, style: {
1308
1329
  width: '100%',
1309
1330
  height: '100%',
1310
1331
  flex: 1,
1311
1332
  minHeight: 0,
1312
1333
  background: theme.colors.background,
1313
- }, children: [_jsx(Background, { variant: BackgroundVariant.Dots, gap: 16, size: 1 }), _jsx(Controls, { showZoom: true, showFitView: true, showInteractive: true })] }, `${baseNodesKey}-${baseEdgesKey}`), (graphTitle || overlayWalkthroughTitle || overlayWalkthroughStep) && (_jsxs("div", { style: {
1334
+ }, children: _jsx(GraphChrome, {}) }, `${baseNodesKey}-${baseEdgesKey}`), (graphTitle || overlayWalkthroughTitle || overlayWalkthroughStep) && (_jsxs("div", { style: {
1314
1335
  position: 'absolute',
1315
1336
  top: 10,
1316
1337
  left: '50%',