@principal-ai/subsystems-react 0.56.25 → 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.
- package/dist/subsystem/C4ProjectionView.d.ts +12 -2
- package/dist/subsystem/C4ProjectionView.d.ts.map +1 -1
- package/dist/subsystem/C4ProjectionView.js +22 -9
- package/dist/subsystem/C4ProjectionView.js.map +1 -1
- package/dist/subsystem/ConstructsCatalog.d.ts +18 -11
- package/dist/subsystem/ConstructsCatalog.d.ts.map +1 -1
- package/dist/subsystem/ConstructsCatalog.js +25 -27
- package/dist/subsystem/ConstructsCatalog.js.map +1 -1
- package/dist/subsystem/SubsystemComponentGraph.d.ts +13 -3
- package/dist/subsystem/SubsystemComponentGraph.d.ts.map +1 -1
- package/dist/subsystem/SubsystemComponentGraph.js +17 -6
- package/dist/subsystem/SubsystemComponentGraph.js.map +1 -1
- package/dist/subsystem/__fixtures__/c4SketchGallery.d.ts +2 -0
- package/dist/subsystem/__fixtures__/c4SketchGallery.d.ts.map +1 -1
- package/dist/subsystem/__fixtures__/c4SketchGallery.js +8 -0
- package/dist/subsystem/__fixtures__/c4SketchGallery.js.map +1 -1
- package/dist/subsystem/__fixtures__/c4Sketches/maintenance-bridge.json +2 -1
- package/dist/subsystem/__fixtures__/c4Sketches/openbot.json +2 -1
- package/package.json +1 -1
- package/src/stories/Canvases/C4/C4Sketch.stories.tsx +6 -0
- package/src/stories/Canvases/Subsystem/ContainerFrames.stories.tsx +6 -3
- package/src/stories/Canvases/Subsystem/CustomEntities.stories.tsx +2 -1
- package/src/stories/Canvases/Subsystem/EdgeViews.stories.tsx +2 -1
- package/src/stories/Canvases/Subsystem/Issues.stories.tsx +2 -1
- package/src/stories/Canvases/Subsystem/ModuleBadges.stories.tsx +3 -2
- package/src/stories/Canvases/Subsystem/Processes.stories.tsx +2 -1
- package/src/stories/Canvases/Subsystem/Reorder.stories.tsx +2 -1
- package/src/stories/Canvases/Subsystem/Scenarios.stories.tsx +6 -3
- package/src/stories/Canvases/Subsystem/TrailAutoplay.stories.tsx +2 -1
- package/src/stories/Canvases/Subsystem/Trails.stories.tsx +4 -2
- package/src/stories/Components/ConstructsCatalog.stories.tsx +2 -1
- package/src/subsystem/C4ProjectionView.tsx +44 -16
- package/src/subsystem/ConstructsCatalog.tsx +59 -58
- package/src/subsystem/DescriptionOverlay.test.tsx +16 -8
- package/src/subsystem/SubsystemComponentGraph.sidebar.test.tsx +27 -7
- package/src/subsystem/SubsystemComponentGraph.tsx +38 -14
- package/src/subsystem/__fixtures__/c4SketchGallery.ts +10 -0
- package/src/subsystem/__fixtures__/c4Sketches/maintenance-bridge.json +2 -1
- package/src/subsystem/__fixtures__/c4Sketches/openbot.json +2 -1
|
@@ -309,4 +309,12 @@ export const DESCRIPTION_BOUNDARY_SKETCH = {
|
|
|
309
309
|
export const OPENBOT_SKETCH = openbot;
|
|
310
310
|
/** The real Studio → OpenBot maintenance bridge sketch (6 containers). */
|
|
311
311
|
export const MAINTENANCE_BRIDGE_SKETCH = maintenanceBridge;
|
|
312
|
+
/** Legacy shape: notes only, no short description (tests the fallback preview). */
|
|
313
|
+
export const NOTES_ONLY_SKETCH = {
|
|
314
|
+
...STUDIO_SKETCH,
|
|
315
|
+
id: 'c4s-gallery-notes-only',
|
|
316
|
+
title: 'Notes only — no description',
|
|
317
|
+
description: undefined,
|
|
318
|
+
notes: '## About this sketch\n\nThis sketch has no short description. The sidebar falls back to a clamped preview of these notes, and **Show more** opens the full Markdown in the Overview overlay.\n\n- Use this story to check the legacy shape.\n- Existing sketches with only `notes` keep working.',
|
|
319
|
+
};
|
|
312
320
|
//# sourceMappingURL=c4SketchGallery.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"c4SketchGallery.js","sourceRoot":"","sources":["../../../src/subsystem/__fixtures__/c4SketchGallery.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAUH,OAAO,OAAO,MAAM,2BAA2B,CAAC;A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,EAAE,EAAE,EAAE,iBAAiB,EAAE,KAAK,EAAE,sBAAsB,EAAE;QAChE,KAAK,EAAE;YACL,SAAS,CAAC;gBACR,EAAE,EAAE,gBAAgB;gBACpB,KAAK,EAAE,kBAAkB;gBACzB,UAAU,EAAE,KAAK;gBACjB,WAAW,EAAE,uCAAuC;aACrD,CAAC;YACF,SAAS,CAAC;gBACR,EAAE,EAAE,wBAAwB;gBAC5B,KAAK,EAAE,SAAS;gBAChB,SAAS,EAAE,gBAAgB;gBAC3B,UAAU,EAAE,MAAM;aACnB,CAAC;SACH;QACD,KAAK,EAAE,EAAE;KACV;CACF,CAAC;AAEF,+EAA+E;AAC/E,MAAM,CAAC,MAAM,cAAc,GAAG,OAA8B,CAAC;AAE7D,0EAA0E;AAC1E,MAAM,CAAC,MAAM,yBAAyB,GAAG,iBAAwC,CAAC"}
|
|
1
|
+
{"version":3,"file":"c4SketchGallery.js","sourceRoot":"","sources":["../../../src/subsystem/__fixtures__/c4SketchGallery.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAUH,OAAO,OAAO,MAAM,2BAA2B,CAAC;AAChD,OAAO,iBAAiB,MAAM,sCAAsC,CAAC;AAErE,MAAM,IAAI,GAAG,4CAA4C,CAAC;AAE1D,SAAS,SAAS,CAChB,IAA8D;IAE9D,OAAO;QACL,IAAI,EAAE,WAAW;QACjB,aAAa,EAAE,aAAa;QAC5B,UAAU,EAAE,EAAE;QACd,KAAK,EAAE,UAAU;QACjB,GAAG,IAAI;KACR,CAAC;AACJ,CAAC;AAED,SAAS,SAAS,CAChB,IAA4E;IAE5E,OAAO;QACL,IAAI,EAAE,WAAW;QACjB,UAAU,EAAE,EAAE;QACd,KAAK,EAAE,UAAU;QACjB,GAAG,IAAI;KACR,CAAC;AACJ,CAAC;AAED,SAAS,QAAQ,CACf,IAAwE;IAExE,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,CAAC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FAAmF;AACnF,MAAM,CAAC,MAAM,iBAAiB,GAAa;IACzC,GAAG,aAAa;IAChB,EAAE,EAAE,wBAAwB;IAC5B,KAAK,EAAE,6BAA6B;IACpC,WAAW,EAAE,SAAS;IACtB,KAAK,EACH,kSAAkS;CACrS,CAAC"}
|
|
@@ -773,5 +773,6 @@
|
|
|
773
773
|
"author": "opencode",
|
|
774
774
|
"notes": "Top-down C4 sketch for topic topic-1792962278647-rghcszfxe: Studio → OpenBot maintenance progress card and signed completion delivery. The linked model is the existing reuse-first bridge proposal, not live integration evidence.",
|
|
775
775
|
"createdAt": "2026-10-25T21:10:30.873Z",
|
|
776
|
-
"updatedAt": "2026-10-25T21:10:30.873Z"
|
|
776
|
+
"updatedAt": "2026-10-25T21:10:30.873Z",
|
|
777
|
+
"description": "A Studio → OpenBot bridge hypothesis: maintenance progress cards in the renderer, signed completion delivery from the host, and both sides’ stores and services."
|
|
777
778
|
}
|
|
@@ -882,5 +882,6 @@
|
|
|
882
882
|
"author": "opencode",
|
|
883
883
|
"notes": "Top-down C4 sketch authored from the OpenBot README, docs/architecture.md, package layout, and docker-compose services.",
|
|
884
884
|
"createdAt": "2026-10-25T20:17:44.365Z",
|
|
885
|
-
"updatedAt": "2026-10-25T20:17:44.365Z"
|
|
885
|
+
"updatedAt": "2026-10-25T20:17:44.365Z",
|
|
886
|
+
"description": "Top-down architecture for OpenBot: browser and server containers, routines and computer workers, agent bots, PostgreSQL + pgvector, and the desktop and mobile clients."
|
|
886
887
|
}
|
package/package.json
CHANGED
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
CONTAINER_MATRIX_SKETCH,
|
|
10
10
|
DESCRIPTION_BOUNDARY_SKETCH,
|
|
11
11
|
MAINTENANCE_BRIDGE_SKETCH,
|
|
12
|
+
NOTES_ONLY_SKETCH,
|
|
12
13
|
OPENBOT_SKETCH,
|
|
13
14
|
STUDIO_SKETCH,
|
|
14
15
|
} from '../../../subsystem/__fixtures__/c4SketchGallery';
|
|
@@ -86,3 +87,8 @@ export const ContainerMatrix: Story = {
|
|
|
86
87
|
export const DescriptionBoundary: Story = {
|
|
87
88
|
render: () => <Demo sketch={DESCRIPTION_BOUNDARY_SKETCH} />,
|
|
88
89
|
};
|
|
90
|
+
|
|
91
|
+
/** Legacy sketch with only notes: the sidebar falls back to a clamped preview. */
|
|
92
|
+
export const NotesOnly: Story = {
|
|
93
|
+
render: () => <Demo sketch={NOTES_ONLY_SKETCH} />,
|
|
94
|
+
};
|
|
@@ -81,7 +81,8 @@ export const ProcessCards: Story = {
|
|
|
81
81
|
<div style={{ width: '100%', height: '100vh' }}>
|
|
82
82
|
<SubsystemComponentGraph
|
|
83
83
|
title="Container frames"
|
|
84
|
-
description="Process frames draw as container cards.
|
|
84
|
+
description="Process frames draw as container cards."
|
|
85
|
+
notes="The host states Bun through `regionDetails` and takes the Bun hue; the renderer derives React from its members' `framework`; the database is a data store and wears the database glyph."
|
|
85
86
|
components={containerComponents}
|
|
86
87
|
trails={containerEdges.trails}
|
|
87
88
|
regionDetails={{
|
|
@@ -105,7 +106,8 @@ export const UnstatedTechnology: Story = {
|
|
|
105
106
|
<div style={{ width: '100%', height: '100vh' }}>
|
|
106
107
|
<SubsystemComponentGraph
|
|
107
108
|
title="Unstated technology"
|
|
108
|
-
description="No `regionDetails`: frames with no known member framework fall back to their kind in the technology row and keep the per-key hue
|
|
109
|
+
description="No `regionDetails`: frames with no known member framework fall back to their kind in the technology row and keep the per-key hue."
|
|
110
|
+
notes="Several unstated processes stay distinguishable."
|
|
109
111
|
components={containerComponents}
|
|
110
112
|
trails={containerEdges.trails}
|
|
111
113
|
/>
|
|
@@ -118,7 +120,8 @@ export const StartOpen: Story = {
|
|
|
118
120
|
<div style={{ width: '100%', height: '100vh' }}>
|
|
119
121
|
<SubsystemComponentGraph
|
|
120
122
|
title="Start open"
|
|
121
|
-
description="Frames start closed by default; `defaultFramesCollapsed={false}` lays every process frame out from the start.
|
|
123
|
+
description="Frames start closed by default; `defaultFramesCollapsed={false}` lays every process frame out from the start."
|
|
124
|
+
notes="Close one from its card, by double-click, or from the Containers list in the sidebar switch."
|
|
122
125
|
components={containerComponents}
|
|
123
126
|
trails={containerEdges.trails}
|
|
124
127
|
defaultFramesCollapsed={false}
|
|
@@ -176,7 +176,8 @@ export const NovaTechWorkRequests: Story = {
|
|
|
176
176
|
<div style={{ width: '100%', height: '100vh' }}>
|
|
177
177
|
<SubsystemComponentGraph
|
|
178
178
|
title="Custom entities — NovaTech work-request chain"
|
|
179
|
-
description="Persons, an agent, and a queue as `custom_entity` nodes (badge = entityKind).
|
|
179
|
+
description="Persons, an agent, and a queue as `custom_entity` nodes (badge = entityKind)."
|
|
180
|
+
notes="Actors keep the themed coral; the agent and queue wear authored `color` overrides. Click a node for its declaration — `entity 'Name' — kind` plus authored `attributes` (key: value)."
|
|
180
181
|
components={components}
|
|
181
182
|
trails={entityGraph.trails}
|
|
182
183
|
/>
|
|
@@ -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.
|
|
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
|
/>
|
|
@@ -229,7 +229,8 @@ export const GraphWithProcessVerification: Story = {
|
|
|
229
229
|
<div style={{ width: '100%', height: '100vh' }}>
|
|
230
230
|
<SubsystemComponentGraph
|
|
231
231
|
title="Process verification"
|
|
232
|
-
description="Each process boundary's C4 verification status flows through the diagnostics pipeline as a dynamic-topology finding
|
|
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."
|
|
233
234
|
components={processComponents}
|
|
234
235
|
trails={processEdges.trails}
|
|
235
236
|
issues={issues}
|
|
@@ -112,8 +112,9 @@ export const DeepModulePaths: Story = {
|
|
|
112
112
|
<div style={{ width: '100%', height: '100vh' }}>
|
|
113
113
|
<SubsystemComponentGraph
|
|
114
114
|
title="Deep module paths"
|
|
115
|
-
description=
|
|
116
|
-
|
|
115
|
+
description="Module badges never spill past their frame while collapsed."
|
|
116
|
+
notes={
|
|
117
|
+
'A path that would overflow collapses to `first/…/last`; ' +
|
|
117
118
|
'click the badge to expand the full path (the badge widens past the frame edge — the frame itself stays put), click again to collapse it back.'
|
|
118
119
|
}
|
|
119
120
|
components={deepComponents}
|
|
@@ -67,7 +67,8 @@ export const ProcessBoundaries: Story = {
|
|
|
67
67
|
<div style={{ width: '100%', height: '100vh' }}>
|
|
68
68
|
<SubsystemComponentGraph
|
|
69
69
|
title="Process boundaries"
|
|
70
|
-
description="Host and renderer each render in their own ELK-aware boundary frame.
|
|
70
|
+
description="Host and renderer each render in their own ELK-aware boundary frame."
|
|
71
|
+
notes="The worker process holds a single node and still gets a frame (singleton frames default on). The telemetry service has no `process` and sits outside every boundary."
|
|
71
72
|
components={processComponents}
|
|
72
73
|
trails={processEdges.trails}
|
|
73
74
|
/>
|
|
@@ -41,7 +41,8 @@ function ReorderGraphDemo() {
|
|
|
41
41
|
trails={trails}
|
|
42
42
|
onReorderTrails={onReorder}
|
|
43
43
|
title="drawing-files flows"
|
|
44
|
-
description="Drag the grip at the right of a trail row to reorder it.
|
|
44
|
+
description="Drag the grip at the right of a trail row to reorder it."
|
|
45
|
+
notes="Select a trail to open its steps and focus its components; Back restores the full list and model. The header above mirrors the array order; dropping a row calls `onReorderTrails` with the next array."
|
|
45
46
|
/>
|
|
46
47
|
</div>
|
|
47
48
|
</div>
|
|
@@ -149,7 +149,8 @@ function MultiRepoDemo() {
|
|
|
149
149
|
<div style={{ width: '100%', height: '100vh', display: 'flex', flexDirection: 'column' }}>
|
|
150
150
|
<SubsystemComponentGraph
|
|
151
151
|
title="Type-ref resolution across repos"
|
|
152
|
-
description="Two repos → two file trees.
|
|
152
|
+
description="Two repos → two file trees."
|
|
153
|
+
notes="Each tree is scoped to its repo's files and headed by the owner avatar + repo name. Cross-repo edges land on external stubs."
|
|
153
154
|
components={multiRepoComponents}
|
|
154
155
|
trails={multiRepoEdges.trails}
|
|
155
156
|
/>
|
|
@@ -382,7 +383,8 @@ function AccessSurfacesDemo() {
|
|
|
382
383
|
<div style={{ width: '100%', height: '100vh', display: 'flex', flexDirection: 'column' }}>
|
|
383
384
|
<SubsystemComponentGraph
|
|
384
385
|
title="Access surfaces, roles, and process boundaries"
|
|
385
|
-
description="Two process regions (host, renderer) + boundary entries; agents and the external service float outside every boundary.
|
|
386
|
+
description="Two process regions (host, renderer) + boundary entries; agents and the external service float outside every boundary."
|
|
387
|
+
notes="Hover for the role badge; click the store to drill into its state-only detail."
|
|
386
388
|
components={accessSurfaceComponents}
|
|
387
389
|
trails={accessSurfaceEdges.trails}
|
|
388
390
|
onSelect={(id) => setSelected(id)}
|
|
@@ -1128,7 +1130,8 @@ function TypeFamilySpectrumDemo() {
|
|
|
1128
1130
|
<div style={{ width: '100%', height: '100vh', display: 'flex', flexDirection: 'column' }}>
|
|
1129
1131
|
<SubsystemComponentGraph
|
|
1130
1132
|
title="Type-family — what a type can hold"
|
|
1131
|
-
description="Structured buckets: callable signature (generics + params), interface properties, enum members, union, plain alias reference.
|
|
1133
|
+
description="Structured buckets: callable signature (generics + params), interface properties, enum members, union, plain alias reference."
|
|
1134
|
+
notes="`rhs` = verbatim escape hatch for shapes that don't fit (mapped/conditional/template-literal). Click each to see the declaration."
|
|
1132
1135
|
components={typeSpectrumComponents}
|
|
1133
1136
|
trails={typeSpectrumEdges.trails}
|
|
1134
1137
|
onSelect={(id) => setSelected(id)}
|
|
@@ -203,7 +203,8 @@ export const AutoplayFocus: Story = {
|
|
|
203
203
|
edgeView="trails"
|
|
204
204
|
initialTrailId="wt-book"
|
|
205
205
|
title="Autoplay through steps"
|
|
206
|
-
description="Autoplay cycles the trail steps.
|
|
206
|
+
description="Autoplay cycles the trail steps."
|
|
207
|
+
notes="**Goal to refine:** each advance should camera-focus the step (and optionally open its snippet), not just dim the rest of the graph. Use the controls to compare `focus` vs `dim` and the zoom gate."
|
|
207
208
|
renderFileViewer={(file, opts) => (
|
|
208
209
|
<div style={{ padding: 12, fontFamily: 'monospace', fontSize: 12, color: '#bbb', whiteSpace: 'pre' }}>
|
|
209
210
|
{`// ${file}`}
|
|
@@ -194,7 +194,8 @@ function TrailsDemo() {
|
|
|
194
194
|
components={drawingComponents}
|
|
195
195
|
trails={drawingTrails}
|
|
196
196
|
title="drawing-files flow"
|
|
197
|
-
description="Three trails over one graph — opening, saving, and deleting a drawing.
|
|
197
|
+
description="Three trails over one graph — opening, saving, and deleting a drawing."
|
|
198
|
+
notes="The sidebar's **Trails** panel lists each step by **symbol**; clicking a step focuses that step and scrolls the bottom CodeView to that snippet."
|
|
198
199
|
renderTrailViewer={renderTrailViewer}
|
|
199
200
|
renderFileViewer={(file, opts) => (
|
|
200
201
|
<div
|
|
@@ -411,7 +412,8 @@ function ClickableConstructsDemo() {
|
|
|
411
412
|
trails={clickableTrails}
|
|
412
413
|
initialTrailId="tl-load"
|
|
413
414
|
title="clickable constructs"
|
|
414
|
-
description="A trail step's line is an edge to a construct.
|
|
415
|
+
description="A trail step's line is an edge to a construct."
|
|
416
|
+
notes="Tokens that name the step's `from`/`to` components are clickable and open that construct's declaration line in the file drawer — including a **method** endpoint (click `list` to jump to `DrawingStore.list`)."
|
|
415
417
|
renderTrailViewer={renderTrailViewer}
|
|
416
418
|
onFileSelect={setOpened}
|
|
417
419
|
renderFileViewer={(file, opts) => (
|
|
@@ -413,7 +413,8 @@ function CatalogDemo({
|
|
|
413
413
|
<ConstructsCatalog
|
|
414
414
|
components={comps}
|
|
415
415
|
title="Notes intake — constructs"
|
|
416
|
-
description="Nothing is selected, so every construct is listed and searchable; pick a file on the left to narrow.
|
|
416
|
+
description="Nothing is selected, so every construct is listed and searchable; pick a file on the left to narrow."
|
|
417
|
+
notes="Every file stacks under one combined header (path + a notes link for the whole stack), each declaration labeling the line that holds the construct in a file-like gutter; external constructs get a header naming their kind with the body naming the construct. Click the header or a line to open the file."
|
|
417
418
|
hideSidebar={hideSidebar}
|
|
418
419
|
onSelect={(id) => setSelected(id)}
|
|
419
420
|
renderFileViewer={renderFileViewer}
|
|
@@ -14,10 +14,12 @@
|
|
|
14
14
|
import { useCallback, useMemo, useRef, useState } from 'react';
|
|
15
15
|
import type { CSSProperties, ReactNode } from 'react';
|
|
16
16
|
import { useTheme } from '@principal-ade/industry-theme';
|
|
17
|
-
import {
|
|
17
|
+
import { SUBSYSTEM_MODEL_DESCRIPTION_MAX } from '@principal-ai/subsystems-core';
|
|
18
18
|
import { C4Graph } from './C4Graph';
|
|
19
19
|
import type { C4ConstructGraph, C4GraphProps } from './C4Graph';
|
|
20
20
|
import { C4ContainersPanel } from './C4ContainersPanel';
|
|
21
|
+
import { DescriptionOverlay } from './DescriptionOverlay';
|
|
22
|
+
import { DescriptionPreview } from './DescriptionPreview';
|
|
21
23
|
import { GraphWithSidebar } from './GraphWithSidebar';
|
|
22
24
|
import { TrailStepsNav } from './TrailStepsNav';
|
|
23
25
|
import {
|
|
@@ -40,8 +42,18 @@ export interface C4ProjectionViewProps {
|
|
|
40
42
|
memberships: Readonly<Record<string, readonly string[]>>;
|
|
41
43
|
/** Sidebar heading. Falls back to the system label. */
|
|
42
44
|
title?: string;
|
|
43
|
-
/**
|
|
45
|
+
/**
|
|
46
|
+
* Short description shown under the heading. At most 200 characters;
|
|
47
|
+
* extended detail belongs in `notes`.
|
|
48
|
+
*/
|
|
44
49
|
description?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Extended Markdown notes about the model. When set, the description's
|
|
52
|
+
* `Show more` link opens the full document in an Overview overlay. Omit
|
|
53
|
+
* `description` and the sidebar falls back to a clamped preview of these
|
|
54
|
+
* notes.
|
|
55
|
+
*/
|
|
56
|
+
notes?: string;
|
|
45
57
|
/** Extra controls in the sidebar header (source badge, refresh, …). */
|
|
46
58
|
headerActions?: ReactNode;
|
|
47
59
|
/**
|
|
@@ -199,6 +211,7 @@ export function C4ProjectionView({
|
|
|
199
211
|
memberships,
|
|
200
212
|
title,
|
|
201
213
|
description,
|
|
214
|
+
notes,
|
|
202
215
|
headerActions,
|
|
203
216
|
openContainerIds,
|
|
204
217
|
onOpenContainerIdsChange,
|
|
@@ -211,6 +224,18 @@ export function C4ProjectionView({
|
|
|
211
224
|
style,
|
|
212
225
|
}: C4ProjectionViewProps) {
|
|
213
226
|
const { theme } = useTheme();
|
|
227
|
+
const [notesOpen, setNotesOpen] = useState(false);
|
|
228
|
+
const rawDescription = description?.trim();
|
|
229
|
+
// The host caps the authored description; trim defensively for other hosts.
|
|
230
|
+
const shortDescription =
|
|
231
|
+
rawDescription && rawDescription.length > SUBSYSTEM_MODEL_DESCRIPTION_MAX
|
|
232
|
+
? `${rawDescription.slice(0, SUBSYSTEM_MODEL_DESCRIPTION_MAX - 1)}…`
|
|
233
|
+
: rawDescription;
|
|
234
|
+
const extendedNotes = notes?.trim();
|
|
235
|
+
// The short description owns the header; a legacy model with only notes
|
|
236
|
+
// falls back to a clamped preview of them.
|
|
237
|
+
const descriptionPreview = shortDescription || extendedNotes;
|
|
238
|
+
const hasNotes = Boolean(extendedNotes);
|
|
214
239
|
const [internalOpenIds, setInternalOpenIds] = useState<string[]>(() =>
|
|
215
240
|
[...(openContainerIds ?? model.openContainerIds ?? [])].sort(),
|
|
216
241
|
);
|
|
@@ -499,20 +524,15 @@ export function C4ProjectionView({
|
|
|
499
524
|
setOpenIds([]);
|
|
500
525
|
}, [setOpenIds]);
|
|
501
526
|
|
|
502
|
-
const sidebarHeader =
|
|
503
|
-
<
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
disableBasePadding
|
|
512
|
-
enableKeyboardScrolling={false}
|
|
513
|
-
autoFocusOnVisible={false}
|
|
514
|
-
/>
|
|
515
|
-
</div>
|
|
527
|
+
const sidebarHeader = descriptionPreview ? (
|
|
528
|
+
<DescriptionPreview
|
|
529
|
+
content={descriptionPreview}
|
|
530
|
+
clamp={!shortDescription}
|
|
531
|
+
open={hasNotes && notesOpen}
|
|
532
|
+
onOpen={hasNotes ? () => setNotesOpen(true) : undefined}
|
|
533
|
+
onClose={hasNotes ? () => setNotesOpen(false) : undefined}
|
|
534
|
+
slideIdPrefix="c4-projection-desc"
|
|
535
|
+
/>
|
|
516
536
|
) : null;
|
|
517
537
|
|
|
518
538
|
return (
|
|
@@ -636,6 +656,14 @@ export function C4ProjectionView({
|
|
|
636
656
|
)
|
|
637
657
|
}
|
|
638
658
|
>
|
|
659
|
+
{hasNotes && notesOpen && (
|
|
660
|
+
<DescriptionOverlay
|
|
661
|
+
description={extendedNotes ?? ''}
|
|
662
|
+
ariaLabel="Subsystem notes"
|
|
663
|
+
slideIdPrefix="c4-projection-notes-overlay"
|
|
664
|
+
onClose={() => setNotesOpen(false)}
|
|
665
|
+
/>
|
|
666
|
+
)}
|
|
639
667
|
<C4Graph
|
|
640
668
|
model={renderedModel}
|
|
641
669
|
onSelectEdge={(edge) => {
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Left: the model's files as a tree; clicking a file toggles its
|
|
6
6
|
* constructs. Right: signatures grouped by repo, and within a repo stacked
|
|
7
|
-
* per file under one combined file header carrying the path
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
7
|
+
* per file under one combined file header carrying the path; a declaration
|
|
8
|
+
* with a known line labels just that construct's line in a file-like gutter,
|
|
9
|
+
* and `external` constructs get a header naming their kind with the body
|
|
10
|
+
* naming the construct. The short model description sits in the left chrome;
|
|
11
|
+
* when `notes` is set, its `Show more` link opens the extended Markdown as an
|
|
12
12
|
* overlay over the construct area. File opens still use the bottom FileDrawer
|
|
13
13
|
* when the host injects a viewer.
|
|
14
14
|
*/
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
17
17
|
import type { ReactNode } from 'react';
|
|
18
18
|
import { useTheme } from '@principal-ade/industry-theme';
|
|
19
|
+
import { SUBSYSTEM_MODEL_DESCRIPTION_MAX } from '@principal-ai/subsystems-core';
|
|
19
20
|
import { IndustryMarkdownSlide } from 'themed-markdown';
|
|
20
21
|
import {
|
|
21
22
|
AlignLeft,
|
|
@@ -35,6 +36,7 @@ import { ComponentDeclaration } from './ComponentDeclaration';
|
|
|
35
36
|
import type { ComponentVerificationState } from './ComponentDeclaration';
|
|
36
37
|
import type { DeclarationSymbolRef, SymbolInspection } from './symbolRefs';
|
|
37
38
|
import { SubsystemDiagnosticToggle, type SubsystemDiagnostic } from './DiagnosticToggle';
|
|
39
|
+
import { DescriptionPreview } from './DescriptionPreview';
|
|
38
40
|
import { FileDrawer } from './FileDrawer';
|
|
39
41
|
import { componentColor } from '../pierre/constructColors';
|
|
40
42
|
import { resolvePierreSyntaxThemeName } from '../pierre/pierreSyntaxTheme';
|
|
@@ -45,14 +47,21 @@ export interface ConstructsCatalogProps {
|
|
|
45
47
|
title?: string;
|
|
46
48
|
hideSidebar?: boolean;
|
|
47
49
|
/**
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
+
* Short model description shown in the left chrome. At most 200 characters;
|
|
51
|
+
* extended detail belongs in `notes`.
|
|
50
52
|
*/
|
|
51
53
|
description?: string;
|
|
52
54
|
/**
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
55
|
+
* Extended Markdown notes about the model. When set, the description's
|
|
56
|
+
* `Show more` link opens the full document in an Overview overlay over the
|
|
57
|
+
* construct area. Omit `description` and the chrome falls back to a clamped
|
|
58
|
+
* preview of these notes.
|
|
59
|
+
*/
|
|
60
|
+
notes?: string;
|
|
61
|
+
/**
|
|
62
|
+
* Controlled open state for the notes overlay. When provided the host owns
|
|
63
|
+
* it (e.g. a button in its own header); otherwise the built-in link drives
|
|
64
|
+
* the state.
|
|
56
65
|
*/
|
|
57
66
|
descriptionOpen?: boolean;
|
|
58
67
|
onDescriptionOpenChange?: (open: boolean) => void;
|
|
@@ -196,6 +205,7 @@ export function ConstructsCatalog({
|
|
|
196
205
|
title,
|
|
197
206
|
hideSidebar,
|
|
198
207
|
description,
|
|
208
|
+
notes,
|
|
199
209
|
descriptionOpen: descriptionOpenProp,
|
|
200
210
|
onDescriptionOpenChange,
|
|
201
211
|
diagnostic,
|
|
@@ -237,7 +247,17 @@ export function ConstructsCatalog({
|
|
|
237
247
|
setDescriptionVisible(open);
|
|
238
248
|
onDescriptionOpenChange?.(open);
|
|
239
249
|
};
|
|
240
|
-
const
|
|
250
|
+
const rawDescription = description?.trim();
|
|
251
|
+
// The host caps the authored description; trim defensively for other hosts.
|
|
252
|
+
const shortDescription =
|
|
253
|
+
rawDescription && rawDescription.length > SUBSYSTEM_MODEL_DESCRIPTION_MAX
|
|
254
|
+
? `${rawDescription.slice(0, SUBSYSTEM_MODEL_DESCRIPTION_MAX - 1)}…`
|
|
255
|
+
: rawDescription;
|
|
256
|
+
const extendedNotes = notes?.trim();
|
|
257
|
+
// The short description owns the chrome; a legacy model with only notes
|
|
258
|
+
// falls back to a clamped preview of them.
|
|
259
|
+
const descriptionPreview = shortDescription || extendedNotes;
|
|
260
|
+
const hasNotes = Boolean(extendedNotes);
|
|
241
261
|
const [hoveredRow, setHoveredRow] = useState<string | null>(null);
|
|
242
262
|
const [collapsedFolders, setCollapsedFolders] = useState<Set<string>>(
|
|
243
263
|
new Set(),
|
|
@@ -571,7 +591,7 @@ export function ConstructsCatalog({
|
|
|
571
591
|
!hideSidebar &&
|
|
572
592
|
!!(
|
|
573
593
|
title ||
|
|
574
|
-
|
|
594
|
+
descriptionPreview ||
|
|
575
595
|
diagnostic ||
|
|
576
596
|
sidebarExtra ||
|
|
577
597
|
sidebarAfterDescription
|
|
@@ -612,7 +632,7 @@ export function ConstructsCatalog({
|
|
|
612
632
|
}}
|
|
613
633
|
>
|
|
614
634
|
{sidebarExtra}
|
|
615
|
-
{(title ||
|
|
635
|
+
{(title || diagnostic) && (
|
|
616
636
|
<div style={{ display: 'flex', alignItems: 'flex-start', gap: 8 }}>
|
|
617
637
|
{title && (
|
|
618
638
|
<h2
|
|
@@ -629,50 +649,31 @@ export function ConstructsCatalog({
|
|
|
629
649
|
{title}
|
|
630
650
|
</h2>
|
|
631
651
|
)}
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
aria-expanded={descriptionOpen}
|
|
646
|
-
aria-label={
|
|
647
|
-
descriptionOpen ? 'Hide description' : 'Show description'
|
|
648
|
-
}
|
|
649
|
-
title={
|
|
650
|
-
descriptionOpen ? 'Hide description' : 'Show description'
|
|
651
|
-
}
|
|
652
|
-
onMouseEnter={() => setDescToggleHover(true)}
|
|
653
|
-
onMouseLeave={() => setDescToggleHover(false)}
|
|
654
|
-
onClick={() => setDescriptionOpen(!descriptionOpen)}
|
|
655
|
-
style={{
|
|
656
|
-
display: 'inline-flex',
|
|
657
|
-
alignItems: 'center',
|
|
658
|
-
justifyContent: 'center',
|
|
659
|
-
flexShrink: 0,
|
|
660
|
-
width: 22,
|
|
661
|
-
height: 22,
|
|
662
|
-
padding: 0,
|
|
663
|
-
border: 'none',
|
|
664
|
-
borderRadius: 4,
|
|
665
|
-
background: descriptionOpen || descToggleHover ? theme.colors.border : 'transparent',
|
|
666
|
-
color: descriptionOpen || descToggleHover ? theme.colors.text : muted,
|
|
667
|
-
cursor: 'pointer',
|
|
668
|
-
}}
|
|
669
|
-
>
|
|
670
|
-
<FileText size={14} />
|
|
671
|
-
</button>
|
|
672
|
-
)}
|
|
673
|
-
</div>
|
|
652
|
+
{diagnostic && (
|
|
653
|
+
<div
|
|
654
|
+
style={{
|
|
655
|
+
display: 'flex',
|
|
656
|
+
alignItems: 'center',
|
|
657
|
+
gap: 4,
|
|
658
|
+
flexShrink: 0,
|
|
659
|
+
marginLeft: title ? undefined : 'auto',
|
|
660
|
+
}}
|
|
661
|
+
>
|
|
662
|
+
<SubsystemDiagnosticToggle {...diagnostic} />
|
|
663
|
+
</div>
|
|
664
|
+
)}
|
|
674
665
|
</div>
|
|
675
666
|
)}
|
|
667
|
+
{descriptionPreview && (
|
|
668
|
+
<DescriptionPreview
|
|
669
|
+
content={descriptionPreview}
|
|
670
|
+
clamp={!shortDescription}
|
|
671
|
+
open={hasNotes && descriptionOpen}
|
|
672
|
+
onOpen={hasNotes ? () => setDescriptionOpen(true) : undefined}
|
|
673
|
+
onClose={hasNotes ? () => setDescriptionOpen(false) : undefined}
|
|
674
|
+
slideIdPrefix="constructs-desc"
|
|
675
|
+
/>
|
|
676
|
+
)}
|
|
676
677
|
{sidebarAfterDescription}
|
|
677
678
|
</div>
|
|
678
679
|
)}
|
|
@@ -715,7 +716,7 @@ export function ConstructsCatalog({
|
|
|
715
716
|
flexDirection: 'column',
|
|
716
717
|
}}
|
|
717
718
|
>
|
|
718
|
-
{
|
|
719
|
+
{hasNotes && descriptionOpen && (
|
|
719
720
|
<div
|
|
720
721
|
style={{
|
|
721
722
|
position: 'absolute',
|
|
@@ -753,7 +754,7 @@ export function ConstructsCatalog({
|
|
|
753
754
|
</h3>
|
|
754
755
|
<button
|
|
755
756
|
type="button"
|
|
756
|
-
aria-label="Close
|
|
757
|
+
aria-label="Close notes"
|
|
757
758
|
title="Close"
|
|
758
759
|
onClick={() => setDescriptionOpen(false)}
|
|
759
760
|
style={{
|
|
@@ -792,7 +793,7 @@ export function ConstructsCatalog({
|
|
|
792
793
|
}}
|
|
793
794
|
>
|
|
794
795
|
<IndustryMarkdownSlide
|
|
795
|
-
content={
|
|
796
|
+
content={extendedNotes ?? ''}
|
|
796
797
|
slideIdPrefix="constructs-desc-overlay"
|
|
797
798
|
slideIndex={0}
|
|
798
799
|
isVisible
|