@localstack/appinspector-ui 1.0.214 → 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.cjs CHANGED
@@ -2541,7 +2541,6 @@ var WATERFALL_ROW_TOGGLE_TEST_ID = "waterfall-row-toggle";
2541
2541
  var DETAIL_TAB_DETAILS_TEST_ID = "detail-tab-details";
2542
2542
  var DETAIL_TAB_REQUEST_TEST_ID = "detail-tab-request";
2543
2543
  var DETAIL_TAB_RESPONSE_TEST_ID = "detail-tab-response";
2544
- var DETAIL_TAB_ERROR_TEST_ID = "detail-tab-error";
2545
2544
  var DETAIL_TAB_PERMISSIONS_TEST_ID = "detail-tab-permissions";
2546
2545
  var DETAIL_TAB_LOGS_TEST_ID = "detail-tab-logs";
2547
2546
  var DETAIL_TAB_ADVANCED_TEST_ID = "detail-tab-advanced";
@@ -15619,6 +15618,7 @@ var AwsServiceIcon = (0, import_react35.memo)(({ hideTooltip, service, size = "m
15619
15618
 
15620
15619
  // src/components/operation-identity/operation-identity.tsx
15621
15620
  var import_jsx_runtime126 = require("react/jsx-runtime");
15621
+ var RESOURCE_CODE_SX = { backgroundColor: "action.hover", borderRadius: "4px", fontFamily: "monospace", px: "4px" };
15622
15622
  var OperationIdentity = (0, import_react36.memo)(({
15623
15623
  arn = "",
15624
15624
  children,
@@ -15632,7 +15632,9 @@ var OperationIdentity = (0, import_react36.memo)(({
15632
15632
  service,
15633
15633
  sx,
15634
15634
  tailTestId,
15635
- testId
15635
+ testId,
15636
+ trailing,
15637
+ trailingRow = "title"
15636
15638
  }) => {
15637
15639
  const resource = shortResourceName(resourceName, arn);
15638
15640
  const hasResource = resource !== "" && resource !== "*";
@@ -15640,20 +15642,26 @@ var OperationIdentity = (0, import_react36.memo)(({
15640
15642
  const stackedIconSize = typeof iconSize === "number" ? iconSize : 32;
15641
15643
  if (density === "heading") {
15642
15644
  const isText = typeof children === "string";
15645
+ const trailingNode = (row) => trailing !== void 0 && trailingRow === row ? /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Box, { sx: { alignSelf: "center", flex: "none", ml: "auto", pl: 1 }, children: trailing }) : void 0;
15643
15646
  return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_material5.Box, { "data-testid": testId, sx: { minWidth: 0, ...sx }, children: [
15644
- label !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Typography, { color: "text.secondary", component: "div", sx: { fontSize: 11, fontWeight: 500, letterSpacing: "0.06em", lineHeight: "16px", textTransform: "uppercase" }, children: label }),
15647
+ label !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_material5.Box, { sx: { alignItems: "center", display: "flex", minWidth: 0 }, children: [
15648
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Typography, { color: "text.secondary", component: "div", sx: { fontSize: 11, fontWeight: 500, letterSpacing: "0.06em", lineHeight: "16px", textTransform: "uppercase" }, children: label }),
15649
+ trailingNode("label")
15650
+ ] }),
15645
15651
  /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_material5.Box, { sx: { alignItems: "center", columnGap: "10px", display: "flex", minWidth: 0 }, children: [
15646
15652
  /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Box, { sx: { borderRadius: "6px", flex: "none", lineHeight: 0, overflow: "hidden" }, children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(AwsServiceIcon, { hideTooltip: true, service, size: "large" }) }),
15647
15653
  /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_material5.Stack, { sx: { flex: 1, minWidth: 0 }, children: [
15648
15654
  /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_material5.Box, { sx: { alignItems: "baseline", columnGap: "6px", display: "flex", fontSize: 15, lineHeight: "20px", minWidth: 0 }, children: [
15649
15655
  /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Typography, { component: "span", noWrap: true, sx: { flex: "0 100 auto", fontWeight: 700, minWidth: "3ch" }, title: getServiceDisplayName(service), variant: "inherit", children: getServiceDisplayName(service) }),
15650
- hasOperation && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Typography, { component: "span", "data-testid": SERVICE_NODE_OPERATION_NAME_TEST_ID, noWrap: true, sx: { flex: "0 1 auto", minWidth: 0 }, variant: "inherit", children: operation2 })
15656
+ hasOperation && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Typography, { component: "span", "data-testid": SERVICE_NODE_OPERATION_NAME_TEST_ID, noWrap: true, sx: { flex: "0 1 auto", minWidth: 0 }, variant: "inherit", children: operation2 }),
15657
+ trailingNode("title")
15651
15658
  ] }),
15652
- (hasResource || resourcePlaceholder !== void 0 || children !== void 0) && /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_material5.Box, { sx: { alignItems: "center", color: "text.secondary", columnGap: "6px", display: "flex", flexWrap: isText ? "nowrap" : "wrap", fontSize: 12, lineHeight: "18px", minWidth: 0, rowGap: "4px" }, children: [
15653
- hasResource && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Typography, { component: "span", "data-testid": SERVICE_NODE_SERVICE_NAME_TEST_ID, noWrap: true, sx: { flex: "0 3 auto", minWidth: "3ch" }, title: resourceName || arn, variant: "inherit", children: resource }),
15659
+ (hasResource || resourcePlaceholder !== void 0 || children !== void 0 || trailingRow === "resource") && /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_material5.Box, { sx: { alignItems: "center", color: "text.secondary", columnGap: "6px", display: "flex", flexWrap: isText ? "nowrap" : "wrap", fontSize: 12, lineHeight: "18px", minWidth: 0, rowGap: "4px" }, children: [
15660
+ hasResource && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Typography, { 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 }),
15654
15661
  !hasResource && resourcePlaceholder !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Box, { component: "span", sx: { color: "text.disabled", flex: "none" }, children: resourcePlaceholder }),
15655
15662
  (hasResource || resourcePlaceholder !== void 0) && isText && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Box, { "aria-hidden": true, component: "span", sx: { color: "text.disabled", flex: "none" }, children: "\xB7" }),
15656
- isText ? /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Typography, { component: "span", "data-testid": tailTestId, noWrap: true, sx: { flex: "1 1 0", minWidth: 0 }, title: children, variant: "inherit", children }) : children
15663
+ isText ? /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Typography, { component: "span", "data-testid": tailTestId, noWrap: true, sx: { flex: "1 1 0", minWidth: 0 }, title: children, variant: "inherit", children }) : children,
15664
+ trailingNode("resource")
15657
15665
  ] })
15658
15666
  ] })
15659
15667
  ] })
