footprint-explainable-ui 0.23.0 → 0.24.0

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.
@@ -234,6 +234,16 @@ interface StructureSpecRef {
234
234
  readonly isSubflowRoot?: boolean;
235
235
  readonly subflowId?: string;
236
236
  readonly isLazy?: boolean;
237
+ /**
238
+ * How the REAL engine flags decider/selector stages: footprintjs fires
239
+ * `onStageAdded` with `type: 'stage'` and stamps `hasDecider: true` /
240
+ * `hasSelector: true` on the spec instead of `type: 'decider'|'selector'`
241
+ * (pinned by the U2 golden fixtures against fp 9.5.0). Both signals must
242
+ * feed `TraceNodeData.isDecider` or real traces render decision stages
243
+ * as plain rectangles.
244
+ */
245
+ readonly hasDecider?: boolean;
246
+ readonly hasSelector?: boolean;
237
247
  readonly [key: string]: unknown;
238
248
  }
239
249
  interface StageAddedEvent {
@@ -234,6 +234,16 @@ interface StructureSpecRef {
234
234
  readonly isSubflowRoot?: boolean;
235
235
  readonly subflowId?: string;
236
236
  readonly isLazy?: boolean;
237
+ /**
238
+ * How the REAL engine flags decider/selector stages: footprintjs fires
239
+ * `onStageAdded` with `type: 'stage'` and stamps `hasDecider: true` /
240
+ * `hasSelector: true` on the spec instead of `type: 'decider'|'selector'`
241
+ * (pinned by the U2 golden fixtures against fp 9.5.0). Both signals must
242
+ * feed `TraceNodeData.isDecider` or real traces render decision stages
243
+ * as plain rectangles.
244
+ */
245
+ readonly hasDecider?: boolean;
246
+ readonly hasSelector?: boolean;
237
247
  readonly [key: string]: unknown;
238
248
  }
239
249
  interface StageAddedEvent {
package/dist/flowchart.js CHANGED
@@ -3189,7 +3189,7 @@ function walkNode(node, subflowPath, sink, visited) {
3189
3189
  walkNode(node.subflowStructure, nestedPath, sink, visited);
3190
3190
  }
3191
3191
  const type = node.type ?? "stage";
3192
- const isDecider = type === "decider" || type === "selector";
3192
+ const isDecider = type === "decider" || type === "selector" || node.hasDecider === true || node.hasSelector === true;
3193
3193
  const isFork = type === "fork";
3194
3194
  const isStreaming = type === "streaming";
3195
3195
  const isSubflow = !!node.isSubflowRoot;
@@ -3323,7 +3323,7 @@ function createTraceStructureRecorder(options = {}) {
3323
3323
  onStageAdded(event) {
3324
3324
  const spec = event.spec;
3325
3325
  const type = event.type;
3326
- const isDecider = type === "decider" || type === "selector";
3326
+ const isDecider = type === "decider" || type === "selector" || spec.hasDecider === true || spec.hasSelector === true;
3327
3327
  const isFork = type === "fork";
3328
3328
  const isStreaming = type === "streaming";
3329
3329
  const isSubflow = !!spec.isSubflowRoot;
@@ -3392,7 +3392,10 @@ function createTraceStructureRecorder(options = {}) {
3392
3392
  const node = nodes[existing];
3393
3393
  const data = {
3394
3394
  ...node.data,
3395
- branchIds: event.branchIds
3395
+ branchIds: event.branchIds,
3396
+ // A sealed branch list IS decider-ness — engines that stamp neither
3397
+ // `type: 'decider'` nor `spec.hasDecider` still get a decision node.
3398
+ isDecider: true
3396
3399
  };
3397
3400
  if (event.defaultBranch !== void 0) data.defaultBranch = event.defaultBranch;
3398
3401
  nodes[existing] = { ...node, data };