@principal-ai/subsystems-react 0.56.24 → 0.56.26

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 (133) hide show
  1. package/dist/index.d.ts +7 -0
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +4 -0
  4. package/dist/index.js.map +1 -1
  5. package/dist/stories/Canvases/Subsystem/issuesFixtures.d.ts +4 -0
  6. package/dist/stories/Canvases/Subsystem/issuesFixtures.d.ts.map +1 -0
  7. package/dist/stories/Canvases/Subsystem/issuesFixtures.js +189 -0
  8. package/dist/stories/Canvases/Subsystem/issuesFixtures.js.map +1 -0
  9. package/dist/stories/Canvases/Subsystem/reorderFixtures.d.ts +8 -0
  10. package/dist/stories/Canvases/Subsystem/reorderFixtures.d.ts.map +1 -0
  11. package/dist/stories/Canvases/Subsystem/reorderFixtures.js +103 -0
  12. package/dist/stories/Canvases/Subsystem/reorderFixtures.js.map +1 -0
  13. package/dist/subsystem/C4ContainersPanel.d.ts +35 -0
  14. package/dist/subsystem/C4ContainersPanel.d.ts.map +1 -0
  15. package/dist/subsystem/C4ContainersPanel.js +165 -0
  16. package/dist/subsystem/C4ContainersPanel.js.map +1 -0
  17. package/dist/subsystem/C4NodeCard.d.ts.map +1 -1
  18. package/dist/subsystem/C4NodeCard.js +10 -4
  19. package/dist/subsystem/C4NodeCard.js.map +1 -1
  20. package/dist/subsystem/C4ProjectionView.d.ts +12 -2
  21. package/dist/subsystem/C4ProjectionView.d.ts.map +1 -1
  22. package/dist/subsystem/C4ProjectionView.js +100 -33
  23. package/dist/subsystem/C4ProjectionView.js.map +1 -1
  24. package/dist/subsystem/C4SketchView.d.ts.map +1 -1
  25. package/dist/subsystem/C4SketchView.js +53 -34
  26. package/dist/subsystem/C4SketchView.js.map +1 -1
  27. package/dist/subsystem/ConstructsCatalog.d.ts +18 -11
  28. package/dist/subsystem/ConstructsCatalog.d.ts.map +1 -1
  29. package/dist/subsystem/ConstructsCatalog.js +25 -27
  30. package/dist/subsystem/ConstructsCatalog.js.map +1 -1
  31. package/dist/subsystem/DescriptionOverlay.d.ts +10 -2
  32. package/dist/subsystem/DescriptionOverlay.d.ts.map +1 -1
  33. package/dist/subsystem/DescriptionOverlay.js +4 -4
  34. package/dist/subsystem/DescriptionOverlay.js.map +1 -1
  35. package/dist/subsystem/DescriptionPreview.d.ts +31 -0
  36. package/dist/subsystem/DescriptionPreview.d.ts.map +1 -0
  37. package/dist/subsystem/DescriptionPreview.js +31 -0
  38. package/dist/subsystem/DescriptionPreview.js.map +1 -0
  39. package/dist/subsystem/SubsystemComponentGraph.d.ts +13 -3
  40. package/dist/subsystem/SubsystemComponentGraph.d.ts.map +1 -1
  41. package/dist/subsystem/SubsystemComponentGraph.js +18 -23
  42. package/dist/subsystem/SubsystemComponentGraph.js.map +1 -1
  43. package/dist/subsystem/__fixtures__/c4Sketch.d.ts.map +1 -1
  44. package/dist/subsystem/__fixtures__/c4Sketch.js +1 -0
  45. package/dist/subsystem/__fixtures__/c4Sketch.js.map +1 -1
  46. package/dist/subsystem/__fixtures__/c4SketchGallery.d.ts +29 -0
  47. package/dist/subsystem/__fixtures__/c4SketchGallery.d.ts.map +1 -0
  48. package/dist/subsystem/__fixtures__/c4SketchGallery.js +320 -0
  49. package/dist/subsystem/__fixtures__/c4SketchGallery.js.map +1 -0
  50. package/dist/subsystem/__fixtures__/c4Sketches/maintenance-bridge.json +778 -0
  51. package/dist/subsystem/__fixtures__/c4Sketches/openbot.json +887 -0
  52. package/dist/subsystem/c4Sketch.d.ts +12 -0
  53. package/dist/subsystem/c4Sketch.d.ts.map +1 -1
  54. package/dist/subsystem/c4Sketch.js +2 -1
  55. package/dist/subsystem/c4Sketch.js.map +1 -1
  56. package/dist/subsystem/containerCard.d.ts +3 -1
  57. package/dist/subsystem/containerCard.d.ts.map +1 -1
  58. package/dist/subsystem/containerCard.js +2 -2
  59. package/dist/subsystem/containerCard.js.map +1 -1
  60. package/dist/subsystem/techIcons/index.d.ts +3 -1
  61. package/dist/subsystem/techIcons/index.d.ts.map +1 -1
  62. package/dist/subsystem/techIcons/index.js +2 -2
  63. package/dist/subsystem/techIcons/index.js.map +1 -1
  64. package/package.json +1 -1
  65. package/src/index.ts +10 -0
  66. package/src/stories/Canvases/C4/C4CardGrow.stories.tsx +1 -1
  67. package/src/stories/Canvases/C4/C4Component.stories.tsx +1 -1
  68. package/src/stories/Canvases/C4/C4Container.stories.tsx +1 -1
  69. package/src/stories/Canvases/C4/C4Draft.stories.tsx +1 -1
  70. package/src/stories/Canvases/C4/C4NodeGallery.stories.tsx +1 -1
  71. package/src/stories/Canvases/C4/C4Sketch.stories.tsx +62 -4
  72. package/src/stories/Canvases/C4/C4ToComponentDrill.stories.tsx +1 -1
  73. package/src/stories/Canvases/C4/C4Transition.stories.tsx +1 -1
  74. package/src/stories/Canvases/Subsystem/AnimatedProgression.stories.tsx +1 -1
  75. package/src/stories/Canvases/Subsystem/Appearance.stories.tsx +1 -1
  76. package/src/stories/Canvases/Subsystem/Basics.stories.tsx +1 -1
  77. package/src/stories/Canvases/Subsystem/Captures.stories.tsx +1 -1
  78. package/src/stories/Canvases/Subsystem/Constructs.stories.tsx +3 -7
  79. package/src/stories/Canvases/Subsystem/ConstructsEmbed.stories.tsx +27 -0
  80. package/src/stories/Canvases/Subsystem/ContainerFrames.stories.tsx +7 -4
  81. package/src/stories/Canvases/Subsystem/CustomEntities.stories.tsx +3 -2
  82. package/src/stories/Canvases/Subsystem/Deprecated.stories.tsx +2 -100
  83. package/src/stories/Canvases/Subsystem/DeprecatedGraph.stories.tsx +124 -0
  84. package/src/stories/Canvases/Subsystem/DetailPanel.stories.tsx +1 -1
  85. package/src/stories/Canvases/Subsystem/Diagnostics.stories.tsx +1 -43
  86. package/src/stories/Canvases/Subsystem/DiagnosticsStates.stories.tsx +63 -0
  87. package/src/stories/Canvases/Subsystem/EdgeViews.stories.tsx +3 -2
  88. package/src/stories/Canvases/Subsystem/FrameworkStereotype.stories.tsx +1 -1
  89. package/src/stories/Canvases/Subsystem/GraphTitle.stories.tsx +1 -19
  90. package/src/stories/Canvases/Subsystem/GraphTitleGraph.stories.tsx +51 -0
  91. package/src/stories/Canvases/Subsystem/Issues.stories.tsx +5 -229
  92. package/src/stories/Canvases/Subsystem/IssuesList.stories.tsx +60 -0
  93. package/src/stories/Canvases/Subsystem/LayoutDirection.stories.tsx +1 -1
  94. package/src/stories/Canvases/Subsystem/ModuleBadges.stories.tsx +6 -63
  95. package/src/stories/Canvases/Subsystem/ModuleBadgesNode.stories.tsx +81 -0
  96. package/src/stories/Canvases/Subsystem/ModulePathNesting.stories.tsx +1 -1
  97. package/src/stories/Canvases/Subsystem/Modules.stories.tsx +1 -1
  98. package/src/stories/Canvases/Subsystem/NodeAnatomy.stories.tsx +1 -1
  99. package/src/stories/Canvases/Subsystem/Packages.stories.tsx +1 -1
  100. package/src/stories/Canvases/Subsystem/Presentation.stories.tsx +1 -1
  101. package/src/stories/Canvases/Subsystem/Processes.stories.tsx +3 -2
  102. package/src/stories/Canvases/Subsystem/Reorder.stories.tsx +5 -154
  103. package/src/stories/Canvases/Subsystem/ReorderPanel.stories.tsx +75 -0
  104. package/src/stories/Canvases/Subsystem/Scenarios.stories.tsx +7 -4
  105. package/src/stories/Canvases/Subsystem/Spotlights.stories.tsx +1 -1
  106. package/src/stories/Canvases/Subsystem/StepEmphasis.stories.tsx +1 -1
  107. package/src/stories/Canvases/Subsystem/StoreValueType.stories.tsx +1 -1
  108. package/src/stories/Canvases/Subsystem/TrailAutoplay.stories.tsx +3 -2
  109. package/src/stories/Canvases/Subsystem/TrailSidebarViews.stories.tsx +1 -1
  110. package/src/stories/Canvases/Subsystem/Trails.stories.tsx +5 -3
  111. package/src/stories/Canvases/Subsystem/WorkspacePackageFrames.stories.tsx +1 -1
  112. package/src/stories/Canvases/Subsystem/issuesFixtures.ts +192 -0
  113. package/src/stories/Canvases/Subsystem/reorderFixtures.tsx +125 -0
  114. package/src/stories/Components/ConstructsCatalog.stories.tsx +2 -1
  115. package/src/subsystem/C4ContainersPanel.test.tsx +151 -0
  116. package/src/subsystem/C4ContainersPanel.tsx +315 -0
  117. package/src/subsystem/C4NodeCard.tsx +12 -4
  118. package/src/subsystem/C4ProjectionView.tsx +151 -53
  119. package/src/subsystem/C4SketchView.tsx +96 -74
  120. package/src/subsystem/ConstructsCatalog.tsx +59 -58
  121. package/src/subsystem/DescriptionOverlay.test.tsx +18 -8
  122. package/src/subsystem/DescriptionOverlay.tsx +20 -5
  123. package/src/subsystem/DescriptionPreview.tsx +96 -0
  124. package/src/subsystem/SubsystemComponentGraph.sidebar.test.tsx +28 -8
  125. package/src/subsystem/SubsystemComponentGraph.tsx +46 -51
  126. package/src/subsystem/__fixtures__/c4Sketch.ts +2 -0
  127. package/src/subsystem/__fixtures__/c4SketchGallery.test.ts +65 -0
  128. package/src/subsystem/__fixtures__/c4SketchGallery.ts +361 -0
  129. package/src/subsystem/__fixtures__/c4Sketches/maintenance-bridge.json +778 -0
  130. package/src/subsystem/__fixtures__/c4Sketches/openbot.json +887 -0
  131. package/src/subsystem/c4Sketch.ts +13 -0
  132. package/src/subsystem/containerCard.tsx +4 -1
  133. package/src/subsystem/techIcons/index.tsx +11 -2
