@memberjunction/ng-task-graph-editor 6.1.0 → 6.1.2

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.
@@ -581,7 +581,7 @@ export class TaskGraphRunViewComponent extends BaseAngularComponent {
581
581
  },
582
582
  {
583
583
  EntityName: 'MJ: Task Dependencies',
584
- ExtraFilter: `TaskID IN (SELECT ID FROM __mj.Task WHERE ParentID='${this.parentTaskID}')`,
584
+ ExtraFilter: `TaskID IN (SELECT ID FROM [__mj].[vwTasks] WHERE ParentID='${this.parentTaskID}')`,
585
585
  ResultType: 'entity_object',
586
586
  BypassCache: true,
587
587
  },
@@ -1 +1 @@
1
- {"version":3,"file":"task-graph-run-view.component.js","sourceRoot":"","sources":["../../src/lib/task-graph-run-view.component.ts","../../src/lib/task-graph-run-view.component.html"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EACH,uBAAuB,EAEvB,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,KAAK,EAEL,MAAM,GACT,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAwC,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACrG,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,sBAAsB,EAA0B,MAAM,wBAAwB,CAAC;AACxF,OAAO,EACH,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,GAIxB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;;;;;;;ICzCxG,8BAA8D;;;IAApC,6CAAwB;;;IAElD,8BAA8B;IAAA,uDA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esContent":["/**\n * @fileoverview Watching a graph that is running, on the canvas its author drew on.\n *\n * **Why this is a component and not three.** A run needs rendering in at least three places — inside\n * an Agent Run, inside the test harness, and on a standalone workflow-runs screen — and every one of\n * them wants the identical thing: the graph, with live status, laid out legibly, with a node you can\n * click. Three implementations would be three chances to render the same run differently, and the\n * one that matters most (is that branch grey because it was *not taken*, or because it *broke*?) is\n * exactly the distinction a second implementation gets wrong.\n *\n * **What it owns and what it doesn't.** It owns data acquisition — reading `MJ: Tasks` and\n * `MJ: Task Dependencies` through the host's provider — and geometry. It does not navigate: a\n * widgets-layer component cannot know whether it sits inside Explorer, so selecting a node emits an\n * event and the host decides what \"open the agent run\" means. That boundary is the whole reason\n * this can live beside the editor rather than in Explorer.\n *\n * @module @memberjunction/ng-task-graph-editor\n */\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n HostListener,\n Input,\n OnDestroy,\n Output,\n} from '@angular/core';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport { LogError, RunView } from '@memberjunction/core';\nimport { UUIDsEqual } from '@memberjunction/global';\nimport { MJTaskEntity, MJTaskDependencyEntity, UserInfoEngine } from '@memberjunction/core-entities';\nimport { ToPaneSizePair } from './pane-split';\nimport { TaskGraphRunPrefsStore, type TaskGraphRunPrefs } from './task-graph-run-prefs';\nimport {\n GraphLayoutBounds,\n LayoutGraphNodes,\n ProjectTaskRowsToSpec,\n type GraphLayoutEdge,\n type GraphNodePosition,\n type TaskGraphSpec,\n} from '@memberjunction/ai-core-plus';\nimport { BuildRuntimeStatus, IsRuntimeSettled, NormalizeRuntimeState } from './task-graph-runtime-source';\nimport type { TaskGraphDebugOverlay, TaskGraphRuntimeStatus } from './task-graph-canvas-adapter';\nimport type { TaskGraphSelectionChangedEventArgs } from './task-graph-editor-events';\nimport type {\n FlowAfterContextMenuActionEventArgs,\n FlowBeforeContextMenuEventArgs,\n FlowConnection,\n FlowToolbarAlign,\n FlowToolbarVisibility,\n} from '@memberjunction/ng-flow-editor';\n\n/** What the host learns when someone clicks a step. */\nexport type TaskGraphRunNodeSelectedEvent = {\n /** The `MJ: Tasks` row id. */\n TaskID: string;\n Task: MJTaskEntity | null;\n};\n\n/** What the host learns when someone clicks a path. */\nexport type TaskGraphRunConnectionSelectedEvent = {\n /** The `MJ: Task Dependencies` row id, when the projection carried one. */\n EdgeID: string | null;\n FromTaskID: string;\n ToTaskID: string;\n Condition?: string;\n};\n\n/**\n * One live dispatcher frame, as the HOST hands it in.\n *\n * Structural on purpose: the widget must not import the transport (`GraphQLDataProvider`'s\n * `TaskGraphFrameEvent` satisfies this shape as-is), and the host owns the subscription — this\n * component only renders what it is handed, which is the widgets-layer rule that keeps it embeddable\n * anywhere. Fields beyond these are ignored, so a newer server cannot break an older widget.\n */\nexport type TaskGraphRunFrame = {\n kind: string;\n taskId?: string;\n taskName?: string;\n status?: string;\n progressMessage?: string;\n progressPercent?: number;\n reason?: string;\n edgeId?: string;\n dependsOnTaskId?: string;\n conditionText?: string;\n claimEvent?: string;\n claimedBy?: string;\n verdict?: string;\n passNumber?: number;\n eligibleCount?: number;\n heldCount?: number;\n claimedCount?: number;\n};\n\n/** Statuses at which a graph has stopped moving, so polling can stop with it. */\nconst SETTLED = new Set<MJTaskEntity['Status']>(['Complete', 'Failed', 'Cancelled', 'Skipped']);\n\n@Component({\n standalone: false,\n selector: 'mj-task-graph-run-view',\n templateUrl: './task-graph-run-view.component.html',\n styleUrls: ['./task-graph-run-view.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TaskGraphRunViewComponent extends BaseAngularComponent implements OnDestroy {\n /**\n * The graph to watch — the parent `MJ: Tasks` row that represents it.\n *\n * Setter-based rather than `ngOnChanges`, matching the editor beside it: the reaction is\n * explicit and costs nothing on unrelated change-detection passes.\n */\n @Input()\n public set ParentTaskID(value: string | null) {\n if (value === this.parentTaskID) return;\n this.parentTaskID = value;\n this.settledEmitted = false;\n void this.load();\n }\n public get ParentTaskID(): string | null {\n return this.parentTaskID;\n }\n\n /** Name shown on the compiled graph. Purely cosmetic; the rows carry the truth. */\n @Input() public WorkflowName: string = 'Workflow';\n\n /**\n * Keep re-reading while the graph is still moving.\n *\n * Off by default: most hosts show a finished run, and a component that polls by default would\n * have every historical run quietly issuing queries forever.\n */\n @Input() public LiveUpdates: boolean = false;\n\n /** How often to re-read while live. Seconds, not milliseconds — this is a human-scale view. */\n @Input() public PollIntervalSeconds: number = 3;\n\n /** Height of the canvas. Hosts embed this in very different amounts of space. */\n @Input() public Height: string = '320px';\n\n /**\n * Whether the canvas legend shows. **Off by default here**, unlike the editor.\n *\n * The legend explains the authoring vocabulary — what a conditional edge means, what a duplicate\n * default looks like. That is what someone drawing a graph needs. A run view answers a different\n * question, \"what happened\", which the legend helps with not at all while covering a corner of\n * the canvas the graph is usually occupying.\n */\n @Input() public ShowLegend: boolean = false;\n\n /**\n * Whether the canvas toolbar rides above the graph.\n *\n * Debug and other run hosts leave this on and set `ToolbarVisibility` to `minimized` so the\n * graph is the picture, not a floating tool strip. The chip in the corner restores the bar.\n */\n @Input() public ShowToolbar: boolean = true;\n @Input() public ToolbarVisibility: FlowToolbarVisibility = 'minimized';\n @Input() public ToolbarAlign: FlowToolbarAlign = 'left';\n\n /**\n * The latest live dispatcher frame, handed in by the host.\n *\n * The host owns the subscription (`GraphQLDataProvider.TaskGraphFrames` or anything shaped like\n * it) and binds each arrival here; the widget folds it into the overlay. Frames are advisory —\n * a task frame patches the node's status in place for sub-second feedback, and the frames that\n * imply CASCADES (a skip, a block, settlement) trigger a debounced row reload, because the\n * dispatcher's propagation writes rows this component cannot infer from one frame. Rows remain\n * the truth; the existing poll (if enabled) remains the safety net.\n */\n @Input()\n public set LiveFrame(frame: TaskGraphRunFrame | null) {\n if (!frame) return;\n this.foldFrame(frame);\n }\n\n /**\n * Replay: render the run as it stood at this moment, reconstructed from each step's\n * `StartedAt`/`CompletedAt`. Null (the default) renders the present. A step that had not\n * started reads Pending; one mid-flight reads In Progress; one already finished reads its\n * final status — the same three answers the rows would have given a viewer at that time.\n */\n @Input()\n public set ReplayAt(value: Date | null) {\n if (value?.getTime() === this.replayAt?.getTime()) return;\n this.replayAt = value;\n this.applyReplay();\n }\n public get ReplayAt(): Date | null {\n return this.replayAt;\n }\n\n /**\n * Armed breakpoint task IDs, from the parent row's `$.debug.breakpoints`. Empty by default so\n * embeds (agent-run timeline, test harness) never grow debugger chrome they did not ask for.\n */\n @Input()\n public set Breakpoints(value: readonly string[]) {\n this.breakpoints = value ?? [];\n this.rebuildOverlay();\n }\n public get Breakpoints(): readonly string[] {\n return this.breakpoints;\n }\n /** The step a breakpoint actually stopped on. */\n @Input()\n public set PausedAtTaskID(value: string | null) {\n this.pausedAtTaskID = value;\n if (value) this.SelectedTaskID = value;\n this.rebuildOverlay();\n }\n public get PausedAtTaskID(): string | null {\n return this.pausedAtTaskID;\n }\n /**\n * The graph is claim-gated. Combined with `PausedAtTaskID` so start-paused (no specific\n * step yet) can still light the entry node as waiting.\n */\n @Input()\n public set GraphPaused(value: boolean) {\n this.graphPaused = value;\n this.rebuildOverlay();\n }\n public get GraphPaused(): boolean {\n return this.graphPaused;\n }\n /** Operator-forced edge verdicts, keyed by `MJ: Task Dependencies` row ID. */\n @Input()\n public set EdgeOverrides(value: Readonly<Record<string, 'true' | 'false'>>) {\n this.edgeOverrides = value ?? {};\n this.rebuildOverlay();\n }\n public get EdgeOverrides(): Readonly<Record<string, 'true' | 'false'>> {\n return this.edgeOverrides;\n }\n /**\n * Whether this host may arm/disarm breakpoints from the selected-step control.\n * Off by default — the run view also renders where those controls would be wrong.\n */\n @Input() public AllowBreakpointEditing: boolean = false;\n /** Compact debug key under the summary line. Off unless the host is a debugger. */\n @Input() public ShowDebugLegend: boolean = false;\n /** VS Code VARIABLES pane to the left of the canvas. Off unless the host is debugging. */\n @Input() public ShowVariables: boolean = false;\n /** The parent bag's `data` / `context` roots, for the Invocation scope. */\n @Input() public Invocation: { data?: unknown; context?: unknown } | null = null;\n\n @Output() public NodeSelected = new EventEmitter<TaskGraphRunNodeSelectedEvent>();\n /** The legend was toggled from the toolbar, so a host can remember the choice. */\n @Output() public LegendToggled = new EventEmitter<boolean>();\n /** Emitted once, when every step has reached a terminal status. */\n @Output() public Settled = new EventEmitter<void>();\n /** A connection was clicked. `EdgeID` is the dependency row id when the projection carried one. */\n @Output() public ConnectionSelected = new EventEmitter<TaskGraphRunConnectionSelectedEvent>();\n /** Intent only — the host owns `SetBreakpoints`. */\n @Output() public BreakpointToggled = new EventEmitter<{ TaskID: string; Enabled: boolean }>();\n /** Intent only — the host owns `OverrideEdge`. */\n @Output() public EdgeOverrideRequested = new EventEmitter<{\n EdgeID: string;\n Verdict: 'true' | 'false' | null;\n }>();\n\n /** What each running step says it is doing, from `NodeProgress` frames. Keyed by task row id. */\n public LiveActivity = new Map<string, { Message: string; Percent?: number }>();\n\n /** The last step the person selected, so the breakpoint control has a target. */\n public SelectedTaskID: string | null = null;\n /** Stable overlay object — rebuilt only when debug inputs change, so the editor does not re-project every CD cycle. */\n public Overlay: TaskGraphDebugOverlay = { showConditions: true };\n\n private breakpoints: readonly string[] = [];\n private pausedAtTaskID: string | null = null;\n private graphPaused = false;\n private edgeOverrides: Readonly<Record<string, 'true' | 'false'>> = {};\n /** `Settled` is once-per-parent — a finished poll must not re-fire the host. */\n private settledEmitted = false;\n\n /** Left data pane + split sizes. One JSON bag in `MJ: User Settings`. */\n public get Prefs(): TaskGraphRunPrefs {\n return this.prefsStore.Value;\n }\n private prefsStore = new TaskGraphRunPrefsStore({\n Get: () => undefined,\n Set: () => { /* unit tests / pre-bootstrap */ },\n });\n\n public Spec: TaskGraphSpec | null = null;\n public RuntimeStatus: TaskGraphRuntimeStatus | null = null;\n public Positions: Map<string, GraphNodePosition> = new Map();\n public IsLoading = false;\n public ErrorMessage: string | null = null;\n\n /** Rows by id, so a selection event can hand the host the whole task rather than an id. */\n private taskByID = new Map<string, MJTaskEntity>();\n private parentTaskID: string | null = null;\n private replayAt: Date | null = null;\n private pollTimer: ReturnType<typeof setTimeout> | null = null;\n private frameReloadTimer: ReturnType<typeof setTimeout> | null = null;\n private destroyed = false;\n\n constructor(private cdr: ChangeDetectorRef) {\n super();\n try {\n this.prefsStore = new TaskGraphRunPrefsStore({\n Get: (key) => UserInfoEngine.Instance.GetSetting(key),\n Set: (key, value) => UserInfoEngine.Instance.SetSettingDebounced(key, value),\n });\n this.prefsStore.Restore();\n } catch {\n // Engine not configured yet (unit tests, pre-bootstrap) — keep the default.\n }\n }\n\n public get InvocationPaneOpen(): boolean {\n return this.ShowVariables && this.Prefs.InvocationOpen;\n }\n\n public get InvocationPaneSize(): number {\n return this.InvocationPaneOpen ? this.Prefs.InvocationSplit[0] : 0;\n }\n\n public get CanvasPaneSize(): number {\n return this.InvocationPaneOpen ? this.Prefs.InvocationSplit[1] : 100;\n }\n\n public OnToggleInvocation(): void {\n this.prefsStore.SetInvocationOpen(!this.Prefs.InvocationOpen);\n this.cdr.markForCheck();\n }\n\n public OnInvocationSplitDragEnd(sizes: readonly (number | '*')[]): void {\n const pair = ToPaneSizePair(sizes);\n if (!pair) return;\n this.prefsStore.SetInvocationSplit(pair);\n this.cdr.markForCheck();\n }\n\n public ngOnDestroy(): void {\n this.destroyed = true;\n this.stopPolling();\n if (this.frameReloadTimer) {\n clearTimeout(this.frameReloadTimer);\n this.frameReloadTimer = null;\n }\n }\n\n /** Steps in a terminal state, for the host's summary line. Uses the same map the canvas paints. */\n public get CompletedCount(): number {\n return this.countRuntime('Complete');\n }\n\n public get TotalCount(): number {\n return this.Spec?.tasks.length ?? this.taskByID.size;\n }\n\n public get SkippedCount(): number {\n return this.countRuntime('Skipped');\n }\n\n public get RunningCount(): number {\n return this.countRuntime('In Progress');\n }\n\n public get IsSettled(): boolean {\n if (!this.Spec || this.Spec.tasks.length === 0) return false;\n return IsRuntimeSettled(this.RuntimeStatus ?? {}, this.Spec.tasks.map((t) => t.tempId));\n }\n\n /**\n * A node was selected on the canvas.\n *\n * The projected `tempId` IS the task id, so the row lookup is exact — and handing the host the\n * whole task rather than an id spares every host from re-reading a row this component already\n * holds.\n */\n public OnSelectionChanged(args: TaskGraphSelectionChangedEventArgs): void {\n const tempId = args?.Task?.tempId;\n if (!tempId) return;\n this.SelectedTaskID = tempId;\n this.NodeSelected.emit({ TaskID: tempId, Task: this.taskByID.get(tempId) ?? null });\n this.cdr.markForCheck();\n }\n\n public OnConnectionSelected(connection: FlowConnection | null): void {\n if (!connection) {\n this.ConnectionSelected.emit({ EdgeID: null, FromTaskID: '', ToTaskID: '' });\n return;\n }\n const data = connection.Data ?? {};\n const edgeID = typeof data['EdgeID'] === 'string' ? data['EdgeID'] : null;\n const from = typeof data['FromTempId'] === 'string' ? data['FromTempId'] : connection.SourceNodeID;\n const to = typeof data['ToTempId'] === 'string' ? data['ToTempId'] : connection.TargetNodeID;\n this.ConnectionSelected.emit({\n EdgeID: edgeID,\n FromTaskID: from,\n ToTaskID: to,\n Condition: connection.Condition,\n });\n }\n\n private countRuntime(state: TaskGraphRuntimeStatus[string]): number {\n if (!this.RuntimeStatus) {\n return [...this.taskByID.values()].filter((t) => NormalizeRuntimeState(t.Status) === state).length;\n }\n return Object.values(this.RuntimeStatus).filter((s) => s === state).length;\n }\n\n public get HasSelectedBreakpoint(): boolean {\n return !!this.SelectedTaskID && this.hasBreakpoint(this.SelectedTaskID);\n }\n\n public get SelectedTaskName(): string {\n if (!this.SelectedTaskID) return '';\n return this.taskByID.get(this.SelectedTaskID)?.Name ?? 'this step';\n }\n\n public get WaitingStepName(): string {\n if (this.pausedAtTaskID) {\n return this.taskByID.get(this.pausedAtTaskID)?.Name\n ?? this.Spec?.tasks.find((t) => t.tempId === this.pausedAtTaskID)?.name\n ?? 'this step';\n }\n const entry = this.Spec?.tasks.find((t) => (t.dependsOn?.length ?? 0) === 0);\n return entry?.name ?? 'the first step';\n }\n\n public get SelectedTask(): MJTaskEntity | null {\n return this.SelectedTaskID ? this.taskByID.get(this.SelectedTaskID) ?? null : null;\n }\n\n public OnToggleSelectedBreakpoint(): void {\n if (!this.AllowBreakpointEditing || !this.SelectedTaskID) return;\n this.BreakpointToggled.emit({\n TaskID: this.SelectedTaskID,\n Enabled: !this.HasSelectedBreakpoint,\n });\n }\n\n /** Debug attaches here: replace Edit/Remove with breakpoint / path-override items. */\n public OnBeforeContextMenu(event: FlowBeforeContextMenuEventArgs): void {\n if (!this.AllowBreakpointEditing) {\n event.Cancel = true;\n return;\n }\n if (event.Target === 'node' && event.Node) {\n const on = this.hasBreakpoint(event.Node.ID);\n event.Items = [{\n ID: 'toggle-breakpoint',\n Label: on ? 'Remove Breakpoint' : 'Add Breakpoint',\n Icon: 'fa-circle',\n Shortcut: 'F9',\n }];\n return;\n }\n if (event.Target === 'connection' && event.Connection?.Condition?.trim()) {\n const edgeID = typeof event.Connection.Data?.['EdgeID'] === 'string'\n ? event.Connection.Data['EdgeID']\n : null;\n if (!edgeID) {\n event.Cancel = true;\n return;\n }\n event.Items = [\n { ID: 'force-true', Label: 'Take this path', Icon: 'fa-check' },\n { ID: 'force-false', Label: 'Skip this path', Icon: 'fa-xmark' },\n { ID: 'force-clear', Label: 'Clear override', Icon: 'fa-rotate-left' },\n ];\n return;\n }\n event.Cancel = true;\n }\n\n public OnAfterContextMenuAction(event: FlowAfterContextMenuActionEventArgs): void {\n if (event.ActionID === 'toggle-breakpoint' && event.Node) {\n this.BreakpointToggled.emit({\n TaskID: event.Node.ID,\n Enabled: !this.hasBreakpoint(event.Node.ID),\n });\n return;\n }\n const edgeID = typeof event.Connection?.Data?.['EdgeID'] === 'string'\n ? event.Connection.Data['EdgeID']\n : null;\n if (!edgeID) return;\n if (event.ActionID === 'force-true') this.EdgeOverrideRequested.emit({ EdgeID: edgeID, Verdict: 'true' });\n if (event.ActionID === 'force-false') this.EdgeOverrideRequested.emit({ EdgeID: edgeID, Verdict: 'false' });\n if (event.ActionID === 'force-clear') this.EdgeOverrideRequested.emit({ EdgeID: edgeID, Verdict: null });\n }\n\n private hasBreakpoint(taskID: string): boolean {\n return this.breakpoints.some((id) => UUIDsEqual(id, taskID));\n }\n\n @HostListener('document:keydown', ['$event'])\n public OnDebugHotkey(event: KeyboardEvent): void {\n if (!this.AllowBreakpointEditing) return;\n if (isTypingTarget(event.target)) return;\n if (event.key === 'F9') {\n event.preventDefault();\n this.OnToggleSelectedBreakpoint();\n }\n }\n\n private rebuildOverlay(): void {\n this.Overlay = {\n breakpoints: this.breakpoints,\n // A finished graph is not \"paused here\" — the durable bag can still name the last\n // breakpoint after every step is terminal.\n pausedAtTaskID: this.IsSettled ? null : this.pausedAtTaskID,\n paused: !this.IsSettled && this.graphPaused,\n edgeOverrides: this.edgeOverrides,\n showConditions: true,\n };\n }\n\n private emitSettledOnce(): void {\n if (this.settledEmitted || !this.IsSettled) return;\n this.settledEmitted = true;\n this.Settled.emit();\n }\n\n /**\n * Reads the graph and projects it onto the canvas.\n *\n * `BypassCache` throughout: a run view exists to show what is true *now*, and the whole point of\n * the poll is to see a status that changed a second ago. A cached read would render a stale graph\n * that looks authoritative.\n */\n private async load(): Promise<void> {\n this.stopPolling();\n if (!this.parentTaskID) {\n this.Spec = null;\n this.cdr.markForCheck();\n return;\n }\n\n this.IsLoading = this.Spec === null; // only show the spinner on first load, not on every poll\n this.ErrorMessage = null;\n\n try {\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const [tasks, deps] = await rv.RunViews<MJTaskEntity | MJTaskDependencyEntity>([\n {\n EntityName: 'MJ: Tasks',\n ExtraFilter: `ParentID='${this.parentTaskID}'`,\n // Started work in the order it ran, unstarted last, persist order as the\n // tiebreak — the same rule GetAgentRunTree uses, so a graph reads identically\n // wherever it is shown.\n //\n // `__mj_CreatedAt ASC` alone was persist order, which is the COMPILER's walk\n // order, not the author's numbering and not what actually happened: a settled\n // graph listed its steps in an order unrelated to their execution, and a skipped\n // step could sit above work that ran.\n OrderBy: 'CASE WHEN StartedAt IS NULL THEN 1 ELSE 0 END, StartedAt, __mj_CreatedAt',\n ResultType: 'entity_object',\n BypassCache: true,\n },\n {\n EntityName: 'MJ: Task Dependencies',\n ExtraFilter: `TaskID IN (SELECT ID FROM __mj.Task WHERE ParentID='${this.parentTaskID}')`,\n ResultType: 'entity_object',\n BypassCache: true,\n },\n ]);\n\n if (this.destroyed) return;\n\n if (!tasks.Success) {\n this.fail(`The workflow's steps could not be loaded: ${tasks.ErrorMessage}`);\n return;\n }\n\n const taskRows = (tasks.Results ?? []) as MJTaskEntity[];\n const depRows = (deps.Success ? (deps.Results ?? []) : []) as MJTaskDependencyEntity[];\n this.project(taskRows, depRows);\n this.rebuildOverlay();\n this.emitSettledOnce();\n\n if (this.LiveUpdates && !this.isSettled(taskRows)) this.schedulePoll();\n } catch (e) {\n this.fail(e instanceof Error ? e.message : String(e));\n } finally {\n this.IsLoading = false;\n this.cdr.markForCheck();\n }\n }\n\n /** Rows → spec + runtime + geometry. */\n private project(taskRows: MJTaskEntity[], depRows: MJTaskDependencyEntity[]): void {\n this.taskByID = new Map(taskRows.map((t) => [t.ID, t]));\n\n const projection = ProjectTaskRowsToSpec(this.WorkflowName, taskRows, depRows);\n this.Spec = projection.Spec;\n\n // Correlate by ID, not by name: a projected node's tempId IS the task id, which is the one\n // case where an id match is exact. Name correlation exists for specs whose tempIds were\n // never real, and would be needlessly lossy here.\n const knownIDs = new Set(taskRows.map((t) => t.ID));\n this.RuntimeStatus = this.replayAt\n ? this.statusAt(this.replayAt)\n : BuildRuntimeStatus(taskRows, new Map(), knownIDs);\n\n this.Positions = this.resolvePositions(projection.AuthoredPositions, taskRows, depRows);\n }\n\n /** Re-derives the overlay for the current replay position (or the present) from held rows. */\n private applyReplay(): void {\n if (this.taskByID.size === 0) return;\n const rows = [...this.taskByID.values()];\n this.RuntimeStatus = this.replayAt\n ? this.statusAt(this.replayAt)\n : BuildRuntimeStatus(rows, new Map(), new Set(rows.map((t) => t.ID)));\n this.cdr.markForCheck();\n }\n\n /** The overlay as it stood at `moment`, from each row's own timestamps. */\n private statusAt(moment: Date): TaskGraphRuntimeStatus {\n const at = moment.getTime();\n const status: TaskGraphRuntimeStatus = {};\n for (const [id, row] of this.taskByID) {\n const started = row.StartedAt?.getTime?.() ?? (row.StartedAt ? new Date(row.StartedAt).getTime() : null);\n const completed = row.CompletedAt?.getTime?.() ?? (row.CompletedAt ? new Date(row.CompletedAt).getTime() : null);\n if (started == null || started > at) status[id] = 'Pending';\n else if (completed == null || completed > at) status[id] = 'In Progress';\n else status[id] = NormalizeRuntimeState(row.Status);\n }\n return status;\n }\n\n /**\n * The author's arrangement where there is one, a computed layout everywhere else.\n *\n * Mixing the two per-node rather than choosing one for the whole graph: a workflow whose author\n * positioned some steps and left others where they fell should keep the positions they chose.\n * A wholly unpositioned graph — the normal case for anything an agent emitted — is laid out\n * entirely by the algorithm.\n */\n private resolvePositions(\n authored: Map<string, GraphNodePosition>,\n taskRows: MJTaskEntity[],\n depRows: MJTaskDependencyEntity[],\n ): Map<string, GraphNodePosition> {\n const missing = taskRows.filter((t) => !authored.has(t.ID)).map((t) => t.ID);\n if (missing.length === 0) return authored;\n\n const edges: GraphLayoutEdge[] = depRows.map((d) => ({ From: d.DependsOnTaskID, To: d.TaskID }));\n const computed = LayoutGraphNodes(taskRows.map((t) => t.ID), edges, { Direction: 'LR' });\n\n const resolved = new Map(computed);\n for (const [id, position] of authored) resolved.set(id, position);\n return resolved;\n }\n\n private isSettled(taskRows: MJTaskEntity[]): boolean {\n return taskRows.length > 0 && taskRows.every((t) => SETTLED.has(t.Status));\n }\n\n /**\n * Folds one live frame into the overlay.\n *\n * Direct status frames patch in place — a new `RuntimeStatus` object, because the canvas is\n * OnPush and mutation would render nothing. Frames whose consequences the dispatcher computes\n * across the whole graph (skips cascade, blocks propagate, settlement rolls up) reload the rows\n * instead: inferring a cascade client-side would be a second implementation of the engine's\n * rules, free to drift.\n */\n private foldFrame(frame: TaskGraphRunFrame): void {\n switch (frame.kind) {\n case 'TaskStarted':\n case 'TaskCompleted':\n case 'TaskFailed':\n if (frame.taskId && frame.status && this.RuntimeStatus) {\n const row = this.taskByID.get(frame.taskId);\n if (row) row.Status = frame.status as MJTaskEntity['Status'];\n this.RuntimeStatus = { ...this.RuntimeStatus, [frame.taskId]: NormalizeRuntimeState(frame.status) };\n if (frame.kind !== 'TaskStarted') this.LiveActivity.delete(frame.taskId);\n this.rebuildOverlay();\n this.emitSettledOnce();\n this.cdr.markForCheck();\n }\n break;\n case 'NodeProgress':\n if (frame.taskId && frame.progressMessage) {\n this.LiveActivity.set(frame.taskId, { Message: frame.progressMessage, Percent: frame.progressPercent });\n this.cdr.markForCheck();\n }\n break;\n case 'GraphSettled':\n this.scheduleFrameReload();\n // The engine said the graph is done — do not wait for the row reload to tell the host.\n if (!this.settledEmitted) {\n this.settledEmitted = true;\n this.Settled.emit();\n }\n break;\n case 'TaskSkipped':\n case 'TaskBlocked':\n case 'TaskAwaitingHuman':\n case 'GraphResumed':\n this.scheduleFrameReload();\n break;\n default:\n // GateDecision / ClaimChanged / PassCompleted / GraphPaused / BreakpointHit are\n // console-chrome concerns the HOST renders; unknown kinds are a newer server.\n break;\n }\n }\n\n /** One reload per burst of cascade frames, not one per frame. */\n private scheduleFrameReload(): void {\n if (this.frameReloadTimer) return;\n this.frameReloadTimer = setTimeout(() => {\n this.frameReloadTimer = null;\n void this.load();\n }, 250);\n }\n\n private schedulePoll(): void {\n this.pollTimer = setTimeout(() => void this.load(), Math.max(1, this.PollIntervalSeconds) * 1000);\n }\n\n private stopPolling(): void {\n if (this.pollTimer) {\n clearTimeout(this.pollTimer);\n this.pollTimer = null;\n }\n }\n\n private fail(message: string): void {\n LogError(`[TaskGraphRunView] ${message}`);\n this.ErrorMessage = message;\n this.cdr.markForCheck();\n }\n\n /** Canvas extent, so a host can size its container to the graph rather than guessing. */\n public get GraphBounds(): { Width: number; Height: number } {\n const box = GraphLayoutBounds(this.Positions);\n return { Width: box.Width, Height: box.Height };\n }\n}\n\nfunction isTypingTarget(target: EventTarget | null): boolean {\n if (!(target instanceof HTMLElement)) return false;\n const tag = target.tagName;\n return tag === 'INPUT' || tag === 'TEXTAREA' || tag === 'SELECT' || target.isContentEditable;\n}\n","@if (ErrorMessage) {\n <mj-alert Variant=\"error\" [Message]=\"ErrorMessage\"></mj-alert>\n} @else if (IsLoading) {\n <div class=\"run-view-loading\">Loading the workflow&rsquo;s steps&hellip;</div>\n} @else if (!Spec || Spec.tasks.length === 0) {\n <mj-empty-state\n Icon=\"fa-solid fa-diagram-project\"\n Title=\"No steps yet\"\n Message=\"This workflow has not created any steps.\">\n </mj-empty-state>\n} @else {\n <div class=\"run-view\" [style.height]=\"Height\">\n <div class=\"run-view-summary\">\n <span class=\"run-view-count\">{{ CompletedCount }} of {{ TotalCount }} complete</span>\n @if (SkippedCount > 0) {\n <span class=\"run-view-skipped\">{{ SkippedCount }} not taken</span>\n }\n @if (IsSettled) {\n <span class=\"run-view-done\">Finished</span>\n } @else if (GraphPaused) {\n <span class=\"run-view-waiting\">\n @if (PausedAtTaskID) { Waiting on {{ WaitingStepName }} }\n @else { Waiting to start — Continue or Step }\n </span>\n } @else if (RunningCount > 0) {\n <span class=\"run-view-running\">{{ RunningCount }} running</span>\n }\n @if (AllowBreakpointEditing && SelectedTaskID) {\n <button\n type=\"button\"\n class=\"run-view-bp\"\n [class.run-view-bp-on]=\"HasSelectedBreakpoint\"\n (click)=\"OnToggleSelectedBreakpoint()\"\n [attr.aria-pressed]=\"HasSelectedBreakpoint\"\n [attr.aria-label]=\"HasSelectedBreakpoint ? 'Remove breakpoint from ' + SelectedTaskName : 'Add breakpoint on ' + SelectedTaskName\"\n [title]=\"HasSelectedBreakpoint ? 'Remove breakpoint' : 'Break before this step'\">\n <i class=\"fa-circle\" [class.fa-solid]=\"HasSelectedBreakpoint\" [class.fa-regular]=\"!HasSelectedBreakpoint\" aria-hidden=\"true\"></i>\n </button>\n <span class=\"run-view-bp-name\">{{ SelectedTaskName }}</span>\n }\n </div>\n\n <div class=\"run-view-body\">\n @if (ShowVariables && !Prefs.InvocationOpen) {\n <button type=\"button\" class=\"run-view-vars-rail\"\n (click)=\"OnToggleInvocation()\"\n title=\"Show invocation and output\"\n aria-label=\"Show invocation and output\">\n <i class=\"fa-solid fa-code\" aria-hidden=\"true\"></i>\n <span>Data</span>\n </button>\n }\n <as-split class=\"run-view-split\" direction=\"horizontal\" unit=\"percent\"\n [gutterSize]=\"8\" (dragEnd)=\"OnInvocationSplitDragEnd($event.sizes)\">\n <as-split-area [size]=\"InvocationPaneSize\" [minSize]=\"14\" [visible]=\"InvocationPaneOpen\">\n <div class=\"run-view-vars\">\n <div class=\"run-view-vars-bar\">\n <span>Data</span>\n <button type=\"button\" class=\"run-view-vars-min\"\n (click)=\"OnToggleInvocation()\"\n title=\"Minimize\"\n aria-label=\"Minimize invocation and output\">\n <i class=\"fa-solid fa-chevron-left\" aria-hidden=\"true\"></i>\n </button>\n </div>\n <mj-task-graph-variables\n [InputPayload]=\"SelectedTask?.InputPayload\"\n [OutputPayload]=\"SelectedTask?.OutputPayload\"\n [Invocation]=\"Invocation\">\n </mj-task-graph-variables>\n </div>\n </as-split-area>\n <as-split-area [size]=\"CanvasPaneSize\" [minSize]=\"40\">\n <div class=\"run-view-canvas\">\n <mj-task-graph-editor\n [Spec]=\"Spec\"\n [RuntimeStatus]=\"RuntimeStatus\"\n [NodePositions]=\"Positions\"\n [DebugOverlay]=\"Overlay\"\n [ReadOnly]=\"true\"\n [ShowToolbar]=\"ShowToolbar\"\n [ToolbarVisibility]=\"ToolbarVisibility\"\n [ToolbarAlign]=\"ToolbarAlign\"\n [ShowPalette]=\"false\"\n [ShowProperties]=\"false\"\n [ShowMinimap]=\"false\"\n [ShowStatusBar]=\"false\"\n [ShowLegend]=\"ShowLegend\"\n (SelectionChanged)=\"OnSelectionChanged($event)\"\n (ConnectionSelected)=\"OnConnectionSelected($event)\"\n (LegendToggled)=\"LegendToggled.emit($event)\"\n (BeforeContextMenu)=\"OnBeforeContextMenu($event)\"\n (AfterContextMenuAction)=\"OnAfterContextMenuAction($event)\">\n </mj-task-graph-editor>\n </div>\n </as-split-area>\n </as-split>\n </div>\n </div>\n}\n"]}
1
+ {"version":3,"file":"task-graph-run-view.component.js","sourceRoot":"","sources":["../../src/lib/task-graph-run-view.component.ts","../../src/lib/task-graph-run-view.component.html"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EACH,uBAAuB,EAEvB,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,KAAK,EAEL,MAAM,GACT,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAwC,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACrG,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,sBAAsB,EAA0B,MAAM,wBAAwB,CAAC;AACxF,OAAO,EACH,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,GAIxB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;;;;;;;ICzCxG,8BAA8D;;;IAApC,6CAAwB;;;IAElD,8BAA8B;IAAA,uDAA0C;IAAA,iBAAM;;;IAE9E,oCAIiB;;;IAMX,+BAA+B;IAAA,YAA4B;IAAA,iBAAO;;;IAAnC,cAA4B;IAA5B,4DAA4B;;;IAG3D,+BAA4B;IAAA,wBAAQ;IAAA,iBAAO;;;IAGlB,YAAiC;;;IAAjC,kEAAiC;;;IAChD,0DAAoC;;;IAF9C,+BAA+B;IAE7B,AADA,6GAAsB,uFACf;IACT,iBAAO;;;IAFL,cAC6C;IAD7C,+CAC6C;;;IAG/C,gCAA+B;IAAA,YAA0B;IAAA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GAAA,yBAAqB,0BAAI;;YCjGpC,AANA,AAFA,AAFF,gGAAoB,qEAEI,gFAEuB,uEAMtC;;YAVT,6GAmGC;;;iFDQY,yBAAyB;cAPrC,SAAS;6BACM,KAAK,YACP,wBAAwB,mBAGjB,uBAAuB,CAAC,MAAM;;kBAS9C,KAAK;;kBAYL,KAAK;;kBAQL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAUL,KAAK;;kBAQL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBAYL,KAAK;;kBAYL,KAAK;;kBAcL,KAAK;;kBASL,KAAK;;kBAaL,KAAK;;kBASL,KAAK;;kBAYL,KAAK;;kBAEL,KAAK;;kBAEL,KAAK;;kBAEL,KAAK;;kBAEL,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBA4ON,YAAY;mBAAC,kBAAkB,EAAE,CAAC,QAAQ,CAAC;;kFApYnC,yBAAyB;AA4nBtC,SAAS,cAAc,CAAC,MAA0B;IAC9C,IAAI,CAAC,CAAC,MAAM,YAAY,WAAW,CAAC;QAAE,OAAO,KAAK,CAAC;IACnD,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC;IAC3B,OAAO,GAAG,KAAK,OAAO,IAAI,GAAG,KAAK,UAAU,IAAI,GAAG,KAAK,QAAQ,IAAI,MAAM,CAAC,iBAAiB,CAAC;AACjG,CAAC","sourcesContent":["/**\n * @fileoverview Watching a graph that is running, on the canvas its author drew on.\n *\n * **Why this is a component and not three.** A run needs rendering in at least three places — inside\n * an Agent Run, inside the test harness, and on a standalone workflow-runs screen — and every one of\n * them wants the identical thing: the graph, with live status, laid out legibly, with a node you can\n * click. Three implementations would be three chances to render the same run differently, and the\n * one that matters most (is that branch grey because it was *not taken*, or because it *broke*?) is\n * exactly the distinction a second implementation gets wrong.\n *\n * **What it owns and what it doesn't.** It owns data acquisition — reading `MJ: Tasks` and\n * `MJ: Task Dependencies` through the host's provider — and geometry. It does not navigate: a\n * widgets-layer component cannot know whether it sits inside Explorer, so selecting a node emits an\n * event and the host decides what \"open the agent run\" means. That boundary is the whole reason\n * this can live beside the editor rather than in Explorer.\n *\n * @module @memberjunction/ng-task-graph-editor\n */\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n HostListener,\n Input,\n OnDestroy,\n Output,\n} from '@angular/core';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport { LogError, RunView } from '@memberjunction/core';\nimport { UUIDsEqual } from '@memberjunction/global';\nimport { MJTaskEntity, MJTaskDependencyEntity, UserInfoEngine } from '@memberjunction/core-entities';\nimport { ToPaneSizePair } from './pane-split';\nimport { TaskGraphRunPrefsStore, type TaskGraphRunPrefs } from './task-graph-run-prefs';\nimport {\n GraphLayoutBounds,\n LayoutGraphNodes,\n ProjectTaskRowsToSpec,\n type GraphLayoutEdge,\n type GraphNodePosition,\n type TaskGraphSpec,\n} from '@memberjunction/ai-core-plus';\nimport { BuildRuntimeStatus, IsRuntimeSettled, NormalizeRuntimeState } from './task-graph-runtime-source';\nimport type { TaskGraphDebugOverlay, TaskGraphRuntimeStatus } from './task-graph-canvas-adapter';\nimport type { TaskGraphSelectionChangedEventArgs } from './task-graph-editor-events';\nimport type {\n FlowAfterContextMenuActionEventArgs,\n FlowBeforeContextMenuEventArgs,\n FlowConnection,\n FlowToolbarAlign,\n FlowToolbarVisibility,\n} from '@memberjunction/ng-flow-editor';\n\n/** What the host learns when someone clicks a step. */\nexport type TaskGraphRunNodeSelectedEvent = {\n /** The `MJ: Tasks` row id. */\n TaskID: string;\n Task: MJTaskEntity | null;\n};\n\n/** What the host learns when someone clicks a path. */\nexport type TaskGraphRunConnectionSelectedEvent = {\n /** The `MJ: Task Dependencies` row id, when the projection carried one. */\n EdgeID: string | null;\n FromTaskID: string;\n ToTaskID: string;\n Condition?: string;\n};\n\n/**\n * One live dispatcher frame, as the HOST hands it in.\n *\n * Structural on purpose: the widget must not import the transport (`GraphQLDataProvider`'s\n * `TaskGraphFrameEvent` satisfies this shape as-is), and the host owns the subscription — this\n * component only renders what it is handed, which is the widgets-layer rule that keeps it embeddable\n * anywhere. Fields beyond these are ignored, so a newer server cannot break an older widget.\n */\nexport type TaskGraphRunFrame = {\n kind: string;\n taskId?: string;\n taskName?: string;\n status?: string;\n progressMessage?: string;\n progressPercent?: number;\n reason?: string;\n edgeId?: string;\n dependsOnTaskId?: string;\n conditionText?: string;\n claimEvent?: string;\n claimedBy?: string;\n verdict?: string;\n passNumber?: number;\n eligibleCount?: number;\n heldCount?: number;\n claimedCount?: number;\n};\n\n/** Statuses at which a graph has stopped moving, so polling can stop with it. */\nconst SETTLED = new Set<MJTaskEntity['Status']>(['Complete', 'Failed', 'Cancelled', 'Skipped']);\n\n@Component({\n standalone: false,\n selector: 'mj-task-graph-run-view',\n templateUrl: './task-graph-run-view.component.html',\n styleUrls: ['./task-graph-run-view.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TaskGraphRunViewComponent extends BaseAngularComponent implements OnDestroy {\n /**\n * The graph to watch — the parent `MJ: Tasks` row that represents it.\n *\n * Setter-based rather than `ngOnChanges`, matching the editor beside it: the reaction is\n * explicit and costs nothing on unrelated change-detection passes.\n */\n @Input()\n public set ParentTaskID(value: string | null) {\n if (value === this.parentTaskID) return;\n this.parentTaskID = value;\n this.settledEmitted = false;\n void this.load();\n }\n public get ParentTaskID(): string | null {\n return this.parentTaskID;\n }\n\n /** Name shown on the compiled graph. Purely cosmetic; the rows carry the truth. */\n @Input() public WorkflowName: string = 'Workflow';\n\n /**\n * Keep re-reading while the graph is still moving.\n *\n * Off by default: most hosts show a finished run, and a component that polls by default would\n * have every historical run quietly issuing queries forever.\n */\n @Input() public LiveUpdates: boolean = false;\n\n /** How often to re-read while live. Seconds, not milliseconds — this is a human-scale view. */\n @Input() public PollIntervalSeconds: number = 3;\n\n /** Height of the canvas. Hosts embed this in very different amounts of space. */\n @Input() public Height: string = '320px';\n\n /**\n * Whether the canvas legend shows. **Off by default here**, unlike the editor.\n *\n * The legend explains the authoring vocabulary — what a conditional edge means, what a duplicate\n * default looks like. That is what someone drawing a graph needs. A run view answers a different\n * question, \"what happened\", which the legend helps with not at all while covering a corner of\n * the canvas the graph is usually occupying.\n */\n @Input() public ShowLegend: boolean = false;\n\n /**\n * Whether the canvas toolbar rides above the graph.\n *\n * Debug and other run hosts leave this on and set `ToolbarVisibility` to `minimized` so the\n * graph is the picture, not a floating tool strip. The chip in the corner restores the bar.\n */\n @Input() public ShowToolbar: boolean = true;\n @Input() public ToolbarVisibility: FlowToolbarVisibility = 'minimized';\n @Input() public ToolbarAlign: FlowToolbarAlign = 'left';\n\n /**\n * The latest live dispatcher frame, handed in by the host.\n *\n * The host owns the subscription (`GraphQLDataProvider.TaskGraphFrames` or anything shaped like\n * it) and binds each arrival here; the widget folds it into the overlay. Frames are advisory —\n * a task frame patches the node's status in place for sub-second feedback, and the frames that\n * imply CASCADES (a skip, a block, settlement) trigger a debounced row reload, because the\n * dispatcher's propagation writes rows this component cannot infer from one frame. Rows remain\n * the truth; the existing poll (if enabled) remains the safety net.\n */\n @Input()\n public set LiveFrame(frame: TaskGraphRunFrame | null) {\n if (!frame) return;\n this.foldFrame(frame);\n }\n\n /**\n * Replay: render the run as it stood at this moment, reconstructed from each step's\n * `StartedAt`/`CompletedAt`. Null (the default) renders the present. A step that had not\n * started reads Pending; one mid-flight reads In Progress; one already finished reads its\n * final status — the same three answers the rows would have given a viewer at that time.\n */\n @Input()\n public set ReplayAt(value: Date | null) {\n if (value?.getTime() === this.replayAt?.getTime()) return;\n this.replayAt = value;\n this.applyReplay();\n }\n public get ReplayAt(): Date | null {\n return this.replayAt;\n }\n\n /**\n * Armed breakpoint task IDs, from the parent row's `$.debug.breakpoints`. Empty by default so\n * embeds (agent-run timeline, test harness) never grow debugger chrome they did not ask for.\n */\n @Input()\n public set Breakpoints(value: readonly string[]) {\n this.breakpoints = value ?? [];\n this.rebuildOverlay();\n }\n public get Breakpoints(): readonly string[] {\n return this.breakpoints;\n }\n /** The step a breakpoint actually stopped on. */\n @Input()\n public set PausedAtTaskID(value: string | null) {\n this.pausedAtTaskID = value;\n if (value) this.SelectedTaskID = value;\n this.rebuildOverlay();\n }\n public get PausedAtTaskID(): string | null {\n return this.pausedAtTaskID;\n }\n /**\n * The graph is claim-gated. Combined with `PausedAtTaskID` so start-paused (no specific\n * step yet) can still light the entry node as waiting.\n */\n @Input()\n public set GraphPaused(value: boolean) {\n this.graphPaused = value;\n this.rebuildOverlay();\n }\n public get GraphPaused(): boolean {\n return this.graphPaused;\n }\n /** Operator-forced edge verdicts, keyed by `MJ: Task Dependencies` row ID. */\n @Input()\n public set EdgeOverrides(value: Readonly<Record<string, 'true' | 'false'>>) {\n this.edgeOverrides = value ?? {};\n this.rebuildOverlay();\n }\n public get EdgeOverrides(): Readonly<Record<string, 'true' | 'false'>> {\n return this.edgeOverrides;\n }\n /**\n * Whether this host may arm/disarm breakpoints from the selected-step control.\n * Off by default — the run view also renders where those controls would be wrong.\n */\n @Input() public AllowBreakpointEditing: boolean = false;\n /** Compact debug key under the summary line. Off unless the host is a debugger. */\n @Input() public ShowDebugLegend: boolean = false;\n /** VS Code VARIABLES pane to the left of the canvas. Off unless the host is debugging. */\n @Input() public ShowVariables: boolean = false;\n /** The parent bag's `data` / `context` roots, for the Invocation scope. */\n @Input() public Invocation: { data?: unknown; context?: unknown } | null = null;\n\n @Output() public NodeSelected = new EventEmitter<TaskGraphRunNodeSelectedEvent>();\n /** The legend was toggled from the toolbar, so a host can remember the choice. */\n @Output() public LegendToggled = new EventEmitter<boolean>();\n /** Emitted once, when every step has reached a terminal status. */\n @Output() public Settled = new EventEmitter<void>();\n /** A connection was clicked. `EdgeID` is the dependency row id when the projection carried one. */\n @Output() public ConnectionSelected = new EventEmitter<TaskGraphRunConnectionSelectedEvent>();\n /** Intent only — the host owns `SetBreakpoints`. */\n @Output() public BreakpointToggled = new EventEmitter<{ TaskID: string; Enabled: boolean }>();\n /** Intent only — the host owns `OverrideEdge`. */\n @Output() public EdgeOverrideRequested = new EventEmitter<{\n EdgeID: string;\n Verdict: 'true' | 'false' | null;\n }>();\n\n /** What each running step says it is doing, from `NodeProgress` frames. Keyed by task row id. */\n public LiveActivity = new Map<string, { Message: string; Percent?: number }>();\n\n /** The last step the person selected, so the breakpoint control has a target. */\n public SelectedTaskID: string | null = null;\n /** Stable overlay object — rebuilt only when debug inputs change, so the editor does not re-project every CD cycle. */\n public Overlay: TaskGraphDebugOverlay = { showConditions: true };\n\n private breakpoints: readonly string[] = [];\n private pausedAtTaskID: string | null = null;\n private graphPaused = false;\n private edgeOverrides: Readonly<Record<string, 'true' | 'false'>> = {};\n /** `Settled` is once-per-parent — a finished poll must not re-fire the host. */\n private settledEmitted = false;\n\n /** Left data pane + split sizes. One JSON bag in `MJ: User Settings`. */\n public get Prefs(): TaskGraphRunPrefs {\n return this.prefsStore.Value;\n }\n private prefsStore = new TaskGraphRunPrefsStore({\n Get: () => undefined,\n Set: () => { /* unit tests / pre-bootstrap */ },\n });\n\n public Spec: TaskGraphSpec | null = null;\n public RuntimeStatus: TaskGraphRuntimeStatus | null = null;\n public Positions: Map<string, GraphNodePosition> = new Map();\n public IsLoading = false;\n public ErrorMessage: string | null = null;\n\n /** Rows by id, so a selection event can hand the host the whole task rather than an id. */\n private taskByID = new Map<string, MJTaskEntity>();\n private parentTaskID: string | null = null;\n private replayAt: Date | null = null;\n private pollTimer: ReturnType<typeof setTimeout> | null = null;\n private frameReloadTimer: ReturnType<typeof setTimeout> | null = null;\n private destroyed = false;\n\n constructor(private cdr: ChangeDetectorRef) {\n super();\n try {\n this.prefsStore = new TaskGraphRunPrefsStore({\n Get: (key) => UserInfoEngine.Instance.GetSetting(key),\n Set: (key, value) => UserInfoEngine.Instance.SetSettingDebounced(key, value),\n });\n this.prefsStore.Restore();\n } catch {\n // Engine not configured yet (unit tests, pre-bootstrap) — keep the default.\n }\n }\n\n public get InvocationPaneOpen(): boolean {\n return this.ShowVariables && this.Prefs.InvocationOpen;\n }\n\n public get InvocationPaneSize(): number {\n return this.InvocationPaneOpen ? this.Prefs.InvocationSplit[0] : 0;\n }\n\n public get CanvasPaneSize(): number {\n return this.InvocationPaneOpen ? this.Prefs.InvocationSplit[1] : 100;\n }\n\n public OnToggleInvocation(): void {\n this.prefsStore.SetInvocationOpen(!this.Prefs.InvocationOpen);\n this.cdr.markForCheck();\n }\n\n public OnInvocationSplitDragEnd(sizes: readonly (number | '*')[]): void {\n const pair = ToPaneSizePair(sizes);\n if (!pair) return;\n this.prefsStore.SetInvocationSplit(pair);\n this.cdr.markForCheck();\n }\n\n public ngOnDestroy(): void {\n this.destroyed = true;\n this.stopPolling();\n if (this.frameReloadTimer) {\n clearTimeout(this.frameReloadTimer);\n this.frameReloadTimer = null;\n }\n }\n\n /** Steps in a terminal state, for the host's summary line. Uses the same map the canvas paints. */\n public get CompletedCount(): number {\n return this.countRuntime('Complete');\n }\n\n public get TotalCount(): number {\n return this.Spec?.tasks.length ?? this.taskByID.size;\n }\n\n public get SkippedCount(): number {\n return this.countRuntime('Skipped');\n }\n\n public get RunningCount(): number {\n return this.countRuntime('In Progress');\n }\n\n public get IsSettled(): boolean {\n if (!this.Spec || this.Spec.tasks.length === 0) return false;\n return IsRuntimeSettled(this.RuntimeStatus ?? {}, this.Spec.tasks.map((t) => t.tempId));\n }\n\n /**\n * A node was selected on the canvas.\n *\n * The projected `tempId` IS the task id, so the row lookup is exact — and handing the host the\n * whole task rather than an id spares every host from re-reading a row this component already\n * holds.\n */\n public OnSelectionChanged(args: TaskGraphSelectionChangedEventArgs): void {\n const tempId = args?.Task?.tempId;\n if (!tempId) return;\n this.SelectedTaskID = tempId;\n this.NodeSelected.emit({ TaskID: tempId, Task: this.taskByID.get(tempId) ?? null });\n this.cdr.markForCheck();\n }\n\n public OnConnectionSelected(connection: FlowConnection | null): void {\n if (!connection) {\n this.ConnectionSelected.emit({ EdgeID: null, FromTaskID: '', ToTaskID: '' });\n return;\n }\n const data = connection.Data ?? {};\n const edgeID = typeof data['EdgeID'] === 'string' ? data['EdgeID'] : null;\n const from = typeof data['FromTempId'] === 'string' ? data['FromTempId'] : connection.SourceNodeID;\n const to = typeof data['ToTempId'] === 'string' ? data['ToTempId'] : connection.TargetNodeID;\n this.ConnectionSelected.emit({\n EdgeID: edgeID,\n FromTaskID: from,\n ToTaskID: to,\n Condition: connection.Condition,\n });\n }\n\n private countRuntime(state: TaskGraphRuntimeStatus[string]): number {\n if (!this.RuntimeStatus) {\n return [...this.taskByID.values()].filter((t) => NormalizeRuntimeState(t.Status) === state).length;\n }\n return Object.values(this.RuntimeStatus).filter((s) => s === state).length;\n }\n\n public get HasSelectedBreakpoint(): boolean {\n return !!this.SelectedTaskID && this.hasBreakpoint(this.SelectedTaskID);\n }\n\n public get SelectedTaskName(): string {\n if (!this.SelectedTaskID) return '';\n return this.taskByID.get(this.SelectedTaskID)?.Name ?? 'this step';\n }\n\n public get WaitingStepName(): string {\n if (this.pausedAtTaskID) {\n return this.taskByID.get(this.pausedAtTaskID)?.Name\n ?? this.Spec?.tasks.find((t) => t.tempId === this.pausedAtTaskID)?.name\n ?? 'this step';\n }\n const entry = this.Spec?.tasks.find((t) => (t.dependsOn?.length ?? 0) === 0);\n return entry?.name ?? 'the first step';\n }\n\n public get SelectedTask(): MJTaskEntity | null {\n return this.SelectedTaskID ? this.taskByID.get(this.SelectedTaskID) ?? null : null;\n }\n\n public OnToggleSelectedBreakpoint(): void {\n if (!this.AllowBreakpointEditing || !this.SelectedTaskID) return;\n this.BreakpointToggled.emit({\n TaskID: this.SelectedTaskID,\n Enabled: !this.HasSelectedBreakpoint,\n });\n }\n\n /** Debug attaches here: replace Edit/Remove with breakpoint / path-override items. */\n public OnBeforeContextMenu(event: FlowBeforeContextMenuEventArgs): void {\n if (!this.AllowBreakpointEditing) {\n event.Cancel = true;\n return;\n }\n if (event.Target === 'node' && event.Node) {\n const on = this.hasBreakpoint(event.Node.ID);\n event.Items = [{\n ID: 'toggle-breakpoint',\n Label: on ? 'Remove Breakpoint' : 'Add Breakpoint',\n Icon: 'fa-circle',\n Shortcut: 'F9',\n }];\n return;\n }\n if (event.Target === 'connection' && event.Connection?.Condition?.trim()) {\n const edgeID = typeof event.Connection.Data?.['EdgeID'] === 'string'\n ? event.Connection.Data['EdgeID']\n : null;\n if (!edgeID) {\n event.Cancel = true;\n return;\n }\n event.Items = [\n { ID: 'force-true', Label: 'Take this path', Icon: 'fa-check' },\n { ID: 'force-false', Label: 'Skip this path', Icon: 'fa-xmark' },\n { ID: 'force-clear', Label: 'Clear override', Icon: 'fa-rotate-left' },\n ];\n return;\n }\n event.Cancel = true;\n }\n\n public OnAfterContextMenuAction(event: FlowAfterContextMenuActionEventArgs): void {\n if (event.ActionID === 'toggle-breakpoint' && event.Node) {\n this.BreakpointToggled.emit({\n TaskID: event.Node.ID,\n Enabled: !this.hasBreakpoint(event.Node.ID),\n });\n return;\n }\n const edgeID = typeof event.Connection?.Data?.['EdgeID'] === 'string'\n ? event.Connection.Data['EdgeID']\n : null;\n if (!edgeID) return;\n if (event.ActionID === 'force-true') this.EdgeOverrideRequested.emit({ EdgeID: edgeID, Verdict: 'true' });\n if (event.ActionID === 'force-false') this.EdgeOverrideRequested.emit({ EdgeID: edgeID, Verdict: 'false' });\n if (event.ActionID === 'force-clear') this.EdgeOverrideRequested.emit({ EdgeID: edgeID, Verdict: null });\n }\n\n private hasBreakpoint(taskID: string): boolean {\n return this.breakpoints.some((id) => UUIDsEqual(id, taskID));\n }\n\n @HostListener('document:keydown', ['$event'])\n public OnDebugHotkey(event: KeyboardEvent): void {\n if (!this.AllowBreakpointEditing) return;\n if (isTypingTarget(event.target)) return;\n if (event.key === 'F9') {\n event.preventDefault();\n this.OnToggleSelectedBreakpoint();\n }\n }\n\n private rebuildOverlay(): void {\n this.Overlay = {\n breakpoints: this.breakpoints,\n // A finished graph is not \"paused here\" — the durable bag can still name the last\n // breakpoint after every step is terminal.\n pausedAtTaskID: this.IsSettled ? null : this.pausedAtTaskID,\n paused: !this.IsSettled && this.graphPaused,\n edgeOverrides: this.edgeOverrides,\n showConditions: true,\n };\n }\n\n private emitSettledOnce(): void {\n if (this.settledEmitted || !this.IsSettled) return;\n this.settledEmitted = true;\n this.Settled.emit();\n }\n\n /**\n * Reads the graph and projects it onto the canvas.\n *\n * `BypassCache` throughout: a run view exists to show what is true *now*, and the whole point of\n * the poll is to see a status that changed a second ago. A cached read would render a stale graph\n * that looks authoritative.\n */\n private async load(): Promise<void> {\n this.stopPolling();\n if (!this.parentTaskID) {\n this.Spec = null;\n this.cdr.markForCheck();\n return;\n }\n\n this.IsLoading = this.Spec === null; // only show the spinner on first load, not on every poll\n this.ErrorMessage = null;\n\n try {\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const [tasks, deps] = await rv.RunViews<MJTaskEntity | MJTaskDependencyEntity>([\n {\n EntityName: 'MJ: Tasks',\n ExtraFilter: `ParentID='${this.parentTaskID}'`,\n // Started work in the order it ran, unstarted last, persist order as the\n // tiebreak — the same rule GetAgentRunTree uses, so a graph reads identically\n // wherever it is shown.\n //\n // `__mj_CreatedAt ASC` alone was persist order, which is the COMPILER's walk\n // order, not the author's numbering and not what actually happened: a settled\n // graph listed its steps in an order unrelated to their execution, and a skipped\n // step could sit above work that ran.\n OrderBy: 'CASE WHEN StartedAt IS NULL THEN 1 ELSE 0 END, StartedAt, __mj_CreatedAt',\n ResultType: 'entity_object',\n BypassCache: true,\n },\n {\n EntityName: 'MJ: Task Dependencies',\n ExtraFilter: `TaskID IN (SELECT ID FROM [__mj].[vwTasks] WHERE ParentID='${this.parentTaskID}')`,\n ResultType: 'entity_object',\n BypassCache: true,\n },\n ]);\n\n if (this.destroyed) return;\n\n if (!tasks.Success) {\n this.fail(`The workflow's steps could not be loaded: ${tasks.ErrorMessage}`);\n return;\n }\n\n const taskRows = (tasks.Results ?? []) as MJTaskEntity[];\n const depRows = (deps.Success ? (deps.Results ?? []) : []) as MJTaskDependencyEntity[];\n this.project(taskRows, depRows);\n this.rebuildOverlay();\n this.emitSettledOnce();\n\n if (this.LiveUpdates && !this.isSettled(taskRows)) this.schedulePoll();\n } catch (e) {\n this.fail(e instanceof Error ? e.message : String(e));\n } finally {\n this.IsLoading = false;\n this.cdr.markForCheck();\n }\n }\n\n /** Rows → spec + runtime + geometry. */\n private project(taskRows: MJTaskEntity[], depRows: MJTaskDependencyEntity[]): void {\n this.taskByID = new Map(taskRows.map((t) => [t.ID, t]));\n\n const projection = ProjectTaskRowsToSpec(this.WorkflowName, taskRows, depRows);\n this.Spec = projection.Spec;\n\n // Correlate by ID, not by name: a projected node's tempId IS the task id, which is the one\n // case where an id match is exact. Name correlation exists for specs whose tempIds were\n // never real, and would be needlessly lossy here.\n const knownIDs = new Set(taskRows.map((t) => t.ID));\n this.RuntimeStatus = this.replayAt\n ? this.statusAt(this.replayAt)\n : BuildRuntimeStatus(taskRows, new Map(), knownIDs);\n\n this.Positions = this.resolvePositions(projection.AuthoredPositions, taskRows, depRows);\n }\n\n /** Re-derives the overlay for the current replay position (or the present) from held rows. */\n private applyReplay(): void {\n if (this.taskByID.size === 0) return;\n const rows = [...this.taskByID.values()];\n this.RuntimeStatus = this.replayAt\n ? this.statusAt(this.replayAt)\n : BuildRuntimeStatus(rows, new Map(), new Set(rows.map((t) => t.ID)));\n this.cdr.markForCheck();\n }\n\n /** The overlay as it stood at `moment`, from each row's own timestamps. */\n private statusAt(moment: Date): TaskGraphRuntimeStatus {\n const at = moment.getTime();\n const status: TaskGraphRuntimeStatus = {};\n for (const [id, row] of this.taskByID) {\n const started = row.StartedAt?.getTime?.() ?? (row.StartedAt ? new Date(row.StartedAt).getTime() : null);\n const completed = row.CompletedAt?.getTime?.() ?? (row.CompletedAt ? new Date(row.CompletedAt).getTime() : null);\n if (started == null || started > at) status[id] = 'Pending';\n else if (completed == null || completed > at) status[id] = 'In Progress';\n else status[id] = NormalizeRuntimeState(row.Status);\n }\n return status;\n }\n\n /**\n * The author's arrangement where there is one, a computed layout everywhere else.\n *\n * Mixing the two per-node rather than choosing one for the whole graph: a workflow whose author\n * positioned some steps and left others where they fell should keep the positions they chose.\n * A wholly unpositioned graph — the normal case for anything an agent emitted — is laid out\n * entirely by the algorithm.\n */\n private resolvePositions(\n authored: Map<string, GraphNodePosition>,\n taskRows: MJTaskEntity[],\n depRows: MJTaskDependencyEntity[],\n ): Map<string, GraphNodePosition> {\n const missing = taskRows.filter((t) => !authored.has(t.ID)).map((t) => t.ID);\n if (missing.length === 0) return authored;\n\n const edges: GraphLayoutEdge[] = depRows.map((d) => ({ From: d.DependsOnTaskID, To: d.TaskID }));\n const computed = LayoutGraphNodes(taskRows.map((t) => t.ID), edges, { Direction: 'LR' });\n\n const resolved = new Map(computed);\n for (const [id, position] of authored) resolved.set(id, position);\n return resolved;\n }\n\n private isSettled(taskRows: MJTaskEntity[]): boolean {\n return taskRows.length > 0 && taskRows.every((t) => SETTLED.has(t.Status));\n }\n\n /**\n * Folds one live frame into the overlay.\n *\n * Direct status frames patch in place — a new `RuntimeStatus` object, because the canvas is\n * OnPush and mutation would render nothing. Frames whose consequences the dispatcher computes\n * across the whole graph (skips cascade, blocks propagate, settlement rolls up) reload the rows\n * instead: inferring a cascade client-side would be a second implementation of the engine's\n * rules, free to drift.\n */\n private foldFrame(frame: TaskGraphRunFrame): void {\n switch (frame.kind) {\n case 'TaskStarted':\n case 'TaskCompleted':\n case 'TaskFailed':\n if (frame.taskId && frame.status && this.RuntimeStatus) {\n const row = this.taskByID.get(frame.taskId);\n if (row) row.Status = frame.status as MJTaskEntity['Status'];\n this.RuntimeStatus = { ...this.RuntimeStatus, [frame.taskId]: NormalizeRuntimeState(frame.status) };\n if (frame.kind !== 'TaskStarted') this.LiveActivity.delete(frame.taskId);\n this.rebuildOverlay();\n this.emitSettledOnce();\n this.cdr.markForCheck();\n }\n break;\n case 'NodeProgress':\n if (frame.taskId && frame.progressMessage) {\n this.LiveActivity.set(frame.taskId, { Message: frame.progressMessage, Percent: frame.progressPercent });\n this.cdr.markForCheck();\n }\n break;\n case 'GraphSettled':\n this.scheduleFrameReload();\n // The engine said the graph is done — do not wait for the row reload to tell the host.\n if (!this.settledEmitted) {\n this.settledEmitted = true;\n this.Settled.emit();\n }\n break;\n case 'TaskSkipped':\n case 'TaskBlocked':\n case 'TaskAwaitingHuman':\n case 'GraphResumed':\n this.scheduleFrameReload();\n break;\n default:\n // GateDecision / ClaimChanged / PassCompleted / GraphPaused / BreakpointHit are\n // console-chrome concerns the HOST renders; unknown kinds are a newer server.\n break;\n }\n }\n\n /** One reload per burst of cascade frames, not one per frame. */\n private scheduleFrameReload(): void {\n if (this.frameReloadTimer) return;\n this.frameReloadTimer = setTimeout(() => {\n this.frameReloadTimer = null;\n void this.load();\n }, 250);\n }\n\n private schedulePoll(): void {\n this.pollTimer = setTimeout(() => void this.load(), Math.max(1, this.PollIntervalSeconds) * 1000);\n }\n\n private stopPolling(): void {\n if (this.pollTimer) {\n clearTimeout(this.pollTimer);\n this.pollTimer = null;\n }\n }\n\n private fail(message: string): void {\n LogError(`[TaskGraphRunView] ${message}`);\n this.ErrorMessage = message;\n this.cdr.markForCheck();\n }\n\n /** Canvas extent, so a host can size its container to the graph rather than guessing. */\n public get GraphBounds(): { Width: number; Height: number } {\n const box = GraphLayoutBounds(this.Positions);\n return { Width: box.Width, Height: box.Height };\n }\n}\n\nfunction isTypingTarget(target: EventTarget | null): boolean {\n if (!(target instanceof HTMLElement)) return false;\n const tag = target.tagName;\n return tag === 'INPUT' || tag === 'TEXTAREA' || tag === 'SELECT' || target.isContentEditable;\n}\n","@if (ErrorMessage) {\n <mj-alert Variant=\"error\" [Message]=\"ErrorMessage\"></mj-alert>\n} @else if (IsLoading) {\n <div class=\"run-view-loading\">Loading the workflow&rsquo;s steps&hellip;</div>\n} @else if (!Spec || Spec.tasks.length === 0) {\n <mj-empty-state\n Icon=\"fa-solid fa-diagram-project\"\n Title=\"No steps yet\"\n Message=\"This workflow has not created any steps.\">\n </mj-empty-state>\n} @else {\n <div class=\"run-view\" [style.height]=\"Height\">\n <div class=\"run-view-summary\">\n <span class=\"run-view-count\">{{ CompletedCount }} of {{ TotalCount }} complete</span>\n @if (SkippedCount > 0) {\n <span class=\"run-view-skipped\">{{ SkippedCount }} not taken</span>\n }\n @if (IsSettled) {\n <span class=\"run-view-done\">Finished</span>\n } @else if (GraphPaused) {\n <span class=\"run-view-waiting\">\n @if (PausedAtTaskID) { Waiting on {{ WaitingStepName }} }\n @else { Waiting to start — Continue or Step }\n </span>\n } @else if (RunningCount > 0) {\n <span class=\"run-view-running\">{{ RunningCount }} running</span>\n }\n @if (AllowBreakpointEditing && SelectedTaskID) {\n <button\n type=\"button\"\n class=\"run-view-bp\"\n [class.run-view-bp-on]=\"HasSelectedBreakpoint\"\n (click)=\"OnToggleSelectedBreakpoint()\"\n [attr.aria-pressed]=\"HasSelectedBreakpoint\"\n [attr.aria-label]=\"HasSelectedBreakpoint ? 'Remove breakpoint from ' + SelectedTaskName : 'Add breakpoint on ' + SelectedTaskName\"\n [title]=\"HasSelectedBreakpoint ? 'Remove breakpoint' : 'Break before this step'\">\n <i class=\"fa-circle\" [class.fa-solid]=\"HasSelectedBreakpoint\" [class.fa-regular]=\"!HasSelectedBreakpoint\" aria-hidden=\"true\"></i>\n </button>\n <span class=\"run-view-bp-name\">{{ SelectedTaskName }}</span>\n }\n </div>\n\n <div class=\"run-view-body\">\n @if (ShowVariables && !Prefs.InvocationOpen) {\n <button type=\"button\" class=\"run-view-vars-rail\"\n (click)=\"OnToggleInvocation()\"\n title=\"Show invocation and output\"\n aria-label=\"Show invocation and output\">\n <i class=\"fa-solid fa-code\" aria-hidden=\"true\"></i>\n <span>Data</span>\n </button>\n }\n <as-split class=\"run-view-split\" direction=\"horizontal\" unit=\"percent\"\n [gutterSize]=\"8\" (dragEnd)=\"OnInvocationSplitDragEnd($event.sizes)\">\n <as-split-area [size]=\"InvocationPaneSize\" [minSize]=\"14\" [visible]=\"InvocationPaneOpen\">\n <div class=\"run-view-vars\">\n <div class=\"run-view-vars-bar\">\n <span>Data</span>\n <button type=\"button\" class=\"run-view-vars-min\"\n (click)=\"OnToggleInvocation()\"\n title=\"Minimize\"\n aria-label=\"Minimize invocation and output\">\n <i class=\"fa-solid fa-chevron-left\" aria-hidden=\"true\"></i>\n </button>\n </div>\n <mj-task-graph-variables\n [InputPayload]=\"SelectedTask?.InputPayload\"\n [OutputPayload]=\"SelectedTask?.OutputPayload\"\n [Invocation]=\"Invocation\">\n </mj-task-graph-variables>\n </div>\n </as-split-area>\n <as-split-area [size]=\"CanvasPaneSize\" [minSize]=\"40\">\n <div class=\"run-view-canvas\">\n <mj-task-graph-editor\n [Spec]=\"Spec\"\n [RuntimeStatus]=\"RuntimeStatus\"\n [NodePositions]=\"Positions\"\n [DebugOverlay]=\"Overlay\"\n [ReadOnly]=\"true\"\n [ShowToolbar]=\"ShowToolbar\"\n [ToolbarVisibility]=\"ToolbarVisibility\"\n [ToolbarAlign]=\"ToolbarAlign\"\n [ShowPalette]=\"false\"\n [ShowProperties]=\"false\"\n [ShowMinimap]=\"false\"\n [ShowStatusBar]=\"false\"\n [ShowLegend]=\"ShowLegend\"\n (SelectionChanged)=\"OnSelectionChanged($event)\"\n (ConnectionSelected)=\"OnConnectionSelected($event)\"\n (LegendToggled)=\"LegendToggled.emit($event)\"\n (BeforeContextMenu)=\"OnBeforeContextMenu($event)\"\n (AfterContextMenuAction)=\"OnAfterContextMenuAction($event)\">\n </mj-task-graph-editor>\n </div>\n </as-split-area>\n </as-split>\n </div>\n </div>\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memberjunction/ng-task-graph-editor",
3
- "version": "6.1.0",
3
+ "version": "6.1.2",
4
4
  "description": "MemberJunction: View and edit a TaskGraphSpec on a canvas — the one graph contract shared by design-time flows and runtime task graphs",
5
5
  "main": "./dist/public-api.js",
6
6
  "typings": "./dist/public-api.d.ts",
@@ -20,7 +20,7 @@
20
20
  "devDependencies": {
21
21
  "@angular/compiler": "21.2.22",
22
22
  "@angular/compiler-cli": "21.2.22",
23
- "@memberjunction/ng-test-utils": "6.1.0",
23
+ "@memberjunction/ng-test-utils": "6.1.2",
24
24
  "sass": "^1.97.3",
25
25
  "vitest": "^4.0.18"
26
26
  },
@@ -31,13 +31,13 @@
31
31
  "@angular/platform-browser": "^21.2.22"
32
32
  },
33
33
  "dependencies": {
34
- "@memberjunction/ai-core-plus": "6.1.0",
35
- "@memberjunction/core": "6.1.0",
36
- "@memberjunction/core-entities": "6.1.0",
37
- "@memberjunction/global": "6.1.0",
38
- "@memberjunction/ng-base-types": "6.1.0",
39
- "@memberjunction/ng-flow-editor": "6.1.0",
40
- "@memberjunction/ng-ui-components": "6.1.0",
34
+ "@memberjunction/ai-core-plus": "6.1.2",
35
+ "@memberjunction/core": "6.1.2",
36
+ "@memberjunction/core-entities": "6.1.2",
37
+ "@memberjunction/global": "6.1.2",
38
+ "@memberjunction/ng-base-types": "6.1.2",
39
+ "@memberjunction/ng-flow-editor": "6.1.2",
40
+ "@memberjunction/ng-ui-components": "6.1.2",
41
41
  "angular-split": "^20.0.0",
42
42
  "rxjs": "^7.8.2",
43
43
  "tslib": "^2.8.1"