@leitwerk-dev/ui 0.3.1 → 0.4.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.
- package/dist/assets/ApiTokensPage-DCmYvZdE.js +1 -0
- package/dist/assets/ChronicleMarkdown-CDe1jngc.js +1 -0
- package/dist/assets/DashboardPage-BRxe3uuy.css +1 -0
- package/dist/assets/DashboardPage-LiQ0_72g.js +1 -0
- package/dist/assets/FutureLaunchDetailPage-DvyW_J5d.js +1 -0
- package/dist/assets/GenericLauncher-D1qQy9hq.js +4 -0
- package/dist/assets/GenericLauncher-DRUMMTd7.css +1 -0
- package/dist/assets/HomePage-Cnmp6osB.js +1 -0
- package/dist/assets/ProcessActionsMenu-DEQynjFa.js +1 -0
- package/dist/assets/ProcessDetailPage-DvjQQTDj.js +14 -0
- package/dist/assets/ProcessDetailPage-km76G8wj.css +1 -0
- package/dist/assets/ProcessFlowDiagram-DI5KZ2Qj.js +1 -0
- package/dist/assets/ProcessFlowDiagram-NQ6oEZi7.css +1 -0
- package/dist/assets/ProcessesPage-B4BMXJT7.js +1 -0
- package/dist/assets/ScheduleDateTimePicker-2eJ0jBQ-.css +1 -0
- package/dist/assets/ScheduleDateTimePicker-fg0Vau5Z.js +3 -0
- package/dist/assets/SettingsPage-BHSV4rl7.css +1 -0
- package/dist/assets/SettingsPage-w1RHZ2l6.js +2 -0
- package/dist/assets/SkillsPage-Ber36rAD.js +2 -0
- package/dist/assets/WatchersPage-Btq_SIk3.js +1 -0
- package/dist/assets/WikiPage-BjncVYf1.js +1 -0
- package/dist/assets/WikiPage-Bvnhxl3m.css +1 -0
- package/dist/assets/http-client-Cvi3zOou.js +2 -0
- package/dist/assets/http-contracts-public-BUgTIHYG.js +1 -0
- package/dist/assets/index-Dz0T5gKc.js +21 -0
- package/dist/assets/index-DzKWCM-z.css +1 -0
- package/dist/assets/{index-client-BYQviCtQ.js → index-client-BSAA7n1a.js} +2 -2
- package/dist/assets/mermaid-render.worker-BN0bcvGc.js +6398 -0
- package/dist/assets/retry-config.svelte-HNNF65qc.js +1 -0
- package/dist/assets/settings-Dk5UoSQa.js +1 -0
- package/dist/index.html +4 -7
- package/package.json +10 -9
- package/src/App.svelte +9 -0
- package/src/chronicle/components/ChronicleActionSection.svelte +10 -2
- package/src/chronicle/components/ChronicleEntryHeader.svelte +4 -16
- package/src/chronicle/components/ChronicleFlow.svelte +24 -6
- package/src/chronicle/components/ChronicleLiveTail.svelte +52 -24
- package/src/chronicle/components/ChronicleProcessErrorSection.svelte +14 -0
- package/src/chronicle/components/ChronicleQuestionRequest.svelte +1 -1
- package/src/chronicle/components/ChronicleRecoverySection.svelte +14 -10
- package/src/chronicle/components/ChronicleStartupRecoverySection.svelte +22 -10
- package/src/chronicle/components/ChronicleThinkingSection.svelte +8 -2
- package/src/chronicle/components/ChronicleToolApproval.svelte +120 -17
- package/src/chronicle/components/ChronicleToolCallItem.svelte +32 -6
- package/src/chronicle/components/ChronicleTurnCluster.svelte +6 -6
- package/src/chronicle/components/ChronicleTurnProgress.svelte +10 -4
- package/src/chronicle/components/ChronicleTurnRail.svelte +1 -0
- package/src/chronicle/components/RecoveryModelControl.svelte +14 -13
- package/src/chronicle/lib/chronicle-projection.ts +74 -376
- package/src/chronicle/lib/chronicle-selectable-items.ts +23 -3
- package/src/chronicle/lib/recovery-model.ts +17 -0
- package/src/components/ConversationTreeDiagram.svelte +93 -30
- package/src/components/FormFieldRenderer.svelte +184 -27
- package/src/components/GenericLauncher.svelte +438 -259
- package/src/components/NamedSelectionList.svelte +77 -0
- package/src/components/ProcessActionsMenu.svelte +37 -59
- package/src/components/ProcessSettings.svelte +110 -0
- package/src/components/ScheduleDateTimePicker.svelte +9 -4
- package/src/components/SettingsField.svelte +317 -0
- package/src/components/SettingsOverview.svelte +237 -0
- package/src/components/SkillSelector.svelte +15 -3
- package/src/components/launcher-form-copy.ts +2 -1
- package/src/components/launcher-model-config.ts +8 -7
- package/src/components/launcher-selections.ts +123 -0
- package/src/lib/api.ts +100 -43
- package/src/lib/dashboard-refresh.ts +47 -0
- package/src/lib/http-client.ts +20 -1
- package/src/lib/instance-tree-layout.ts +41 -10
- package/src/lib/primary-path-detail.ts +56 -341
- package/src/lib/primary-path-replay.ts +8 -9
- package/src/lib/process-history.ts +57 -0
- package/src/lib/processes.svelte.ts +71 -79
- package/src/lib/reasoning-history.ts +31 -23
- package/src/lib/router-logic.ts +127 -56
- package/src/lib/router.svelte.ts +10 -6
- package/src/lib/settings.ts +114 -0
- package/src/lib/wiki.ts +34 -0
- package/src/pages/DashboardPage.svelte +194 -0
- package/src/pages/FutureLaunchDetailPage.svelte +2 -2
- package/src/pages/HomePage.svelte +4 -4
- package/src/pages/ProcessDetailPage.svelte +55 -344
- package/src/pages/ProcessFlowDiagram.svelte +39 -684
- package/src/pages/SettingsPage.svelte +265 -0
- package/src/pages/SkillsPage.svelte +26 -12
- package/src/pages/WikiPage.svelte +9 -0
- package/src/pages/process-detail/ProcessDetailChronicle.svelte +57 -13
- package/src/pages/process-detail/ProcessDetailHeader.svelte +9 -3
- package/src/pages/process-detail/TicketCreationComposer.svelte +49 -10
- package/src/pages/process-detail/inspector/ExecutionDetails.svelte +210 -0
- package/src/pages/process-detail/inspector/InspectionEvidence.svelte +48 -0
- package/src/pages/process-detail/inspector/InspectionMessage.svelte +71 -0
- package/src/pages/process-detail/inspector/ProcessInspector.svelte +144 -0
- package/src/pages/process-detail/inspector/ProcessModelEditor.svelte +161 -0
- package/src/pages/process-detail/inspector/ProcessReference.svelte +166 -0
- package/src/pages/process-detail/inspector/inspection-activity.ts +118 -0
- package/src/pages/process-detail/inspector/inspection-data.svelte.ts +107 -0
- package/src/pages/process-detail/inspector/inspection-tool-call.ts +30 -0
- package/src/pages/process-detail/inspector/inspector-navigation.ts +190 -0
- package/src/pages/process-detail/inspector/model-source-label.ts +17 -0
- package/src/pages/process-detail/process-detail-actions.svelte.ts +10 -0
- package/src/pages/process-detail/process-detail-chronicle-scroll.svelte.ts +18 -2
- package/src/pages/process-detail/process-detail-view-model.ts +2 -2
- package/src/shell/AppShell.svelte +55 -56
- package/src/shell/Sidebar.svelte +136 -232
- package/src/test-support/mount.ts +34 -0
- package/src/test-support/wait.ts +19 -0
- package/dist/assets/ApiTokensPage-ClJp9PYr.js +0 -1
- package/dist/assets/ChronicleMarkdown-lqwX9Ywa.js +0 -16
- package/dist/assets/FutureLaunchDetailPage-ygp-IdXC.js +0 -1
- package/dist/assets/GenericLauncher-CExW6wei.css +0 -1
- package/dist/assets/GenericLauncher-DOwsERpB.js +0 -1
- package/dist/assets/HomePage-D1J-Rmsw.js +0 -1
- package/dist/assets/PageHeader-DPuQInDo.css +0 -1
- package/dist/assets/PageHeader-sphJnWL1.js +0 -1
- package/dist/assets/ProcessActionsMenu-DV9zaxNS.js +0 -1
- package/dist/assets/ProcessDetailPage-BW1M2IH8.js +0 -14
- package/dist/assets/ProcessDetailPage-Cth6A0DN.css +0 -1
- package/dist/assets/ProcessFlowDiagram-Cz8wNicU.css +0 -1
- package/dist/assets/ProcessFlowDiagram-Dx2wheGN.js +0 -2
- package/dist/assets/ProcessesPage-CSPH5L7E.js +0 -1
- package/dist/assets/ScheduleDateTimePicker-DmojMRxN.js +0 -1
- package/dist/assets/ScheduleDateTimePicker-uacJAkIq.css +0 -1
- package/dist/assets/SkillsPage-KnLql0n1.js +0 -2
- package/dist/assets/WatchersPage-B4jf3Ywp.js +0 -1
- package/dist/assets/http-client-VpPXJwbR.js +0 -2
- package/dist/assets/index-DPCokDbS.js +0 -6
- package/dist/assets/index-DtEI5gsQ.css +0 -1
- package/dist/assets/mermaid-render.worker-QW2WZpEE.js +0 -6393
- package/dist/assets/process-terminal-display-BQRQwGod.js +0 -1
- package/dist/assets/router.svelte-EEldxHlO.js +0 -1
- package/src/chronicle/components/ChronicleReasoningDetailsOverlay.svelte +0 -855
- package/src/components/ProcessInfoOverlay.svelte +0 -1221
- package/src/lib/flow-layout.ts +0 -319
- package/src/pages/process-detail/OverlayFrame.svelte +0 -58
package/src/lib/flow-layout.ts
DELETED
|
@@ -1,319 +0,0 @@
|
|
|
1
|
-
import dagre from "@dagrejs/dagre";
|
|
2
|
-
import type {
|
|
3
|
-
ProcessFlowEdge,
|
|
4
|
-
ProcessFlowNode,
|
|
5
|
-
ProcessFlowView,
|
|
6
|
-
ProcessTurnTerminalLifecycleStatus,
|
|
7
|
-
ProcessTurnType,
|
|
8
|
-
} from "@leitwerk-dev/domain";
|
|
9
|
-
import { getProcessTerminalHeading as endNodeTitle } from "./process-terminal-display.js";
|
|
10
|
-
|
|
11
|
-
export type FlowLayoutNodeKind = "turn" | "end";
|
|
12
|
-
|
|
13
|
-
export interface FlowLayoutPoint {
|
|
14
|
-
x: number;
|
|
15
|
-
y: number;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export interface FlowLayoutNode {
|
|
19
|
-
id: string;
|
|
20
|
-
kind: FlowLayoutNodeKind;
|
|
21
|
-
x: number;
|
|
22
|
-
y: number;
|
|
23
|
-
width: number;
|
|
24
|
-
height: number;
|
|
25
|
-
title: string;
|
|
26
|
-
subtitle: string;
|
|
27
|
-
role: ProcessFlowNode["role"] | null;
|
|
28
|
-
turnType: ProcessTurnType | null;
|
|
29
|
-
lifecycleStatus: ProcessTurnTerminalLifecycleStatus | null;
|
|
30
|
-
isEntry: boolean;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export interface FlowLayoutEdge {
|
|
34
|
-
id: string;
|
|
35
|
-
from: string;
|
|
36
|
-
to: string;
|
|
37
|
-
kind: ProcessFlowEdge["kind"];
|
|
38
|
-
/**
|
|
39
|
-
* All transition labels merged into this single visual edge. Parallel
|
|
40
|
-
* transitions between the same two boxes (same kind) are combined into one
|
|
41
|
-
* drawn edge, so this holds every underlying transition label.
|
|
42
|
-
*/
|
|
43
|
-
labels: string[];
|
|
44
|
-
points: FlowLayoutPoint[];
|
|
45
|
-
labelX: number | null;
|
|
46
|
-
labelY: number | null;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export interface FlowLayout {
|
|
50
|
-
width: number;
|
|
51
|
-
height: number;
|
|
52
|
-
nodes: FlowLayoutNode[];
|
|
53
|
-
edges: FlowLayoutEdge[];
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export interface FlowLayoutOptions {
|
|
57
|
-
/** Average glyph advance used to estimate box width without DOM measurement. */
|
|
58
|
-
charWidth?: number;
|
|
59
|
-
minNodeWidth?: number;
|
|
60
|
-
maxNodeWidth?: number;
|
|
61
|
-
nodeHeight?: number;
|
|
62
|
-
endNodeHeight?: number;
|
|
63
|
-
/** Horizontal padding inside a box. */
|
|
64
|
-
nodePaddingX?: number;
|
|
65
|
-
rankSep?: number;
|
|
66
|
-
nodeSep?: number;
|
|
67
|
-
edgeSep?: number;
|
|
68
|
-
edgeLabelCharWidth?: number;
|
|
69
|
-
edgeLabelHeight?: number;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
const DEFAULTS = {
|
|
73
|
-
charWidth: 7.2,
|
|
74
|
-
minNodeWidth: 132,
|
|
75
|
-
maxNodeWidth: 280,
|
|
76
|
-
nodeHeight: 56,
|
|
77
|
-
endNodeHeight: 44,
|
|
78
|
-
nodePaddingX: 28,
|
|
79
|
-
rankSep: 56,
|
|
80
|
-
nodeSep: 36,
|
|
81
|
-
edgeSep: 18,
|
|
82
|
-
edgeLabelCharWidth: 6,
|
|
83
|
-
edgeLabelHeight: 18,
|
|
84
|
-
} as const;
|
|
85
|
-
|
|
86
|
-
const END_NODE_PREFIX = "__end__";
|
|
87
|
-
|
|
88
|
-
export function endNodeId(status: ProcessTurnTerminalLifecycleStatus): string {
|
|
89
|
-
return `${END_NODE_PREFIX}${status}`;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* Short text drawn on a merged edge: the single label when only one transition
|
|
94
|
-
* was merged, or a self-describing `N transitions` count when several share the
|
|
95
|
-
* edge. The full list is exposed separately for a hover tooltip.
|
|
96
|
-
*/
|
|
97
|
-
export function edgeDisplayLabel(labels: readonly string[]): string {
|
|
98
|
-
if (labels.length === 0) {
|
|
99
|
-
return "";
|
|
100
|
-
}
|
|
101
|
-
if (labels.length === 1) {
|
|
102
|
-
return labels[0];
|
|
103
|
-
}
|
|
104
|
-
return `${labels.length} transitions`;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
/** Short operator-facing name for a turn type, used as a node subtitle and in summaries. */
|
|
108
|
-
export function turnTypeLabel(turnType: ProcessTurnType): string {
|
|
109
|
-
switch (turnType) {
|
|
110
|
-
case "llm":
|
|
111
|
-
return "Agent turn";
|
|
112
|
-
case "human":
|
|
113
|
-
return "Operator decision";
|
|
114
|
-
case "external":
|
|
115
|
-
return "External wait";
|
|
116
|
-
case "automatic":
|
|
117
|
-
return "Automatic";
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* Single source of truth for the operator-facing explanation of each turn type,
|
|
123
|
-
* surfaced as a hover tooltip on flow-diagram nodes. Keep these aligned with the
|
|
124
|
-
* short {@link turnTypeLabel} names.
|
|
125
|
-
*/
|
|
126
|
-
export function turnTypeDescription(turnType: ProcessTurnType): string {
|
|
127
|
-
switch (turnType) {
|
|
128
|
-
case "llm":
|
|
129
|
-
return "An AI agent does the work in this step, using its tools to plan, edit, or review.";
|
|
130
|
-
case "human":
|
|
131
|
-
return "You decide how the process continues by choosing one of the available actions.";
|
|
132
|
-
case "external":
|
|
133
|
-
return "The process pauses until an outside system or event reports back.";
|
|
134
|
-
case "automatic":
|
|
135
|
-
return "A deterministic step runs automatically in the workspace, with no AI or operator input.";
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
function estimateWidth(
|
|
140
|
-
text: string,
|
|
141
|
-
options: Required<FlowLayoutOptions>,
|
|
142
|
-
charWidth = options.charWidth,
|
|
143
|
-
): number {
|
|
144
|
-
const raw = text.length * charWidth + options.nodePaddingX * 2;
|
|
145
|
-
return Math.max(options.minNodeWidth, Math.min(options.maxNodeWidth, Math.round(raw)));
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* Computes a layered graph layout for a process flow view using dagre.
|
|
150
|
-
* Every node and every edge in the view is laid out — including loops, branch
|
|
151
|
-
* offshoots, and multiple edges into or out of a single box — so the result can
|
|
152
|
-
* be rendered as a real directed flow chart rather than a linear list.
|
|
153
|
-
* The layout is deterministic for a given input and option set, so it can be
|
|
154
|
-
* asserted in unit tests without a DOM.
|
|
155
|
-
*/
|
|
156
|
-
export function computeFlowLayout(
|
|
157
|
-
view: ProcessFlowView,
|
|
158
|
-
options: FlowLayoutOptions = {},
|
|
159
|
-
): FlowLayout {
|
|
160
|
-
const opts: Required<FlowLayoutOptions> = { ...DEFAULTS, ...options };
|
|
161
|
-
|
|
162
|
-
const graph = new dagre.graphlib.Graph({ multigraph: true });
|
|
163
|
-
graph.setGraph({
|
|
164
|
-
rankdir: "TB",
|
|
165
|
-
ranksep: opts.rankSep,
|
|
166
|
-
nodesep: opts.nodeSep,
|
|
167
|
-
edgesep: opts.edgeSep,
|
|
168
|
-
marginx: 12,
|
|
169
|
-
marginy: 12,
|
|
170
|
-
});
|
|
171
|
-
graph.setDefaultEdgeLabel(() => ({}));
|
|
172
|
-
|
|
173
|
-
const turnNodes = new Map<string, ProcessFlowNode>();
|
|
174
|
-
for (const node of view.nodes) {
|
|
175
|
-
turnNodes.set(node.turnId, node);
|
|
176
|
-
const width = estimateWidth(node.description, opts);
|
|
177
|
-
graph.setNode(node.turnId, { width, height: opts.nodeHeight });
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
// Terminal end-state boxes that real transitions point into.
|
|
181
|
-
const endStatuses = new Set<ProcessTurnTerminalLifecycleStatus>();
|
|
182
|
-
for (const edge of view.edges) {
|
|
183
|
-
if (edge.lifecycleStatus !== null) {
|
|
184
|
-
endStatuses.add(edge.lifecycleStatus);
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
for (const status of endStatuses) {
|
|
188
|
-
const title = endNodeTitle(status);
|
|
189
|
-
graph.setNode(endNodeId(status), {
|
|
190
|
-
width: estimateWidth(title, opts),
|
|
191
|
-
height: opts.endNodeHeight,
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
// Merge parallel transitions between the same two boxes (same kind) into a
|
|
196
|
-
// single drawn edge, collecting every underlying label. This keeps the chart
|
|
197
|
-
// readable: N transitions from A to B become one arrow, not N overlapping ones.
|
|
198
|
-
type EdgeGroup = {
|
|
199
|
-
from: string;
|
|
200
|
-
target: string;
|
|
201
|
-
kind: ProcessFlowEdge["kind"];
|
|
202
|
-
labels: string[];
|
|
203
|
-
};
|
|
204
|
-
const edgeGroups = new Map<string, EdgeGroup>();
|
|
205
|
-
for (const edge of view.edges) {
|
|
206
|
-
const target = edge.to ?? (edge.lifecycleStatus ? endNodeId(edge.lifecycleStatus) : null);
|
|
207
|
-
if (target === null || !graph.hasNode(edge.from) || !graph.hasNode(target)) {
|
|
208
|
-
continue;
|
|
209
|
-
}
|
|
210
|
-
const key = `${edge.from}|${target}|${edge.kind}`;
|
|
211
|
-
const existing = edgeGroups.get(key);
|
|
212
|
-
if (existing) {
|
|
213
|
-
if (edge.label && !existing.labels.includes(edge.label)) {
|
|
214
|
-
existing.labels.push(edge.label);
|
|
215
|
-
}
|
|
216
|
-
continue;
|
|
217
|
-
}
|
|
218
|
-
edgeGroups.set(key, {
|
|
219
|
-
from: edge.from,
|
|
220
|
-
target,
|
|
221
|
-
kind: edge.kind,
|
|
222
|
-
labels: edge.label ? [edge.label] : [],
|
|
223
|
-
});
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
type EdgeMeta = { kind: ProcessFlowEdge["kind"]; labels: string[] };
|
|
227
|
-
const edgeMeta = new Map<string, EdgeMeta>();
|
|
228
|
-
let edgeIndex = 0;
|
|
229
|
-
for (const group of edgeGroups.values()) {
|
|
230
|
-
const name = `e${edgeIndex}`;
|
|
231
|
-
edgeIndex += 1;
|
|
232
|
-
const display = edgeDisplayLabel(group.labels);
|
|
233
|
-
const labelConfig = display
|
|
234
|
-
? {
|
|
235
|
-
width: Math.round(display.length * opts.edgeLabelCharWidth),
|
|
236
|
-
height: opts.edgeLabelHeight,
|
|
237
|
-
labelpos: "c" as const,
|
|
238
|
-
}
|
|
239
|
-
: {};
|
|
240
|
-
graph.setEdge(group.from, group.target, labelConfig, name);
|
|
241
|
-
edgeMeta.set(`${group.from}|${group.target}|${name}`, {
|
|
242
|
-
kind: group.kind,
|
|
243
|
-
labels: group.labels,
|
|
244
|
-
});
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
dagre.layout(graph);
|
|
248
|
-
|
|
249
|
-
const graphLabel = graph.graph();
|
|
250
|
-
const layoutNodes: FlowLayoutNode[] = [];
|
|
251
|
-
for (const id of graph.nodes()) {
|
|
252
|
-
const dagreNode = graph.node(id);
|
|
253
|
-
if (!dagreNode) {
|
|
254
|
-
continue;
|
|
255
|
-
}
|
|
256
|
-
const turn = turnNodes.get(id);
|
|
257
|
-
if (turn) {
|
|
258
|
-
layoutNodes.push({
|
|
259
|
-
id,
|
|
260
|
-
kind: "turn",
|
|
261
|
-
x: dagreNode.x,
|
|
262
|
-
y: dagreNode.y,
|
|
263
|
-
width: dagreNode.width,
|
|
264
|
-
height: dagreNode.height,
|
|
265
|
-
title: turn.description,
|
|
266
|
-
subtitle: turnTypeLabel(turn.turnType),
|
|
267
|
-
role: turn.role,
|
|
268
|
-
turnType: turn.turnType,
|
|
269
|
-
lifecycleStatus: null,
|
|
270
|
-
isEntry: turn.isEntry,
|
|
271
|
-
});
|
|
272
|
-
continue;
|
|
273
|
-
}
|
|
274
|
-
const status: ProcessTurnTerminalLifecycleStatus = id.endsWith("completed")
|
|
275
|
-
? "completed"
|
|
276
|
-
: "aborted";
|
|
277
|
-
layoutNodes.push({
|
|
278
|
-
id,
|
|
279
|
-
kind: "end",
|
|
280
|
-
x: dagreNode.x,
|
|
281
|
-
y: dagreNode.y,
|
|
282
|
-
width: dagreNode.width,
|
|
283
|
-
height: dagreNode.height,
|
|
284
|
-
title: endNodeTitle(status),
|
|
285
|
-
subtitle: "End state",
|
|
286
|
-
role: null,
|
|
287
|
-
turnType: null,
|
|
288
|
-
lifecycleStatus: status,
|
|
289
|
-
isEntry: false,
|
|
290
|
-
});
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
const layoutEdges: FlowLayoutEdge[] = [];
|
|
294
|
-
for (const edgeObj of graph.edges()) {
|
|
295
|
-
const dagreEdge = graph.edge(edgeObj);
|
|
296
|
-
if (!dagreEdge) {
|
|
297
|
-
continue;
|
|
298
|
-
}
|
|
299
|
-
const meta = edgeMeta.get(`${edgeObj.v}|${edgeObj.w}|${edgeObj.name}`);
|
|
300
|
-
const points = (dagreEdge.points ?? []).map((point) => ({ x: point.x, y: point.y }));
|
|
301
|
-
layoutEdges.push({
|
|
302
|
-
id: edgeObj.name ?? `${edgeObj.v}-${edgeObj.w}`,
|
|
303
|
-
from: edgeObj.v,
|
|
304
|
-
to: edgeObj.w,
|
|
305
|
-
kind: meta?.kind ?? "forward",
|
|
306
|
-
labels: meta?.labels ?? [],
|
|
307
|
-
points,
|
|
308
|
-
labelX: typeof dagreEdge.x === "number" ? dagreEdge.x : null,
|
|
309
|
-
labelY: typeof dagreEdge.y === "number" ? dagreEdge.y : null,
|
|
310
|
-
});
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
return {
|
|
314
|
-
width: typeof graphLabel.width === "number" ? graphLabel.width : 0,
|
|
315
|
-
height: typeof graphLabel.height === "number" ? graphLabel.height : 0,
|
|
316
|
-
nodes: layoutNodes,
|
|
317
|
-
edges: layoutEdges,
|
|
318
|
-
};
|
|
319
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { Snippet } from "svelte";
|
|
3
|
-
|
|
4
|
-
interface Props {
|
|
5
|
-
kind: "process-info" | "reasoning";
|
|
6
|
-
closeLabel: string;
|
|
7
|
-
onClose: () => void;
|
|
8
|
-
children: Snippet;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
let { kind, closeLabel, onClose, children }: Props = $props();
|
|
12
|
-
</script>
|
|
13
|
-
|
|
14
|
-
<div class="process-detail-overlay-frame" data-section="process-detail-overlay-frame" data-overlay-kind={kind}>
|
|
15
|
-
<button
|
|
16
|
-
type="button"
|
|
17
|
-
class="process-detail-overlay-backdrop"
|
|
18
|
-
aria-label={closeLabel}
|
|
19
|
-
onclick={onClose}
|
|
20
|
-
></button>
|
|
21
|
-
<div class="process-detail-overlay-panel">
|
|
22
|
-
{@render children()}
|
|
23
|
-
</div>
|
|
24
|
-
</div>
|
|
25
|
-
|
|
26
|
-
<style>
|
|
27
|
-
.process-detail-overlay-frame {
|
|
28
|
-
position: absolute;
|
|
29
|
-
inset: 0;
|
|
30
|
-
display: grid;
|
|
31
|
-
min-height: 0;
|
|
32
|
-
z-index: 30;
|
|
33
|
-
pointer-events: none;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.process-detail-overlay-backdrop {
|
|
37
|
-
position: absolute;
|
|
38
|
-
inset: 0;
|
|
39
|
-
border: 0;
|
|
40
|
-
background: color-mix(in srgb, var(--chronicle-bg) 18%, transparent 82%);
|
|
41
|
-
cursor: default;
|
|
42
|
-
pointer-events: auto;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.process-detail-overlay-panel {
|
|
46
|
-
position: absolute;
|
|
47
|
-
inset: 0;
|
|
48
|
-
display: grid;
|
|
49
|
-
min-height: 0;
|
|
50
|
-
z-index: 1;
|
|
51
|
-
pointer-events: auto;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.process-detail-overlay-panel > :global(*) {
|
|
55
|
-
height: 100%;
|
|
56
|
-
min-height: 0;
|
|
57
|
-
}
|
|
58
|
-
</style>
|