@@ -15665,7 +15673,7 @@ var OperationIdentity = (0, import_react36.memo)(({
15665
15673
  /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Typography, { component: "span", noWrap: true, sx: { flex: "0 1 auto", fontWeight: 700, minWidth: 0 }, variant: "inherit", children: getServiceDisplayName(service) }),
15666
15674
  hasOperation && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Typography, { component: "span", "data-testid": SERVICE_NODE_OPERATION_NAME_TEST_ID, noWrap: true, sx: { flex: "0 1 auto", minWidth: 0 }, variant: "inherit", children: operation2 }),
15667
15675
  children,
15668
- hasResource && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Typography, { color: "text.secondary", component: "span", "data-testid": SERVICE_NODE_SERVICE_NAME_TEST_ID, noWrap: true, sx: { flex: "1 1 0", fontSize: "0.875em", minWidth: 0 }, title: resourceName || arn, children: resource })
15676
+ hasResource && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Typography, { color: "text.secondary", component: "span", "data-testid": SERVICE_NODE_SERVICE_NAME_TEST_ID, noWrap: true, sx: { ...RESOURCE_CODE_SX, flex: "0 1 auto", fontSize: "0.875em", minWidth: 0 }, title: resourceName || arn, children: resource })
15669
15677
  ] });
