ref(insights): remove useHasPlatformizedInsights and dead widgets#114252
Draft
ref(insights): remove useHasPlatformizedInsights and dead widgets#114252
Conversation
Now that organizations:insights-prebuilt-dashboards is fully rolled out on AM2/AM3 (and AM1 doesn't have Insights), the EAP-eligibility check inside the backend, frontend, and mobile overview pages can use the existing useInsightsEap() signal instead of the soon-to-be-removed useHasPlatformizedInsights(). - Backend overview collapses to: Laravel/NextJS branch when applicable, PlatformizedBackendOverviewPage when EAP, Am1BackendOverviewPage otherwise. Same shape for frontend (NextJS / Platformized / Am1). - Mobile overview drops the useHasPlatformizedInsights branch; AM1 path preserved. - Remove EAPBackendOverviewPage / EAPFrontendOverviewPage and their dedicated tables, query helpers, and span-op utilities (backendTable, frontendOverviewTable, useFrontendTableData, useFrontendQuery, pageSpanOp). overviewIssuesWidget had no remaining callers. - Settings: drop unused DEFAULT_SORT export from frontend/settings. CHART_MAP-referenced overview widgets stay in place; their CHART_MAP entries (and the widgets themselves) get cleaned up in a later PR together with the useHasPlatformizedInsights hook removal. Refs DAIN-1568
Collapse the cache, database, http, and queues landing + summary pages to render their Platformized equivalents directly. The useHasPlatformizedInsights() conditional inside each PageWithProviders is replaced with a thin wrapper around the corresponding Platformized component. - cache: cacheLandingPage - database: databaseLandingPage, databaseSpanSummaryPage - http: httpLandingPage, httpDomainSummaryPage (legacy DESTINATION_TITLE, FIELD_ALIASES exports retained where shared widgets still depend on them) - queues: queuesLandingPage, destinationSummaryPage Removes legacy tables, query helpers, page filters, and co-located specs that only the legacy implementations used (queriesTable, queryTransactionsTable, domainsTable, domainTransactionsTable, queuesTable, transactionCell variants, useQueuesByDestinationQuery, databasePageFilters, etc.). Also drops the now-orphaned common/components/issues.tsx and spans/selectors/actionSelector.tsx. CHART_MAP-referenced widgets and their hooks stay in place; cleaned up in the final PR of the series along with the useHasPlatformizedInsights hook removal. Refs DAIN-1568
Collapse the resources and web vitals landing + detail pages to render their Platformized equivalents directly. The useHasPlatformizedInsights branch and the legacy module implementations are removed. - resources: resourcesLandingPage, resourceSummaryPage - web vitals: webVitalsLandingPage, pageOverview Removes legacy components, tables, queries, and co-located specs that only the legacy implementations used: resourceLandingPageCharts, resourceSummaryCharts, renderBlockingSelector, resourceInfo, resourceView, resourceSummaryTable, resourceTable, useResourcePageQuery, useResourcePagesQuery, useResourceSummarySort, useResourceSort, browserTypeSelector, performanceScoreChart, pageSamplePerformanceTable, useTransactionSamplesWebVitalsScoresQuery, mapWebVitalToOrderBy. Also drops the now-orphaned common/views/spans/selectors/transactionSelector, common/components/tableCells/throughputCell, and common/utils/useWebVitalsDrawer. Loosen the ValidSort constraint in useResourcesQuery to plain Sort so the surviving overview widgets can keep using it after useResourceSort is gone. Drop the now-unused RESOURCE_THROUGHPUT_UNIT export. CHART_MAP-referenced widgets and their hooks stay in place; cleaned up in the final PR of the series alongside useHasPlatformizedInsights removal. Refs DAIN-1568
Collapse the screens landing and detail pages to render their Platformized equivalents directly. The useHasPlatformizedInsights branch and the legacy module implementations are removed. Removes legacy components and queries only the legacy implementations used: screenload affectSelector, screenBarChart, screenCharts, setupContent, referrers, screenLoadSpansPage, mobile/ui screenSummaryPage, and screensLandingPage spec. Also drops the now-orphaned common/utils/useMobileVitalsDrawer. Refs DAIN-1568
Collapse the agents and MCP overview pages, the sessions overview, and
the MCP/agent landing pages (toolsLandingPage, modelsLandingPage,
mcpToolsLandingPage, mcpResourcesLandingPage, mcpPromptsLandingPage)
to render their Platformized equivalents directly.
Removes legacy components, tables, and widgets only the legacy
implementations used:
- pages/agents/components/* (issuesWidget, llmCallsWidget,
modelCostWidget, modelsTable, tokenTypesWidget, tokenUsageWidget,
toolCallsWidget, toolErrorsWidget, toolsTable, common, styles)
- pages/agents/hooks/* (useAgentMonitoringTrackPageView,
useAgentSpanSearchProps, useShowAgentOnboarding)
- pages/mcp/components/* (groupedDurationWidget, groupedErrorRateWidget,
groupedTrafficWidget, mcpOverviewTable, mcpPrompt/Resource/Tool
Duration/ErrorRate/Traffic widgets, mcpToolsTable,
mcpTrafficByClientWidget, mcpTransportWidget, styles)
- pages/mcp/hooks/useMcpSpanSearchProps
- sessions/components/{filterReleaseDropdown,releaseTableSearch,
releaseHealth,releaseHealthTable} and useOrganizationReleases
CHART_MAP-referenced session widgets, charts, and queries
(crashFreeSessionsChartWidget, releaseSessionCount/Percentage,
sessionHealth*, userHealth*, unhealthySessions, releaseNewIssues,
newAndResolvedIssue) and their dependencies (chartWithIssues,
chartMap, chartPlacement, chartSelectionTitle, useReleaseSession*,
useSessionHealthBreakdown, useUserHealthBreakdown, useErroredSessions,
useCrashFreeSessions, useNewAndResolvedIssues, useSessionProjectTotal,
useProjectHasSessions, useRecentIssues, useReleaseNewIssues,
sessions util) stay in place. They get cleaned up in the final PR
of the series alongside useHasPlatformizedInsights removal.
Refs DAIN-1568
…rgegritsouk/dain-1568-pr6-staging
…gegritsouk/dain-1568-pr6-staging
…rgegritsouk/dain-1568-pr6-staging
…egritsouk/dain-1568-pr6-staging
…georgegritsouk/dain-1568-pr6-staging
Final PR in the DAIN-1568 split. Now that PRs #114189, #114200, #114233, #114246, and #114248 have removed every caller of useHasPlatformizedInsights and every legacy module page, the hook and the chart-loader widgets that only existed to back the legacy implementations can go. - Delete useHasPlatformizedInsights.tsx and its usePlatformizedView query-param dev override. - Simplify usePrebuiltDashboardUrl to call useGetPrebuiltDashboard unconditionally; spanSummaryLink loses its dead undefined-fallback branch. - Trim chartWidgetLoader CHART_MAP to the entries that actually back rdChart deep-links from prebuilt dashboards. Remove the spec mocks for the queries the deleted widgets depended on. - Delete the now-orphaned overview*ChartWidget, http*ChartWidget, cache*ChartWidget, database*ChartWidget, queues*ChartWidget, resource*ChartWidget, mcpTrafficWidget, and session widgets (crashFreeSessions, releaseSession*, sessionHealth*, userHealth*, unhealthySessions, releaseNewIssues, newAndResolvedIssue). - Delete the chain of chart-helper hooks, queries, components, and settings exports those widgets imported (sessions/queries/use*, sessions/charts/chartWithIssues, sessions/components/chartMap, chartPlacement, chartSelectionTitle, sessions util, useDatabase*, useHttp*, useResource* hooks, FIELD_ALIASES exports, etc.). - Drop pages/{backend,frontend}/referrers and useFrontendQuery + the PAGE_SPAN_OPS / SPAN_OP_QUERY_PARAM exports that only the deleted widgets referenced. Refs DAIN-1568
…rgegritsouk/dain-1568-pr6-foundation ; Conflicts: ; static/app/views/insights/mobile/screens/views/screensLandingPage.spec.tsx
…gegritsouk/dain-1568-pr6-foundation
…rgegritsouk/dain-1568-pr6-foundation
…egritsouk/dain-1568-pr6-foundation
…georgegritsouk/dain-1568-pr6-foundation ; Conflicts: ; static/app/views/insights/sessions/components/chartMap.tsx ; static/app/views/insights/sessions/components/chartPlacement.tsx
…gegritsouk/dain-1568-pr6-foundation
…rgegritsouk/dain-1568-pr6-foundation
…egritsouk/dain-1568-pr6-foundation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sixth and final PR in the DAIN-1568 split. Lands on top of #114189, #114200, #114233, #114246, and #114248. The diff against `master` will look big until those merge — once they do, this PR shrinks to the foundation cleanup described below.
What this PR actually adds (once stacked PRs merge)
Verification
Refs DAIN-1568