@boltic/swirl 1.0.2-uat.56 → 1.0.2-uat.58

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/swirl.es.js CHANGED
@@ -10680,7 +10680,8 @@ const o6 = {
10680
10680
  error: null,
10681
10681
  logs: null,
10682
10682
  nextPageToken: null,
10683
- fetchedForExecutionId: null
10683
+ fetchedForExecutionId: null,
10684
+ pendingExecutionId: null
10684
10685
  },
10685
10686
  share: {
10686
10687
  loading: !1,
@@ -10814,9 +10815,10 @@ const Zde = (e = o6, t) => {
10814
10815
  executionLogs: {
10815
10816
  ...e.executionLogs,
10816
10817
  loading: !0,
10817
- error: null
10818
+ error: null,
10818
10819
  // Clear previous error when starting new fetch
10819
- // Keep fetchedForExecutionId until SUCCESS clearing it caused extra UI churn / flicker on tab switch
10820
+ // Track which execution we're fetching so stale responses can be discarded
10821
+ pendingExecutionId: t.payload?.executionId ?? e.executionLogs.pendingExecutionId
10820
10822
  }
10821
10823
  };
10822
10824
  case Gr.FETCH_EXECUTION_LOGS_BY_EXECUTION_ID_FAIL:
@@ -10825,10 +10827,9 @@ const Zde = (e = o6, t) => {
10825
10827
  executionLogs: {
10826
10828
  ...e.executionLogs,
10827
10829
  loading: !1,
10828
- // Preserve previously fetched logs on error instead of wiping them
10829
10830
  error: t.payload,
10830
- logs: e.executionLogs.logs ?? null,
10831
- nextPageToken: e.executionLogs.nextPageToken ?? null,
10831
+ logs: null,
10832
+ nextPageToken: null,
10832
10833
  fetchedForExecutionId: e.executionLogs.fetchedForExecutionId ?? null
10833
10834
  }
10834
10835
  };
@@ -10846,9 +10847,12 @@ const Zde = (e = o6, t) => {
10846
10847
  fetchedForExecutionId: null
10847
10848
  }
10848
10849
  };