15670
15678
  }
15671
15679
  return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_material5.Box, { "data-testid": testId, sx: { alignItems: "center", display: "flex", gap: "8px", minWidth: 0, ...sx }, children: [
@@ -15677,7 +15685,7 @@ var OperationIdentity = (0, import_react36.memo)(({
15677
15685
  ] }),
15678
15686
  (hasResource || resourcePlaceholder !== void 0 || resourcePrefix !== void 0) && /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_material5.Box, { sx: { alignItems: "center", columnGap: "4px", display: "flex", height: 14, minWidth: 0 }, children: [
15679
15687
  resourcePrefix,
15680
- hasResource && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Typography, { color: "text.secondary", "data-testid": SERVICE_NODE_SERVICE_NAME_TEST_ID, noWrap: true, sx: { lineHeight: "14px", minWidth: 0 }, title: resourceName || arn, variant: "caption", children: resource }),
15688
+ hasResource && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Typography, { color: "text.secondary", "data-testid": SERVICE_NODE_SERVICE_NAME_TEST_ID, noWrap: true, sx: { ...RESOURCE_CODE_SX, lineHeight: "14px", minWidth: 0 }, title: resourceName || arn, variant: "caption", children: resource }),
15681
15689
  !hasResource && resourcePlaceholder !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Typography, { color: "text.disabled", sx: { lineHeight: "14px" }, variant: "caption", children: resourcePlaceholder })
15682
15690
  ] })
15683
15691
  ] })
@@ -16953,6 +16961,12 @@ var import_icons_material11 = require("@mui/icons-material");
16953
16961
  var import_material21 = require("@mui/material");
16954
16962
  var import_react53 = require("react");
16955
16963
 
16964
+ // src/dev-settings.tsx
16965
+ var React122 = __toESM(require("react"), 1);
16966
+ var DEFAULT_DEV_SETTINGS = { allowedPillWhenSucceeded: "hide", headingPills: "resource-line", succeededIconColor: "green", waterfallLayout: "tree" };
16967
+ var DevSettingsContext = React122.createContext(DEFAULT_DEV_SETTINGS);
16968
+ var useDevSettings = () => React122.useContext(DevSettingsContext);
16969
+
16956
16970
  // src/utils/event-utils.ts
