From ce5c05b1a1fc10ded99584bb98efa4212cac7146 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josh=20Goldberg=20=E2=9C=A8?= Date: Fri, 5 Jun 2026 17:47:11 -0400 Subject: [PATCH 1/4] ref(replays): cut two type-only edges into the import cycle MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two small, source-side type-only cuts (no behavior change): - `utils/replays/types` imported `Event` solely to type one type-guard param (`isHydrateCrumb`). The guard only reads `.category`, so it now takes `unknown` and narrows structurally — dropping the `types/event` edge. (~-24 to the largest SCC on its own.) - The `Output` enum lived in `getOutputType` (a runtime util), so the analytics event map `replayAnalyticsEvents` pulled that whole module in for one type. Move `Output` to a dependency-free leaf and re-export it from `getOutputType` for existing consumers. (~-6 on its own.) Largest type-import SCC drops 1681 -> 1651 (-30) across 5 files. Note: the sibling 'cheap cut' candidates (uptime/types, deprecatedforms, issueTypeConfig importing core/group types) are relocation-style and are already handled by the leaf-extraction PR; configStore genuinely stores `Config` and isn't cheaply cuttable. Part of a series of SCC-shrinking PRs. --- static/app/utils/analytics/replayAnalyticsEvents.tsx | 2 +- static/app/utils/replays/types.tsx | 11 +++++++---- .../replays/detail/network/details/getOutputType.tsx | 12 ++---------- .../replays/detail/network/details/output.tsx | 10 ++++++++++ 4 files changed, 20 insertions(+), 15 deletions(-) create mode 100644 static/app/views/explore/replays/detail/network/details/output.tsx diff --git a/static/app/utils/analytics/replayAnalyticsEvents.tsx b/static/app/utils/analytics/replayAnalyticsEvents.tsx index d9d3b9e9687734..c6d25fc86b00da 100644 --- a/static/app/utils/analytics/replayAnalyticsEvents.tsx +++ b/static/app/utils/analytics/replayAnalyticsEvents.tsx @@ -1,5 +1,5 @@ import type {LayoutKey} from 'sentry/utils/replays/hooks/useReplayLayout'; -import type {Output} from 'sentry/views/explore/replays/detail/network/details/getOutputType'; +import type {Output} from 'sentry/views/explore/replays/detail/network/details/output'; export type ReplayEventParameters = { 'replay.ai-summary.chapter-clicked': { diff --git a/static/app/utils/replays/types.tsx b/static/app/utils/replays/types.tsx index 706c5eb818e38f..f68fe585a6d7aa 100644 --- a/static/app/utils/replays/types.tsx +++ b/static/app/utils/replays/types.tsx @@ -13,8 +13,6 @@ import type { } from '@sentry/react'; import invariant from 'invariant'; -import type {Event} from 'sentry/types/event'; - export type {serializedNodeWithId} from '@sentry-internal/rrweb-snapshot'; export type {fullSnapshotEvent, incrementalSnapshotEvent} from '@sentry-internal/rrweb'; @@ -214,8 +212,13 @@ export function isFeedbackFrame(frame: ReplayFrame | undefined): frame is Feedba return Boolean(frame && 'category' in frame && frame.category === 'feedback'); } -export function isHydrateCrumb(item: BreadcrumbFrame | Event): item is BreadcrumbFrame { - return 'category' in item && item.category === 'replay.hydrate-error'; +export function isHydrateCrumb(item: unknown): item is BreadcrumbFrame { + return ( + typeof item === 'object' && + item !== null && + 'category' in item && + item.category === 'replay.hydrate-error' + ); } export function isSpanFrame(frame: ReplayFrame | undefined): frame is SpanFrame { diff --git a/static/app/views/explore/replays/detail/network/details/getOutputType.tsx b/static/app/views/explore/replays/detail/network/details/getOutputType.tsx index d80a3648a60853..0c06c85a51fa59 100644 --- a/static/app/views/explore/replays/detail/network/details/getOutputType.tsx +++ b/static/app/views/explore/replays/detail/network/details/getOutputType.tsx @@ -1,17 +1,9 @@ import {isRequestFrame} from 'sentry/utils/replays/resourceFrame'; +import {Output} from 'sentry/views/explore/replays/detail/network/details/output'; import type {SectionProps} from 'sentry/views/explore/replays/detail/network/details/sections'; import type {TabKey} from 'sentry/views/explore/replays/detail/network/details/tabs'; -export enum Output { - SETUP = 'setup', - UNSUPPORTED = 'unsupported', - URL_SKIPPED = 'url_skipped', - BODY_SKIPPED = 'body_skipped', - BODY_PARSE_ERROR = 'body_parse_error', - BODY_PARSE_TIMEOUT = 'body_parse_timeout', - UNPARSEABLE_BODY_TYPE = 'unparseable_body_type', - DATA = 'data', -} +export {Output}; type Args = { isCaptureBodySetup: boolean; diff --git a/static/app/views/explore/replays/detail/network/details/output.tsx b/static/app/views/explore/replays/detail/network/details/output.tsx new file mode 100644 index 00000000000000..d0636c0992eccb --- /dev/null +++ b/static/app/views/explore/replays/detail/network/details/output.tsx @@ -0,0 +1,10 @@ +export enum Output { + SETUP = 'setup', + UNSUPPORTED = 'unsupported', + URL_SKIPPED = 'url_skipped', + BODY_SKIPPED = 'body_skipped', + BODY_PARSE_ERROR = 'body_parse_error', + BODY_PARSE_TIMEOUT = 'body_parse_timeout', + UNPARSEABLE_BODY_TYPE = 'unparseable_body_type', + DATA = 'data', +} From b16a69a0af55ae323100e0685426929f2ed9d07f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josh=20Goldberg=20=E2=9C=A8?= Date: Mon, 8 Jun 2026 14:15:41 -0400 Subject: [PATCH 2/4] Remove re-export --- .../explore/replays/detail/network/details/content.tsx | 6 ++---- .../replays/detail/network/details/getOutputType.tsx | 2 -- .../replays/detail/network/details/onboarding.spec.tsx | 2 +- .../explore/replays/detail/network/details/onboarding.tsx | 2 +- static/app/views/insights/pages/mcp/onboarding.tsx | 2 +- 5 files changed, 5 insertions(+), 9 deletions(-) diff --git a/static/app/views/explore/replays/detail/network/details/content.tsx b/static/app/views/explore/replays/detail/network/details/content.tsx index 3953f8339825da..05cac34d6fc2bf 100644 --- a/static/app/views/explore/replays/detail/network/details/content.tsx +++ b/static/app/views/explore/replays/detail/network/details/content.tsx @@ -6,14 +6,12 @@ import {trackAnalytics} from 'sentry/utils/analytics'; import {getFrameMethod, getFrameStatus} from 'sentry/utils/replays/resourceFrame'; import {useOrganization} from 'sentry/utils/useOrganization'; import {FluidHeight} from 'sentry/views/explore/replays/detail/layout/fluidHeight'; -import { - getOutputType, - Output, -} from 'sentry/views/explore/replays/detail/network/details/getOutputType'; +import {getOutputType} from 'sentry/views/explore/replays/detail/network/details/getOutputType'; import { Setup, UnsupportedOp, } from 'sentry/views/explore/replays/detail/network/details/onboarding'; +import {Output} from 'sentry/views/explore/replays/detail/network/details/output'; import type {SectionProps} from 'sentry/views/explore/replays/detail/network/details/sections'; import { GeneralSection, diff --git a/static/app/views/explore/replays/detail/network/details/getOutputType.tsx b/static/app/views/explore/replays/detail/network/details/getOutputType.tsx index 0c06c85a51fa59..a68c597cc3c04e 100644 --- a/static/app/views/explore/replays/detail/network/details/getOutputType.tsx +++ b/static/app/views/explore/replays/detail/network/details/getOutputType.tsx @@ -3,8 +3,6 @@ import {Output} from 'sentry/views/explore/replays/detail/network/details/output import type {SectionProps} from 'sentry/views/explore/replays/detail/network/details/sections'; import type {TabKey} from 'sentry/views/explore/replays/detail/network/details/tabs'; -export {Output}; - type Args = { isCaptureBodySetup: boolean; isSetup: boolean; diff --git a/static/app/views/explore/replays/detail/network/details/onboarding.spec.tsx b/static/app/views/explore/replays/detail/network/details/onboarding.spec.tsx index 3a2dcf85a873a2..20ee4955601779 100644 --- a/static/app/views/explore/replays/detail/network/details/onboarding.spec.tsx +++ b/static/app/views/explore/replays/detail/network/details/onboarding.spec.tsx @@ -6,8 +6,8 @@ import {textWithMarkupMatcher} from 'sentry-test/utils'; import {hydrateSpans} from 'sentry/utils/replays/hydrateSpans'; import {useProjectSdkNeedsUpdate} from 'sentry/utils/useProjectSdkNeedsUpdate'; -import {Output} from 'sentry/views/explore/replays/detail/network/details/getOutputType'; import {Setup} from 'sentry/views/explore/replays/detail/network/details/onboarding'; +import {Output} from 'sentry/views/explore/replays/detail/network/details/output'; jest.mock('sentry/utils/useProjectSdkNeedsUpdate'); diff --git a/static/app/views/explore/replays/detail/network/details/onboarding.tsx b/static/app/views/explore/replays/detail/network/details/onboarding.tsx index c0398059da6ffa..a6c5825ce44ac6 100644 --- a/static/app/views/explore/replays/detail/network/details/onboarding.tsx +++ b/static/app/views/explore/replays/detail/network/details/onboarding.tsx @@ -16,7 +16,7 @@ import type {SpanFrame} from 'sentry/utils/replays/types'; import {useDismissAlert} from 'sentry/utils/useDismissAlert'; import {useOrganization} from 'sentry/utils/useOrganization'; import {useProjectSdkNeedsUpdate} from 'sentry/utils/useProjectSdkNeedsUpdate'; -import {Output} from 'sentry/views/explore/replays/detail/network/details/getOutputType'; +import {Output} from 'sentry/views/explore/replays/detail/network/details/output'; import type {TabKey} from 'sentry/views/explore/replays/detail/network/details/tabs'; export const useDismissReqRespBodiesAlert = () => { diff --git a/static/app/views/insights/pages/mcp/onboarding.tsx b/static/app/views/insights/pages/mcp/onboarding.tsx index f712aa36dc6db3..5cdccc51e7561f 100644 --- a/static/app/views/insights/pages/mcp/onboarding.tsx +++ b/static/app/views/insights/pages/mcp/onboarding.tsx @@ -415,7 +415,7 @@ const BulletList = styled('ul')` const HeaderWrapper = styled('div')` display: flex; justify-content: space-between; - gap: $${p => p.theme.space['2xl']}; + gap: ${p => p.theme.space['2xl']}; border-radius: ${p => p.theme.radius.md}; padding: ${p => p.theme.space['3xl']}; `; From a63fbb25e505f492ba84a6a13339b9e76006f0b5 Mon Sep 17 00:00:00 2001 From: "getsantry[bot]" <66042841+getsantry[bot]@users.noreply.github.com> Date: Mon, 8 Jun 2026 18:17:07 +0000 Subject: [PATCH 3/4] :hammer_and_wrench: apply pre-commit fixes --- static/app/views/insights/pages/mcp/onboarding.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/app/views/insights/pages/mcp/onboarding.tsx b/static/app/views/insights/pages/mcp/onboarding.tsx index 5cdccc51e7561f..7069df2ffdf6f0 100644 --- a/static/app/views/insights/pages/mcp/onboarding.tsx +++ b/static/app/views/insights/pages/mcp/onboarding.tsx @@ -415,7 +415,7 @@ const BulletList = styled('ul')` const HeaderWrapper = styled('div')` display: flex; justify-content: space-between; - gap: ${p => p.theme.space['2xl']}; + gap: ${p => p.theme.space['2xl']}; border-radius: ${p => p.theme.radius.md}; padding: ${p => p.theme.space['3xl']}; `; From eadc30cc9c042c2bfc29037a39fb78d5254b7f56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josh=20Goldberg=20=E2=9C=A8?= Date: Mon, 8 Jun 2026 15:13:34 -0400 Subject: [PATCH 4/4] 38645 --- static/app/views/insights/pages/mcp/onboarding.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/app/views/insights/pages/mcp/onboarding.tsx b/static/app/views/insights/pages/mcp/onboarding.tsx index 7069df2ffdf6f0..f712aa36dc6db3 100644 --- a/static/app/views/insights/pages/mcp/onboarding.tsx +++ b/static/app/views/insights/pages/mcp/onboarding.tsx @@ -415,7 +415,7 @@ const BulletList = styled('ul')` const HeaderWrapper = styled('div')` display: flex; justify-content: space-between; - gap: ${p => p.theme.space['2xl']}; + gap: $${p => p.theme.space['2xl']}; border-radius: ${p => p.theme.radius.md}; padding: ${p => p.theme.space['3xl']}; `;