Reverting e8039f9 to diagnose compound rendering regression affecting
all compound types (SPLIT, CHOICE, LOOP, DO_TRY) and error handlers.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
105 lines
5.8 KiB
HTML
105 lines
5.8 KiB
HTML
<h2>ProcessDiagram Component Hierarchy</h2>
|
|
<p class="subtitle">How the SVG rendering is structured — from data fetch to pixels</p>
|
|
|
|
<div class="section">
|
|
<div class="mockup">
|
|
<div class="mockup-header">Component Tree</div>
|
|
<div class="mockup-body" style="padding: 20px; font-family: 'JetBrains Mono', monospace; font-size: 13px; line-height: 1.8; color: #1A1612;">
|
|
<div><strong style="color: #1A7F8E;">ProcessDiagram</strong> — root, fetches layout, manages state</div>
|
|
<div style="padding-left: 24px; border-left: 2px solid #E4DFD8;">
|
|
<div><svg> container with viewBox (zoom/pan transforms)</div>
|
|
<div style="padding-left: 24px; border-left: 2px solid #E4DFD8;">
|
|
<div><strong style="color: #7C3AED;">DiagramSection</strong> label="Main Route"</div>
|
|
<div style="padding-left: 24px; border-left: 2px solid #E4DFD8;">
|
|
<div><strong style="color: #9C9184;"><g></strong> edges layer (rendered first, behind nodes)</div>
|
|
<div style="padding-left: 24px;">
|
|
<div><strong style="color: #C6820E;">DiagramEdge</strong> × N — SVG <path> with arrowhead</div>
|
|
</div>
|
|
<div><strong style="color: #9C9184;"><g></strong> nodes layer</div>
|
|
<div style="padding-left: 24px;">
|
|
<div><strong style="color: #C6820E;">DiagramNode</strong> × N — top-bar card</div>
|
|
<div style="padding-left: 24px; border-left: 2px solid #E4DFD8;">
|
|
<div><strong style="color: #3D7C47;">ConfigBadge</strong> × 0..N — tap/trace indicators</div>
|
|
<div><strong style="color: #3D7C47;">NodeToolbar</strong> — floating on hover</div>
|
|
</div>
|
|
<div><strong style="color: #C6820E;">CompoundNode</strong> × 0..N — choice/split container</div>
|
|
<div style="padding-left: 24px; border-left: 2px solid #E4DFD8;">
|
|
<div><strong style="color: #C6820E;">DiagramNode</strong> × N — children inside compound</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div style="margin-top: 8px;"><strong style="color: #C0392B;">DiagramSection</strong> label="onException" variant="error"</div>
|
|
<div style="padding-left: 24px; border-left: 2px solid #C0392B;">
|
|
<div><em style="color: #9C9184;">same edge + node structure as above</em></div>
|
|
</div>
|
|
</div>
|
|
<div style="margin-top: 8px;"><strong style="color: #1A7F8E;">ZoomControls</strong> — HTML overlay (not SVG)</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="section" style="margin-top: 24px;">
|
|
<div class="mockup">
|
|
<div class="mockup-header">SVG Structure (simplified)</div>
|
|
<div class="mockup-body" style="padding: 20px; font-family: 'JetBrains Mono', monospace; font-size: 12px; line-height: 1.7; color: #5C5347; background: #F5F2ED;">
|
|
<pre style="margin: 0;"><div class="process-diagram"> <span style="color:#9C9184">/* wrapper div */</span>
|
|
<svg viewBox="0 0 {w} {h}"> <span style="color:#9C9184">/* zoom = viewBox transform */</span>
|
|
<g class="diagram-content"> <span style="color:#9C9184">/* pan offset */</span>
|
|
|
|
<span style="color:#7C3AED"><!-- Main Route section --></span>
|
|
<g class="section section--main">
|
|
<g class="edges">
|
|
<path d="M 100 40 C ..." /> <span style="color:#9C9184">/* cubic bezier edge */</span>
|
|
<marker>...</marker> <span style="color:#9C9184">/* arrowhead def */</span>
|
|
</g>
|
|
<g class="nodes">
|
|
<g transform="translate(x, y)"> <span style="color:#9C9184">/* positioned by ELK */</span>
|
|
<rect .../> <span style="color:#9C9184">/* card background */</span>
|
|
<rect .../> <span style="color:#9C9184">/* color top bar */</span>
|
|
<text>LOG</text> <span style="color:#9C9184">/* label */</span>
|
|
<g class="badges">...</g> <span style="color:#9C9184">/* config indicators */</span>
|
|
</g>
|
|
</g>
|
|
</g>
|
|
|
|
<span style="color:#C0392B"><!-- Error Handler section --></span>
|
|
<g class="section section--error"
|
|
transform="translate(0, {mainH + gap})">
|
|
<text>onException</text> <span style="color:#9C9184">/* section label */</span>
|
|
<line .../> <span style="color:#9C9184">/* divider line */</span>
|
|
<g class="edges">...</g>
|
|
<g class="nodes">...</g>
|
|
</g>
|
|
|
|
</g>
|
|
</svg>
|
|
<div class="zoom-controls">...</div> <span style="color:#9C9184">/* HTML overlay */</span>
|
|
</div></pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="section" style="margin-top: 24px;">
|
|
<div class="mockup">
|
|
<div class="mockup-header">Data Flow</div>
|
|
<div class="mockup-body" style="padding: 20px; font-family: 'JetBrains Mono', monospace; font-size: 12px; line-height: 1.8; color: #5C5347;">
|
|
<pre style="margin: 0;">
|
|
<span style="color:#1A7F8E">GET /diagrams/{hash}/render?direction=LR</span>
|
|
│
|
|
▼
|
|
DiagramLayout { nodes[], edges[], width, height }
|
|
│
|
|
▼
|
|
<span style="color:#7C3AED">separateFlows(nodes)</span> → mainNodes[] + errorSections[]
|
|
│ │
|
|
▼ ▼
|
|
<span style="color:#C6820E">renderMainSection()</span> <span style="color:#C0392B">renderErrorSection()</span>
|
|
│ │
|
|
▼ ▼
|
|
SVG groups with SVG groups offset below
|
|
ELK x/y coordinates main section by mainHeight + gap
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div> |