16957
16971
  var iamEventParser = (eventName, attributes) => {
16958
16972
  if (attributes?.payload && typeof attributes.payload === "string") {
@@ -31671,17 +31685,14 @@ var tint = (color2) => ({
31671
31685
  px: 0.75,
31672
31686
  py: 0.25
31673
31687
  });
31674
- var clickable = (onClick) => onClick === void 0 ? {} : {
31675
- component: import_material20.ButtonBase,
31676
- onClick,
31677
- sx: { "&:hover": { filter: "brightness(1.15)" }, "borderRadius": 1, "cursor": "pointer", "font": "inherit" }
31678
- };
31679
- var OperationStatusBadges = ({ iam, iamPermission, onIamClick, onStatusClick, status, statusLabel }) => {
31688
+ var OperationStatusBadges = ({ iam, iamPermission, status, statusLabel }) => {
31689
+ const { allowedPillWhenSucceeded, succeededIconColor } = useDevSettings();
31680
31690
  const isError = status === "error";
31681
31691
  const statusText = isError ? statusLabel ?? "Error" : "OK";
31682
31692
  const StatusIcon2 = isError ? import_icons_material10.Cancel : import_icons_material10.CheckCircle;
31683
31693
  const statusColor = isError ? "error" : "success";
31684
- const iamStyle = iam === void 0 ? void 0 : IAM[iam];
31694
+ const hideAllowed = iam === "allowed" && status === "ok" && allowedPillWhenSucceeded === "hide";
31695
+ const iamStyle = iam === void 0 || hideAllowed ? void 0 : IAM[iam];
31685
31696
  const iamLabel = iamPermission === void 0 || iam === "suppressed" ? iamStyle?.label : sentenceCase(formatPermissionStatus(iamPermission));
31686
31697
  const showStatus = status !== "unset";
31687
31698
  if (!showStatus && !iamStyle) {
@@ -31692,10 +31703,9 @@ var OperationStatusBadges = ({ iam, iamPermission, onIamClick, onStatusClick, st
31692
31703
  import_material20.Box,
31693
31704
  {
31694
31705
  "data-testid": EVENT_DETAILS_HEADING_STATUS_TEST_ID,
31695
- ...clickable(onStatusClick),
31696
- sx: { alignItems: "center", display: "flex", gap: 0.5, minWidth: 0, ...clickable(onStatusClick).sx, ...tint(statusColor) },
31706
+ sx: { alignItems: "center", display: "flex", gap: 0.5, minWidth: 0, ...tint(statusColor) },
31697
31707
  children: [
31698
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(StatusIcon2, { sx: { color: `${statusColor}.main`, fontSize: 14 } }),
31708
+ /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(StatusIcon2, { sx: { color: !isError && succeededIconColor === "gray" ? "text.disabled" : `${statusColor}.main`, fontSize: 14 } }),
31699
31709
  /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(import_material20.Typography, { color: "inherit", noWrap: true, variant: "caption", children: isError ? `Failed \xB7 ${statusText}` : "Succeeded" })
31700
31710
  ]
31701
31711
  }
@@ -31704,8 +31714,7 @@ var OperationStatusBadges = ({ iam, iamPermission, onIamClick, onStatusClick, st
31704
31714
  import_material20.Box,
31705
31715
  {
31706
31716
  "data-testid": EVENT_DETAILS_HEADING_IAM_TEST_ID,
31707
- ...clickable(onIamClick),
31708
- sx: { alignItems: "center", display: "flex", flex: "none", gap: 0.5, ...clickable(onIamClick).sx, ...tint(iamStyle.color) },
31717
+ sx: { alignItems: "center", display: "flex", flex: "none", gap: 0.5, ...tint(iamStyle.color) },
31709
31718
  children: [
31710
31719
  /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(iamStyle.icon, { sx: { color: paletteColor(iamStyle.color), fontSize: 14 } }),
31711
31720
  /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(import_material20.Typography, { color: "inherit", variant: "caption", children: iamLabel })
@@ -31732,12 +31741,14 @@ var checkIsSqsSendMessage = (span) => {
31732
31741
  };
31733
31742
  var PERMISSION_SEVERITY = ["explicitly_denied", "implicitly_denied", "explicitly_allowed"];
31734
31743
  var getWorstPermission = (events) => PERMISSION_SEVERITY.find((permission) => events.some((event) => event.permission === permission));
31744
+ var TRAILING_ROW = { "bottom-right": "resource", "resource-line": "title", "title-row": "title", "top-right": "label" };
31735
31745
  var IAM_OUTCOME = { allowed: "allowed", error: "denied", none: void 0, warning: "warning" };
31736
- var OPTIONAL_TABS = ["error", "logs", "permissions"];
31746
+ var OPTIONAL_TABS = ["logs", "permissions", "response"];
31737
31747
  var getOptionalTabs = (span, eventGroups) => ({
31738
- error: getSpanIssues(span).error,
31739
31748
  logs: checkIsLambdaInvoke(span) && typeof span.attributes?.["localstack.request_id"] === "string",
31740
- permissions: span.iam_errors_suppressed === true || eventGroups.permissions !== void 0
31749
+ permissions: span.iam_errors_suppressed === true || eventGroups.permissions !== void 0,
31750
+ // A failed call has no response; its error is at the top of Details.
31751
+ response: span.attributes?.["localstack.aws.service.response_suppressed"] === true || tryParseJson(span.attributes?.["localstack.aws.service.response"]) !== void 0
31741
31752
  });
31742
31753
  var Field = ({ children, copy, label, testId, testIdOn = "value" }) => /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_material21.Box, { children: [
31743
31754
  /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material21.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: label }),
@@ -31752,6 +31763,7 @@ var EventDetails = ({ onClose, onOperationShown, selectedEvent }) => {
31752
31763
  () => getEventGroupsByType(selectedEvent?.events ?? []),
31753
31764
  [selectedEvent?.events]
31754
31765
  );
31766
+ const { headingPills } = useDevSettings();
31755
31767
  const [parseNestedJson, setParseNestedJson] = (0, import_react53.useState)(true);
31756
31768
  const [tab, setTab] = (0, import_react53.useState)("details");
31757
31769
  const optionalTabs = selectedEvent ? getOptionalTabs(selectedEvent, eventGroups) : void 0;
@@ -31796,7 +31808,8 @@ var EventDetails = ({ onClose, onOperationShown, selectedEvent }) => {
31796
31808
  const functionError = isLambdaInvoke ? getLambdaFunctionError(selectedEvent.attributes?.["localstack.aws.service.response"]) : void 0;
31797
31809
  const errorType = functionError?.errorType ?? issues.errorType;
31798
31810
  const duration = selectedEvent.end_time_unix_nano ? ((BigInt(selectedEvent.end_time_unix_nano) - BigInt(selectedEvent.start_time_unix_nano)) / BigInt("1000000")).toString() : void 0;
31799
- const { error: showError, logs: showLogs, permissions: showPermissions } = getOptionalTabs(selectedEvent, eventGroups);
31811
+ const showError = issues.error;
31812
+ const { logs: showLogs, permissions: showPermissions, response: showResponse } = getOptionalTabs(selectedEvent, eventGroups);
31800
31813
  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];
31801
31814
  const iamEvents = getIamEvents(selectedEvent);
31802
31815
  const iamPermission = getWorstPermission(iamEvents);
@@ -31806,17 +31819,11 @@ var EventDetails = ({ onClose, onOperationShown, selectedEvent }) => {
31806
31819
  {
31807
31820
  iam: iamOutcome,
31808
31821
  iamPermission,
31809
- onIamClick: showPermissions ? () => {
31810
- setTab("permissions");
31811
- } : void 0,
31812
- onStatusClick: () => {
31813
- setTab(showError ? "error" : "response");
31814
- },
31815
31822
  status: issues.error ? "error" : selectedEvent.status_code === 1 ? "ok" : "unset",
31816
31823
  statusLabel: errorType
31817
31824
  }
31818
31825
  );
31819
- const identity = { arn: selectedEvent.arn, operation: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(OperationName, { span: selectedEvent }), resourceName: selectedEvent.resource_name, resourcePlaceholder: "\u2014", service: selectedEvent.service_name };
31826
+ const identity = { arn: selectedEvent.arn, operation: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(OperationName, { span: selectedEvent }), resourceName: selectedEvent.resource_name, service: selectedEvent.service_name };
31820
31827
  const rawDataSwitch = /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
31821
31828
  import_material21.FormControlLabel,
31822
31829
  {
@@ -31844,7 +31851,7 @@ var EventDetails = ({ onClose, onOperationShown, selectedEvent }) => {
31844
31851
  py: 1.25
31845
31852
  },
31846
31853
  children: [
31847
- /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(OperationIdentity, { ...identity, density: "heading", label: "Selected operation", sx: { flex: 1 }, testId: EVENT_DETAILS_HEADING_TEST_ID, children: statusBadges }),
31854
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(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 }),
31848
31855
  onClose && /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material21.IconButton, { "data-testid": EVENT_DETAILS_CLOSE_BUTTON_TEST_ID, onClick: onClose, size: "small", children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_icons_material11.Close, {}) })
31849
31856
  ]
31850
31857
  }
@@ -31872,10 +31879,9 @@ var EventDetails = ({ onClose, onOperationShown, selectedEvent }) => {
31872
31879
  value: activeTab,
31873
31880
  variant: "scrollable",
31874
31881
  children: [
31875
- /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material21.Tab, { "data-testid": DETAIL_TAB_DETAILS_TEST_ID, label: "Details", value: "details" }),
31882
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material21.Tab, { "data-testid": DETAIL_TAB_DETAILS_TEST_ID, icon: showError ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_icons_material11.Cancel, { color: "error", sx: { fontSize: 16 } }) : void 0, iconPosition: "end", label: "Details", value: "details" }),
31876
31883
  /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material21.Tab, { "data-testid": DETAIL_TAB_REQUEST_TEST_ID, label: "Payload", value: "payload" }),
31877
- /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material21.Tab, { "data-testid": DETAIL_TAB_RESPONSE_TEST_ID, label: "Response", value: "response" }),
31878
- showError && /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material21.Tab, { "data-testid": DETAIL_TAB_ERROR_TEST_ID, icon: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_icons_material11.Cancel, { color: "error", sx: { fontSize: 16 } }), iconPosition: "end", label: "Error", value: "error" }),
31884
+ showResponse && /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material21.Tab, { "data-testid": DETAIL_TAB_RESPONSE_TEST_ID, label: "Response", value: "response" }),
31879
31885
  showPermissions && /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material21.Tab, { "data-testid": DETAIL_TAB_PERMISSIONS_TEST_ID, icon: permissionsIcon, iconPosition: "end", label: "Permissions", value: "permissions" }),
31880
31886
  showLogs && /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material21.Tab, { "data-testid": DETAIL_TAB_LOGS_TEST_ID, label: "Logs", value: "logs" }),
