@burdenoff/fluidgrids-fe-sdk 2026.922.7 → 2026.922.8

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,11 +1,11 @@
1
1
  import { useFlowStore } from './chunk-275FCUOI.js';
2
- import { useWorkflowDefinitionQuery, useUpdateWorkflowDefinitionMutation } from './chunk-WO3AHQVD.js';
2
+ import { useWorkflowDefinitionQuery, useUpdateWorkflowDefinitionMutation, useWorkflowDefinitionsQuery } from './chunk-WO3AHQVD.js';
3
3
  import { useTr } from './chunk-7YWBH2A5.js';
4
4
  import { useState, useMemo, useEffect, useCallback } from 'react';
5
5
  import { useNavigate, useParams } from 'react-router';
6
6
  import { Icon } from '@iconify/react';
7
7
  import { Button } from '@burdenoff/fe-libs/button';
8
- import { Tabs, TabsList, TabsTrigger, TabsContent, Input, Switch, Card, CardHeader, Label, TooltipProvider, Tooltip, TooltipTrigger, TooltipContent } from '@burdenoff/fe-libs/ui';
8
+ import { Tabs, TabsList, TabsTrigger, TabsContent, Input, Switch, Select, SelectTrigger, SelectValue, SelectContent, SelectItem, Card, CardHeader, Label, TooltipProvider, Tooltip, TooltipTrigger, TooltipContent } from '@burdenoff/fe-libs/ui';
9
9
  import { toast } from 'sonner';
10
10
  import { jsxs, jsx } from 'react/jsx-runtime';
11
11
 
@@ -169,6 +169,10 @@ function ExecutionTab({ workflowKey }) {
169
169
  fetchPolicy: "cache-and-network"
170
170
  });
171
171
  const [updateWorkflowDefinition, { loading: saving }] = useUpdateWorkflowDefinitionMutation();
172
+ const { data: otherWorkflowsData, loading: otherWorkflowsLoading } = useWorkflowDefinitionsQuery({
173
+ variables: { input: { latestOnly: true, limit: 100 } }
174
+ });
175
+ const errorWorkflowOptions = (otherWorkflowsData?.workflowDefinitions?.items ?? []).filter((w) => w.workflowKey !== workflowKey);
172
176
  const workflow = data?.workflowDefinition;
