@burdenoff/fluidgrids-fe-sdk 2026.1021.10 → 2026.1021.11

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,4 +1,4 @@
1
- import { useDataSinks, useDataSinkData, useInsightsData, useRunReplayActions } from './chunk-5WSBID2F.js';
1
+ import { useDataSinks, useDataSinkData, useInsightsData, useRunReplayActions } from './chunk-OM5X65LG.js';
2
2
  import { useTr } from './chunk-UULVIT25.js';
3
3
  import { useState, useMemo, useEffect } from 'react';
4
4
  import { Icon } from '@iconify/react';
@@ -1,4 +1,4 @@
1
- import { LogStreamingTab } from './chunk-5WSBID2F.js';
1
+ import { useFluidGridsFlag, FLUIDGRIDS_FLAGS, LogStreamingTab } from './chunk-OM5X65LG.js';
2
2
  import { useFlowStore } from './chunk-EGYJKHAL.js';
3
3
  import { useWorkflowDefinitionQuery, useUpdateWorkflowDefinitionMutation, useWorkflowDefinitionsQuery } from './chunk-L2UWPFJM.js';
4
4
  import { useTr } from './chunk-UULVIT25.js';
@@ -633,6 +633,8 @@ function SettingsPage({
633
633
  const activeWorkflowKey = useFlowStore((s) => s.workflow.workflowKey);
634
634
  const workflowKey = workflowKeyProp || routeParams.workflowKey || routeParams.id || activeWorkflowKey || void 0;
635
635
  const [activeTab, setActiveTab] = useState("general");
636
+ const logStreamsEnabled = useFluidGridsFlag(FLUIDGRIDS_FLAGS.logStreams);
637
+ const visibleTab = !logStreamsEnabled && activeTab === "log-streaming" ? "general" : activeTab;
636
638
  return /* @__PURE__ */ jsxs("div", { className: "p-4 sm:p-6 bg-background-primary min-h-screen", children: [
637
639
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-6", children: [
638
640
  /* @__PURE__ */ jsxs("div", { children: [
@@ -647,7 +649,7 @@ function SettingsPage({
647
649
  tr("fluidgrids.settings.page.backToWorkflows", "Back to Workflows")
648
650
  ] })
649
651
  ] }),
650
- /* @__PURE__ */ jsxs(Tabs, { value: activeTab, onValueChange: setActiveTab, className: "w-full", children: [
652
+ /* @__PURE__ */ jsxs(Tabs, { value: visibleTab, onValueChange: setActiveTab, className: "w-full", children: [
651
653
  /* @__PURE__ */ jsxs(TabsList, { className: "bg-background-secondary border border-border-secondary mb-6", children: [
652
654
  /* @__PURE__ */ jsxs(TabsTrigger, { value: "general", className: "gap-1.5", children: [
653
655
  /* @__PURE__ */ jsx(Icon, { icon: "mdi:cog", width: 16 }),
@@ -661,10 +663,10 @@ function SettingsPage({
661
663
  /* @__PURE__ */ jsx(Icon, { icon: "mdi:bell-outline", width: 16 }),
662
664
  tr("fluidgrids.settings.page.notificationsTab", "Notifications")
663
665
  ] }),
664
- /* @__PURE__ */ jsxs(TabsTrigger, { value: "log-streaming", className: "gap-1.5", children: [
666
+ logStreamsEnabled ? /* @__PURE__ */ jsxs(TabsTrigger, { value: "log-streaming", className: "gap-1.5", children: [
665
667
  /* @__PURE__ */ jsx(Icon, { icon: "mdi:transit-connection-variant", width: 16 }),
666
668
  tr("fluidgrids.settings.page.logStreamingTab", "Log streaming")
667
- ] }),
669
+ ] }) : null,
668
670
  /* @__PURE__ */ jsxs(TabsTrigger, { value: "api", className: "gap-1.5", children: [
669
671
  /* @__PURE__ */ jsx(Icon, { icon: "mdi:api", width: 16 }),
670
672
  tr("fluidgrids.settings.page.apiTab", "API")
@@ -673,7 +675,7 @@ function SettingsPage({
673
675
  /* @__PURE__ */ jsx(TabsContent, { value: "general", children: /* @__PURE__ */ jsx(GeneralTab, {}) }),
674
676
  /* @__PURE__ */ jsx(TabsContent, { value: "execution", children: /* @__PURE__ */ jsx(ExecutionTab, { workflowKey }) }),
675
677
  /* @__PURE__ */ jsx(TabsContent, { value: "notifications", children: /* @__PURE__ */ jsx(NotificationsTab, {}) }),
676
- /* @__PURE__ */ jsx(TabsContent, { value: "log-streaming", children: /* @__PURE__ */ jsx(LogStreamingTab, {}) }),
678
+ logStreamsEnabled ? /* @__PURE__ */ jsx(TabsContent, { value: "log-streaming", children: /* @__PURE__ */ jsx(LogStreamingTab, {}) }) : null,
677
679
  /* @__PURE__ */ jsx(TabsContent, { value: "api", children: /* @__PURE__ */ jsx(ApiTab, {}) })
678
680
  ] })
679
681
  ] });
@@ -2,13 +2,25 @@ import { LOG_STREAM_DESTINATIONS, CREATE_LOG_STREAM_DESTINATION, UPDATE_LOG_STRE
2
2
  import { throwIfResultError, describeOperationError } from './chunk-CFCUM4CN.js';
3
3
  import { useTr } from './chunk-UULVIT25.js';
4
4
  import { getFluidGridsClient } from './chunk-NTWG3CJX.js';
5
+ import { useOptionalFeatureFlag } from '@burdenoff/fe-libs/shared/feature-flags';
5
6
  import { useCallback, useState, useMemo, useEffect } from 'react';
6
7
  import { Icon } from '@iconify/react';
7
8
  import { toast } from 'sonner';
8
9
  import { Button } from '@burdenoff/fe-libs/button';
9
- import { Card, CardHeader, CardContent, Label, Input } from '@burdenoff/fe-libs/ui';
10
- import { jsxs, jsx } from 'react/jsx-runtime';
10
+ import { Card, CardContent, CardHeader, Label, Input } from '@burdenoff/fe-libs/ui';
11
+ import { jsx, jsxs } from 'react/jsx-runtime';
11
12
 
13
+ var FLUIDGRIDS_FLAGS = {
14
+ /**
15
+ * Operational kill switch for log stream destinations (webhook, syslog,
16
+ * Sentry). Defaults on; an admin turning it off hides the Log streaming
17
+ * settings and the backend rejects destination writes with FEATURE_DISABLED.
18
+ */
19
+ logStreams: "fluidgrids.log-streams"
20
+ };
21
+ function useFluidGridsFlag(flag) {
22
+ return useOptionalFeatureFlag(flag, true);
23
+ }
12
24
  function useAsyncRefresh(fetcher, initial) {
13
25
  const [data, setData] = useState(initial);
14
26
  const [loading, setLoading] = useState(true);
@@ -306,6 +318,42 @@ function formToInput(form) {
306
318
  };
307
319
  }
308
320
  function LogStreamingTab() {
321
+ const enabled = useFluidGridsFlag(FLUIDGRIDS_FLAGS.logStreams);
322
+ if (!enabled) return /* @__PURE__ */ jsx(LogStreamingDisabledNotice, {});
323
+ return /* @__PURE__ */ jsx(LogStreamingSettings, {});
324
+ }
325
+ function LogStreamingDisabledNotice() {
326
+ const tr = useTr();
327
+ return /* @__PURE__ */ jsx(
328
+ Card,
329
+ {
330
+ className: "bg-background-secondary border-border-secondary",
331
+ "data-testid": "log-streaming-disabled",
332
+ children: /* @__PURE__ */ jsxs(CardContent, { className: "flex items-start gap-3 p-6", children: [
333
+ /* @__PURE__ */ jsx(
334
+ Icon,
335
+ {
336
+ icon: "mdi:transit-connection-variant",
337
+ width: 20,
338
+ className: "mt-0.5 shrink-0 text-text-tertiary",
339
+ "aria-hidden": "true"
340
+ }
341
+ ),
342
+ /* @__PURE__ */ jsxs("div", { children: [
343
+ /* @__PURE__ */ jsx("h2", { className: "text-base font-semibold text-text-primary", children: tr(
344
+ "fluidgrids.settings.logStreaming.disabledTitle",
345
+ "Log streaming is turned off"
346
+ ) }),
347
+ /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-text-secondary", children: tr(
348
+ "fluidgrids.settings.logStreaming.disabledBody",
349
+ "An administrator has turned off log streaming for this workspace. Run events are not forwarded to external destinations."
350
+ ) })
351
+ ] })
352
+ ] })
353
+ }
354
+ );
355
+ }
356
+ function LogStreamingSettings() {
309
357
  const tr = useTr();
310
358
  const { destinations, loading, error, refetch } = useLogStreamDestinations();
311
359
  const actions = useLogStreamDestinationActions();
@@ -724,4 +772,4 @@ function LogStreamingTab() {
724
772
  ] });
725
773
  }
726
774
 
727
- export { LogStreamingTab, useDataSinkData, useDataSinks, useInsightsData, useLogStreamDestinationActions, useLogStreamDestinations, useRunReplayActions };
775
+ export { FLUIDGRIDS_FLAGS, LogStreamingTab, useDataSinkData, useDataSinks, useFluidGridsFlag, useInsightsData, useLogStreamDestinationActions, useLogStreamDestinations, useRunReplayActions };