31881
31887
  /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material21.Tab, { "data-testid": DETAIL_TAB_ADVANCED_TEST_ID, label: "Advanced", value: "advanced" })
@@ -31884,13 +31890,42 @@ var EventDetails = ({ onClose, onOperationShown, selectedEvent }) => {
31884
31890
  ),
31885
31891
  /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_material21.Box, { sx: { p: 2 }, children: [
31886
31892
  activeTab === "details" && /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_material21.Stack, { spacing: 2, children: [
31893
+ showError && /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_material21.Stack, { spacing: 2, children: [
31894
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_material21.Stack, { spacing: 1, children: [
31895
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Field, { label: "Type", children: errorType }),
31896
+ errorMessages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Field, { label: "Message", children: errorMessages.join(" \xB7 ") }),
31897
+ functionError && /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_material21.Box, { sx: { display: "grid", gap: 2, gridTemplateColumns: "1.3fr 1fr" }, children: [
31898
+ functionError.requestId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Field, { label: "Request ID", children: functionError.requestId }),
31899
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Field, { label: "Function Error", testId: EVENT_DETAILS_FUNCTION_ERROR_TEST_ID, children: functionError.functionError })
31900
+ ] })
31901
+ ] }),
31902
+ functionError?.stackTrace !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_material21.Box, { children: [
31903
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_material21.Stack, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
31904
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material21.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Stack Trace" }),
31905
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(CopyButton, { value: functionError.stackTrace })
31906
+ ] }),
31907
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
31908
+ import_material21.Box,
31909
+ {
31910
+ component: "pre",
31911
+ "data-testid": EVENT_DETAILS_STACK_TRACE_TEST_ID,
31912
+ sx: { backgroundColor: "background.default", borderRadius: 1, fontFamily: "monospace", fontSize: 12, m: 0, overflow: "auto", p: 1 },
31913
+ children: functionError.stackTrace
31914
+ }
31915
+ )
31916
+ ] }),
31917
+ exceptionPayload !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_material21.Box, { children: [
31918
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material21.Typography, { sx: { fontWeight: 600, mb: 0.5 }, variant: "caption", children: "Exception" }),
31919
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(PayloadViewer, { testId: EVENT_DETAILS_EXCEPTION_PAYLOAD_TEST_ID, value: exceptionPayload })
31920
+ ] })
31921
+ ] }),
31887
31922
  /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_material21.Stack, { "data-testid": EVENT_DETAILS_SECTION_BASIC_INFORMATION_TEST_ID, spacing: 1, children: [
31888
31923
  /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_material21.Box, { sx: { display: "grid", gap: 2, gridTemplateColumns: "1.3fr 1fr" }, children: [
31889
31924
  /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Field, { copy: getServiceDisplayName(selectedEvent.service_name), label: "Service", testId: EVENT_DETAILS_SERVICE_NAME_TEST_ID, children: getServiceDisplayName(selectedEvent.service_name) }),
31890
31925
  /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Field, { label: "Action", testId: EVENT_DETAILS_OPERATION_NAME_TEST_ID, children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(OperationName, { span: selectedEvent }) })
31891
31926
  ] }),
