@localstack/appinspector-ui 1.0.215 → 1.0.216

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/index.js CHANGED
@@ -2537,7 +2537,6 @@ var WATERFALL_ROW_TOGGLE_TEST_ID = "waterfall-row-toggle";
2537
2537
  var DETAIL_TAB_DETAILS_TEST_ID = "detail-tab-details";
2538
2538
  var DETAIL_TAB_REQUEST_TEST_ID = "detail-tab-request";
2539
2539
  var DETAIL_TAB_RESPONSE_TEST_ID = "detail-tab-response";
2540
- var DETAIL_TAB_ERROR_TEST_ID = "detail-tab-error";
2541
2540
  var DETAIL_TAB_PERMISSIONS_TEST_ID = "detail-tab-permissions";
2542
2541
  var DETAIL_TAB_LOGS_TEST_ID = "detail-tab-logs";
2543
2542
  var DETAIL_TAB_ADVANCED_TEST_ID = "detail-tab-advanced";
@@ -15646,7 +15645,9 @@ var OperationIdentity = memo7(({
15646
15645
  service,
15647
15646
  sx,
15648
15647
  tailTestId,
15649
- testId
15648
+ testId,
15649
+ trailing,
15650
+ trailingRow = "title"
15650
15651
  }) => {
15651
15652
  const resource = shortResourceName(resourceName, arn);
15652
15653
  const hasResource = resource !== "" && resource !== "*";
@@ -15654,20 +15655,26 @@ var OperationIdentity = memo7(({
15654
15655
  const stackedIconSize = typeof iconSize === "number" ? iconSize : 32;
15655
15656
  if (density === "heading") {
15656
15657
  const isText = typeof children === "string";
15658
+ const trailingNode = (row) => trailing !== void 0 && trailingRow === row ? /* @__PURE__ */ jsx126(Box3, { sx: { alignSelf: "center", flex: "none", ml: "auto", pl: 1 }, children: trailing }) : void 0;
15657
15659
  return /* @__PURE__ */ jsxs120(Box3, { "data-testid": testId, sx: { minWidth: 0, ...sx }, children: [
15658
- label !== void 0 && /* @__PURE__ */ jsx126(Typography3, { color: "text.secondary", component: "div", sx: { fontSize: 11, fontWeight: 500, letterSpacing: "0.06em", lineHeight: "16px", textTransform: "uppercase" }, children: label }),
15660
+ label !== void 0 && /* @__PURE__ */ jsxs120(Box3, { sx: { alignItems: "center", display: "flex", minWidth: 0 }, children: [
15661
+ /* @__PURE__ */ jsx126(Typography3, { color: "text.secondary", component: "div", sx: { fontSize: 11, fontWeight: 500, letterSpacing: "0.06em", lineHeight: "16px", textTransform: "uppercase" }, children: label }),
15662
+ trailingNode("label")
15663
+ ] }),
15659
15664
  /* @__PURE__ */ jsxs120(Box3, { sx: { alignItems: "center", columnGap: "10px", display: "flex", minWidth: 0 }, children: [
15660
15665
  /* @__PURE__ */ jsx126(Box3, { sx: { borderRadius: "6px", flex: "none", lineHeight: 0, overflow: "hidden" }, children: /* @__PURE__ */ jsx126(AwsServiceIcon, { hideTooltip: true, service, size: "large" }) }),
15661
15666
  /* @__PURE__ */ jsxs120(Stack, { sx: { flex: 1, minWidth: 0 }, children: [
15662
15667
  /* @__PURE__ */ jsxs120(Box3, { sx: { alignItems: "baseline", columnGap: "6px", display: "flex", fontSize: 15, lineHeight: "20px", minWidth: 0 }, children: [
15663
15668
  /* @__PURE__ */ jsx126(Typography3, { component: "span", noWrap: true, sx: { flex: "0 100 auto", fontWeight: 700, minWidth: "3ch" }, title: getServiceDisplayName(service), variant: "inherit", children: getServiceDisplayName(service) }),
15664
- hasOperation && /* @__PURE__ */ jsx126(Typography3, { component: "span", "data-testid": SERVICE_NODE_OPERATION_NAME_TEST_ID, noWrap: true, sx: { flex: "0 1 auto", minWidth: 0 }, variant: "inherit", children: operation2 })
15669
+ hasOperation && /* @__PURE__ */ jsx126(Typography3, { component: "span", "data-testid": SERVICE_NODE_OPERATION_NAME_TEST_ID, noWrap: true, sx: { flex: "0 1 auto", minWidth: 0 }, variant: "inherit", children: operation2 }),
15670
+ trailingNode("title")
15665
15671
  ] }),
15666
- (hasResource || resourcePlaceholder !== void 0 || children !== void 0) && /* @__PURE__ */ jsxs120(Box3, { sx: { alignItems: "center", color: "text.secondary", columnGap: "6px", display: "flex", flexWrap: isText ? "nowrap" : "wrap", fontSize: 12, lineHeight: "18px", minWidth: 0, rowGap: "4px" }, children: [
15672
+ (hasResource || resourcePlaceholder !== void 0 || children !== void 0 || trailingRow === "resource") && /* @__PURE__ */ jsxs120(Box3, { sx: { alignItems: "center", color: "text.secondary", columnGap: "6px", display: "flex", flexWrap: isText ? "nowrap" : "wrap", fontSize: 12, lineHeight: "18px", minWidth: 0, rowGap: "4px" }, children: [
15667
15673
  hasResource && /* @__PURE__ */ jsx126(Typography3, { component: "span", "data-testid": SERVICE_NODE_SERVICE_NAME_TEST_ID, noWrap: true, sx: { ...RESOURCE_CODE_SX, flex: "0 3 auto", minWidth: "3ch" }, title: resourceName || arn, variant: "inherit", children: resource }),
15668
15674
  !hasResource && resourcePlaceholder !== void 0 && /* @__PURE__ */ jsx126(Box3, { component: "span", sx: { color: "text.disabled", flex: "none" }, children: resourcePlaceholder }),
15669
15675
  (hasResource || resourcePlaceholder !== void 0) && isText && /* @__PURE__ */ jsx126(Box3, { "aria-hidden": true, component: "span", sx: { color: "text.disabled", flex: "none" }, children: "\xB7" }),
15670
- isText ? /* @__PURE__ */ jsx126(Typography3, { component: "span", "data-testid": tailTestId, noWrap: true, sx: { flex: "1 1 0", minWidth: 0 }, title: children, variant: "inherit", children }) : children
15676
+ isText ? /* @__PURE__ */ jsx126(Typography3, { component: "span", "data-testid": tailTestId, noWrap: true, sx: { flex: "1 1 0", minWidth: 0 }, title: children, variant: "inherit", children }) : children,
15677
+ trailingNode("resource")
15671
15678
  ] })
15672
15679
  ] })
15673
15680
  ] })
@@ -16980,6 +16987,12 @@ import { Cancel as Cancel5, Close as Close3, GppBad as GppBad2, GppMaybe as GppM
16980
16987
  import { Alert as Alert4, Box as Box18, FormControlLabel, IconButton as IconButton6, Stack as Stack4, Switch, Tab, Tabs, Typography as Typography13 } from "@mui/material";
16981
16988
  import { useEffect as useEffect17, useMemo as useMemo10, useRef as useRef13, useState as useState14 } from "react";
16982
16989
 
16990
+ // src/dev-settings.tsx
16991
+ import * as React122 from "react";
16992
+ var DEFAULT_DEV_SETTINGS = { allowedPillWhenSucceeded: "hide", headingPills: "resource-line", succeededIconColor: "green", waterfallLayout: "tree" };
16993
+ var DevSettingsContext = React122.createContext(DEFAULT_DEV_SETTINGS);
16994
+ var useDevSettings = () => React122.useContext(DevSettingsContext);
16995
+
16983
16996
  // src/utils/event-utils.ts
16984
16997
  var iamEventParser = (eventName, attributes) => {
16985
16998
  if (attributes?.payload && typeof attributes.payload === "string") {
@@ -17316,7 +17329,7 @@ import { Box as Box14, useTheme as useTheme3 } from "@mui/material";
17316
17329
  var import_copy_to_clipboard = __toESM(require_copy_to_clipboard(), 1);
17317
17330
  import { jsx as jsx137, jsxs as jsxs128, Fragment as Fragment8 } from "react/jsx-runtime";
17318
17331
  import { Box as Box13, InputBase, NoSsr, SvgIcon, createTheme, ThemeProvider, Paper } from "@mui/material";
17319
- import { createContext as createContext8, useContext as useContext14, useState as useState10, useRef as useRef8, useCallback as useCallback4, useMemo as useMemo6, useEffect as useEffect12, memo as memo10 } from "react";
17332
+ import { createContext as createContext9, useContext as useContext15, useState as useState10, useRef as useRef8, useCallback as useCallback4, useMemo as useMemo6, useEffect as useEffect12, memo as memo10 } from "react";
17320
17333
  import { create, useStore, createStore } from "zustand";
17321
17334
  function r(e2) {
17322
17335
  var t, f2, n = "";
@@ -17432,10 +17445,10 @@ var createJsonViewerStore = (props) => {
17432
17445
  };
17433
17446
  });
17434
17447
  };
17435
- var JsonViewerStoreContext = createContext8(void 0);
17448
+ var JsonViewerStoreContext = createContext9(void 0);
17436
17449
  JsonViewerStoreContext.Provider;
17437
17450
  var useJsonViewerStore = (selector2, equalityFn) => {
17438
- const store = useContext14(JsonViewerStoreContext);
17451
+ const store = useContext15(JsonViewerStoreContext);
17439
17452
  return useStore(store, selector2, equalityFn);
17440
17453
  };
17441
17454
  var useTextColor = () => {
@@ -18473,10 +18486,10 @@ var createTypeRegistryStore = () => {
18473
18486
  }
18474
18487
  }));
18475
18488
  };
18476
- var TypeRegistryStoreContext = /* @__PURE__ */ createContext8(void 0);
18489
+ var TypeRegistryStoreContext = /* @__PURE__ */ createContext9(void 0);
18477
18490
  TypeRegistryStoreContext.Provider;
18478
18491
  var useTypeRegistryStore = (selector2, equalityFn) => {
18479
- const store = useContext14(TypeRegistryStoreContext);
18492
+ const store = useContext15(TypeRegistryStoreContext);
18480
18493
  return useStore(store, selector2, equalityFn);
18481
18494
  };
18482
18495
  function matchTypeComponents(value, path, registry) {
@@ -18944,7 +18957,7 @@ function useThemeDetector() {
18944
18957
  return isDark;
18945
18958
  }
18946
18959
  function useSetIfNotUndefinedEffect(key, value) {
18947
- const { setState } = useContext14(JsonViewerStoreContext);
18960
+ const { setState } = useContext15(JsonViewerStoreContext);
18948
18961
  useEffect12(() => {
18949
18962
  if (value !== void 0) {
18950
18963
  setState({
@@ -18958,7 +18971,7 @@ function useSetIfNotUndefinedEffect(key, value) {
18958
18971
  ]);
18959
18972
  }
18960
18973
  var JsonViewerInner = (props) => {
18961
- const { setState } = useContext14(JsonViewerStoreContext);
18974
+ const { setState } = useContext15(JsonViewerStoreContext);
18962
18975
  useEffect12(() => {
18963
18976
  setState((state) => ({
18964
18977
  prevValue: state.value,
@@ -29210,7 +29223,7 @@ import { Box as Box16, CircularProgress as CircularProgress3, Stack as Stack3, T
29210
29223
  import { useEffect as useEffect16, useMemo as useMemo9, useRef as useRef12, useState as useState13 } from "react";
29211
29224
 
29212
29225
  // src/context.tsx
29213
- import { createContext as createContext10, useContext as useContext16 } from "react";
29226
+ import { createContext as createContext11, useContext as useContext17 } from "react";
29214
29227
  import { useCallback as useCallback6, useMemo as useMemo8 } from "react";
29215
29228
 
29216
29229
  // src/api/client.ts
@@ -29495,7 +29508,7 @@ var createApiClient = ({ localstackEndpoint }) => {
29495
29508
  };
29496
29509
 
29497
29510
  // src/hooks/status-provider.tsx
29498
- import { createContext as createContext9, useContext as useContext15 } from "react";
29511
+ import { createContext as createContext10, useContext as useContext16 } from "react";
29499
29512
 
29500
29513
  // src/hooks/use-connection-state-machine.ts
29501
29514
  import { useCallback as useCallback5, useEffect as useEffect14, useRef as useRef10, useState as useState12 } from "react";
@@ -29581,13 +29594,13 @@ function useConnectionStateMachine() {
29581
29594
 
29582
29595
  // src/hooks/status-provider.tsx
29583
29596
  import { jsx as jsx140 } from "react/jsx-runtime";
29584
- var AppInspectorStatusContext = createContext9(void 0);
29597
+ var AppInspectorStatusContext = createContext10(void 0);
29585
29598
  var StatusProvider = ({ children }) => {
29586
29599
  const value = useConnectionStateMachine();
29587
29600
  return /* @__PURE__ */ jsx140(AppInspectorStatusContext.Provider, { value, children });
29588
29601
  };
29589
29602
  var useAppInspectorStatus = () => {
29590
- const value = useContext15(AppInspectorStatusContext);
29603
+ const value = useContext16(AppInspectorStatusContext);
29591
29604
  if (!value) {
29592
29605
  throw new Error("@localstack-studio/ui: useAppInspectorStatus must be used within a <StatusProvider> (rendered internally by <AppInspectorContextProvider>)");
29593
29606
  }
@@ -31523,9 +31536,9 @@ var AppInspectorTheme = ({ children }) => /* @__PURE__ */ jsx141(ThemeProvider2,
31523
31536
 
31524
31537
  // src/context.tsx
31525
31538
  import { Fragment as Fragment10, jsx as jsx142 } from "react/jsx-runtime";
31526
- var AppInspectorContext = createContext10(void 0);
31539
+ var AppInspectorContext = createContext11(void 0);
31527
31540
  var useAppInspector = () => {
31528
- const context = useContext16(AppInspectorContext);
31541
+ const context = useContext17(AppInspectorContext);
31529
31542
  if (!context) {
31530
31543
  throw new Error("@localstack-studio/ui: components must be used within a <AppInspectorContextProvider>");
31531
31544
  }
@@ -31677,7 +31690,7 @@ var LambdaInvokeLogsSection = ({ endTimeNano, functionName: functionName2, regio
31677
31690
 
31678
31691
  // src/components/event-details/operation-status-badges.tsx
31679
31692
  import { Cancel as Cancel4, CheckCircle as CheckCircle3, GppBad, GppGood, GppMaybe as GppMaybe5, HelpOutline } from "@mui/icons-material";
31680
- import { alpha as alpha5, Box as Box17, ButtonBase, darken, lighten, Typography as Typography12 } from "@mui/material";
31693
+ import { alpha as alpha5, Box as Box17, darken, lighten, Typography as Typography12 } from "@mui/material";
31681
31694
  import { jsx as jsx144, jsxs as jsxs131 } from "react/jsx-runtime";
31682
31695
  var IAM = {
31683
31696
  allowed: { color: "success", icon: GppGood, label: "IAM allowed", title: "IAM allowed the call" },
@@ -31698,17 +31711,14 @@ var tint = (color2) => ({
31698
31711
  px: 0.75,
31699
31712
  py: 0.25
31700
31713
  });
31701
- var clickable = (onClick) => onClick === void 0 ? {} : {
31702
- component: ButtonBase,
31703
- onClick,
31704
- sx: { "&:hover": { filter: "brightness(1.15)" }, "borderRadius": 1, "cursor": "pointer", "font": "inherit" }
31705
- };
31706
- var OperationStatusBadges = ({ iam, iamPermission, onIamClick, onStatusClick, status, statusLabel }) => {
31714
+ var OperationStatusBadges = ({ iam, iamPermission, status, statusLabel }) => {
31715
+ const { allowedPillWhenSucceeded, succeededIconColor } = useDevSettings();
31707
31716
  const isError = status === "error";
31708
31717
  const statusText = isError ? statusLabel ?? "Error" : "OK";
31709
31718
  const StatusIcon2 = isError ? Cancel4 : CheckCircle3;
31710
31719
  const statusColor = isError ? "error" : "success";
31711
- const iamStyle = iam === void 0 ? void 0 : IAM[iam];
31720
+ const hideAllowed = iam === "allowed" && status === "ok" && allowedPillWhenSucceeded === "hide";
31721
+ const iamStyle = iam === void 0 || hideAllowed ? void 0 : IAM[iam];
31712
31722
  const iamLabel = iamPermission === void 0 || iam === "suppressed" ? iamStyle?.label : sentenceCase(formatPermissionStatus(iamPermission));
31713
31723
  const showStatus = status !== "unset";
31714
31724
  if (!showStatus && !iamStyle) {
@@ -31719,10 +31729,9 @@ var OperationStatusBadges = ({ iam, iamPermission, onIamClick, onStatusClick, st
31719
31729
  Box17,
31720
31730
  {
31721
31731
  "data-testid": EVENT_DETAILS_HEADING_STATUS_TEST_ID,
31722
- ...clickable(onStatusClick),
31723
- sx: { alignItems: "center", display: "flex", gap: 0.5, minWidth: 0, ...clickable(onStatusClick).sx, ...tint(statusColor) },
31732
+ sx: { alignItems: "center", display: "flex", gap: 0.5, minWidth: 0, ...tint(statusColor) },
31724
31733
  children: [
31725
- /* @__PURE__ */ jsx144(StatusIcon2, { sx: { color: `${statusColor}.main`, fontSize: 14 } }),
31734
+ /* @__PURE__ */ jsx144(StatusIcon2, { sx: { color: !isError && succeededIconColor === "gray" ? "text.disabled" : `${statusColor}.main`, fontSize: 14 } }),
31726
31735
  /* @__PURE__ */ jsx144(Typography12, { color: "inherit", noWrap: true, variant: "caption", children: isError ? `Failed \xB7 ${statusText}` : "Succeeded" })
31727
31736
  ]
31728
31737
  }
@@ -31731,8 +31740,7 @@ var OperationStatusBadges = ({ iam, iamPermission, onIamClick, onStatusClick, st
31731
31740
  Box17,
31732
31741
  {
31733
31742
  "data-testid": EVENT_DETAILS_HEADING_IAM_TEST_ID,
31734
- ...clickable(onIamClick),
31735
- sx: { alignItems: "center", display: "flex", flex: "none", gap: 0.5, ...clickable(onIamClick).sx, ...tint(iamStyle.color) },
31743
+ sx: { alignItems: "center", display: "flex", flex: "none", gap: 0.5, ...tint(iamStyle.color) },
31736
31744
  children: [
31737
31745
  /* @__PURE__ */ jsx144(iamStyle.icon, { sx: { color: paletteColor(iamStyle.color), fontSize: 14 } }),
31738
31746
  /* @__PURE__ */ jsx144(Typography12, { color: "inherit", variant: "caption", children: iamLabel })
@@ -31759,12 +31767,14 @@ var checkIsSqsSendMessage = (span) => {
31759
31767
  };
31760
31768
  var PERMISSION_SEVERITY = ["explicitly_denied", "implicitly_denied", "explicitly_allowed"];
31761
31769
  var getWorstPermission = (events) => PERMISSION_SEVERITY.find((permission) => events.some((event) => event.permission === permission));
31770
+ var TRAILING_ROW = { "bottom-right": "resource", "resource-line": "title", "title-row": "title", "top-right": "label" };
31762
31771
  var IAM_OUTCOME = { allowed: "allowed", error: "denied", none: void 0, warning: "warning" };
31763
- var OPTIONAL_TABS = ["error", "logs", "permissions"];
31772
+ var OPTIONAL_TABS = ["logs", "permissions", "response"];
31764
31773
  var getOptionalTabs = (span, eventGroups) => ({
31765
- error: getSpanIssues(span).error,
31766
31774
  logs: checkIsLambdaInvoke(span) && typeof span.attributes?.["localstack.request_id"] === "string",
31767
- permissions: span.iam_errors_suppressed === true || eventGroups.permissions !== void 0
31775
+ permissions: span.iam_errors_suppressed === true || eventGroups.permissions !== void 0,
31776
+ // A failed call has no response; its error is at the top of Details.
31777
+ response: span.attributes?.["localstack.aws.service.response_suppressed"] === true || tryParseJson(span.attributes?.["localstack.aws.service.response"]) !== void 0
31768
31778
  });
31769
31779
  var Field = ({ children, copy, label, testId, testIdOn = "value" }) => /* @__PURE__ */ jsxs132(Box18, { children: [
31770
31780
  /* @__PURE__ */ jsx145(Typography13, { sx: { fontWeight: 600 }, variant: "caption", children: label }),
@@ -31779,6 +31789,7 @@ var EventDetails = ({ onClose, onOperationShown, selectedEvent }) => {
31779
31789
  () => getEventGroupsByType(selectedEvent?.events ?? []),
31780
31790
  [selectedEvent?.events]
31781
31791
  );
31792
+ const { headingPills } = useDevSettings();
31782
31793
  const [parseNestedJson, setParseNestedJson] = useState14(true);
31783
31794
  const [tab, setTab] = useState14("details");
31784
31795
  const optionalTabs = selectedEvent ? getOptionalTabs(selectedEvent, eventGroups) : void 0;
@@ -31823,7 +31834,8 @@ var EventDetails = ({ onClose, onOperationShown, selectedEvent }) => {
31823
31834
  const functionError = isLambdaInvoke ? getLambdaFunctionError(selectedEvent.attributes?.["localstack.aws.service.response"]) : void 0;
31824
31835
  const errorType = functionError?.errorType ?? issues.errorType;
31825
31836
  const duration = selectedEvent.end_time_unix_nano ? ((BigInt(selectedEvent.end_time_unix_nano) - BigInt(selectedEvent.start_time_unix_nano)) / BigInt("1000000")).toString() : void 0;
31826
- const { error: showError, logs: showLogs, permissions: showPermissions } = getOptionalTabs(selectedEvent, eventGroups);
31837
+ const showError = issues.error;
31838
+ const { logs: showLogs, permissions: showPermissions, response: showResponse } = getOptionalTabs(selectedEvent, eventGroups);
31827
31839
  const errorMessages = functionError?.errorMessage === void 0 ? [.../* @__PURE__ */ new Set([selectedEvent.status_message, ...(selectedEvent.errors ?? []).filter((item) => item.level === "error").map((item) => item.message)])].filter((message) => Boolean(message) && message !== errorType) : [functionError.errorMessage];
31828
31840
  const iamEvents = getIamEvents(selectedEvent);
31829
31841
  const iamPermission = getWorstPermission(iamEvents);
@@ -31833,12 +31845,6 @@ var EventDetails = ({ onClose, onOperationShown, selectedEvent }) => {
31833
31845
  {
31834
31846
  iam: iamOutcome,
31835
31847
  iamPermission,
31836
- onIamClick: showPermissions ? () => {
31837
- setTab("permissions");
31838
- } : void 0,
31839
- onStatusClick: () => {
31840
- setTab(showError ? "error" : "response");
31841
- },
31842
31848
  status: issues.error ? "error" : selectedEvent.status_code === 1 ? "ok" : "unset",
31843
31849
  statusLabel: errorType
31844
31850
  }
@@ -31871,7 +31877,7 @@ var EventDetails = ({ onClose, onOperationShown, selectedEvent }) => {
31871
31877
  py: 1.25
31872
31878
  },
31873
31879
  children: [
31874
- /* @__PURE__ */ jsx145(OperationIdentity, { ...identity, density: "heading", label: "Selected operation", sx: { flex: 1 }, testId: EVENT_DETAILS_HEADING_TEST_ID, children: statusBadges }),
31880
+ /* @__PURE__ */ jsx145(OperationIdentity, { ...identity, density: "heading", label: "Selected operation", sx: { flex: 1 }, testId: EVENT_DETAILS_HEADING_TEST_ID, trailing: headingPills === "resource-line" ? void 0 : statusBadges, trailingRow: TRAILING_ROW[headingPills], children: headingPills === "resource-line" ? statusBadges : void 0 }),
31875
31881
  onClose && /* @__PURE__ */ jsx145(IconButton6, { "data-testid": EVENT_DETAILS_CLOSE_BUTTON_TEST_ID, onClick: onClose, size: "small", children: /* @__PURE__ */ jsx145(Close3, {}) })
31876
31882
  ]
31877
31883
  }
@@ -31899,10 +31905,9 @@ var EventDetails = ({ onClose, onOperationShown, selectedEvent }) => {
31899
31905
  value: activeTab,
31900
31906
  variant: "scrollable",
31901
31907
  children: [
31902
- /* @__PURE__ */ jsx145(Tab, { "data-testid": DETAIL_TAB_DETAILS_TEST_ID, label: "Details", value: "details" }),
31908
+ /* @__PURE__ */ jsx145(Tab, { "data-testid": DETAIL_TAB_DETAILS_TEST_ID, icon: showError ? /* @__PURE__ */ jsx145(Cancel5, { color: "error", sx: { fontSize: 16 } }) : void 0, iconPosition: "end", label: "Details", value: "details" }),
31903
31909
  /* @__PURE__ */ jsx145(Tab, { "data-testid": DETAIL_TAB_REQUEST_TEST_ID, label: "Payload", value: "payload" }),
31904
- /* @__PURE__ */ jsx145(Tab, { "data-testid": DETAIL_TAB_RESPONSE_TEST_ID, label: "Response", value: "response" }),
31905
- showError && /* @__PURE__ */ jsx145(Tab, { "data-testid": DETAIL_TAB_ERROR_TEST_ID, icon: /* @__PURE__ */ jsx145(Cancel5, { color: "error", sx: { fontSize: 16 } }), iconPosition: "end", label: "Error", value: "error" }),
31910
+ showResponse && /* @__PURE__ */ jsx145(Tab, { "data-testid": DETAIL_TAB_RESPONSE_TEST_ID, label: "Response", value: "response" }),
31906
31911
  showPermissions && /* @__PURE__ */ jsx145(Tab, { "data-testid": DETAIL_TAB_PERMISSIONS_TEST_ID, icon: permissionsIcon, iconPosition: "end", label: "Permissions", value: "permissions" }),
31907
31912
  showLogs && /* @__PURE__ */ jsx145(Tab, { "data-testid": DETAIL_TAB_LOGS_TEST_ID, label: "Logs", value: "logs" }),
31908
31913
  /* @__PURE__ */ jsx145(Tab, { "data-testid": DETAIL_TAB_ADVANCED_TEST_ID, label: "Advanced", value: "advanced" })
@@ -31911,6 +31916,35 @@ var EventDetails = ({ onClose, onOperationShown, selectedEvent }) => {
31911
31916
  ),
31912
31917
  /* @__PURE__ */ jsxs132(Box18, { sx: { p: 2 }, children: [
31913
31918
  activeTab === "details" && /* @__PURE__ */ jsxs132(Stack4, { spacing: 2, children: [
31919
+ showError && /* @__PURE__ */ jsxs132(Stack4, { spacing: 2, children: [
31920
+ /* @__PURE__ */ jsxs132(Stack4, { spacing: 1, children: [
31921
+ /* @__PURE__ */ jsx145(Field, { label: "Type", children: errorType }),
31922
+ errorMessages.length > 0 && /* @__PURE__ */ jsx145(Field, { label: "Message", children: errorMessages.join(" \xB7 ") }),
31923
+ functionError && /* @__PURE__ */ jsxs132(Box18, { sx: { display: "grid", gap: 2, gridTemplateColumns: "1.3fr 1fr" }, children: [
31924
+ functionError.requestId !== void 0 && /* @__PURE__ */ jsx145(Field, { label: "Request ID", children: functionError.requestId }),
31925
+ /* @__PURE__ */ jsx145(Field, { label: "Function Error", testId: EVENT_DETAILS_FUNCTION_ERROR_TEST_ID, children: functionError.functionError })
31926
+ ] })
31927
+ ] }),
31928
+ functionError?.stackTrace !== void 0 && /* @__PURE__ */ jsxs132(Box18, { children: [
31929
+ /* @__PURE__ */ jsxs132(Stack4, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
31930
+ /* @__PURE__ */ jsx145(Typography13, { sx: { fontWeight: 600 }, variant: "caption", children: "Stack Trace" }),
31931
+ /* @__PURE__ */ jsx145(CopyButton, { value: functionError.stackTrace })
31932
+ ] }),
31933
+ /* @__PURE__ */ jsx145(
31934
+ Box18,
31935
+ {
31936
+ component: "pre",
31937
+ "data-testid": EVENT_DETAILS_STACK_TRACE_TEST_ID,
31938
+ sx: { backgroundColor: "background.default", borderRadius: 1, fontFamily: "monospace", fontSize: 12, m: 0, overflow: "auto", p: 1 },
31939
+ children: functionError.stackTrace
31940
+ }
31941
+ )
31942
+ ] }),
31943
+ exceptionPayload !== void 0 && /* @__PURE__ */ jsxs132(Box18, { children: [
31944
+ /* @__PURE__ */ jsx145(Typography13, { sx: { fontWeight: 600, mb: 0.5 }, variant: "caption", children: "Exception" }),
31945
+ /* @__PURE__ */ jsx145(PayloadViewer, { testId: EVENT_DETAILS_EXCEPTION_PAYLOAD_TEST_ID, value: exceptionPayload })
31946
+ ] })
31947
+ ] }),
31914
31948
  /* @__PURE__ */ jsxs132(Stack4, { "data-testid": EVENT_DETAILS_SECTION_BASIC_INFORMATION_TEST_ID, spacing: 1, children: [
31915
31949
  /* @__PURE__ */ jsxs132(Box18, { sx: { display: "grid", gap: 2, gridTemplateColumns: "1.3fr 1fr" }, children: [
31916
31950
  /* @__PURE__ */ jsx145(Field, { copy: getServiceDisplayName(selectedEvent.service_name), label: "Service", testId: EVENT_DETAILS_SERVICE_NAME_TEST_ID, children: getServiceDisplayName(selectedEvent.service_name) }),
@@ -31950,38 +31984,9 @@ var EventDetails = ({ onClose, onOperationShown, selectedEvent }) => {
31950
31984
  rawDataSwitch,
31951
31985
  /* @__PURE__ */ jsx145(PayloadViewer, { testId: EVENT_DETAILS_REQUEST_PAYLOAD, value: requestPayload })
31952
31986
  ] })),
31953
- activeTab === "response" && (responsePayload === void 0 && !isResponseSuppressed ? /* @__PURE__ */ jsx145(EmptyTab, { children: issues.error ? "No response: the call failed. See the Error tab." : "No response payload recorded." }) : /* @__PURE__ */ jsxs132(Fragment11, { children: [
31987
+ activeTab === "response" && /* @__PURE__ */ jsxs132(Fragment11, { children: [
31954
31988
  rawDataSwitch,
31955
31989
  isResponseSuppressed ? /* @__PURE__ */ jsx145(Alert4, { severity: "warning", children: "Response payload is available \u2014 upgrade your license to view" }) : /* @__PURE__ */ jsx145(PayloadViewer, { testId: EVENT_DETAILS_RESPONSE_PAYLOAD_TEST_ID, value: responsePayload })
31956
- ] })),
31957
- activeTab === "error" && /* @__PURE__ */ jsxs132(Stack4, { spacing: 2, children: [
31958
- /* @__PURE__ */ jsxs132(Stack4, { spacing: 1, children: [
31959
- /* @__PURE__ */ jsx145(Field, { label: "Type", children: errorType }),
31960
- errorMessages.length > 0 && /* @__PURE__ */ jsx145(Field, { label: "Message", children: errorMessages.join(" \xB7 ") }),
31961
- functionError && /* @__PURE__ */ jsxs132(Box18, { sx: { display: "grid", gap: 2, gridTemplateColumns: "1.3fr 1fr" }, children: [
31962
- functionError.requestId !== void 0 && /* @__PURE__ */ jsx145(Field, { label: "Request ID", children: functionError.requestId }),
31963
- /* @__PURE__ */ jsx145(Field, { label: "Function Error", testId: EVENT_DETAILS_FUNCTION_ERROR_TEST_ID, children: functionError.functionError })
31964
- ] })
31965
- ] }),
31966
- functionError?.stackTrace !== void 0 && /* @__PURE__ */ jsxs132(Box18, { children: [
31967
- /* @__PURE__ */ jsxs132(Stack4, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
31968
- /* @__PURE__ */ jsx145(Typography13, { sx: { fontWeight: 600 }, variant: "caption", children: "Stack Trace" }),
31969
- /* @__PURE__ */ jsx145(CopyButton, { value: functionError.stackTrace })
31970
- ] }),
31971
- /* @__PURE__ */ jsx145(
31972
- Box18,
31973
- {
31974
- component: "pre",
31975
- "data-testid": EVENT_DETAILS_STACK_TRACE_TEST_ID,
31976
- sx: { backgroundColor: "background.default", borderRadius: 1, fontFamily: "monospace", fontSize: 12, m: 0, overflow: "auto", p: 1 },
31977
- children: functionError.stackTrace
31978
- }
31979
- )
31980
- ] }),
31981
- exceptionPayload !== void 0 && /* @__PURE__ */ jsxs132(Box18, { children: [
31982
- /* @__PURE__ */ jsx145(Typography13, { sx: { fontWeight: 600, mb: 0.5 }, variant: "caption", children: "Exception" }),
31983
- /* @__PURE__ */ jsx145(PayloadViewer, { testId: EVENT_DETAILS_EXCEPTION_PAYLOAD_TEST_ID, value: exceptionPayload })
31984
- ] })
31985
31990
  ] }),
31986
31991
  activeTab === "permissions" && /* @__PURE__ */ jsxs132(Fragment11, { children: [
31987
31992
  selectedEvent.iam_errors_suppressed && /* @__PURE__ */ jsx145(Alert4, { "data-testid": EVENT_DETAILS_IAM_ERRORS_SUPPRESSED_TEST_ID, severity: "warning", sx: { mb: 1 }, children: "IAM errors are suppressed \u2014 upgrade your license to view" }),
@@ -32577,16 +32582,10 @@ function useLocalStorage(key, initialValue) {
32577
32582
 
32578
32583
  // src/components/trace-panel/waterfall.tsx
32579
32584
  import { AccountTreeOutlined, Cancel as Cancel7, FormatListBulleted, GppMaybe as GppMaybe8, KeyboardArrowDown as KeyboardArrowDown2, KeyboardArrowRight as KeyboardArrowRight2 } from "@mui/icons-material";
32580
- import { Box as Box21, ButtonBase as ButtonBase2, ToggleButton as ToggleButton2, ToggleButtonGroup as ToggleButtonGroup2, Typography as Typography14 } from "@mui/material";
32585
+ import { Box as Box21, ButtonBase, ToggleButton as ToggleButton2, ToggleButtonGroup as ToggleButtonGroup2, Typography as Typography14 } from "@mui/material";
32581
32586
  import { alpha as alpha6 } from "@mui/material/styles";
32582
32587
  import * as React124 from "react";
32583
32588
 
32584
- // src/dev-settings.tsx
32585
- import * as React123 from "react";
32586
- var DEFAULT_DEV_SETTINGS = { waterfallLayout: "tree" };
32587
- var DevSettingsContext = React123.createContext(DEFAULT_DEV_SETTINGS);
32588
- var useDevSettings = () => React123.useContext(DevSettingsContext);
32589
-
32590
32589
  // src/components/trace-panel/axis-ticks.ts
32591
32590
  var getAxisTicks = (durationMs, maxIntervals) => {
32592
32591
  if (durationMs <= 0 || maxIntervals < 1) return [0];
@@ -32885,7 +32884,7 @@ var Waterfall = ({ onSelectSpan, selectedSpanId, spanMatches, spans }) => {
32885
32884
  ] }),
32886
32885
  hasChildren && !isCollapsed && /* @__PURE__ */ jsx150(Line, { left: lineX(depth), top: 19 }),
32887
32886
  hasChildren ? /* @__PURE__ */ jsx150(
32888
- ButtonBase2,
32887
+ ButtonBase,
32889
32888
  {
32890
32889
  "aria-label": isCollapsed ? "Expand" : "Collapse",
32891
32890
  "data-testid": WATERFALL_ROW_TOGGLE_TEST_ID,