From 56599f649ba23e2ab4a03c4480d246a9b8f0e1c0 Mon Sep 17 00:00:00 2001 From: Dan Fuller Date: Fri, 17 Apr 2026 18:03:31 -0700 Subject: [PATCH] ref(flags): Remove organizations:continuous-profiling-beta-ui (frontend) The flag scanner classified this as flagpole-disabled. The flag gated a pair of beta banners on the Profiling page; with it always False the banners never render. Removes the Feature wrapper and unused banner components (ContinuousProfilingBetaAlertBanner, ContinuousProfilingBetaSDKAlertBanner), their hook type declarations, the gsApp implementation + hook registration, and the SDKDeprecation helpers that only supported the SDK banner. The backend registration removal will follow in a separate PR. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../components/profiling/billing/alerts.tsx | 8 -- static/app/types/hooks.tsx | 6 -- .../app/views/explore/profiling/content.tsx | 11 +-- static/gsApp/components/profiling/alerts.tsx | 95 +------------------ static/gsApp/registerHooks.tsx | 3 - 5 files changed, 2 insertions(+), 121 deletions(-) diff --git a/static/app/components/profiling/billing/alerts.tsx b/static/app/components/profiling/billing/alerts.tsx index 4b4a3b01de0de9..76ea289846e9d2 100644 --- a/static/app/components/profiling/billing/alerts.tsx +++ b/static/app/components/profiling/billing/alerts.tsx @@ -4,14 +4,6 @@ export const ProfilingBetaAlertBanner = HookOrDefault({ hookName: 'component:profiling-billing-banner', }); -export const ContinuousProfilingBetaAlertBanner = HookOrDefault({ - hookName: 'component:continuous-profiling-beta-banner', -}); - -export const ContinuousProfilingBetaSDKAlertBanner = HookOrDefault({ - hookName: 'component:continuous-profiling-beta-sdk-banner', -}); - export const ContinuousProfilingBillingRequirementBanner = HookOrDefault({ hookName: 'component:continuous-profiling-billing-requirement-banner', }); diff --git a/static/app/types/hooks.tsx b/static/app/types/hooks.tsx index 95c8bf00d53c8d..ffef57d74b21c2 100644 --- a/static/app/types/hooks.tsx +++ b/static/app/types/hooks.tsx @@ -110,10 +110,6 @@ type ProfilingBetaAlertBannerProps = { organization: Organization; }; -type ContinuousProfilingBetaAlertBannerProps = { - organization: Organization; -}; - type ContinuousProfilingBillingRequirementBannerProps = { project: Project; }; @@ -200,8 +196,6 @@ type ComponentHooks = { 'component:ai-setup-data-consent': () => React.ComponentType | null; 'component:codecov-integration-settings-link': () => React.ComponentType; 'component:confirm-account-close': () => React.ComponentType; - 'component:continuous-profiling-beta-banner': () => React.ComponentType; - 'component:continuous-profiling-beta-sdk-banner': () => React.ComponentType; 'component:continuous-profiling-billing-requirement-banner': () => React.ComponentType; 'component:crons-list-page-header': () => React.ComponentType; 'component:crons-onboarding-panel': () => React.ComponentType; diff --git a/static/app/views/explore/profiling/content.tsx b/static/app/views/explore/profiling/content.tsx index 818b867a9c73d8..c1bb4c7b9a4e65 100644 --- a/static/app/views/explore/profiling/content.tsx +++ b/static/app/views/explore/profiling/content.tsx @@ -8,7 +8,6 @@ import {Stack} from '@sentry/scraps/layout'; import {Pagination} from '@sentry/scraps/pagination'; import {TabList, Tabs} from '@sentry/scraps/tabs'; -import Feature from 'sentry/components/acl/feature'; import {FeedbackButton} from 'sentry/components/feedbackButton/feedbackButton'; import * as Layout from 'sentry/components/layouts/thirds'; import {ALL_ACCESS_PROJECTS} from 'sentry/components/pageFilters/constants'; @@ -20,11 +19,7 @@ import {ProjectPageFilter} from 'sentry/components/pageFilters/project/projectPa import {usePageFilters} from 'sentry/components/pageFilters/usePageFilters'; import {PageHeadingQuestionTooltip} from 'sentry/components/pageHeadingQuestionTooltip'; import {TransactionSearchQueryBuilder} from 'sentry/components/performance/transactionSearchQueryBuilder'; -import { - ContinuousProfilingBetaAlertBanner, - ContinuousProfilingBetaSDKAlertBanner, - ProfilingBetaAlertBanner, -} from 'sentry/components/profiling/billing/alerts'; +import {ProfilingBetaAlertBanner} from 'sentry/components/profiling/billing/alerts'; import {ProfileEventsTable} from 'sentry/components/profiling/profileEventsTable'; import {QuestionTooltip} from 'sentry/components/questionTooltip'; import {SentryDocumentTitle} from 'sentry/components/sentryDocumentTitle'; @@ -165,10 +160,6 @@ export default function ProfilingContent() { > - - - - diff --git a/static/gsApp/components/profiling/alerts.tsx b/static/gsApp/components/profiling/alerts.tsx index 4b82cb1da0ee94..b5d4e385a955d0 100644 --- a/static/gsApp/components/profiling/alerts.tsx +++ b/static/gsApp/components/profiling/alerts.tsx @@ -1,21 +1,17 @@ -import {Fragment, useCallback, useEffect, useMemo, useState} from 'react'; +import {Fragment, useCallback, useEffect, useState} from 'react'; import styled from '@emotion/styled'; import {Alert} from '@sentry/scraps/alert'; import {Button} from '@sentry/scraps/button'; -import {Flex} from '@sentry/scraps/layout'; import {Heading, Text} from '@sentry/scraps/text'; -import {usePageFilters} from 'sentry/components/pageFilters/usePageFilters'; import {IconClose, IconInfo, IconWarning} from 'sentry/icons'; import {t, tct} from 'sentry/locale'; import {DataCategory} from 'sentry/types/core'; import type {Organization} from 'sentry/types/organization'; import type {Project} from 'sentry/types/project'; -import {getApiUrl} from 'sentry/utils/api/getApiUrl'; import {getDaysSinceDate} from 'sentry/utils/getDaysSinceDate'; import {getProfileDurationCategoryForPlatform} from 'sentry/utils/profiling/platforms'; -import {useApiQuery} from 'sentry/utils/queryClient'; import {useDismissAlert} from 'sentry/utils/useDismissAlert'; import {useOrganization} from 'sentry/utils/useOrganization'; @@ -271,52 +267,6 @@ export const ProfilingBetaAlertBanner = withSubscription( {noLoader: true} ); -export function ContinuousProfilingBetaSDKAlertBanner() { - const sdkDeprecationResults = useSDKDeprecations(); - - const sdkDeprecations = useMemo(() => { - const sdks = new Map(); - - for (const sdk of sdkDeprecationResults.data?.data ?? []) { - const key = `${sdk.sdkName}:${sdk.sdkVersion}`; - sdks.set(key, sdk); - } - - return sdks; - }, [sdkDeprecationResults.data?.data]); - - if (sdkDeprecations.size <= 0) { - return null; - } - - return ( - - - {tct( - '[bold:Action Needed: Profiling beta period ends May 19, 2025.] Your SDK is out of date. To continue using profiling without interruption, upgrade to the latest version:', - { - bold: , - } - )} - - {sdkDeprecations.values().map(sdk => { - const key = `${sdk.projectId}-${sdk.sdkName}-${sdk.sdkVersion}`; - return ( - - - {tct('[name] minimum version [version]', { - name: {sdk.sdkName}, - version: {sdk.minimumVersion}, - })} - - ); - })} - - - - ); -} - interface ContinuousProfilingBillingRequirementBanner { project: Project; } @@ -536,49 +486,6 @@ function OnDemandOrPaygBanner({ ); } -interface SDKDeprecation { - minimumVersion: string; - projectId: string; - sdkName: string; - sdkVersion: string; -} - -function useSDKDeprecations() { - const organization = useOrganization(); - const {selection} = usePageFilters(); - - const path = getApiUrl('/organizations/$organizationIdOrSlug/sdk-deprecations/', { - path: {organizationIdOrSlug: organization.slug}, - }); - const options = { - query: { - project: selection.projects, - event_type: 'profile', - }, - }; - - return useApiQuery<{data: SDKDeprecation[]}>([path, options], { - staleTime: 0, - refetchOnWindowFocus: false, - refetchOnMount: false, - retry: false, - }); -} - -const SDKDeprecationsContainer = styled('ul')` - margin: 0; -`; - -const Dot = styled('span')` - display: inline-block; - margin-right: ${p => p.theme.space.md}; - border-radius: ${p => p.theme.radius.md}; - width: ${p => p.theme.space.xs}; - height: ${p => p.theme.space.xs}; - /* eslint-disable-next-line @sentry/scraps/use-semantic-token */ - background-color: ${p => p.theme.tokens.content.primary}; -`; - const AlertBody = styled('div')` margin-bottom: ${p => p.theme.space.md}; `; diff --git a/static/gsApp/registerHooks.tsx b/static/gsApp/registerHooks.tsx index 3bf599f2354e79..ffdf7450b3fc2e 100644 --- a/static/gsApp/registerHooks.tsx +++ b/static/gsApp/registerHooks.tsx @@ -82,7 +82,6 @@ import {GsBillingCommandPaletteActions} from './components/gsBillingCommandPalet import {PrimaryNavigationQuotaExceeded} from './components/navBillingStatus'; import {OpenInDiscoverBtn} from './components/openInDiscoverBtn'; import { - ContinuousProfilingBetaSDKAlertBanner, ContinuousProfilingBillingRequirementBanner, ProfilingBetaAlertBanner, } from './components/profiling/alerts'; @@ -229,8 +228,6 @@ const GETSENTRY_HOOKS: Partial = { 'component:ai-setup-configuration': () => AiSetupConfiguration, 'component:ai-setup-data-consent': () => AiSetupDataConsent, 'component:codecov-integration-settings-link': () => CodecovSettingsLink, - 'component:continuous-profiling-beta-sdk-banner': () => - ContinuousProfilingBetaSDKAlertBanner, 'component:continuous-profiling-billing-requirement-banner': () => ContinuousProfilingBillingRequirementBanner, 'component:header-date-page-filter-upsell-footer': () => DateRangeQueryLimitFooter,