31892
31927
  /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_material21.Box, { sx: cfnResourceType ? { display: "grid", gap: 2, gridTemplateColumns: "1.3fr 1fr" } : void 0, children: [
31893
- /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Field, { copy: selectedEvent.resource_name, label: "Resource", testId: EVENT_DETAILS_RESOURCE_NAME_TEST_ID, testIdOn: "row", children: selectedEvent.resource_name || /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material21.Box, { component: "span", sx: { color: "text.disabled" }, children: "\u2014" }) }),
31928
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Field, { copy: selectedEvent.resource_name, label: "Resource", testId: EVENT_DETAILS_RESOURCE_NAME_TEST_ID, testIdOn: "row", children: selectedEvent.resource_name ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material21.Box, { component: "span", sx: RESOURCE_CODE_SX, children: selectedEvent.resource_name }) : /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material21.Box, { component: "span", sx: { color: "text.disabled" }, children: "\u2014" }) }),
31894
31929
  Boolean(cfnResourceType) && /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Field, { label: "Resource Type", testId: EVENT_DETAILS_CFN_RESOURCE_TYPE_TEST_ID, children: cfnResourceType })
31895
31930
  ] }),
31896
31931
  Boolean(resourceArn) && /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Field, { label: "Resource ARN", testId: EVENT_DETAILS_RESOURCE_ARN_TEST_ID, testIdOn: "row", children: resourceArn }),
