@burdenoff/microfe-planmagnet 2026.1014.2 → 2026.1031.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.
@@ -1,3 +1,5 @@
1
+ /** OVL-09 (BOFF-3532): the canonical workflow runs a RUN_WORKFLOW action started, as `key (run id)` labels. */
2
+ export declare function workflowRunsSummary(result: unknown): string | null;
1
3
  export declare function AutomationExecutionsPanel({ workspaceId, ruleId, }: {
2
4
  workspaceId: string | undefined;
3
5
  ruleId: string;
@@ -39,30 +39,37 @@ function c(e) {
39
39
  let t = e.dispatched;
40
40
  return !Array.isArray(t) || t.length === 0 ? null : t.join(", ");
41
41
  }
42
- function l({ workspaceId: t, ruleId: l }) {
43
- let { data: u, loading: d, error: f } = n(o, {
42
+ function l(e) {
43
+ if (!e || typeof e != "object") return null;
44
+ let t = e.workflowRuns;
45
+ if (!Array.isArray(t)) return null;
46
+ let n = t.filter((e) => !!e && typeof e == "object" && typeof e.workflowKey == "string" && typeof e.runId == "string").map((e) => `${e.workflowKey} (run ${e.runId})`);
47
+ return n.length > 0 ? n.join(", ") : null;
48
+ }
49
+ function u({ workspaceId: t, ruleId: u }) {
50
+ let { data: d, loading: f, error: p } = n(o, {
44
51
  variables: {
45
52
  workspaceId: t ?? "",
46
- filter: { ruleId: l },
53
+ filter: { ruleId: u },
47
54
  pagination: { first: 20 }
48
55
  },
49
56
  skip: !t,
50
57
  fetchPolicy: "cache-and-network"
51
- }), p = u?.planmagnetAutomationExecutions, m = p?.items ?? [];
52
- return d && !u ? /* @__PURE__ */ r("p", {
58
+ }), m = d?.planmagnetAutomationExecutions, h = m?.items ?? [];
59
+ return f && !d ? /* @__PURE__ */ r("p", {
53
60
  className: "text-sm text-muted-foreground",
54
61
  children: "Loading recent executions…"
55
- }) : f ? /* @__PURE__ */ i("p", {
62
+ }) : p ? /* @__PURE__ */ i("p", {
56
63
  role: "alert",
57
64
  className: "text-sm text-destructive",
58
- children: ["Recent executions could not be loaded: ", f.message]
59
- }) : m.length === 0 ? /* @__PURE__ */ r("p", {
65
+ children: ["Recent executions could not be loaded: ", p.message]
66
+ }) : h.length === 0 ? /* @__PURE__ */ r("p", {
60
67
  className: "text-sm text-muted-foreground",
61
68
  children: "No executions yet. They appear here once the rule fires or is run manually."
62
69
  }) : /* @__PURE__ */ i("div", {
63
70
  className: "space-y-2",
64
- children: [m.map((t) => {
65
- let n = c(t.result);
71
+ children: [h.map((t) => {
72
+ let n = c(t.result), o = l(t.result);
66
73
  return /* @__PURE__ */ r("div", {
67
74
  className: "flex flex-wrap items-start justify-between gap-2 rounded-md border p-3 text-sm",
68
75
  children: /* @__PURE__ */ i("div", {
@@ -82,6 +89,11 @@ function l({ workspaceId: t, ruleId: l }) {
82
89
  className: "text-xs text-muted-foreground",
83
90
  children: ["Ran: ", n]
84
91
  }),
92
+ o && /* @__PURE__ */ i("p", {
93
+ className: "text-xs text-muted-foreground",
94
+ "data-testid": "automation-workflow-runs",
95
+ children: ["Started workflow: ", o]
96
+ }),
85
97
  t.errorMessage && /* @__PURE__ */ r("ul", {
86
98
  className: "space-y-0.5",
87
99
  children: e(t.errorMessage).map((e, t) => /* @__PURE__ */ r("li", {
@@ -93,17 +105,17 @@ function l({ workspaceId: t, ruleId: l }) {
93
105
  ]
94
106
  })
95
107
  }, t.id);
96
- }), p && p.totalCount > m.length && /* @__PURE__ */ i("p", {
108
+ }), m && m.totalCount > h.length && /* @__PURE__ */ i("p", {
97
109
  className: "text-xs text-muted-foreground",
98
110
  children: [
99
111
  "Showing the ",
100
- m.length,
112
+ h.length,
101
113
  " most recent of ",
102
- p.totalCount,
114
+ m.totalCount,
103
115
  "."
104
116
  ]
105
117
  })]
106
118
  });
107
119
  }
108
120
  //#endregion
109
- export { l as AutomationExecutionsPanel };
121
+ export { u as AutomationExecutionsPanel };
@@ -13,11 +13,12 @@ export interface AutomationRuleFormState {
13
13
  scheduleNotUpdatedForDays: string;
14
14
  actions: RuleAction[];
15
15
  }
16
- /** The actions builder: the five types the engine can dispatch, trigger-aware (BOFF-8047 follow-up —
16
+ /** The actions builder: the types the engine can dispatch, trigger-aware (BOFF-8047 follow-up —
17
17
  * automationRuleTypes.ts's header has the full scope). `POST_TO_CHANNEL` is always visible but disabled (gated
18
18
  * off, BOFF-8240). For a trigger in `NO_WORK_ITEM_TRIGGER_TYPES` (the sprint and release triggers), no work-item
19
19
  * action can ever dispatch — existing rows stay visible (and removable) so a rule saved before this restriction
20
- * existed can still be cleaned up, but they are frozen and no new one can be added. */
20
+ * existed can still be cleaned up, but they are frozen, and a new action can only be "Run a workflow"
21
+ * (OVL-09, BOFF-3532), the one action that needs no work item. */
21
22
  export declare function ActionsEditor({ actions, triggerType, onChange, }: {
22
23
  actions: RuleAction[];
23
24
  triggerType: TriggerType;