173
177
  const persistedConfig = useMemo(() => {
174
178
  const definitionJson = workflow?.definitionJson;
@@ -207,7 +211,20 @@ function ExecutionTab({ workflowKey }) {
207
211
  if (!workflowKey) {
208
212
  const settings = DEFAULT_SETTINGS.execution;
209
213
  return /* @__PURE__ */ jsxs("div", { children: [
210
- /* @__PURE__ */ jsx(ReadOnlyBanner, {}),
214
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 p-3 rounded-lg bg-amber-500/10 border border-amber-500/30 mb-6", children: [
215
+ /* @__PURE__ */ jsx(
216
+ Icon,
217
+ {
218
+ icon: "mdi:information",
219
+ width: 18,
220
+ className: "text-amber-400 shrink-0"
221
+ }
222
+ ),
223
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-amber-400", children: tr(
224
+ "fluidgrids.settings.execution.noWorkflowContextBanner",
225
+ "No workflow selected \u2014 open Settings from a specific workflow to edit its execution settings."
226
+ ) })
227
+ ] }),
211
228
  /* @__PURE__ */ jsx("div", { className: "divide-y divide-border-secondary", children: /* @__PURE__ */ jsx(
212
229
  SettingRow,
213
230
  {
@@ -340,20 +357,30 @@ function ExecutionTab({ workflowKey }) {
340
357
  "fluidgrids.settings.execution.errorWorkflowDescription",
341
358
  "Workflow key to run when this workflow's execution fails (optional)"
342
359
  ),
343
- children: /* @__PURE__ */ jsx(
344
- Input,
360
+ children: /* @__PURE__ */ jsxs(
361
+ Select,
345
362
  {
346
- value: form.errorWorkflowKey ?? "",
347
- onChange: (e) => setForm((f) => ({
363
+ value: form.errorWorkflowKey ?? "__none__",
364
+ onValueChange: (val) => setForm((f) => ({
348
365
  ...f,
349
- errorWorkflowKey: e.target.value || void 0
366
+ errorWorkflowKey: val === "__none__" ? void 0 : val
350
367
  })),
351
- placeholder: tr(
352
- "fluidgrids.settings.execution.errorWorkflowPlaceholder",
353
- "workflow-key"
354
- ),
355
- disabled: loading,
356
- className: "w-[220px]"
368
+ disabled: loading || otherWorkflowsLoading,
369
+ children: [
370
+ /* @__PURE__ */ jsx(SelectTrigger, { className: "w-[220px] bg-background-secondary border-border-secondary", children: /* @__PURE__ */ jsx(
371
+ SelectValue,
372
+ {
373
+ placeholder: tr(
374
+ "fluidgrids.settings.execution.errorWorkflowPlaceholder",
375
+ "None"
376
+ )
377
+ }
378
+ ) }),
379
+ /* @__PURE__ */ jsxs(SelectContent, { children: [
380
+ /* @__PURE__ */ jsx(SelectItem, { value: "__none__", children: tr("fluidgrids.settings.execution.errorWorkflowNone", "None") }),
381
+ errorWorkflowOptions.map((w) => /* @__PURE__ */ jsx(SelectItem, { value: w.workflowKey, children: w.name }, w.workflowKey))
382
+ ] })
383
+ ]
357
384
  }
358
385
  )
359
386
  }
@@ -647,5 +674,5 @@ function SettingsPage({
647
674
  }
648
675
 
649
676
  export { SettingsPage };
650
- //# sourceMappingURL=chunk-XA3IJE2D.js.map
651
- //# sourceMappingURL=chunk-XA3IJE2D.js.map
677
+ //# sourceMappingURL=chunk-QWUPHC3K.js.map
678
+ //# sourceMappingURL=chunk-QWUPHC3K.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/modules/settings/pages/SettingsPage.tsx"],"names":[],"mappings":";;;;;;;;;;;AA4DA,IAAM,0BAAA,GAEF;AAAA,EACF,OAAA,EAAS,GAAA;AAAA,EACT,cAAA,EAAgB,CAAA;AAAA,EAChB,OAAA,EAAS;AACX,CAAA;AAMA,IAAM,gBAAA,GAAmB;AAAA,EACvB,OAAA,EAAS;AAAA,IACP,aAAA,EAAe,mBAAA;AAAA,IACf,qBAAA,EAAuB,IAAA;AAAA,IACvB,cAAA,EAAgB;AAAA,GAClB;AAAA,EACA,SAAA,EAAW;AAAA,IACT,qBAAA,EAAuB,GAIzB,CAAA;AAAA,EACA,aAAA,EAAe;AAAA,IACb,cAAA,EAAgB,KAAA;AAAA,IAChB,cAAA,EAAgB,IAAA;AAAA,IAChB,gBAAA,EAAkB,KAAA;AAAA,IAClB,gBAAA,EAAkB;AAAA,GACpB;AAAA,EACA,GAAA,EAAK;AAAA,IACH,UAAA,EAAY,mBAAA;AAAA,IACZ,gBAAA,E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AAA,EAAK,IAAA,EAAK,kBAAA,EAAmB,KAAA,EAAO,EAAA,EAAI,CAAA;AAAA,UACxC,EAAA,CAAG,6CAA6C,eAAe;AAAA,SAAA,EAClE,CAAA;AAAA,wBACA,IAAA,CAAC,WAAA,EAAA,EAAY,KAAA,EAAM,KAAA,EAAM,WAAU,SAAA,EACjC,QAAA,EAAA;AAAA,0BAAA,GAAA,CAAC,IAAA,EAAA,EAAK,IAAA,EAAK,SAAA,EAAU,KAAA,EAAO,EAAA,EAAI,CAAA;AAAA,UAC/B,EAAA,CAAG,mCAAmC,KAAK;AAAA,SAAA,EAC9C;AAAA,OAAA,EACF,CAAA;AAAA,0BAEC,WAAA,EAAA,EAAY,KAAA,EAAM,SAAA,EACjB,QAAA,kBAAA,GAAA,CAAC,cAAW,CAAA,EACd,CAAA;AAAA,0BACC,WAAA,EAAA,EAAY,KAAA,EAAM,aACjB,QAAA,kBAAA,GAAA,CAAC,YAAA,EAAA,EAAa,aAA0B,CAAA,EAC1C,CAAA;AAAA,0BACC,WAAA,EAAA,EAAY,KAAA,EAAM,eAAA,EACjB,QAAA,kBAAA,GAAA,CAAC,oBAAiB,CAAA,EACpB,CAAA;AAAA,0BACC,WAAA,EAAA,EAAY,KAAA,EAAM,KAAA,EACjB,QAAA,kBAAA,GAAA,CAAC,UAAO,CAAA,EACV;AAAA,KAAA,EACF;AAAA,GAAA,EACF,CAAA;AAEJ","file":"chunk-QWUPHC3K.js","sourcesContent":["import { useState, useCallback, useEffect, useMemo } from \"react\";\nimport { useNavigate, useParams } from \"react-router\";\nimport { Icon } from \"@iconify/react\";\nimport { Button } from \"@burdenoff/fe-libs/button\";\nimport {\n Tabs,\n TabsList,\n TabsTrigger,\n TabsContent,\n Input,\n Label,\n Switch,\n Card,\n CardHeader,\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n TooltipProvider,\n Select,\n SelectTrigger,\n SelectValue,\n SelectContent,\n SelectItem,\n} from \"@burdenoff/fe-libs/ui\";\nimport { toast } from \"sonner\";\nimport { useTr } from \"../../../hooks/useTr\";\nimport { useFlowStore } from \"../../../builder/stores/flow-store\";\nimport {\n useWorkflowDefinitionQuery,\n useUpdateWorkflowDefinitionMutation,\n useWorkflowDefinitionsQuery,\n} from \"../../../generated/operations\";\n\n// ============================================================================\n// Per-workflow execution settings (BOFF-7512)\n// ============================================================================\n\n/**\n * Mirrors `IWorkflowConfig` on `wspace-workflow-svc`'s\n * `IWorkflowDefinitionJson.config` (a sibling of `data`, not nested inside\n * it), plus two fields the backend type doesn't have yet: `errorWorkflowKey`\n * and `dataSaving`. Per the ticket, \"if the underlying setting doesn't exist\n * yet, add just the schema field and wire the UI\" — `config` on\n * `definitionJson` is already a free-form JSON blob, so these new keys need\n * no backend schema change to round-trip; nothing downstream reads\n * `dataSaving.saveSuccessExecutions`/`saveFailedExecutions` yet (that's\n * execution-lifecycle work tracked separately), but the value now persists.\n */\ninterface WorkflowExecutionSettings {\n timeout?: number; // seconds\n maxParallelism?: number;\n onError?: \"stop\" | \"continue\" | \"retry\";\n /** Workflow key to run when this workflow's execution fails. */\n errorWorkflowKey?: string;\n dataSaving?: {\n saveSuccessExecutions?: boolean;\n saveFailedExecutions?: boolean;\n };\n}\n\nconst DEFAULT_EXECUTION_SETTINGS: Required<\n Pick<WorkflowExecutionSettings, \"timeout\" | \"maxParallelism\" | \"onError\">\n> = {\n timeout: 300,\n maxParallelism: 5,\n onError: \"stop\",\n};\n\n// ============================================================================\n// Constants\n// ============================================================================\n\nconst DEFAULT_SETTINGS = {\n general: {\n workspaceName: \"Default Workspace\",\n defaultWorkflowPrefix: \"wf\",\n autoSaveDrafts: true,\n },\n execution: {\n defaultTimeoutSeconds: 300,\n maxRetries: 3,\n retryDelaySeconds: 10,\n concurrentExecutionLimit: 5,\n },\n notifications: {\n emailOnSuccess: false,\n emailOnFailure: true,\n webhookOnSuccess: false,\n webhookOnFailure: true,\n },\n api: {\n gatewayUrl: \"/api/v1/workflows\",\n webhookUrlFormat: \"/api/v1/webhooks/workflow/{workflowKey}/trigger\",\n },\n};\n\n// ============================================================================\n// Sub-Components\n// ============================================================================\n\nfunction ReadOnlyBanner() {\n const tr = useTr();\n\n return (\n <div className=\"flex items-center gap-2 p-3 rounded-lg bg-amber-500/10 border border-amber-500/30 mb-6\">\n <Icon\n icon=\"mdi:information\"\n width={18}\n className=\"text-amber-400 shrink-0\"\n />\n <p className=\"text-sm text-amber-400\">\n {tr(\n \"fluidgrids.settings.readOnlyBanner.message\",\n \"Settings are managed at workspace level. Contact your workspace administrator to change these values.\",\n )}\n </p>\n </div>\n );\n}\n\nfunction CopyButton({ value, label }: { value: string; label: string }) {\n const tr = useTr();\n\n const handleCopy = useCallback(async () => {\n try {\n await navigator.clipboard.writeText(value);\n toast.success(\n `${label} ${tr(\"fluidgrids.settings.copyButton.copiedToast\", \"copied to clipboard\")}`,\n );\n } catch {\n toast.error(\n tr(\n \"fluidgrids.settings.copyButton.copyFailedToast\",\n \"Failed to copy to clipboard\",\n ),\n );\n }\n }, [value, label, tr]);\n\n return (\n <TooltipProvider>\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n onClick={handleCopy}\n className=\"p-1.5 rounded hover:bg-background-tertiary text-text-secondary hover:text-text-primary transition-colors\"\n >\n <Icon icon=\"mdi:content-copy\" width={16} />\n </button>\n </TooltipTrigger>\n <TooltipContent>\n {tr(\"fluidgrids.settings.copyButton.copyTooltipPrefix\", \"Copy\")}{\" \"}\n {label}\n </TooltipContent>\n </Tooltip>\n </TooltipProvider>\n );\n}\n\nfunction SettingRow({\n label,\n description,\n children,\n}: {\n label: string;\n description?: string;\n children: React.ReactNode;\n}) {\n return (\n <div className=\"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3 py-4\">\n <div className=\"flex-1 min-w-0\">\n <Label className=\"text-sm font-medium text-text-primary\">{label}</Label>\n {description && (\n <p className=\"text-xs text-text-secondary mt-0.5\">{description}</p>\n )}\n </div>\n <div className=\"shrink-0\">{children}</div>\n </div>\n );\n}\n\n// ============================================================================\n// Tab Content Components\n// ============================================================================\n\nfunction GeneralTab() {\n const tr = useTr();\n const settings = DEFAULT_SETTINGS.general;\n\n return (\n <div>\n <ReadOnlyBanner />\n <div className=\"divide-y divide-border-secondary\">\n <SettingRow\n label={tr(\n \"fluidgrids.settings.general.workspaceNameLabel\",\n \"Workspace Name\",\n )}\n description={tr(\n \"fluidgrids.settings.general.workspaceNameDescription\",\n \"The name of your workspace\",\n )}\n >\n <Input\n value={settings.workspaceName}\n readOnly\n className=\"w-[250px] bg-background-secondary border-border-secondary text-text-primary cursor-default\"\n />\n </SettingRow>\n <SettingRow\n label={tr(\n \"fluidgrids.settings.general.workflowPrefixLabel\",\n \"Default Workflow Prefix\",\n )}\n description={tr(\n \"fluidgrids.settings.general.workflowPrefixDescription\",\n \"Prefix used when generating new workflow keys\",\n )}\n >\n <Input\n value={settings.defaultWorkflowPrefix}\n readOnly\n className=\"w-[120px] bg-background-secondary border-border-secondary text-text-primary cursor-default\"\n />\n </SettingRow>\n <SettingRow\n label={tr(\n \"fluidgrids.settings.general.autoSaveDraftsLabel\",\n \"Auto-save Drafts\",\n )}\n description={tr(\n \"fluidgrids.settings.general.autoSaveDraftsDescription\",\n \"Automatically save draft workflows while editing\",\n )}\n >\n <Switch checked={settings.autoSaveDrafts} disabled />\n </SettingRow>\n </div>\n </div>\n );\n}\n\n/**\n * Editable, per-WORKFLOW execution settings (BOFF-7512) — replaces the old\n * global/read-only tab. Resolves the target workflow from (in order) an\n * explicit `workflowKey` prop, the `:id` route param, or the flow store's\n * currently-loaded workflow (set when the user arrived here from the\n * builder). When none of those resolve, falls back to the previous\n * read-only static display rather than a broken/blank editor.\n */\nfunction ExecutionTab({ workflowKey }: Readonly<{ workflowKey?: string }>) {\n const tr = useTr();\n\n const { data, loading, refetch } = useWorkflowDefinitionQuery({\n variables: { workflowKey },\n skip: !workflowKey,\n fetchPolicy: \"cache-and-network\",\n });\n const [updateWorkflowDefinition, { loading: saving }] =\n useUpdateWorkflowDefinitionMutation();\n\n // \"Error workflow\" picker — reuses the same list-workflows query the\n // history/list pages already use (`workflowDefinitions`), latest version\n // per key, excluding the workflow being edited (running itself as its own\n // error handler on every failure risks an infinite loop).\n const { data: otherWorkflowsData, loading: otherWorkflowsLoading } =\n useWorkflowDefinitionsQuery({\n variables: { input: { latestOnly: true, limit: 100 } },\n });\n const errorWorkflowOptions = (\n otherWorkflowsData?.workflowDefinitions?.items ?? []\n ).filter((w) => w.workflowKey !== workflowKey);\n\n const workflow = data?.workflowDefinition;\n const persistedConfig = useMemo(() => {\n const definitionJson = workflow?.definitionJson as\n Record<string, unknown> | undefined;\n const config = definitionJson?.config as\n WorkflowExecutionSettings | undefined;\n return config ?? {};\n }, [workflow?.definitionJson]);\n\n const [form, setForm] = useState<WorkflowExecutionSettings>(persistedConfig);\n // Re-seed the form whenever the fetched workflow (or its persisted config)\n // changes — e.g. on first load, or after switching workflows.\n useEffect(() => setForm(persistedConfig), [persistedConfig]);\n\n const handleSave = useCallback(async () => {\n if (!workflow?.id) return;\n try {\n const definitionJson = {\n ...(workflow.definitionJson as Record<string, unknown>),\n config: form,\n };\n await updateWorkflowDefinition({\n variables: { id: workflow.id, input: { definitionJson } },\n });\n toast.success(\n tr(\n \"fluidgrids.settings.execution.savedToast\",\n \"Execution settings saved\",\n ),\n );\n void refetch();\n } catch (err) {\n toast.error(\n tr(\n \"fluidgrids.settings.execution.saveFailedToast\",\n \"Failed to save settings\",\n ),\n { description: err instanceof Error ? err.message : undefined },\n );\n }\n }, [workflow, form, updateWorkflowDefinition, refetch, tr]);\n\n if (!workflowKey) {\n // No workflow context resolvable — keep the previous static display so\n // the page still renders something useful rather than an empty form.\n // NOT the workspace-level `ReadOnlyBanner` copy: this isn't a policy\n // restriction, just a missing route/store context, so it gets its own\n // message rather than implying \"contact your admin\".\n const settings = DEFAULT_SETTINGS.execution;\n return (\n <div>\n <div className=\"flex items-center gap-2 p-3 rounded-lg bg-amber-500/10 border border-amber-500/30 mb-6\">\n <Icon\n icon=\"mdi:information\"\n width={18}\n className=\"text-amber-400 shrink-0\"\n />\n <p className=\"text-sm text-amber-400\">\n {tr(\n \"fluidgrids.settings.execution.noWorkflowContextBanner\",\n \"No workflow selected — open Settings from a specific workflow to edit its execution settings.\",\n )}\n </p>\n </div>\n <div className=\"divide-y divide-border-secondary\">\n <SettingRow\n label={tr(\n \"fluidgrids.settings.execution.defaultTimeoutLabel\",\n \"Default Timeout\",\n )}\n description={tr(\n \"fluidgrids.settings.execution.noWorkflowContextDescription\",\n \"Open this page from a specific workflow to edit its execution settings.\",\n )}\n >\n <div className=\"flex items-center gap-2\">\n <Input\n value={settings.defaultTimeoutSeconds}\n readOnly\n className=\"w-[100px] bg-background-secondary border-border-secondary text-text-primary text-right cursor-default\"\n />\n <span className=\"text-xs text-text-secondary\">\n {tr(\n \"fluidgrids.settings.execution.defaultTimeoutUnit\",\n \"seconds\",\n )}\n </span>\n </div>\n </SettingRow>\n </div>\n </div>\n );\n }\n\n return (\n <div>\n <div className=\"divide-y divide-border-secondary\">\n <SettingRow\n label={tr(\n \"fluidgrids.settings.execution.defaultTimeoutLabel\",\n \"Timeout\",\n )}\n description={tr(\n \"fluidgrids.settings.execution.defaultTimeoutDescription\",\n \"Maximum time this workflow's execution can run (in seconds)\",\n )}\n >\n <div className=\"flex items-center gap-2\">\n <Input\n type=\"number\"\n min={1}\n value={form.timeout ?? DEFAULT_EXECUTION_SETTINGS.timeout}\n onChange={(e) =>\n setForm((f) => ({\n ...f,\n timeout: Math.max(1, parseInt(e.target.value, 10) || 1),\n }))\n }\n disabled={loading}\n className=\"w-[100px] text-right\"\n />\n <span className=\"text-xs text-text-secondary\">\n {tr(\n \"fluidgrids.settings.execution.defaultTimeoutUnit\",\n \"seconds\",\n )}\n </span>\n </div>\n </SettingRow>\n <SettingRow\n label={tr(\n \"fluidgrids.settings.execution.concurrencyLimitLabel\",\n \"Concurrency Limit\",\n )}\n description={tr(\n \"fluidgrids.settings.execution.concurrencyLimitDescription\",\n \"Maximum number of this workflow's executions running simultaneously\",\n )}\n >\n <Input\n type=\"number\"\n min={1}\n value={\n form.maxParallelism ?? DEFAULT_EXECUTION_SETTINGS.maxParallelism\n }\n onChange={(e) =>\n setForm((f) => ({\n ...f,\n maxParallelism: Math.max(1, parseInt(e.target.value, 10) || 1),\n }))\n }\n disabled={loading}\n className=\"w-[80px] text-right\"\n />\n </SettingRow>\n <SettingRow\n label={tr(\n \"fluidgrids.settings.execution.onErrorLabel\",\n \"On workflow error\",\n )}\n description={tr(\n \"fluidgrids.settings.execution.onErrorDescription\",\n \"What to do when this workflow's execution fails\",\n )}\n >\n <select\n value={form.onError ?? DEFAULT_EXECUTION_SETTINGS.onError}\n onChange={(e) =>\n setForm((f) => ({\n ...f,\n onError: e.target.value as WorkflowExecutionSettings[\"onError\"],\n }))\n }\n disabled={loading}\n className=\"w-[160px] rounded-md border border-border-secondary bg-background-secondary px-2 py-1.5 text-sm text-text-primary\"\n >\n <option value=\"stop\">\n {tr(\"fluidgrids.settings.execution.onErrorStop\", \"Stop\")}\n </option>\n <option value=\"continue\">\n {tr(\"fluidgrids.settings.execution.onErrorContinue\", \"Continue\")}\n </option>\n <option value=\"retry\">\n {tr(\"fluidgrids.settings.execution.onErrorRetry\", \"Retry\")}\n </option>\n </select>\n </SettingRow>\n <SettingRow\n label={tr(\n \"fluidgrids.settings.execution.errorWorkflowLabel\",\n \"Error workflow\",\n )}\n description={tr(\n \"fluidgrids.settings.execution.errorWorkflowDescription\",\n \"Workflow key to run when this workflow's execution fails (optional)\",\n )}\n >\n <Select\n value={form.errorWorkflowKey ?? \"__none__\"}\n onValueChange={(val) =>\n setForm((f) => ({\n ...f,\n errorWorkflowKey: val === \"__none__\" ? undefined : val,\n }))\n }\n disabled={loading || otherWorkflowsLoading}\n >\n <SelectTrigger className=\"w-[220px] bg-background-secondary border-border-secondary\">\n <SelectValue\n placeholder={tr(\n \"fluidgrids.settings.execution.errorWorkflowPlaceholder\",\n \"None\",\n )}\n />\n </SelectTrigger>\n <SelectContent>\n <SelectItem value=\"__none__\">\n {tr(\"fluidgrids.settings.execution.errorWorkflowNone\", \"None\")}\n </SelectItem>\n {errorWorkflowOptions.map((w) => (\n <SelectItem key={w.workflowKey} value={w.workflowKey}>\n {w.name}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </SettingRow>\n <SettingRow\n label={tr(\n \"fluidgrids.settings.execution.saveSuccessLabel\",\n \"Save successful execution data\",\n )}\n >\n <Switch\n checked={form.dataSaving?.saveSuccessExecutions ?? true}\n onCheckedChange={(checked) =>\n setForm((f) => ({\n ...f,\n dataSaving: { ...f.dataSaving, saveSuccessExecutions: checked },\n }))\n }\n disabled={loading}\n />\n </SettingRow>\n <SettingRow\n label={tr(\n \"fluidgrids.settings.execution.saveFailedLabel\",\n \"Save failed execution data\",\n )}\n >\n <Switch\n checked={form.dataSaving?.saveFailedExecutions ?? true}\n onCheckedChange={(checked) =>\n setForm((f) => ({\n ...f,\n dataSaving: { ...f.dataSaving, saveFailedExecutions: checked },\n }))\n }\n disabled={loading}\n />\n </SettingRow>\n </div>\n <div className=\"mt-4 flex justify-end\">\n <Button onClick={() => void handleSave()} disabled={loading || saving}>\n {saving\n ? tr(\"fluidgrids.settings.execution.saving\", \"Saving…\")\n : tr(\"fluidgrids.settings.execution.save\", \"Save\")}\n </Button>\n </div>\n </div>\n );\n}\n\nfunction NotificationsTab() {\n const tr = useTr();\n const settings = DEFAULT_SETTINGS.notifications;\n\n return (\n <div>\n <ReadOnlyBanner />\n\n {/* Email Notifications */}\n <div className=\"mb-6\">\n <h3 className=\"text-sm font-semibold text-text-primary flex items-center gap-2 mb-3\">\n <Icon icon=\"mdi:email-outline\" width={18} />\n {tr(\n \"fluidgrids.settings.notifications.emailSectionTitle\",\n \"Email Notifications\",\n )}\n </h3>\n <div className=\"divide-y divide-border-secondary rounded-lg border border-border-secondary bg-background-secondary p-1\">\n <SettingRow\n label={tr(\n \"fluidgrids.settings.notifications.emailOnSuccessLabel\",\n \"On Success\",\n )}\n description={tr(\n \"fluidgrids.settings.notifications.emailOnSuccessDescription\",\n \"Send email when a workflow execution completes successfully\",\n )}\n >\n <Switch checked={settings.emailOnSuccess} disabled />\n </SettingRow>\n <SettingRow\n label={tr(\n \"fluidgrids.settings.notifications.emailOnFailureLabel\",\n \"On Failure\",\n )}\n description={tr(\n \"fluidgrids.settings.notifications.emailOnFailureDescription\",\n \"Send email when a workflow execution fails\",\n )}\n >\n <Switch checked={settings.emailOnFailure} disabled />\n </SettingRow>\n </div>\n </div>\n\n {/* Webhook Notifications */}\n <div>\n <h3 className=\"text-sm font-semibold text-text-primary flex items-center gap-2 mb-3\">\n <Icon icon=\"mdi:webhook\" width={18} />\n {tr(\n \"fluidgrids.settings.notifications.webhookSectionTitle\",\n \"Webhook Notifications\",\n )}\n </h3>\n <div className=\"divide-y divide-border-secondary rounded-lg border border-border-secondary bg-background-secondary p-1\">\n <SettingRow\n label={tr(\n \"fluidgrids.settings.notifications.webhookOnSuccessLabel\",\n \"On Success\",\n )}\n description={tr(\n \"fluidgrids.settings.notifications.webhookOnSuccessDescription\",\n \"Send webhook when a workflow execution completes successfully\",\n )}\n >\n <Switch checked={settings.webhookOnSuccess} disabled />\n </SettingRow>\n <SettingRow\n label={tr(\n \"fluidgrids.settings.notifications.webhookOnFailureLabel\",\n \"On Failure\",\n )}\n description={tr(\n \"fluidgrids.settings.notifications.webhookOnFailureDescription\",\n \"Send webhook when a workflow execution fails\",\n )}\n >\n <Switch checked={settings.webhookOnFailure} disabled />\n </SettingRow>\n </div>\n </div>\n </div>\n );\n}\n\nfunction ApiTab() {\n const tr = useTr();\n const settings = DEFAULT_SETTINGS.api;\n\n return (\n <div>\n <div className=\"space-y-4\">\n {/* API Gateway URL */}\n <Card className=\"border border-border-secondary bg-background-secondary\">\n <CardHeader className=\"pb-3\">\n <div className=\"flex items-center gap-2 mb-2\">\n <Icon icon=\"mdi:api\" width={20} className=\"text-text-secondary\" />\n <h3 className=\"text-sm font-semibold text-text-primary\">\n {tr(\n \"fluidgrids.settings.api.gatewayUrlTitle\",\n \"API Gateway URL\",\n )}\n </h3>\n </div>\n <p className=\"text-xs text-text-secondary mb-3\">\n {tr(\n \"fluidgrids.settings.api.gatewayUrlDescription\",\n \"Base URL for workflow API operations. Use this to trigger, list, and manage workflows programmatically.\",\n )}\n </p>\n <div className=\"flex items-center gap-2 rounded-lg bg-background-tertiary px-3 py-2 border border-border-secondary\">\n <code className=\"text-sm text-text-primary flex-1 truncate\">\n {settings.gatewayUrl}\n </code>\n <CopyButton\n value={settings.gatewayUrl}\n label={tr(\n \"fluidgrids.settings.api.gatewayUrlCopyLabel\",\n \"API Gateway URL\",\n )}\n />\n </div>\n </CardHeader>\n </Card>\n\n {/* Webhook URL */}\n <Card className=\"border border-border-secondary bg-background-secondary\">\n <CardHeader className=\"pb-3\">\n <div className=\"flex items-center gap-2 mb-2\">\n <Icon\n icon=\"mdi:webhook\"\n width={20}\n className=\"text-text-secondary\"\n />\n <h3 className=\"text-sm font-semibold text-text-primary\">\n {tr(\n \"fluidgrids.settings.api.webhookUrlTitle\",\n \"Webhook URL Format\",\n )}\n </h3>\n </div>\n <p className=\"text-xs text-text-secondary mb-3\">\n {tr(\n \"fluidgrids.settings.api.webhookUrlDescriptionPrefix\",\n \"URL format for triggering workflows via webhook. Replace\",\n )}{\" \"}\n <code className=\"text-text-primary\">{\"{workflowKey}\"}</code>{\" \"}\n {tr(\n \"fluidgrids.settings.api.webhookUrlDescriptionSuffix\",\n \"with the actual workflow key.\",\n )}\n </p>\n <div className=\"flex items-center gap-2 rounded-lg bg-background-tertiary px-3 py-2 border border-border-secondary\">\n <code className=\"text-sm text-text-primary flex-1 truncate\">\n {settings.webhookUrlFormat}\n </code>\n <CopyButton\n value={settings.webhookUrlFormat}\n label={tr(\n \"fluidgrids.settings.api.webhookUrlCopyLabel\",\n \"Webhook URL\",\n )}\n />\n </div>\n </CardHeader>\n </Card>\n\n {/* Example cURL */}\n <Card className=\"border border-border-secondary bg-background-secondary\">\n <CardHeader className=\"pb-3\">\n <div className=\"flex items-center gap-2 mb-2\">\n <Icon\n icon=\"mdi:console\"\n width={20}\n className=\"text-text-secondary\"\n />\n <h3 className=\"text-sm font-semibold text-text-primary\">\n {tr(\n \"fluidgrids.settings.api.curlExampleTitle\",\n \"Example: Trigger via cURL\",\n )}\n </h3>\n </div>\n <div className=\"relative rounded-lg bg-background-tertiary px-3 py-2 border border-border-secondary\">\n <pre className=\"text-xs text-text-primary overflow-x-auto whitespace-pre-wrap\">\n {`curl -X POST \"${settings.webhookUrlFormat}\" \\\\\n -H \"Content-Type: application/json\" \\\\\n -H \"Authorization: Bearer <token>\" \\\\\n -d '{\"input\": {}}'`}\n </pre>\n <div className=\"absolute top-2 right-2\">\n <CopyButton\n value={`curl -X POST \"${settings.webhookUrlFormat}\" \\\\\\n -H \"Content-Type: application/json\" \\\\\\n -H \"Authorization: Bearer <token>\" \\\\\\n -d '{\"input\": {}}'`}\n label={tr(\n \"fluidgrids.settings.api.curlCopyLabel\",\n \"cURL command\",\n )}\n />\n </div>\n </div>\n </CardHeader>\n </Card>\n </div>\n </div>\n );\n}\n\n// ============================================================================\n// Main Component\n// ============================================================================\n\nexport interface SettingsPageProps {\n /**\n * Explicit workflow key to scope the Execution tab to (BOFF-7512). When\n * omitted, falls back to the `:id`/`:workflowKey` route param (for hosts\n * that mount this page under a per-workflow path), then to the workflow\n * currently loaded in the builder's flow store (for hosts that navigate\n * here from the builder without a route param). If none resolve, the\n * Execution tab falls back to its previous static display.\n */\n workflowKey?: string;\n}\n\nexport function SettingsPage({\n workflowKey: workflowKeyProp,\n}: SettingsPageProps = {}) {\n const tr = useTr();\n const navigate = useNavigate();\n const routeParams = useParams<{ id?: string; workflowKey?: string }>();\n const activeWorkflowKey = useFlowStore((s) => s.workflow.workflowKey);\n const workflowKey =\n workflowKeyProp ||\n routeParams.workflowKey ||\n routeParams.id ||\n activeWorkflowKey ||\n undefined;\n const [activeTab, setActiveTab] = useState(\"general\");\n\n return (\n <div className=\"p-4 sm:p-6 bg-background-primary min-h-screen\">\n {/* Header */}\n <div className=\"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-6\">\n <div>\n <h1 className=\"text-2xl sm:text-3xl font-bold text-text-primary\">\n {tr(\"fluidgrids.settings.page.title\", \"Settings\")}\n </h1>\n <p className=\"text-text-secondary mt-1\">\n {tr(\n \"fluidgrids.settings.page.subtitle\",\n \"Configure workflow execution and notification preferences\",\n )}\n </p>\n </div>\n <Button variant=\"outline\" onClick={() => navigate(\"../list\")}>\n <Icon icon=\"mdi:arrow-left\" className=\"mr-2\" width={16} />\n {tr(\"fluidgrids.settings.page.backToWorkflows\", \"Back to Workflows\")}\n </Button>\n </div>\n\n {/* Tabs */}\n <Tabs value={activeTab} onValueChange={setActiveTab} className=\"w-full\">\n <TabsList className=\"bg-background-secondary border border-border-secondary mb-6\">\n <TabsTrigger value=\"general\" className=\"gap-1.5\">\n <Icon icon=\"mdi:cog\" width={16} />\n {tr(\"fluidgrids.settings.page.generalTab\", \"General\")}\n </TabsTrigger>\n <TabsTrigger value=\"execution\" className=\"gap-1.5\">\n <Icon icon=\"mdi:play-circle\" width={16} />\n {tr(\"fluidgrids.settings.page.executionTab\", \"Execution\")}\n </TabsTrigger>\n <TabsTrigger value=\"notifications\" className=\"gap-1.5\">\n <Icon icon=\"mdi:bell-outline\" width={16} />\n {tr(\"fluidgrids.settings.page.notificationsTab\", \"Notifications\")}\n </TabsTrigger>\n <TabsTrigger value=\"api\" className=\"gap-1.5\">\n <Icon icon=\"mdi:api\" width={16} />\n {tr(\"fluidgrids.settings.page.apiTab\", \"API\")}\n </TabsTrigger>\n </TabsList>\n\n <TabsContent value=\"general\">\n <GeneralTab />\n </TabsContent>\n <TabsContent value=\"execution\">\n <ExecutionTab workflowKey={workflowKey} />\n </TabsContent>\n <TabsContent value=\"notifications\">\n <NotificationsTab />\n </TabsContent>\n <TabsContent value=\"api\">\n <ApiTab />\n </TabsContent>\n </Tabs>\n </div>\n );\n}\n"]}
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { r as WorkflowData } from './workflow-builder-lgLa__fU.js';
3
- export { C as ConditionRule, E as EdgeCondition, a as EdgeMapping, b as ErrorType, c as ExecutionLog, d as ExecutionsFilter, e as ExecutionsPagination, f as ExtendedNodeType, F as FlowEdge, g as FlowNode, h as FlowNodeData, I as IFlowState, N as NODE_STATUS_CONFIG, i as NodeEndpointConfig, j as NodeManifest, k as NodeState, l as NodeStatus, R as RUN_STATUS_CONFIG, m as RunStatus, S as SidebarState, T as Tag, W as WorkflowBuilder, o as WorkflowBuilderCore, p as WorkflowBuilderCoreProps, n as WorkflowBuilderPage, q as WorkflowBuilderProps, s as WorkflowDefinition, t as WorkflowDefinitionJson, u as WorkflowError, v as WorkflowRun, w as WorkflowSearchRedirect, x as refetchStoreNodes, y as useFlowStore } from './workflow-builder-lgLa__fU.js';
2
+ import { r as WorkflowData } from './workflow-builder-D9z-_vNX.js';
3
+ export { C as ConditionRule, E as EdgeCondition, a as EdgeMapping, b as ErrorType, c as ExecutionLog, d as ExecutionsFilter, e as ExecutionsPagination, f as ExtendedNodeType, F as FlowEdge, g as FlowNode, h as FlowNodeData, I as IFlowState, N as NODE_STATUS_CONFIG, i as NodeEndpointConfig, j as NodeManifest, k as NodeState, l as NodeStatus, R as RUN_STATUS_CONFIG, m as RunStatus, S as SidebarState, T as Tag, W as WorkflowBuilder, o as WorkflowBuilderCore, p as WorkflowBuilderCoreProps, n as WorkflowBuilderPage, q as WorkflowBuilderProps, s as WorkflowDefinition, t as WorkflowDefinitionJson, u as WorkflowError, v as WorkflowRun, w as WorkflowSearchRedirect, x as refetchStoreNodes, y as useFlowStore } from './workflow-builder-D9z-_vNX.js';
4
4
  import * as React from 'react';
5
5
  import { ReactNode, HTMLAttributes, InputHTMLAttributes, ReactElement } from 'react';
6
6
  import { ApolloClient } from '@apollo/client/core';
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ export { ExecutionDetailPage } from './chunk-Z4XRVZZ2.js';
5
5
  import './chunk-CVNW2EUB.js';
6
6
  export { HistoryPage } from './chunk-KAMWWBX5.js';
7
7
  export { NodesPage, fetchAllNodesWithManifests, useLazyNodeManifest, useNodeEndpoint, useNodeEndpoints, useNodeManifest } from './chunk-CQOQ6A73.js';
8
- export { SettingsPage } from './chunk-XA3IJE2D.js';
8
+ export { SettingsPage } from './chunk-QWUPHC3K.js';
9
9
  import { ThemeProvider, extractTemplateGraph } from './chunk-WJQSPVU5.js';
10
10
  export { A2AMessagePriority, A2AMessageStatus, A2ATrustLevel, ActionExecutionStatus, ActionSourceType, ActionStatus, ActionStyle, ActionTriggerType, ActionType, ActivityCategory, ActivityType, ActorType, AgentVisibility, AiPromptCategory, AiPromptStatus, AlertSeverity, AnalyticsEntityType, AnalyticsEventSeverity, AnalyticsGranularity, AnalyticsInsightSeverity, AppCategory, AppInstallationState, AppPermission, AppStatus, AppType, AppVisibility, ApprovalStatus, ArtifactType, AssetBudgetStatus, AssetCondition, AssetStatus, AssignmentSource, AttendeeRole, AuthType, AuthorType, AutomationExecutionStatus, AutomationStatus, AutomationTriggerType, BackoffStrategy, BatchDownloadStatus, BigConsoleConflictResolution, BillingType, BoardColumnType, BoardType, BookingFormFieldType, BookingPageType, BookingStatus, BotAppStatus, BotAppType, BotAppVisibility, BotlitAgentCapability, BotlitAgentStatus, BotlitAgentType, BotlitHealthStatus, BotlitLlmProviderType, BudgetStatus, BulkConversationAction, CalendarEventStatus, CalendarExecutionStatus, CalendarExportFormat, CalendarPromptStatus, CalendarResourceType, CalendarType, CallParticipantChangeType, CallState, CallType, CatalogVisibility, ChangeRisk, ChangeStatus, ChannelMessageStatus, ChannelPlatform, ChannelStatus, ChannelType, ChatRole, CheckInStatus, ChunkingMethod, CircuitState, CohortType, CollaboratorRole, CollectionActivityType, CollectionItemSortField, CollectionSortField, CollectionType, CollectionVisibility, CommentExportFormat, CommentScheduleType, CommentStatus, CommentVisibility, ComparisonOperator, ComplianceStatus, ComponentLifecycle, ComponentType, ConfigScope, ConflictResolution, ConnectionCredentialSource, ConnectionQuality, ConnectionStatus, ContentSearchEngine, ContentSearchStatus, ContentType, ConversationPermission, ConversationSortField, ConversationState, ConversationType, ConversationVisibility, ConversationsExportFormat, CustomFieldType, DashboardCategory, DashboardLayout, DashboardSortField, DashboardStatus, DashboardStyleType, DashboardVisibility, DataSinkRefreshType, DataSinkSetupState, DataSinkSourceType, DataSinkStatus, DataSinkUpdateEventType, DataSourceTestStatus, DataSourceType, DayOfWeek, DeliveryChannelType, DependencyStatus, DependencyType, DiscoveryJobStatus, DlqStatus, DocumentStatus, DriverStatus, EncryptionAlgorithm, EnergyLevel, EntityStatus, ErrorType, EventStatus, EventType, EventValidationStatus, EventVisibility, EventfullymanagedConfigScope, EventfullymanagedSessionStatus, EventfullymanagedSessionType, EventfullymanagedVibeStatus, EventfullymanagedVibeType, ExecutionStatus, ExecutionType, ExecutorType, ExpenseOrderByField, ExpenseStatus, ExportArchiveFormat, ExportFormat, ExportJobStatus, ExportScope, ExportSortField, ExternalCalendarSyncDirection, ExternalCalendarSyncStatus, ExternalProviderType, FeatureRequestStatus, FieldMaskStrategy, FileEventType, FileMetadataSortField, FileShareAccessLevel, FileShareType, FileSortField, FileStatus, FileVisibility, FilterDataType, FilterOperator, FilterType, FluidGridsEventType, FluidGridsWorkflowStatus, FolderSortField, FolderStatus, FunnelStepOrder, GeneratedLayoutType, GenerationStatus, GeofenceEventType, GeofenceTrigger, GgnomadBookingStatus, GgnomadBookingType, GgnomadListingStatus, GitopsProviderType, GitopsSnapshotType, GraphMetadataOperator, GraphSearchMode, GraphSearchSortBy, GroupCompositionMode, GroupExportFormat, GroupScope, GroupSortField, GroupStatus, GroupType, GroupVisibility, GroupsExportFormat, HeadshotmarketingAdCampaignStatus, HeadshotmarketingAdCreativeStatus, HeadshotmarketingAdCreativeType, HeadshotmarketingAdPlatform, HeadshotmarketingAiToolCategory, HeadshotmarketingAiToolExecutionStatus, HeadshotmarketingAssetType, HeadshotmarketingCampaignStatus, HeadshotmarketingCampaignType, HeadshotmarketingContactStatus, HeadshotmarketingContentItemStatus, HeadshotmarketingContentItemType, HeadshotmarketingDateRangePreset, HeadshotmarketingDealStatus, HeadshotmarketingEventRegistrationStatus, HeadshotmarketingEventStatus, HeadshotmarketingEventType, HeadshotmarketingInfluencerCampaignStatus, HeadshotmarketingInfluencerRelationshipStatus, HeadshotmarketingInfluencerTier, HeadshotmarketingLandingPageSectionType, HeadshotmarketingLandingPageStatus, HeadshotmarketingLeadSource, HeadshotmarketingLeadStatus, HeadshotmarketingMetricType, HeadshotmarketingReportStatus, HeadshotmarketingReportType, HeadshotmarketingSeoAuditSeverity, HeadshotmarketingSeoAuditStatus, HeadshotmarketingSeoKeywordStatus, HeadshotmarketingSocialAccountStatus, HeadshotmarketingSocialPlatform, HeadshotmarketingSocialPostStatus, HeadshotmarketingWorkflowExecutionStatus, HeadshotmarketingWorkflowStatus, HeadshotmarketingWorkflowTriggerType, HttpMethod, IncidentStatus, IndexStatus, InstallMode, InventoryTransactionType, InvitationStatus, InviteStatus, InvoiceStatus, IssueTokenErrorCode, JobStatus, KadaikodiInvestmentStatus, KadaikodiOfferingKind, KadaikodiOrderStatus, KadaikodiPaymentStatus, KadaikodiProviderStatus, KadaikodiRiskLevel, KadaikodiServiceCategory, KeyStatus, KeyType, KnowledgeArticleStatus, LocationType, LockType, LogAction, LogLevel, McpConnectionStatus, McpResourceType, McpToolStatus, MeetingActionItemStatus, MeetingOrderByField, MeetingParticipantRole, MeetingParticipantStatus, MeetingProvider, MeetingType, MemberPresenceStatus, MembershipRole, MembershipSource, MembershipStatus, MembershipType, MentionType, MessageContentType, MessageReportResolutionAction, MessageReportStatus, MessageStatus, MessageType, MetadataValueType, MetricAggregation, MetricAggregationField, MetricType, MilestoneStatus, MisfirePolicy, Mood, NatsFilterType, NavigationMode, NodeConfigStatus, NodeStatus, NotificationLevel, OrderDirection, OrderPriority, OrderStatus, OrderType, OverrideType, PackageKind, PageLayout, ParserStatus, ParserType, ParticipantChangeType, ParticipantRole, PipelineExecutionStatus, PipelineStatus, PlanmagnetProjectStatus, PlanmagnetSyncDirection, PlanmagnetSyncProvider, PlanmagnetSyncStatus, PluginStatus, PolicyStatus, PolicyType, PomodoroGoalPeriod, PomodoroGoalType, PomodoroSessionOrderByField, PomodoroSessionType, PortfolioStatus, PresenceStatus, Priority, ProblemStatus, ProductType, ProjectMethodology, ProjectOrderField, ProjectStatus, PromptGenerationStatus, PromptPriority, PromptStatus, PropertyStatus, PropertyType, ProviderCategory, PublishType, QualityGateStatus, RbacChangeType, ReactionChangeType, RecordingMode, ReleaseStatus, ReminderChannel, ReminderType, ReportFormat, ReportScheduleStatus, ResourceBookingStatus, RetrievalMode, RiskSeverity, RiskStatus, RoadmapItemStatus, RoadmapType, RoleLevel, RouteStatus, RoutingStrategy, RsvpStatus, RuleActionType, RuleConditionOperator, RuleRunMode, RunLogLevel, RunLogStream, RunMode, RunStatus, SandboxChangeType, SandboxExportFormat, SandboxExportJobStatus, SandboxKind, SandboxMode, SandboxSource, SandboxStatus, SandboxTemplate, SchedulePriority, ScheduleType, ScorecardMetricStatus, ScorecardMetricType, ScorecardOwnerType, SecretStatus, SecretType, SecurityExportFormat, SecuritySeverity, SecuritySubscriptionEvent, SegmentVisibility, SessionSharePermission, SettingsCategory, SharePermission, ShareRecipientType, ShareSortField, ShareStatus, ShareTokenType, ShipmentStatus, SmartCollectionConditionField, SmartCollectionConditionOperator, SmartCollectionOperator, SortDirection, SortOrder, SprintStatus, StageErrorHandling, StageExecutionStatus, StorageMode, StrategicAlignment, StressLevel, SubmissionStatus, SuggestedDataSourceType, SyncDirection, SyncFromGlobalOperation, SyncProvider, SystemEventType, TagCardinality, TagDataType, TagFilterOperator, TagRelationType, TagScope, TagsExportFormat, TargetType, TaskOrderField, TaskPriority, TaskStatus, TemplateAuthorType, TemplateCategory, TemplateComplexity, TemplatePreview, TemplateStatus, TemplateVisibility, TemplatesPage, TimeBucket, TimeCampusChannelType, TimeCampusConfigScope, TimeCampusProjectStatus, TimeCampusSortDirection, TimeEntryOrderField, TimeEntryStatus, TimeGrain, TimeRange, TlsMode, ToolRiskLevel, TrackingEventType, TransactionStatus, TransactionType, TraversalDirection, TunnelDomainType, TunnelDomainVerificationStatus, TunnelEnvironment, TunnelProtocol, TunnelProviderKey, TunnelSessionStatus, TunnelShardStatus, TunnelStatus, UpdateScope, UploadStatus, UploadType, UsageStatus, ValidationMethod, VaultIncidentSeverity, VaultIncidentStatus, VaultMemberRole, VaultRotationStatus, VaultScope, VaultSecurityEventSeverity, VaultSecurityEventType, VaultStatus, VaultSyncStatus, VehicleStatus, VehicleType, VersionStatus, VibeAuditAction, VibeAuditExportFormat, VibeAuditResourceType, VibeAuditStatus, VibeCalendarExecutionStatus, VibeCalendarTaskStatus, VibeDeckButtonActionType, VibeDeckSharePermission, VibeDeckShareStatus, VibeDeckShareVisibility, VibeStatus, VibeType, VibecontrolsActionType, VibecontrolsDocsBuildImagePullPolicy, VibecontrolsDocsBuildImageScanStatus, VibecontrolsDocsBuildImageStatus, VibecontrolsDocsBuildRuntime, VibecontrolsDocsPageStatus, VibecontrolsDocsRevisionStatus, VibecontrolsDocsSiteOwnerType, VibecontrolsDocsSiteVisibility, VibecontrolsSessionStatus, VibecontrolsSessionType, VibecontrolsTemplateCategory, VibecontrolsTemplateStatus, Visibility, VisibilityType, VocabularyKind, VocabularyScope, WarehouseType, WebhookAuthType, WidgetConfidence, WidgetRenderer, WidgetType, WorkItemPriority, WorkItemStatus, WorkItemType, WorkOrderStatus, WorkOrderType, WorkPatternInsightType, WorkflowStatus, WorkspaceResourceStatus, WorkspaceResourceType, WorkspaceStatus, WorkspaceType, WorkspacesExportFormat } from './chunk-WJQSPVU5.js';
11
11
  export { WorkflowBuilder, WorkflowBuilderCore, WorkflowSearchRedirect } from './chunk-4LJOUX2R.js';
package/dist/settings.js CHANGED
@@ -1,4 +1,4 @@
1
- export { SettingsPage } from './chunk-XA3IJE2D.js';
1
+ export { SettingsPage } from './chunk-QWUPHC3K.js';
2
2
  import './chunk-275FCUOI.js';
3
3
  import './chunk-WO3AHQVD.js';
4
4
  import './chunk-7YWBH2A5.js';
@@ -150,13 +150,15 @@ interface INodeExecutionSettings {
150
150
  * Workflow-level execution configuration (BOFF-7512).
151
151
  *
152
152
  * Mirrors `IWorkflowConfig` in `wspace-workflow-svc/src/modules/main/types/workflow.types.ts`
153
- * (`maxParallelism`, `timeout` in SECONDS, `retry`, `onError`) plus three
154
- * additive, frontend-only fields (`errorWorkflowId`, `saveDataOnSuccess`,
155
- * `saveDataOnError`) that don't exist on the backend interface yet.
156
- * `definitionJson` is a JSON scalar with no GraphQL/runtime schema
157
- * validation on its shape, so these round-trip through
158
- * `updateWorkflowDefinition` without needing a backend change — see the
159
- * Settings page for where they're read/written.
153
+ * (`maxParallelism`, `timeout` in SECONDS, `retry`, `onError`) plus two
154
+ * additive, frontend-only fields — `errorWorkflowKey` and `dataSaving` —
155
+ * that don't exist on the backend interface yet. `definitionJson` is a JSON
156
+ * scalar with no GraphQL/runtime schema validation on its shape, so these
157
+ * round-trip through `updateWorkflowDefinition` without needing a backend
158
+ * change. This is the SAME shape the per-workflow Settings page's Execution
159
+ * tab reads/writes (`SettingsPage.tsx`'s local `WorkflowExecutionSettings`
160
+ * — kept in sync with this interface by hand since that file intentionally
161
+ * doesn't import across the builder/settings module boundary).
160
162
  */
161
163
  interface IWorkflowConfig {
162
164
  /** Max parallel executions. */
@@ -169,12 +171,13 @@ interface IWorkflowConfig {
169
171
  initialDelay?: number;
170
172
  };
171
173
  onError?: "stop" | "continue" | "retry";
172
- /** Workflow key/id to trigger when this workflow's execution fails (frontend-only, additive). */
173
- errorWorkflowId?: string;
174
- /** Persist run data when an execution succeeds (frontend-only, additive; not yet engine-enforced). */
175
- saveDataOnSuccess?: boolean;
176
- /** Persist run data when an execution fails (frontend-only, additive; not yet engine-enforced). */
177
- saveDataOnError?: boolean;
174
+ /** workflowKey to trigger when this workflow's execution fails (frontend-only, additive). */
175
+ errorWorkflowKey?: string;
176
+ /** Persist run data on success/failure (frontend-only, additive; not yet engine-enforced — tracked separately as execution-lifecycle work). */
177
+ dataSaving?: {
178
+ saveSuccessExecutions?: boolean;
179
+ saveFailedExecutions?: boolean;
180
+ };
178
181
  }
179
182
  interface WorkflowDefinition {
180
183
  id: string;
@@ -1,4 +1,4 @@
1
- export { I as IFlowState, W as WorkflowBuilder, o as WorkflowBuilderCore, p as WorkflowBuilderCoreProps, n as WorkflowBuilderPage, q as WorkflowBuilderProps, w as WorkflowSearchRedirect, x as refetchStoreNodes, y as useFlowStore } from './workflow-builder-lgLa__fU.js';
1
+ export { I as IFlowState, W as WorkflowBuilder, o as WorkflowBuilderCore, p as WorkflowBuilderCoreProps, n as WorkflowBuilderPage, q as WorkflowBuilderProps, w as WorkflowSearchRedirect, x as refetchStoreNodes, y as useFlowStore } from './workflow-builder-D9z-_vNX.js';
2
2
  import 'react/jsx-runtime';
3
3
  import '@apollo/client/core';
4
4
  import '@xyflow/react';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/fluidgrids-fe-sdk",
3
- "version": "2026.922.7",
3
+ "version": "2026.922.8",
4
4
  "description": "FluidGrids Workflow Builder SDK - Embeddable visual workflow automation",
5
5
  "type": "module",
6
6
  "imports": {
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/modules/settings/pages/SettingsPage.tsx"],"names":[],"mappings":";;;;;;;;;;;AAsDA,IAAM,0BAAA,GAEF;AAAA,EACF,OAAA,EAAS,GAAA;AAAA,EACT,cAAA,EAAgB,CAAA;AAAA,EAChB,OAAA,EAAS;AACX,CAAA;AAMA,IAAM,gBAAA,GAAmB;AAAA,EACvB,OAAA,EAAS;AAAA,IACP,aAAA,EAAe,mBAAA;AAAA,IACf,qBAAA,EAAuB,IAAA;AAAA,IACvB,cAAA,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A3IJE2D.js","sourcesContent":["import { useState, useCallback, useEffect, useMemo } from \"react\";\nimport { useNavigate, useParams } from \"react-router\";\nimport { Icon } from \"@iconify/react\";\nimport { Button } from \"@burdenoff/fe-libs/button\";\nimport {\n Tabs,\n TabsList,\n TabsTrigger,\n TabsContent,\n Input,\n Label,\n Switch,\n Card,\n CardHeader,\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n TooltipProvider,\n} from \"@burdenoff/fe-libs/ui\";\nimport { toast } from \"sonner\";\nimport { useTr } from \"../../../hooks/useTr\";\nimport { useFlowStore } from \"../../../builder/stores/flow-store\";\nimport {\n useWorkflowDefinitionQuery,\n useUpdateWorkflowDefinitionMutation,\n} from \"../../../generated/operations\";\n\n// ============================================================================\n// Per-workflow execution settings (BOFF-7512)\n// ============================================================================\n\n/**\n * Mirrors `IWorkflowConfig` on `wspace-workflow-svc`'s\n * `IWorkflowDefinitionJson.config` (a sibling of `data`, not nested inside\n * it), plus two fields the backend type doesn't have yet: `errorWorkflowKey`\n * and `dataSaving`. Per the ticket, \"if the underlying setting doesn't exist\n * yet, add just the schema field and wire the UI\" — `config` on\n * `definitionJson` is already a free-form JSON blob, so these new keys need\n * no backend schema change to round-trip; nothing downstream reads\n * `dataSaving.saveSuccessExecutions`/`saveFailedExecutions` yet (that's\n * execution-lifecycle work tracked separately), but the value now persists.\n */\ninterface WorkflowExecutionSettings {\n timeout?: number; // seconds\n maxParallelism?: number;\n onError?: \"stop\" | \"continue\" | \"retry\";\n /** Workflow key to run when this workflow's execution fails. */\n errorWorkflowKey?: string;\n dataSaving?: {\n saveSuccessExecutions?: boolean;\n saveFailedExecutions?: boolean;\n };\n}\n\nconst DEFAULT_EXECUTION_SETTINGS: Required<\n Pick<WorkflowExecutionSettings, \"timeout\" | \"maxParallelism\" | \"onError\">\n> = {\n timeout: 300,\n maxParallelism: 5,\n onError: \"stop\",\n};\n\n// ============================================================================\n// Constants\n// ============================================================================\n\nconst DEFAULT_SETTINGS = {\n general: {\n workspaceName: \"Default Workspace\",\n defaultWorkflowPrefix: \"wf\",\n autoSaveDrafts: true,\n },\n execution: {\n defaultTimeoutSeconds: 300,\n maxRetries: 3,\n retryDelaySeconds: 10,\n concurrentExecutionLimit: 5,\n },\n notifications: {\n emailOnSuccess: false,\n emailOnFailure: true,\n webhookOnSuccess: false,\n webhookOnFailure: true,\n },\n api: {\n gatewayUrl: \"/api/v1/workflows\",\n webhookUrlFormat: \"/api/v1/webhooks/workflow/{workflowKey}/trigger\",\n },\n};\n\n// ============================================================================\n// Sub-Components\n// ============================================================================\n\nfunction ReadOnlyBanner() {\n const tr = useTr();\n\n return (\n <div className=\"flex items-center gap-2 p-3 rounded-lg bg-amber-500/10 border border-amber-500/30 mb-6\">\n <Icon\n icon=\"mdi:information\"\n width={18}\n className=\"text-amber-400 shrink-0\"\n />\n <p className=\"text-sm text-amber-400\">\n {tr(\n \"fluidgrids.settings.readOnlyBanner.message\",\n \"Settings are managed at workspace level. Contact your workspace administrator to change these values.\",\n )}\n </p>\n </div>\n );\n}\n\nfunction CopyButton({ value, label }: { value: string; label: string }) {\n const tr = useTr();\n\n const handleCopy = useCallback(async () => {\n try {\n await navigator.clipboard.writeText(value);\n toast.success(\n `${label} ${tr(\"fluidgrids.settings.copyButton.copiedToast\", \"copied to clipboard\")}`,\n );\n } catch {\n toast.error(\n tr(\n \"fluidgrids.settings.copyButton.copyFailedToast\",\n \"Failed to copy to clipboard\",\n ),\n );\n }\n }, [value, label, tr]);\n\n return (\n <TooltipProvider>\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n onClick={handleCopy}\n className=\"p-1.5 rounded hover:bg-background-tertiary text-text-secondary hover:text-text-primary transition-colors\"\n >\n <Icon icon=\"mdi:content-copy\" width={16} />\n </button>\n </TooltipTrigger>\n <TooltipContent>\n {tr(\"fluidgrids.settings.copyButton.copyTooltipPrefix\", \"Copy\")}{\" \"}\n {label}\n </TooltipContent>\n </Tooltip>\n </TooltipProvider>\n );\n}\n\nfunction SettingRow({\n label,\n description,\n children,\n}: {\n label: string;\n description?: string;\n children: React.ReactNode;\n}) {\n return (\n <div className=\"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3 py-4\">\n <div className=\"flex-1 min-w-0\">\n <Label className=\"text-sm font-medium text-text-primary\">{label}</Label>\n {description && (\n <p className=\"text-xs text-text-secondary mt-0.5\">{description}</p>\n )}\n </div>\n <div className=\"shrink-0\">{children}</div>\n </div>\n );\n}\n\n// ============================================================================\n// Tab Content Components\n// ============================================================================\n\nfunction GeneralTab() {\n const tr = useTr();\n const settings = DEFAULT_SETTINGS.general;\n\n return (\n <div>\n <ReadOnlyBanner />\n <div className=\"divide-y divide-border-secondary\">\n <SettingRow\n label={tr(\n \"fluidgrids.settings.general.workspaceNameLabel\",\n \"Workspace Name\",\n )}\n description={tr(\n \"fluidgrids.settings.general.workspaceNameDescription\",\n \"The name of your workspace\",\n )}\n >\n <Input\n value={settings.workspaceName}\n readOnly\n className=\"w-[250px] bg-background-secondary border-border-secondary text-text-primary cursor-default\"\n />\n </SettingRow>\n <SettingRow\n label={tr(\n \"fluidgrids.settings.general.workflowPrefixLabel\",\n \"Default Workflow Prefix\",\n )}\n description={tr(\n \"fluidgrids.settings.general.workflowPrefixDescription\",\n \"Prefix used when generating new workflow keys\",\n )}\n >\n <Input\n value={settings.defaultWorkflowPrefix}\n readOnly\n className=\"w-[120px] bg-background-secondary border-border-secondary text-text-primary cursor-default\"\n />\n </SettingRow>\n <SettingRow\n label={tr(\n \"fluidgrids.settings.general.autoSaveDraftsLabel\",\n \"Auto-save Drafts\",\n )}\n description={tr(\n \"fluidgrids.settings.general.autoSaveDraftsDescription\",\n \"Automatically save draft workflows while editing\",\n )}\n >\n <Switch checked={settings.autoSaveDrafts} disabled />\n </SettingRow>\n </div>\n </div>\n );\n}\n\n/**\n * Editable, per-WORKFLOW execution settings (BOFF-7512) — replaces the old\n * global/read-only tab. Resolves the target workflow from (in order) an\n * explicit `workflowKey` prop, the `:id` route param, or the flow store's\n * currently-loaded workflow (set when the user arrived here from the\n * builder). When none of those resolve, falls back to the previous\n * read-only static display rather than a broken/blank editor.\n */\nfunction ExecutionTab({ workflowKey }: Readonly<{ workflowKey?: string }>) {\n const tr = useTr();\n\n const { data, loading, refetch } = useWorkflowDefinitionQuery({\n variables: { workflowKey },\n skip: !workflowKey,\n fetchPolicy: \"cache-and-network\",\n });\n const [updateWorkflowDefinition, { loading: saving }] =\n useUpdateWorkflowDefinitionMutation();\n\n const workflow = data?.workflowDefinition;\n const persistedConfig = useMemo(() => {\n const definitionJson = workflow?.definitionJson as\n Record<string, unknown> | undefined;\n const config = definitionJson?.config as\n WorkflowExecutionSettings | undefined;\n return config ?? {};\n }, [workflow?.definitionJson]);\n\n const [form, setForm] = useState<WorkflowExecutionSettings>(persistedConfig);\n // Re-seed the form whenever the fetched workflow (or its persisted config)\n // changes — e.g. on first load, or after switching workflows.\n useEffect(() => setForm(persistedConfig), [persistedConfig]);\n\n const handleSave = useCallback(async () => {\n if (!workflow?.id) return;\n try {\n const definitionJson = {\n ...(workflow.definitionJson as Record<string, unknown>),\n config: form,\n };\n await updateWorkflowDefinition({\n variables: { id: workflow.id, input: { definitionJson } },\n });\n toast.success(\n tr(\n \"fluidgrids.settings.execution.savedToast\",\n \"Execution settings saved\",\n ),\n );\n void refetch();\n } catch (err) {\n toast.error(\n tr(\n \"fluidgrids.settings.execution.saveFailedToast\",\n \"Failed to save settings\",\n ),\n { description: err instanceof Error ? err.message : undefined },\n );\n }\n }, [workflow, form, updateWorkflowDefinition, refetch, tr]);\n\n if (!workflowKey) {\n // No workflow context resolvable — keep the previous static display so\n // the page still renders something useful rather than an empty form.\n const settings = DEFAULT_SETTINGS.execution;\n return (\n <div>\n <ReadOnlyBanner />\n <div className=\"divide-y divide-border-secondary\">\n <SettingRow\n label={tr(\n \"fluidgrids.settings.execution.defaultTimeoutLabel\",\n \"Default Timeout\",\n )}\n description={tr(\n \"fluidgrids.settings.execution.noWorkflowContextDescription\",\n \"Open this page from a specific workflow to edit its execution settings.\",\n )}\n >\n <div className=\"flex items-center gap-2\">\n <Input\n value={settings.defaultTimeoutSeconds}\n readOnly\n className=\"w-[100px] bg-background-secondary border-border-secondary text-text-primary text-right cursor-default\"\n />\n <span className=\"text-xs text-text-secondary\">\n {tr(\n \"fluidgrids.settings.execution.defaultTimeoutUnit\",\n \"seconds\",\n )}\n </span>\n </div>\n </SettingRow>\n </div>\n </div>\n );\n }\n\n return (\n <div>\n <div className=\"divide-y divide-border-secondary\">\n <SettingRow\n label={tr(\n \"fluidgrids.settings.execution.defaultTimeoutLabel\",\n \"Timeout\",\n )}\n description={tr(\n \"fluidgrids.settings.execution.defaultTimeoutDescription\",\n \"Maximum time this workflow's execution can run (in seconds)\",\n )}\n >\n <div className=\"flex items-center gap-2\">\n <Input\n type=\"number\"\n min={1}\n value={form.timeout ?? DEFAULT_EXECUTION_SETTINGS.timeout}\n onChange={(e) =>\n setForm((f) => ({\n ...f,\n timeout: Math.max(1, parseInt(e.target.value, 10) || 1),\n }))\n }\n disabled={loading}\n className=\"w-[100px] text-right\"\n />\n <span className=\"text-xs text-text-secondary\">\n {tr(\n \"fluidgrids.settings.execution.defaultTimeoutUnit\",\n \"seconds\",\n )}\n </span>\n </div>\n </SettingRow>\n <SettingRow\n label={tr(\n \"fluidgrids.settings.execution.concurrencyLimitLabel\",\n \"Concurrency Limit\",\n )}\n description={tr(\n \"fluidgrids.settings.execution.concurrencyLimitDescription\",\n \"Maximum number of this workflow's executions running simultaneously\",\n )}\n >\n <Input\n type=\"number\"\n min={1}\n value={\n form.maxParallelism ?? DEFAULT_EXECUTION_SETTINGS.maxParallelism\n }\n onChange={(e) =>\n setForm((f) => ({\n ...f,\n maxParallelism: Math.max(1, parseInt(e.target.value, 10) || 1),\n }))\n }\n disabled={loading}\n className=\"w-[80px] text-right\"\n />\n </SettingRow>\n <SettingRow\n label={tr(\n \"fluidgrids.settings.execution.onErrorLabel\",\n \"On workflow error\",\n )}\n description={tr(\n \"fluidgrids.settings.execution.onErrorDescription\",\n \"What to do when this workflow's execution fails\",\n )}\n >\n <select\n value={form.onError ?? DEFAULT_EXECUTION_SETTINGS.onError}\n onChange={(e) =>\n setForm((f) => ({\n ...f,\n onError: e.target.value as WorkflowExecutionSettings[\"onError\"],\n }))\n }\n disabled={loading}\n className=\"w-[160px] rounded-md border border-border-secondary bg-background-secondary px-2 py-1.5 text-sm text-text-primary\"\n >\n <option value=\"stop\">\n {tr(\"fluidgrids.settings.execution.onErrorStop\", \"Stop\")}\n </option>\n <option value=\"continue\">\n {tr(\"fluidgrids.settings.execution.onErrorContinue\", \"Continue\")}\n </option>\n <option value=\"retry\">\n {tr(\"fluidgrids.settings.execution.onErrorRetry\", \"Retry\")}\n </option>\n </select>\n </SettingRow>\n <SettingRow\n label={tr(\n \"fluidgrids.settings.execution.errorWorkflowLabel\",\n \"Error workflow\",\n )}\n description={tr(\n \"fluidgrids.settings.execution.errorWorkflowDescription\",\n \"Workflow key to run when this workflow's execution fails (optional)\",\n )}\n >\n <Input\n value={form.errorWorkflowKey ?? \"\"}\n onChange={(e) =>\n setForm((f) => ({\n ...f,\n errorWorkflowKey: e.target.value || undefined,\n }))\n }\n placeholder={tr(\n \"fluidgrids.settings.execution.errorWorkflowPlaceholder\",\n \"workflow-key\",\n )}\n disabled={loading}\n className=\"w-[220px]\"\n />\n </SettingRow>\n <SettingRow\n label={tr(\n \"fluidgrids.settings.execution.saveSuccessLabel\",\n \"Save successful execution data\",\n )}\n >\n <Switch\n checked={form.dataSaving?.saveSuccessExecutions ?? true}\n onCheckedChange={(checked) =>\n setForm((f) => ({\n ...f,\n dataSaving: { ...f.dataSaving, saveSuccessExecutions: checked },\n }))\n }\n disabled={loading}\n />\n </SettingRow>\n <SettingRow\n label={tr(\n \"fluidgrids.settings.execution.saveFailedLabel\",\n \"Save failed execution data\",\n )}\n >\n <Switch\n checked={form.dataSaving?.saveFailedExecutions ?? true}\n onCheckedChange={(checked) =>\n setForm((f) => ({\n ...f,\n dataSaving: { ...f.dataSaving, saveFailedExecutions: checked },\n }))\n }\n disabled={loading}\n />\n </SettingRow>\n </div>\n <div className=\"mt-4 flex justify-end\">\n <Button onClick={() => void handleSave()} disabled={loading || saving}>\n {saving\n ? tr(\"fluidgrids.settings.execution.saving\", \"Saving…\")\n : tr(\"fluidgrids.settings.execution.save\", \"Save\")}\n </Button>\n </div>\n </div>\n );\n}\n\nfunction NotificationsTab() {\n const tr = useTr();\n const settings = DEFAULT_SETTINGS.notifications;\n\n return (\n <div>\n <ReadOnlyBanner />\n\n {/* Email Notifications */}\n <div className=\"mb-6\">\n <h3 className=\"text-sm font-semibold text-text-primary flex items-center gap-2 mb-3\">\n <Icon icon=\"mdi:email-outline\" width={18} />\n {tr(\n \"fluidgrids.settings.notifications.emailSectionTitle\",\n \"Email Notifications\",\n )}\n </h3>\n <div className=\"divide-y divide-border-secondary rounded-lg border border-border-secondary bg-background-secondary p-1\">\n <SettingRow\n label={tr(\n \"fluidgrids.settings.notifications.emailOnSuccessLabel\",\n \"On Success\",\n )}\n description={tr(\n \"fluidgrids.settings.notifications.emailOnSuccessDescription\",\n \"Send email when a workflow execution completes successfully\",\n )}\n >\n <Switch checked={settings.emailOnSuccess} disabled />\n </SettingRow>\n <SettingRow\n label={tr(\n \"fluidgrids.settings.notifications.emailOnFailureLabel\",\n \"On Failure\",\n )}\n description={tr(\n \"fluidgrids.settings.notifications.emailOnFailureDescription\",\n \"Send email when a workflow execution fails\",\n )}\n >\n <Switch checked={settings.emailOnFailure} disabled />\n </SettingRow>\n </div>\n </div>\n\n {/* Webhook Notifications */}\n <div>\n <h3 className=\"text-sm font-semibold text-text-primary flex items-center gap-2 mb-3\">\n <Icon icon=\"mdi:webhook\" width={18} />\n {tr(\n \"fluidgrids.settings.notifications.webhookSectionTitle\",\n \"Webhook Notifications\",\n )}\n </h3>\n <div className=\"divide-y divide-border-secondary rounded-lg border border-border-secondary bg-background-secondary p-1\">\n <SettingRow\n label={tr(\n \"fluidgrids.settings.notifications.webhookOnSuccessLabel\",\n \"On Success\",\n )}\n description={tr(\n \"fluidgrids.settings.notifications.webhookOnSuccessDescription\",\n \"Send webhook when a workflow execution completes successfully\",\n )}\n >\n <Switch checked={settings.webhookOnSuccess} disabled />\n </SettingRow>\n <SettingRow\n label={tr(\n \"fluidgrids.settings.notifications.webhookOnFailureLabel\",\n \"On Failure\",\n )}\n description={tr(\n \"fluidgrids.settings.notifications.webhookOnFailureDescription\",\n \"Send webhook when a workflow execution fails\",\n )}\n >\n <Switch checked={settings.webhookOnFailure} disabled />\n </SettingRow>\n </div>\n </div>\n </div>\n );\n}\n\nfunction ApiTab() {\n const tr = useTr();\n const settings = DEFAULT_SETTINGS.api;\n\n return (\n <div>\n <div className=\"space-y-4\">\n {/* API Gateway URL */}\n <Card className=\"border border-border-secondary bg-background-secondary\">\n <CardHeader className=\"pb-3\">\n <div className=\"flex items-center gap-2 mb-2\">\n <Icon icon=\"mdi:api\" width={20} className=\"text-text-secondary\" />\n <h3 className=\"text-sm font-semibold text-text-primary\">\n {tr(\n \"fluidgrids.settings.api.gatewayUrlTitle\",\n \"API Gateway URL\",\n )}\n </h3>\n </div>\n <p className=\"text-xs text-text-secondary mb-3\">\n {tr(\n \"fluidgrids.settings.api.gatewayUrlDescription\",\n \"Base URL for workflow API operations. Use this to trigger, list, and manage workflows programmatically.\",\n )}\n </p>\n <div className=\"flex items-center gap-2 rounded-lg bg-background-tertiary px-3 py-2 border border-border-secondary\">\n <code className=\"text-sm text-text-primary flex-1 truncate\">\n {settings.gatewayUrl}\n </code>\n <CopyButton\n value={settings.gatewayUrl}\n label={tr(\n \"fluidgrids.settings.api.gatewayUrlCopyLabel\",\n \"API Gateway URL\",\n )}\n />\n </div>\n </CardHeader>\n </Card>\n\n {/* Webhook URL */}\n <Card className=\"border border-border-secondary bg-background-secondary\">\n <CardHeader className=\"pb-3\">\n <div className=\"flex items-center gap-2 mb-2\">\n <Icon\n icon=\"mdi:webhook\"\n width={20}\n className=\"text-text-secondary\"\n />\n <h3 className=\"text-sm font-semibold text-text-primary\">\n {tr(\n \"fluidgrids.settings.api.webhookUrlTitle\",\n \"Webhook URL Format\",\n )}\n </h3>\n </div>\n <p className=\"text-xs text-text-secondary mb-3\">\n {tr(\n \"fluidgrids.settings.api.webhookUrlDescriptionPrefix\",\n \"URL format for triggering workflows via webhook. Replace\",\n )}{\" \"}\n <code className=\"text-text-primary\">{\"{workflowKey}\"}</code>{\" \"}\n {tr(\n \"fluidgrids.settings.api.webhookUrlDescriptionSuffix\",\n \"with the actual workflow key.\",\n )}\n </p>\n <div className=\"flex items-center gap-2 rounded-lg bg-background-tertiary px-3 py-2 border border-border-secondary\">\n <code className=\"text-sm text-text-primary flex-1 truncate\">\n {settings.webhookUrlFormat}\n </code>\n <CopyButton\n value={settings.webhookUrlFormat}\n label={tr(\n \"fluidgrids.settings.api.webhookUrlCopyLabel\",\n \"Webhook URL\",\n )}\n />\n </div>\n </CardHeader>\n </Card>\n\n {/* Example cURL */}\n <Card className=\"border border-border-secondary bg-background-secondary\">\n <CardHeader className=\"pb-3\">\n <div className=\"flex items-center gap-2 mb-2\">\n <Icon\n icon=\"mdi:console\"\n width={20}\n className=\"text-text-secondary\"\n />\n <h3 className=\"text-sm font-semibold text-text-primary\">\n {tr(\n \"fluidgrids.settings.api.curlExampleTitle\",\n \"Example: Trigger via cURL\",\n )}\n </h3>\n </div>\n <div className=\"relative rounded-lg bg-background-tertiary px-3 py-2 border border-border-secondary\">\n <pre className=\"text-xs text-text-primary overflow-x-auto whitespace-pre-wrap\">\n {`curl -X POST \"${settings.webhookUrlFormat}\" \\\\\n -H \"Content-Type: application/json\" \\\\\n -H \"Authorization: Bearer <token>\" \\\\\n -d '{\"input\": {}}'`}\n </pre>\n <div className=\"absolute top-2 right-2\">\n <CopyButton\n value={`curl -X POST \"${settings.webhookUrlFormat}\" \\\\\\n -H \"Content-Type: application/json\" \\\\\\n -H \"Authorization: Bearer <token>\" \\\\\\n -d '{\"input\": {}}'`}\n label={tr(\n \"fluidgrids.settings.api.curlCopyLabel\",\n \"cURL command\",\n )}\n />\n </div>\n </div>\n </CardHeader>\n </Card>\n </div>\n </div>\n );\n}\n\n// ============================================================================\n// Main Component\n// ============================================================================\n\nexport interface SettingsPageProps {\n /**\n * Explicit workflow key to scope the Execution tab to (BOFF-7512). When\n * omitted, falls back to the `:id`/`:workflowKey` route param (for hosts\n * that mount this page under a per-workflow path), then to the workflow\n * currently loaded in the builder's flow store (for hosts that navigate\n * here from the builder without a route param). If none resolve, the\n * Execution tab falls back to its previous static display.\n */\n workflowKey?: string;\n}\n\nexport function SettingsPage({\n workflowKey: workflowKeyProp,\n}: SettingsPageProps = {}) {\n const tr = useTr();\n const navigate = useNavigate();\n const routeParams = useParams<{ id?: string; workflowKey?: string }>();\n const activeWorkflowKey = useFlowStore((s) => s.workflow.workflowKey);\n const workflowKey =\n workflowKeyProp ||\n routeParams.workflowKey ||\n routeParams.id ||\n activeWorkflowKey ||\n undefined;\n const [activeTab, setActiveTab] = useState(\"general\");\n\n return (\n <div className=\"p-4 sm:p-6 bg-background-primary min-h-screen\">\n {/* Header */}\n <div className=\"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-6\">\n <div>\n <h1 className=\"text-2xl sm:text-3xl font-bold text-text-primary\">\n {tr(\"fluidgrids.settings.page.title\", \"Settings\")}\n </h1>\n <p className=\"text-text-secondary mt-1\">\n {tr(\n \"fluidgrids.settings.page.subtitle\",\n \"Configure workflow execution and notification preferences\",\n )}\n </p>\n </div>\n <Button variant=\"outline\" onClick={() => navigate(\"../list\")}>\n <Icon icon=\"mdi:arrow-left\" className=\"mr-2\" width={16} />\n {tr(\"fluidgrids.settings.page.backToWorkflows\", \"Back to Workflows\")}\n </Button>\n </div>\n\n {/* Tabs */}\n <Tabs value={activeTab} onValueChange={setActiveTab} className=\"w-full\">\n <TabsList className=\"bg-background-secondary border border-border-secondary mb-6\">\n <TabsTrigger value=\"general\" className=\"gap-1.5\">\n <Icon icon=\"mdi:cog\" width={16} />\n {tr(\"fluidgrids.settings.page.generalTab\", \"General\")}\n </TabsTrigger>\n <TabsTrigger value=\"execution\" className=\"gap-1.5\">\n <Icon icon=\"mdi:play-circle\" width={16} />\n {tr(\"fluidgrids.settings.page.executionTab\", \"Execution\")}\n </TabsTrigger>\n <TabsTrigger value=\"notifications\" className=\"gap-1.5\">\n <Icon icon=\"mdi:bell-outline\" width={16} />\n {tr(\"fluidgrids.settings.page.notificationsTab\", \"Notifications\")}\n </TabsTrigger>\n <TabsTrigger value=\"api\" className=\"gap-1.5\">\n <Icon icon=\"mdi:api\" width={16} />\n {tr(\"fluidgrids.settings.page.apiTab\", \"API\")}\n </TabsTrigger>\n </TabsList>\n\n <TabsContent value=\"general\">\n <GeneralTab />\n </TabsContent>\n <TabsContent value=\"execution\">\n <ExecutionTab workflowKey={workflowKey} />\n </TabsContent>\n <TabsContent value=\"notifications\">\n <NotificationsTab />\n </TabsContent>\n <TabsContent value=\"api\">\n <ApiTab />\n </TabsContent>\n </Tabs>\n </div>\n );\n}\n"]}