@@ -31923,38 +31958,9 @@ var EventDetails = ({ onClose, onOperationShown, selectedEvent }) => {
31923
31958
  rawDataSwitch,
31924
31959
  /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(PayloadViewer, { testId: EVENT_DETAILS_REQUEST_PAYLOAD, value: requestPayload })
31925
31960
  ] })),
31926
- activeTab === "response" && (responsePayload === void 0 && !isResponseSuppressed ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(EmptyTab, { children: issues.error ? "No response: the call failed. See the Error tab." : "No response payload recorded." }) : /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_jsx_runtime145.Fragment, { children: [
31961
+ activeTab === "response" && /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_jsx_runtime145.Fragment, { children: [
31927
31962
  rawDataSwitch,
31928
31963
  isResponseSuppressed ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material21.Alert, { severity: "warning", children: "Response payload is available \u2014 upgrade your license to view" }) : /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(PayloadViewer, { testId: EVENT_DETAILS_RESPONSE_PAYLOAD_TEST_ID, value: responsePayload })
31929
- ] })),
31930
- activeTab === "error" && /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_material21.Stack, { spacing: 2, children: [
31931
- /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_material21.Stack, { spacing: 1, children: [
31932
- /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Field, { label: "Type", children: errorType }),
31933
- errorMessages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Field, { label: "Message", children: errorMessages.join(" \xB7 ") }),
31934
- functionError && /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_material21.Box, { sx: { display: "grid", gap: 2, gridTemplateColumns: "1.3fr 1fr" }, children: [
31935
- functionError.requestId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Field, { label: "Request ID", children: functionError.requestId }),
31936
- /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Field, { label: "Function Error", testId: EVENT_DETAILS_FUNCTION_ERROR_TEST_ID, children: functionError.functionError })
31937
- ] })
31938
- ] }),
31939
- functionError?.stackTrace !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_material21.Box, { children: [
31940
- /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_material21.Stack, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
31941
- /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material21.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Stack Trace" }),
31942
- /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(CopyButton, { value: functionError.stackTrace })
31943
- ] }),
31944
- /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
31945
- import_material21.Box,
31946
- {
31947
- component: "pre",
31948
- "data-testid": EVENT_DETAILS_STACK_TRACE_TEST_ID,
31949
- sx: { backgroundColor: "background.default", borderRadius: 1, fontFamily: "monospace", fontSize: 12, m: 0, overflow: "auto", p: 1 },
31950
- children: functionError.stackTrace
31951
- }
31952
- )
31953
- ] }),
31954
- exceptionPayload !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_material21.Box, { children: [
31955
- /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material21.Typography, { sx: { fontWeight: 600, mb: 0.5 }, variant: "caption", children: "Exception" }),
31956
- /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(PayloadViewer, { testId: EVENT_DETAILS_EXCEPTION_PAYLOAD_TEST_ID, value: exceptionPayload })
31957
- ] })
31958
31964
  ] }),
