@burdenoff/fluidgrids-fe-sdk 2026.1023.3 → 2026.1023.4

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.
@@ -11,14 +11,25 @@ import { Tabs, TabsList, TabsTrigger, TabsContent, Input, Switch, Select, Select
11
11
  import { toast } from 'sonner';
12
12
  import { jsxs, jsx } from 'react/jsx-runtime';
13
13
 
14
- // src/modules/settings/utils/max-parallelism.ts
15
- function parseMaxParallelism(value) {
14
+ // src/modules/settings/utils/error-trigger.ts
15
+ var ERROR_TRIGGER_NODE_TYPE = "internal:error-trigger";
16
+ function asRecord(value) {
17
+ return value && typeof value === "object" && !Array.isArray(value) ? value : null;
18
+ }
19
+ function hasErrorTriggerNode(definitionJson) {
20
+ const definition = asRecord(definitionJson);
21
+ const dataNodes = asRecord(definition?.data)?.nodes;
22
+ const nodes = Array.isArray(dataNodes) ? dataNodes : definition?.nodes;
23
+ return Array.isArray(nodes) && nodes.some((node) => asRecord(node)?.type === ERROR_TRIGGER_NODE_TYPE);
24
+ }
25
+
26
+ // src/modules/settings/utils/optional-positive-int.ts
27
+ function parseOptionalPositiveInt(value) {
16
28
  if (value.trim() === "") return void 0;
17
29
  const parsed = Number.parseInt(value, 10);
18
30
  return Number.isFinite(parsed) ? Math.max(1, parsed) : void 0;
19
31
  }
20
32
  var DEFAULT_EXECUTION_SETTINGS = {
21
- timeout: 300,
22
33
  onError: "stop"
23
34
  };
24
35
  var DEFAULT_SETTINGS = {
@@ -188,6 +199,15 @@ function ExecutionTab({ workflowKey }) {
188
199
  }, [workflow?.definitionJson]);
189
200
  const [form, setForm] = useState(persistedConfig);
190
201
  useEffect(() => setForm(persistedConfig), [persistedConfig]);
202
+ const selectedErrorWorkflowKey = form.errorWorkflowKey;
203
+ const { data: errorWorkflowData } = useWorkflowDefinitionQuery({
204
+ variables: { workflowKey: selectedErrorWorkflowKey ?? "" },
205
+ skip: !selectedErrorWorkflowKey
206
+ });
207
+ const selectedErrorWorkflow = errorWorkflowData?.workflowDefinition;
208
+ const errorWorkflowLacksTrigger = Boolean(
209
+ selectedErrorWorkflowKey && selectedErrorWorkflow && !hasErrorTriggerNode(selectedErrorWorkflow.definitionJson)
210
+ );
191
211
  const handleSave = useCallback(async () => {
192
212
  if (!workflow?.id) return;
193
213
  try {
@@ -272,7 +292,7 @@ function ExecutionTab({ workflowKey }) {
272
292
  ),
273
293
  description: tr(
274
294
  "fluidgrids.settings.execution.defaultTimeoutDescription",
275
- "Maximum time this workflow's execution can run (in seconds)"
295
+ "Stop a run that keeps running longer than this. Time a run spends paused (a Wait over a minute, an approval, a person's answer) does not count. Leave empty for no limit."
276
296
  ),
277
297
  children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
278
298
  /* @__PURE__ */ jsx(
@@ -280,10 +300,18 @@ function ExecutionTab({ workflowKey }) {
280
300
  {
281
301
  type: "number",
282
302
  min: 1,
283
- value: form.timeout ?? DEFAULT_EXECUTION_SETTINGS.timeout,
303
+ value: form.timeout ?? "",
304
+ placeholder: tr(
305
+ "fluidgrids.settings.execution.timeoutPlaceholder",
306
+ "No timeout"
307
+ ),
308
+ "aria-label": tr(
309
+ "fluidgrids.settings.execution.defaultTimeoutLabel",
310
+ "Timeout"
311
+ ),
284
312
  onChange: (e) => setForm((f) => ({
285
313
  ...f,
286
- timeout: Math.max(1, parseInt(e.target.value, 10) || 1)
314
+ timeout: parseOptionalPositiveInt(e.target.value)
287
315
  })),
288
316
  disabled: loading,
289
317
  className: "w-[100px] text-right"
@@ -323,7 +351,7 @@ function ExecutionTab({ workflowKey }) {
323
351
  ),
324
352
  onChange: (e) => setForm((f) => ({
325
353
  ...f,
326
- maxParallelism: parseMaxParallelism(e.target.value)
354
+ maxParallelism: parseOptionalPositiveInt(e.target.value)
327
355
  })),
328
356
  disabled: loading,
329
357
  className: "w-[100px] text-right"
@@ -370,34 +398,50 @@ function ExecutionTab({ workflowKey }) {
370
398
  ),
371
399
  description: tr(
372
400
  "fluidgrids.settings.execution.errorWorkflowDescription",
373
- "Workflow key to run when this workflow's execution fails (optional)"
401
+ "Runs when a production run of this workflow fails, starting at that workflow's Error Trigger (optional)"
374
402
  ),
375
- children: /* @__PURE__ */ jsxs(
376
- Select,
377
- {
378
- value: form.errorWorkflowKey ?? "__none__",
379
- onValueChange: (val) => setForm((f) => ({
380
- ...f,
381
- errorWorkflowKey: val === "__none__" ? void 0 : val
382
- })),
383
- disabled: loading || otherWorkflowsLoading,
384
- children: [
385
- /* @__PURE__ */ jsx(SelectTrigger, { className: "w-[220px] bg-background-secondary border-border-secondary", children: /* @__PURE__ */ jsx(
386
- SelectValue,
387
- {
388
- placeholder: tr(
389
- "fluidgrids.settings.execution.errorWorkflowPlaceholder",
403
+ children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-end gap-1", children: [
404
+ /* @__PURE__ */ jsxs(
405
+ Select,
406
+ {
407
+ value: form.errorWorkflowKey ?? "__none__",
408
+ onValueChange: (val) => setForm((f) => ({
409
+ ...f,
410
+ errorWorkflowKey: val === "__none__" ? void 0 : val
411
+ })),
412
+ disabled: loading || otherWorkflowsLoading,
413
+ children: [
414
+ /* @__PURE__ */ jsx(SelectTrigger, { className: "w-[220px] bg-background-secondary border-border-secondary", children: /* @__PURE__ */ jsx(
415
+ SelectValue,
416
+ {
417
+ placeholder: tr(
418
+ "fluidgrids.settings.execution.errorWorkflowPlaceholder",
419
+ "None"
420
+ )
421
+ }
422
+ ) }),
423
+ /* @__PURE__ */ jsxs(SelectContent, { children: [
424
+ /* @__PURE__ */ jsx(SelectItem, { value: "__none__", children: tr(
425
+ "fluidgrids.settings.execution.errorWorkflowNone",
390
426
  "None"
391
- )
392
- }
393
- ) }),
394
- /* @__PURE__ */ jsxs(SelectContent, { children: [
395
- /* @__PURE__ */ jsx(SelectItem, { value: "__none__", children: tr("fluidgrids.settings.execution.errorWorkflowNone", "None") }),
396
- errorWorkflowOptions.map((w) => /* @__PURE__ */ jsx(SelectItem, { value: w.workflowKey, children: w.name }, w.workflowKey))
397
- ] })
398
- ]
399
- }
400
- )
427
+ ) }),
428
+ errorWorkflowOptions.map((w) => /* @__PURE__ */ jsx(SelectItem, { value: w.workflowKey, children: w.name }, w.workflowKey))
429
+ ] })
430
+ ]
431
+ }
432
+ ),
433
+ errorWorkflowLacksTrigger && /* @__PURE__ */ jsx(
434
+ "p",
435
+ {
436
+ className: "max-w-[260px] text-right text-xs text-status-warning-text",
437
+ "data-testid": "error-workflow-no-trigger",
438
+ children: tr(
439
+ "fluidgrids.settings.execution.errorWorkflowNoTrigger",
440
+ "This workflow has no Error Trigger, so it will not start. Add an Error Trigger node to it."
441
+ )
442
+ }
443
+ )
444
+ ] })
401
445
  }
402
446
  ),
403
447
  /* @__PURE__ */ jsx(
package/dist/index.js CHANGED
@@ -12,7 +12,7 @@ import './chunk-LLPLOWMA.js';
12
12
  export { HistoryPage } from './chunk-UKMXGBU3.js';
13
13
  export { NodesPage, fetchAllNodesWithManifests, useLazyNodeManifest, useNodeEndpoint, useNodeEndpoints, useNodeManifest } from './chunk-HAYSY6TZ.js';
14
14
  export { DataSinkDashboardPage, ErrorAnalyticsPage, InsightsPage } from './chunk-KAOLPDNX.js';
15
- export { SettingsPage } from './chunk-GARL3KYH.js';
15
+ export { SettingsPage } from './chunk-EB344COE.js';
16
16
  export { FLUIDGRIDS_FLAGS, useDataSinkData, useDataSinks, useFluidGridsFlag, useInsightsData, useLogStreamDestinationActions, useLogStreamDestinations, useRunReplayActions } from './chunk-2QTKDR23.js';
17
17
  import './chunk-QBFAJNUC.js';
18
18
  import { ThemeProvider, extractTemplateGraph } from './chunk-3BK65TDZ.js';
package/dist/settings.js CHANGED
@@ -1,4 +1,4 @@
1
- export { SettingsPage } from './chunk-GARL3KYH.js';
1
+ export { SettingsPage } from './chunk-EB344COE.js';
2
2
  import './chunk-2QTKDR23.js';
3
3
  import './chunk-QBFAJNUC.js';
4
4
  import './chunk-4VJ3MDOV.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/fluidgrids-fe-sdk",
3
- "version": "2026.1023.3",
3
+ "version": "2026.1023.4",
4
4
  "description": "FluidGrids Workflow Builder SDK - Embeddable visual workflow automation",
5
5
  "type": "module",
6
6
  "imports": {