@@ -0,0 +1,124 @@
1
+ import React, { useState } from 'react';
2
+ import '@xyflow/react/dist/style.css';
3
+ import type { Meta, StoryObj } from '@storybook/react';
4
+ import { ReactFlowProvider } from '@xyflow/react';
5
+ import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
6
+ import { SubsystemComponentGraph } from '../../../subsystem/SubsystemComponentGraph';
7
+ import type { SubsystemComponent } from '../../../subsystem/model';
8
+ import { trailFromSteps } from './fixtures';
9
+
10
+ const PURL = 'pkg:github/principal-ai/subsystem-modeling';
11
+
12
+ const meta = {
13
+ title: 'Canvases/Subsystem/Views/Deprecated',
14
+ parameters: { layout: 'fullscreen' },
15
+ tags: ['autodocs'],
16
+ decorators: [
17
+ (Story) => (
18
+ <ThemeProvider theme={defaultEditorTheme}>
19
+ <ReactFlowProvider>
20
+ <Story />
21
+ </ReactFlowProvider>
22
+ </ThemeProvider>
23
+ ),
24
+ ],
25
+ } satisfies Meta;
26
+
27
+ export default meta;
28
+ type Story = StoryObj<typeof meta>;
29
+
30
+ // ---------------------------------------------------------------------------
31
+ // Full graph: live audit calling a deleted topology audit, which called two
32
+ // more deleted helpers. Mirrors the real wedged model.
33
+ // ---------------------------------------------------------------------------
34
+ const deprecatedComponents: SubsystemComponent[] = [
35
+ {
36
+ alias: 'audit',
37
+ name: 'auditSubsystemModel',
38
+ construct: 'function',
39
+ file: 'src/bun/verify-subsystem-component.ts',
40
+ purl: PURL,
41
+ symbol: 'auditSubsystemModel',
42
+ purpose: 'Deterministic dry-run audit of a stored model',
43
+ role: 'entry',
44
+ },
45
+ {
46
+ alias: 'topology',
47
+ name: 'auditTopologyRelations',
48
+ construct: 'function',
49
+ file: 'src/bun/topology-audit.ts',
50
+ purl: PURL,
51
+ symbol: 'auditTopologyRelations',
52
+ purpose: 'Orchestrates relations[] endpoint checks',
53
+ deprecated: true,
54
+ removedIn: {
55
+ commit: 'e168afc',
56
+ reason: 'Remove topology relations; nest module boundaries by path',
57
+ },
58
+ },
59
+ {
60
+ alias: 'topo-relation',
61
+ name: 'graphifyHasRelationBetween',
62
+ construct: 'function',
63
+ file: 'src/bun/topology-audit.ts',
64
+ purl: PURL,
65
+ symbol: 'graphifyHasRelationBetween',
66
+ purpose: 'True when Graphify records a relation between two nodes',
67
+ deprecated: true,
68
+ removedIn: {
69
+ commit: 'e168afc',
70
+ reason: 'Remove topology relations; nest module boundaries by path',
71
+ },
72
+ },
73
+ {
74
+ alias: 'topo-hints',
75
+ name: 'graphifyHasRelationTowardHints',
76
+ construct: 'function',
77
+ file: 'src/bun/topology-audit.ts',
78
+ purl: PURL,
79
+ symbol: 'graphifyHasRelationTowardHints',
80
+ purpose: 'Relation hints directed at a component',
81
+ deprecated: true,
82
+ removedIn: { commit: 'e168afc' },
83
+ },
84
+ {
85
+ alias: 'boundary',
86
+ name: 'auditBoundaryFields',
87
+ construct: 'function',
88
+ file: 'src/bun/boundary-audit.ts',
89
+ purl: PURL,
90
+ symbol: 'auditBoundaryFields',
91
+ purpose: 'Package/module containment + process checks',
92
+ },
93
+ ];
94
+
95
+ const deprecatedTrails = [
96
+ trailFromSteps('audit-steps', 'Audit (dry-run, graphify-backed)', [
97
+ ['audit', 'topology', 'calls', 'src/bun/verify-subsystem-component.ts', 1],
98
+ ['audit', 'boundary', 'calls', 'src/bun/verify-subsystem-component.ts', 1],
99
+ ['topology', 'topo-relation', 'calls', 'src/bun/topology-audit.ts', 1],
100
+ ['topology', 'topo-hints', 'calls', 'src/bun/topology-audit.ts', 1],
101
+ ]),
102
+ ];
103
+
104
+ function DeprecatedDemo() {
105
+ const [selected, setSelected] = useState<string | null>(null);
106
+ return (
107
+ <div style={{ width: '100%', height: '100vh', display: 'flex', flexDirection: 'column' }}>
108
+ <SubsystemComponentGraph
109
+ components={deprecatedComponents}
110
+ trails={deprecatedTrails}
111
+ onSelect={(id) => setSelected(id)}
112
+ />
113
+ <div style={{ marginTop: 8, padding: '0 12px', fontFamily: 'monospace', fontSize: 12, color: '#aaa' }}>
114
+ Click a slate `deprecated` badge to open the removal provenance
115
+ {selected ? ` · selected: ${selected}` : ''}
116
+ </div>
117
+ </div>
118
+ );
119
+ }
120
+
121
+ /** Full graph: the deleted topology subtree still wired into a live audit. */
122
+ export const RemovedSubtree: Story = {
123
+ render: () => <DeprecatedDemo />,
124
+ };
@@ -12,7 +12,7 @@ import resolveSource from '../../../graphify/resolve.ts?raw';
12
12
  import { readerDetail } from './fixtures';