31959
31965
  activeTab === "permissions" && /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_jsx_runtime145.Fragment, { children: [
31960
31966
  selectedEvent.iam_errors_suppressed && /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material21.Alert, { "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" }),
@@ -31991,7 +31997,7 @@ var import_icons_material12 = require("@mui/icons-material");
31991
31997
  var import_material22 = require("@mui/material");
31992
31998
  var import_react54 = require("@xyflow/react");
31993
31999
  var import_style = require("@xyflow/react/dist/style.css");
31994
- var React122 = require("react");
32000
+ var React123 = require("react");
31995
32001
  var import_react55 = require("react");
31996
32002
  var import_jsx_runtime146 = require("react/jsx-runtime");
31997
32003
  var handleStyle = {
@@ -32554,12 +32560,6 @@ var import_material26 = require("@mui/material");
32554
32560
  var import_styles4 = require("@mui/material/styles");
32555
32561
  var React124 = __toESM(require("react"), 1);
32556
32562
 
32557
- // src/dev-settings.tsx
32558
- var React123 = __toESM(require("react"), 1);
32559
- var DEFAULT_DEV_SETTINGS = { waterfallLayout: "tree" };
32560
- var DevSettingsContext = React123.createContext(DEFAULT_DEV_SETTINGS);
32561
- var useDevSettings = () => React123.useContext(DevSettingsContext);
32562
-
32563
32563
  // src/components/trace-panel/axis-ticks.ts
32564
32564
  var getAxisTicks = (durationMs, maxIntervals) => {
32565
32565
  if (durationMs <= 0 || maxIntervals < 1) return [0];
@@ -33090,7 +33090,6 @@ var TraceSidebar = ({ onClose, onOperationShown, onRequestRendered, onSelectSpan
33090
33090
  label: "Request",
33091
33091
  operation: /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(OperationName, { span: root2 }),
33092
33092
  resourceName: root2.resource_name,
33093
- resourcePlaceholder: "\u2014",
33094
33093
  service: root2.service_name,
33095
33094
  sx: { flex: 1 },
33096
33095
  tailTestId: TRACE_SIDEBAR_STATS_TEST_ID,