10849
- const { isAppend: n, nextPageToken: i, ...o } = r, s = i ?? null;
10850
- if (n && e.executionLogs.logs) {
10851
- const a = e.executionLogs.logs.events || [], l = o.events || [];
10850
+ const n = e.executionLogs.pendingExecutionId;
10851
+ if (n && r.executionId && String(r.executionId) !== String(n))
10852
+ return e;
10853
+ const { isAppend: i, nextPageToken: o, ...s } = r, a = o ?? null;
10854
+ if (i && e.executionLogs.logs) {
10855
+ const l = e.executionLogs.logs.events || [], c = s.events || [];
10852
10856
  return {
10853
10857
  ...e,
10854
10858
  executionLogs: {
@@ -10856,10 +10860,10 @@ const Zde = (e = o6, t) => {
10856
10860
  loading: !1,
10857
10861
  logs: {
10858
10862
  ...e.executionLogs.logs,
10859
- ...o,
10860
- events: [...a, ...l]
10863
+ ...s,
10864
+ events: [...l, ...c]
10861
10865
  },
10862
- nextPageToken: s,
10866
+ nextPageToken: a,
10863
10867
  error: null,
10864
10868
  fetchedForExecutionId: String(r.executionId ?? e.executionLogs.fetchedForExecutionId ?? "")
10865
10869
  }
@@ -10870,14 +10874,14 @@ const Zde = (e = o6, t) => {
10870
10874
  executionLogs: {
10871
10875
  ...e.executionLogs,
10872
10876
  loading: !1,
10873
- logs: r.logs ?? o,
10874
- nextPageToken: s,
10877
+ logs: r.logs ?? s,
10878
+ nextPageToken: a,
10875
10879
  error: null,
10876
10880
  fetchedForExecutionId: String(r.executionId ?? "")
10877
10881
  },
10878
10882
  executions: Kde(
10879
10883
  e.executions,
10880
- r.logs ?? o,
10884
+ r.logs ?? s,
10881
10885
  String(r.executionId ?? "")
10882
10886
  )
10883
10887
  };
@@ -13250,14 +13254,15 @@ const jQ = (e, t, r) => async (n) => {
13250
13254
  }, NA = (e, t, r, n, i, o, s, a, l) => async (c) => {
13251
13255
  const { captureEvent: u, WORKFLOW_EVENTS: d } = o || {};
13252
13256
  l || c({
13253
- type: Gr.FETCH_EXECUTION_LOGS_BY_EXECUTION_ID
13257
+ type: Gr.FETCH_EXECUTION_LOGS_BY_EXECUTION_ID,
13258
+ payload: { executionId: t }
13254
13259
  });
13255
13260
  try {
13256
13261
  const p = or(
13257
13262
  r,
13258
13263
  `/v1.0/${n}/`,
13259
13264
  `/workflows/execution/logs/${e}/${t}`
13260
- ), h = { ...s, page_size: 100 };
13265
+ ), h = { ...s, page_size: 50 };
13261
13266
  a ? h.next_token = a : h.next_token = !0;
13262
13267
  const A = await ir.get(p, { params: h }), g = {
13263
13268
  ...A.data.data,
@@ -148034,7 +148039,7 @@ const _tt = ts(kne, ""), wtt = Ur((e, t) => {
148034
148039
  ),
148035
148040
  /* @__PURE__ */ f.jsxs(Ve, { children: [
148036
148041
  "Check",
148037
- /* @__PURE__ */ f.jsx(kd, { href: `${c}/integrations/IfElse#operators`, target: "_blank", children: " documentation " }),
148042
+ /* @__PURE__ */ f.jsx(kd, { href: `${c}/integrations/control-flows/ifelse#operators`, target: "_blank", children: " documentation " }),
148038
148043
  "for field, condition, and data usage with examples."
148039
148044
  ] })
148040
148045
  ]
@@ -176296,7 +176301,7 @@ const RW = ({ data: e, maxHeight: t = 400 }) => {
176296
176301
  }, ot = () => {
176297
176302
  const { executions: q } = o0.getState().workflows;
176298
176303
  if (F && Ae && !q.loading && q.data.length > 0) {
176299
- const fe = !St(we) && we ? we : Ae, Qe = B === "run_with_previous" || F === b ? { execution_source: "partial" } : void 0;
176304
+ const fe = !St(we) && we ? we : Ae, Qe = B === "run_with_previous" || F === b ? { execution_source: "partial" } : { execution_source: "full" };
176300
176305
  c(
176301
176306
  NA(
176302
176307
  fe,
@@ -186841,7 +186846,7 @@ const fG = () => {
186841
186846
  e.onRefresh ? e.onRefresh() : (t(
186842
186847
  L0(
186843
186848
  s,
186844
- { ...a },
186849
+ { ...a, execution_source: "full" },
186845
186850
  u,
186846
186851
  n,
186847
186852
  i
@@ -188570,7 +188575,7 @@ const AG = /* @__PURE__ */ ai(Sht), xht = (e) => {
188570
188575
  i,
188571
188576
  cf.EXECUTION_HISTORY,
188572
188577
  o,
188573
- void 0
188578
+ { execution_source: "full" }
188574
188579
  )
188575
188580
  );
188576
188581
  }, [U, u, r]);
@@ -188583,7 +188588,7 @@ const AG = /* @__PURE__ */ ai(Sht), xht = (e) => {
188583
188588
  i,
188584
188589
  cf.EXECUTION_HISTORY,
188585
188590
  o,
188586
- void 0
188591
+ { execution_source: "full" }
188587
188592
  )
188588
188593
  );
188589
188594
  }, k = () => {
@@ -188609,7 +188614,7 @@ const AG = /* @__PURE__ */ ai(Sht), xht = (e) => {
188609
188614
  executedFrom: cf.EXECUTION_HISTORY,
188610
188615
  analytics: o,
188611
188616
  executionLogs: d,
188612
- params: void 0,
188617
+ params: { execution_source: "full" },
188613
188618
  // Start polling if we have logs (to catch running executions) or if we're still loading
188614
188619
  shouldPoll: () => d?.error ? !1 : d?.logs !== null && d?.logs !== void 0 ? !0 : d?.loading || d?.logs === null || d?.logs === void 0
188615
188620
  });
@@ -190974,7 +190979,7 @@ const AG = /* @__PURE__ */ ai(Sht), xht = (e) => {
190974
190979
  }, pAt = (e, t, r, n, i, o, s, a, l) => {
190975
190980
  const c = Lr(), [u, d] = Te(null), [p, h] = Te(!0), [A, g] = Te(!1), [m, E] = Te(!1), O = Pt(!1), y = Pt(!1), v = ut(
190976
190981
  async (S, x) => {
190977
- const C = !!x?.silent, w = !!x?.isPagination, _ = { ...i.current, ...S || {} };
190982
+ const C = !!x?.silent, w = !!x?.isPagination, _ = { ...i.current, execution_source: "full", ...S || {} };
190978
190983
  if (!n && !e) {
190979
190984
  d("Workflow id not found in the current URL."), h(!1), g(!1);
190980
190985
  return;
@@ -191067,7 +191072,7 @@ const AG = /* @__PURE__ */ ai(Sht), xht = (e) => {
191067
191072
  await A(
191068
191073
  L0(
191069
191074
  a,
191070
- { ...e.current, execution_id: v },
191075
+ { ...e.current, execution_id: v, execution_source: "full" },
191071
191076
  l,
191072
191077
  c,
191073
191078
  h