13
13
 
14
14
  const meta = {
15
- title: 'Canvases/Subsystem/DetailPanel',
15
+ title: 'Canvases/Subsystem/Views/DetailPanel',
16
16
  component: SubsystemComponentGraph,
17
17
  parameters: {
18
18
  layout: 'fullscreen',
@@ -3,14 +3,10 @@ import React from 'react';
3
3
  import type { Meta, StoryObj } from '@storybook/react';
4
4
  import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
5
5
  import { SubsystemComponentGraph } from '../../../subsystem/SubsystemComponentGraph';
6
- import {
7
- SubsystemDiagnosticToggle,
8
- type SubsystemDiagnosticStatus,
9
- } from '../../../subsystem/DiagnosticToggle';
10
6
  import { components, graphSpecFromSteps } from './fixtures';
11
7
 
12
8
  const meta = {
13
- title: 'Canvases/Subsystem/Diagnostics',
9
+ title: 'Canvases/Subsystem/Views/Diagnostics',
14
10
  component: SubsystemComponentGraph,
15
11
  parameters: {
16
12
  layout: 'fullscreen',
@@ -43,44 +39,6 @@ const graphEdges = graphSpecFromSteps([
43
39
  const GRAPH_DESCRIPTION =
44
40
  'A small e-commerce checkout subsystem: an HTTP entry point that writes to retained cart state and calls out to Stripe.';
45
41
 
46
- /** Every chip state side by side, for quick visual review. */
47
- export const States: Story = {
48
- render: () => {
49
- const rows: Array<{ label: string; status: SubsystemDiagnosticStatus; issueCount?: number; fixableCount?: number; stale?: boolean; busy?: boolean }> = [
50
- { label: 'ok', status: 'ok' },
51
- { label: 'ok (stale)', status: 'ok', stale: true },
52
- { label: 'issues · 3', status: 'issues', issueCount: 3 },
53
- { label: 'gaps · 2', status: 'gaps', issueCount: 2 },
54
- { label: 'unknown (never checked)', status: 'unknown' },
55
- { label: 'issues (busy)', status: 'issues', issueCount: 3, busy: true },
56
- { label: 'issues · 7, 7 fixable', status: 'issues', issueCount: 7, fixableCount: 7 },
57
- { label: 'issues · 4, 2 fixable', status: 'issues', issueCount: 4, fixableCount: 2 },
58
- { label: 'issues · 2, fixable + stale', status: 'issues', issueCount: 2, fixableCount: 2, stale: true },
59
- { label: 'issues · 120, fixable capped', status: 'issues', issueCount: 120, fixableCount: 120 },
60
- { label: 'issues (busy) hides badge', status: 'issues', issueCount: 3, fixableCount: 3, busy: true },
61
- ];
62
- return (
63
- <div style={{ display: 'flex', flexDirection: 'column', gap: 18, padding: 32 }}>
64
- {rows.map((row) => (
65
- <div key={row.label} style={{ display: 'flex', alignItems: 'center', gap: 16 }}>
66
- <span style={{ width: 220, fontFamily: 'monospace', fontSize: 12, opacity: 0.7 }}>
67
- {row.label}
68
- </span>
69
- <SubsystemDiagnosticToggle
70
- status={row.status}
71
- issueCount={row.issueCount}
72
- fixableCount={row.fixableCount}
73
- stale={row.stale}
74
- busy={row.busy}
75
- onToggle={() => {}}
76
- />
77
- </div>
78
- ))}
79
- </div>
80
- );
81
- },
82
- };
83
-
84
42
  /**
85
43
  * The real case that motivated the badge: seven re-pin findings, every one a
86
44
  * one-click fix the construct-fixer defers to the human. The chip announces
@@ -0,0 +1,63 @@
1
+ import '@xyflow/react/dist/style.css';
2
+ import React from 'react';
3
+ import type { Meta, StoryObj } from '@storybook/react';
4
+ import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
5
+ import {
6
+ SubsystemDiagnosticToggle,
7
+ type SubsystemDiagnosticStatus,
8
+ } from '../../../subsystem/DiagnosticToggle';
9
+
10
+ const meta = {
11
+ title: 'Canvases/Subsystem/UI Isolation/Diagnostics',
12
+ parameters: {
13
+ layout: 'fullscreen',
14
+ },
15
+ decorators: [
16
+ (Story) => (
17
+ <ThemeProvider theme={defaultEditorTheme}>
18
+ <Story />
19
+ </ThemeProvider>
20
+ ),
21
+ ],
22
+ } satisfies Meta;
23
+
24
+ export default meta;
25
+ type Story = StoryObj<typeof meta>;
26
+
27
+ /** Every chip state side by side, for quick visual review. */
28
+ export const States: Story = {
29
+ render: () => {
30
+ const rows: Array<{ label: string; status: SubsystemDiagnosticStatus; issueCount?: number; fixableCount?: number; stale?: boolean; busy?: boolean }> = [
31
+ { label: 'ok', status: 'ok' },
32
+ { label: 'ok (stale)', status: 'ok', stale: true },
33
+ { label: 'issues · 3', status: 'issues', issueCount: 3 },
34
+ { label: 'gaps · 2', status: 'gaps', issueCount: 2 },
35
+ { label: 'unknown (never checked)', status: 'unknown' },
36
+ { label: 'issues (busy)', status: 'issues', issueCount: 3, busy: true },
37
+ { label: 'issues · 7, 7 fixable', status: 'issues', issueCount: 7, fixableCount: 7 },
38
+ { label: 'issues · 4, 2 fixable', status: 'issues', issueCount: 4, fixableCount: 2 },
39
+ { label: 'issues · 2, fixable + stale', status: 'issues', issueCount: 2, fixableCount: 2, stale: true },
40
+ { label: 'issues · 120, fixable capped', status: 'issues', issueCount: 120, fixableCount: 120 },
41
+ { label: 'issues (busy) hides badge', status: 'issues', issueCount: 3, fixableCount: 3, busy: true },
42
+ ];
43
+ return (
44
+ <div style={{ display: 'flex', flexDirection: 'column', gap: 18, padding: 32 }}>
45
+ {rows.map((row) => (
46
+ <div key={row.label} style={{ display: 'flex', alignItems: 'center', gap: 16 }}>
47
+ <span style={{ width: 220, fontFamily: 'monospace', fontSize: 12, opacity: 0.7 }}>
48
+ {row.label}
49
+ </span>
50
+ <SubsystemDiagnosticToggle
51
+ status={row.status}
52
+ issueCount={row.issueCount}
53
+ fixableCount={row.fixableCount}
54
+ stale={row.stale}
55
+ busy={row.busy}
56
+ onToggle={() => {}}
57
+ />
58
+ </div>
59
+ ))}
60
+ </div>
61
+ );
62
+ },
63
+ };
@@ -7,7 +7,7 @@ import type { SubsystemEdgeView, SubsystemGraphifyRelation } from '../../../subs
7
7
  import { components, trailFromSteps } from './fixtures';
8
8
 
9
9
  const meta = {
10
- title: 'Canvases/Subsystem/EdgeViews',
10
+ title: 'Canvases/Subsystem/Views/EdgeViews',
11
11
  component: SubsystemComponentGraph,
12
12
  parameters: {
13
13
  layout: 'fullscreen',
@@ -121,7 +121,8 @@ function EdgeViewDemo() {
121
121
  graphifyRelations={labelViewGraphify}
122
122
  trails={labelViewTrails}
123
123
  title="edge views"
124
- description="The graphify and trail edge sources are disjoint and never shown together. Toggle the view: **Graphify** draws `svc --references--> reader`; **Trails** draws `svc --calls--> reader`. The model is the same either way."
124
+ description="The graphify and trail edge sources are disjoint and never shown together."
125
+ notes="Toggle the view: **Graphify** draws `svc --references--> reader`; **Trails** draws `svc --calls--> reader`. The model is the same either way."
125
126
  showEdgeLabels={showEdgeLabels}
126
127
  edgeView={view}
127
128
  />
@@ -6,7 +6,7 @@ import type { SubsystemComponent } from '../../../subsystem/model';
6
6
  import { trailFromSteps } from './fixtures';
7
7
 
8
8
  const meta = {
9
- title: 'Canvases/Subsystem/FrameworkStereotype',
9
+ title: 'Canvases/Subsystem/Views/FrameworkStereotype',
10
10
  component: SubsystemComponentGraph,
11
11
  parameters: { layout: 'fullscreen' },
12
12
  tags: ['autodocs'],
@@ -6,7 +6,7 @@ import { SubsystemComponentGraph } from '../../../subsystem/SubsystemComponentGr
6
6
  import { components, graphSpecFromSteps } from './fixtures';
7
7
 
8
8
  const meta = {
9
- title: 'Canvases/Subsystem/GraphTitle',
9
+ title: 'Canvases/Subsystem/Views/GraphTitle',
10
10
  component: SubsystemComponentGraph,
11
11
  parameters: {
12
12
  layout: 'fullscreen',
@@ -36,24 +36,6 @@ const graphOnlyEdges = graphSpecFromSteps([
36
36
  ['entry', 'stripe', 'calls'],
37
37
  ]);
38
38
 
39
- function GraphOnly() {
40
- return (
41
- <div style={{ width: '100%', height: '100vh' }}>
42
- <SubsystemComponentGraph
43
- components={graphOnlyComponents}
44
- trails={graphOnlyEdges.trails}
45
- graphTitle="Checkout"
46
- hideSidebar
47
- />
48
- </div>
49
- );
50
- }
51
-
52
- /** The hero configuration: no sidebar, subsystem name as a canvas chip. */
53
- export const GraphOnlyWithTitle: Story = {
54
- render: () => <GraphOnly />,
55
- };
56
-
57
39
  /** Full-width name header above the graph and its description/trails sidebar. */
58
40
  export const WithSidebar: Story = {
59
41
  render: () => (
@@ -0,0 +1,51 @@
1
+ import '@xyflow/react/dist/style.css';
2
+ import React from 'react';
3
+ import type { Meta, StoryObj } from '@storybook/react';
4
+ import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
5
+ import { SubsystemComponentGraph } from '../../../subsystem/SubsystemComponentGraph';
6
+ import { components, graphSpecFromSteps } from './fixtures';
7
+
8
+ const meta = {
9
+ title: 'Canvases/Subsystem/Graphs/GraphTitle',
10
+ component: SubsystemComponentGraph,
11
+ parameters: {
12
+ layout: 'fullscreen',
13
+ },
14
+ decorators: [
15
+ (Story) => (
16
+ <ThemeProvider theme={defaultEditorTheme}>
17
+ <Story />
18
+ </ThemeProvider>
19
+ ),
20
+ ],
21
+ } satisfies Meta<typeof SubsystemComponentGraph>;
22
+
23
+ export default meta;
24
+ type Story = StoryObj<typeof meta>;
25
+
26
+ const componentsSpec = components([
27
+ ['entry', 'checkoutApi', 'function', 'src/checkout/api.ts', 'pkg:github/you/your-app', 'Handles cart requests.', 'checkoutApi'],
28
+ ['store', 'cartStore', 'store', 'src/checkout/cartStore.ts', 'pkg:github/you/your-app', 'Retained cart state.', 'cartStore'],
29
+ ['stripe', 'Stripe', 'external', '', 'external', undefined, undefined],
30
+ ['caller', 'Web client', 'external', '', 'external', undefined, undefined],
31
+ ]);
32
+
33
+ const edges = graphSpecFromSteps([
34
+ ['caller', 'entry', 'calls'],
35
+ ['entry', 'store', 'writes'],
36
+ ['entry', 'stripe', 'calls'],
37
+ ]);
38
+
39
+ /** The hero configuration: no sidebar, subsystem name as a canvas chip. */
40
+ export const GraphOnlyWithTitle: Story = {
41
+ render: () => (
42
+ <div style={{ width: '100%', height: '100vh' }}>
43
+ <SubsystemComponentGraph
44
+ components={componentsSpec}
45
+ trails={edges.trails}
46
+ graphTitle="Checkout"
47
+ hideSidebar
48
+ />
49
+ </div>
50
+ ),
51
+ };
@@ -3,14 +3,15 @@ import React, { useMemo, useState } from 'react';
3
3
  import type { Meta, StoryObj } from '@storybook/react';
4
4
  import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
5
5
  import { SubsystemComponentGraph } from '../../../subsystem/SubsystemComponentGraph';
6
- import { SubsystemIssueList, issueCategory, type SubsystemIssue, type SubsystemIssueCategory } from '../../../subsystem/IssueList';
6
+ import { issueCategory, type SubsystemIssue, type SubsystemIssueCategory } from '../../../subsystem/IssueList';
7
7
  import { verifyProcessBoundaries, verificationIssues } from '../../../subsystem/c4Evidence';
8
8
  import { getSubsystemRegions, type SubsystemComponent, type SubsystemTrail } from '../../../subsystem/model';
9
9
  import type { C4Container } from '../../../subsystem/c4';
10
10
  import { components, graphSpecFromSteps } from './fixtures';
11
+ import { ISSUES } from './issuesFixtures';
11
12
 
12
13
  const meta = {
13
- title: 'Canvases/Subsystem/Issues',
14
+ title: 'Canvases/Subsystem/Views/Issues',
14
15
  component: SubsystemComponentGraph,
15
16
  parameters: {
16
17
  layout: 'fullscreen',
@@ -27,142 +28,6 @@ const meta = {
27
28
  export default meta;
28
29
  type Story = StoryObj<typeof meta>;
29
30
 
30
- const ISSUES: SubsystemIssue[] = [
31
- {
32
- id: 'i1',
33
- severity: 'error',
34
- kind: 'missing_file',
35
- message: 'File src/checkout/cartStore.ts is not present on disk (repo pkg:github/you/your-app).',
36
- target: { kind: 'component', id: 'store', label: 'cartStore' },
37
- fix: { label: 'Use graphify file' },
38
- },
39
- {
40
- id: 'i2',
41
- severity: 'error',
42
- kind: 'construct_mismatch',
43
- message: 'Claimed function but graphify infers class.',
44
- target: { kind: 'component', id: 'entry', label: 'checkoutApi' },
45
- },
46
- {
47
- id: 'i3',
48
- severity: 'info',
49
- kind: 'signature_unconfirmed',
50
- message: 'Named parameter types are not present in the graphify cache.',
51
- target: { kind: 'component', id: 'entry', label: 'checkoutApi' },
52
- },
53
- {
54
- id: 'i5',
55
- severity: 'info',
56
- kind: 'boundary_module_file_mismatch',
57
- message: 'Module "src/checkout" contains a file outside its declared root.',
58
- target: { kind: 'module', id: 'src/checkout', label: 'src/checkout' },
59
- },
60
- {
61
- id: 'i6',
62
- severity: 'info',
63
- kind: 'trail',
64
- message: 'Step 2 references a line that moved (was :42).',
65
- target: {
66
- kind: 'step',
67
- id: 'story-steps',
68
- label: 'Story steps',
69
- detail: 'step 2',
70
- stepIndex: 1,
71
- },
72
- },
73
- {
74
- id: 'i20',
75
- severity: 'error',
76
- kind: 'step_span_unconfirmed',
77
- message: 'Trail "Story steps" step 1: step span not captured (entry → store via writes)',
78
- target: {
79
- kind: 'step',
80
- id: 'story-steps',
81
- label: 'Story steps',
82
- detail: 'step 1',
83
- stepIndex: 0,
84
- },
85
- },
86
- {
87
- id: 'i21',
88
- severity: 'info',
89
- kind: 'step_span_stale',
90
- message: 'Trail "Story steps" step 2: step span changed since verification (lines 42-44 in src/checkout/api.ts)',
91
- target: {
92
- kind: 'step',
93
- id: 'story-steps',
94
- label: 'Story steps',
95
- detail: 'step 2',
96
- stepIndex: 1,
97
- },
98
- },
99
- {
100
- id: 'i7',
101
- severity: 'info',
102
- kind: 'boundary_process_nest_disagree',
103
- message:
104
- 'module "src/host/main.ts" members claim different processes: "host", "renderer"',
105
- target: { kind: 'module', id: 'src/host/main.ts', label: 'src/host/main.ts' },
106
- },
107
- {
108
- id: 'i17',
109
- severity: 'error',
110
- kind: 'symbol_ambiguous',
111
- message: 'Multiple Graphify nodes match readSession (3 candidates)',
112
- target: { kind: 'component', id: 'session-reader', label: 'SessionReader' },
113
- },
114
- {
115
- id: 'i18',
116
- severity: 'error',
117
- kind: 'symbol_unmatched',
118
- message: 'No Graphify node matches symbol persistSession in src/session/SessionStore.ts',
119
- target: { kind: 'component', id: 'session-store', label: 'SessionStore' },
120
- },
121
- {
122
- id: 'i9',
123
- severity: 'info',
124
- kind: 'construct_span_stale',
125
- message: 'Declaration moved since capture — recorded start line 42, now 57.',
126
- target: { kind: 'component', id: 'session-store', label: 'SessionStore' },
127
- fix: { label: 'Re-pin declaration' },
128
- },
129
- {
130
- id: 'i10',
131
- severity: 'info',
132
- kind: 'construct_unconfirmed',
133
- message: 'Graphify anchored the node but left the construct unclassified (interface vs type alias).',
134
- target: { kind: 'component', id: 'host-info', label: 'HostInfo' },
135
- },
136
- {
137
- id: 'i22',
138
- severity: 'error',
139
- kind: 'construct_span_unconfirmed',
140
- message: 'HostInfo has no captured source span — its declaration extent is unpinned until an agent proposes start/end lines.',
141
- target: { kind: 'component', id: 'host-info', label: 'HostInfo' },
142
- },
143
- {
144
- id: 'i11',
145
- severity: 'error',
146
- kind: 'signature_mismatch',
147
- message: 'Claimed (req: HostInfo) => Session; Graphify has (string) => void.',
148
- target: { kind: 'component', id: 'entry', label: 'checkoutApi' },
149
- },
150
- {
151
- id: 'i13',
152
- severity: 'info',
153
- kind: 'repo_unresolved',
154
- message: 'Repo pkg:github/acme/worker is not available locally — clone it to verify its components',
155
- target: { kind: 'repo', id: 'pkg:github/acme/worker', label: 'pkg:github/acme/worker' },
156
- },
157
- {
158
- id: 'i19',
159
- severity: 'info',
160
- kind: 'graphify_unavailable',
161
- message: 'Graphify cache missing for pkg:github/you/your-app — build it to verify constructs and anchors',
162
- target: { kind: 'repo', id: 'pkg:github/you/your-app', label: 'pkg:github/you/your-app' },
163
- },
164
- ];
165
-
166
31
  const graphComponents = components([
167
32
  ['entry', 'checkoutApi', 'function', 'src/checkout/api.ts', 'pkg:github/you/your-app', 'Handles cart requests.', 'checkoutApi'],
168
33
  ['store', 'cartStore', 'store', 'src/checkout/cartStore.ts', 'pkg:github/you/your-app', 'Retained cart state.', 'cartStore'],
@@ -174,28 +39,6 @@ const graphEdges = graphSpecFromSteps([
174
39
  ['entry', 'stripe', 'calls'],
175
40
  ]);
176
41
 
177
- /** The catalogue, grouped by verification layer. */
178
- export const List: Story = {
179
- render: () => (
180
- <div style={{ display: 'flex', flexDirection: 'column', width: 380, height: '100vh', borderRight: '1px solid #333' }}>
181
- <SubsystemIssueList
182
- issues={ISSUES}
183
- onSelectIssue={() => {}}
184
- onApplyFix={() => {}}
185
- />
186
- </div>
187
- ),
188
- };
189
-
190
- /** All four layers clean — the happy state. */
191
- export const AllGood: Story = {
192
- render: () => (
193
- <div style={{ display: 'flex', flexDirection: 'column', width: 380, height: '100vh', borderRight: '1px solid #333' }}>
194
- <SubsystemIssueList issues={[]} />
195
- </div>
196
- ),
197
- };
198
-
199
42
  /** In place: diagnostics active, so the sidebar bottom panel is the issue list. */
200
43
  export const GraphWithIssues: Story = {
201
44
  render: () => (
@@ -219,74 +62,6 @@ export const GraphWithIssues: Story = {
219
62
  };
220
63
 
221
64
  /** Trail step verification findings — unconfirmed and stale call sites. */
222
- const TRAIL_STEP_ISSUES: SubsystemIssue[] = [
223
- {
224
- id: 'ts1',
225
- severity: 'info',
226
- kind: 'step_span_unconfirmed',
227
- message: 'Trail "Add to Cart" step 1: call site not verified (addToCart → cartStore via writes)',
228
- target: {
229
- kind: 'step',
230
- id: 'add-to-cart',
231
- label: 'Add to Cart',
232
- detail: 'step 1',
233
- stepIndex: 0,
234
- },
235
- },
236
- {
237
- id: 'ts2',
238
- severity: 'info',
239
- kind: 'step_span_unconfirmed',
240
- message: 'Trail "Add to Cart" step 2: call site not verified (cartStore → inventoryService via calls)',
241
- target: {
242
- kind: 'step',
243
- id: 'add-to-cart',
244
- label: 'Add to Cart',
245
- detail: 'step 2',
246
- stepIndex: 1,
247
- },
248
- },
249
- {
250
- id: 'ts3',
251
- severity: 'info',
252
- kind: 'step_span_stale',
253
- message: 'Trail "Checkout" step 1: call site changed since verification (lines 42-44 in src/checkout/api.ts)',
254
- target: {
255
- kind: 'step',
256
- id: 'checkout',
257
- label: 'Checkout',
258
- detail: 'step 1',
259
- stepIndex: 0,
260
- },
261
- },
262
- {
263
- id: 'ts4',
264
- severity: 'info',
265
- kind: 'step_span_stale',
266
- message: 'Trail "Checkout" step 3: call site changed since verification (lines 78-82 in src/checkout/api.ts)',
267
- target: {
268
- kind: 'step',
269
- id: 'checkout',
270
- label: 'Checkout',
271
- detail: 'step 3',
272
- stepIndex: 2,
273
- },
274
- },
275
- ];
276
-
277
- /** Trail step verification: shows unconfirmed and stale call site findings. */
278
- export const TrailStepVerification: Story = {
279
- render: () => (
280
- <div style={{ display: 'flex', flexDirection: 'column', width: 380, height: '100vh', borderRight: '1px solid #333' }}>
281
- <SubsystemIssueList
282
- issues={TRAIL_STEP_ISSUES}
283
- focusCategory="trail"
284
- onSelectIssue={() => {}}
285
- />
286
- </div>
287
- ),
288
- };
289
-
290
65
  /** Trail step verification badges on graph edges. */
291
66
  const stepVerificationComponents = components([
292
67
  ['api', 'checkoutApi', 'function', 'src/checkout/api.ts', 'pkg:github/you/your-app', 'Handles cart requests.', 'checkoutApi'],
@@ -454,7 +229,8 @@ export const GraphWithProcessVerification: Story = {
454
229
  <div style={{ width: '100%', height: '100vh' }}>
455
230
  <SubsystemComponentGraph
456
231
  title="Process verification"
457
- description="Each process boundary's C4 verification status flows through the diagnostics pipeline as a dynamic-topology finding: **unclaimed** (no container), **awaiting decision** (an agent scaffold), or **rejected** — one per boundary that is not verified, badged on the frame and listed in the sidebar. A verified boundary reports nothing: the audit reports absence only, and silence is the good state. The cards' fixes drive the element store — propose an unclaimed boundary, accept the proposed one — and the badge clears when the decision lands."
232
+ description="Each process boundary's C4 verification status flows through the diagnostics pipeline as a dynamic-topology finding."
233
+ notes="**Unclaimed** (no container), **awaiting decision** (an agent scaffold), or **rejected** — one per boundary that is not verified, badged on the frame and listed in the sidebar. A verified boundary reports nothing: the audit reports absence only, and silence is the good state. The cards' fixes drive the element store — propose an unclaimed boundary, accept the proposed one — and the badge clears when the decision lands."
458
234
  components={processComponents}
459
235
  trails={processEdges.trails}
460
236
  issues={issues}