Skip to content

ref(dashboards): Remove circular dependencies - #127232

Merged
TkDodo merged 9 commits into
masterfrom
tkdodo/ref/dashboard-dependency-cycles
Oct 15, 2026
Merged

TkDodo merged 9 commits into
masterfrom
tkdodo/ref/dashboard-dependency-cycles

Conversation

@TkDodo

@TkDodo TkDodo commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Remove the circular dependencies behind all 26 dashboard coding-convention findings. Dataset query hooks now import response transforms from separate modules, and widget-builder helpers, constants, and context access no longer import the components or provider that use them.

lots of imports are changing but really, this just moves code around.

Sentry findings

Fixes CODING-CONVENTIONS-8YY.

Fixes CODING-CONVENTIONS-8Z0.

Fixes CODING-CONVENTIONS-8Z1.

Fixes CODING-CONVENTIONS-8ZE.

Fixes CODING-CONVENTIONS-8ZP.

Fixes CODING-CONVENTIONS-8ZS.

Fixes CODING-CONVENTIONS-8ZY.

Fixes CODING-CONVENTIONS-903.

Fixes CODING-CONVENTIONS-908.

Fixes CODING-CONVENTIONS-90H.

Fixes CODING-CONVENTIONS-90M.

Fixes CODING-CONVENTIONS-90N.

Fixes CODING-CONVENTIONS-912.

Fixes CODING-CONVENTIONS-913.

Fixes CODING-CONVENTIONS-917.

Fixes CODING-CONVENTIONS-91E.

Fixes CODING-CONVENTIONS-926.

Fixes CODING-CONVENTIONS-927.

Fixes CODING-CONVENTIONS-92K.

Fixes CODING-CONVENTIONS-930.

Fixes CODING-CONVENTIONS-9C2.

Fixes CODING-CONVENTIONS-9C3.

Fixes CODING-CONVENTIONS-9G5.

Fixes CODING-CONVENTIONS-9G7.

Fixes CODING-CONVENTIONS-9G9.

Fixes CODING-CONVENTIONS-9GA.

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Oct 13, 2026
@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

📊 Type Coverage Diff

Metric Before After Delta
Coverage 95.72% 95.72% ±0%
Typed 142,216 142,218 🟢 +2
Untyped 6,363 6,363 ±0
🔍 27 new type safety issues introduced

any-typed symbols (1 new)

File Line Detail
static/app/views/insights/common/components/chartTypes.ts 8 value (param)

Non-null assertions (!) (16 new)

File Line Detail
static/app/views/dashboards/datasetConfig/utils/mobileAppSizeResponseTransforms.ts 51 series[0]!
static/app/views/dashboards/datasetConfig/utils/mobileAppSizeResponseTransforms.ts 54 series[0]!
static/app/views/dashboards/datasetConfig/utils/mobileAppSizeResponseTransforms.ts 67 value!
static/app/views/dashboards/datasetConfig/utils/mobileAppSizeResponseTransforms.ts 113 values[0]!
static/app/views/dashboards/datasetConfig/utils/mobileAppSizeResponseTransforms.ts 138 values[0]!
static/app/views/dashboards/datasetConfig/utils/spansResponseTransforms.ts 170 seriesMeta?.fields?.[aggregate]!
static/app/views/dashboards/datasetConfig/utils/traceMetricsResponseTransforms.ts 59 transformedData.meta!.units!
static/app/views/dashboards/datasetConfig/utils/traceMetricsResponseTransforms.ts 59 transformedData.meta!
static/app/views/dashboards/datasetConfig/utils/traceMetricsResponseTransforms.ts 61 transformedData.meta!.units!
static/app/views/dashboards/datasetConfig/utils/traceMetricsResponseTransforms.ts 61 transformedData.meta!
static/app/views/dashboards/widgetCard/hooks/useErrorsWidgetQuery.tsx 195 eventsResponseTransforms.transformSeries!
static/app/views/dashboards/widgetCard/hooks/useLogsWidgetQuery.tsx 201 eventsResponseTransforms.transformSeries!
static/app/views/dashboards/widgetCard/hooks/useMobileAppSizeWidgetQuery.tsx 189 mobileAppSizeResponseTransforms.transformSeries!
static/app/views/dashboards/widgetCard/hooks/useSpansWidgetQuery.tsx 396 spansResponseTransforms.transformSeries!
static/app/views/dashboards/widgetCard/hooks/useTraceMetricsWidgetQuery.tsx 128 traceMetricsResponseTransforms.transformSeries!

...and 1 more

Type assertions (as) (10 new)

File Line Detail
static/app/views/dashboards/datasetConfig/utils/releaseQueryFields.ts 36 as DerivedStatusFields — agg as DerivedStatusFields
static/app/views/dashboards/datasetConfig/utils/spansResponseTransforms.ts 99 as EventsStats — data[groupName]?.[aggregate] as EventsStats
static/app/views/dashboards/datasetConfig/utils/spansResponseTransforms.ts 158 as DataUnit — meta?.valueUnit as DataUnit
static/app/views/dashboards/datasetConfig/utils/spansResponseTransforms.ts 159 as DataUnit — seriesMeta?.units?.[aggregate] as DataUnit
static/app/views/dashboards/datasetConfig/utils/spansResponseTransforms.ts 169 as AggregationOutputType — meta?.valueType as AggregationOutputType
static/app/views/dashboards/datasetConfig/utils/traceMetricsResponseTransforms.ts 89 as AggregationOutputType — timeSeries.meta.valueType as AggregationOutputType
static/app/views/dashboards/globalFilter/operatorLabels.ts 18 as TermOperator — operator as TermOperator
static/app/views/dashboards/widgetBuilder/components/visualize/utils.tsx 175 as ValidateColumnTypes — parameter.columnTypes as ValidateColumnTypes
static/app/views/dashboards/widgetBuilder/components/visualize/utils.tsx 191 as ValidateColumnTypes — parameter.columnTypes as ValidateColumnTypes
static/app/views/dashboards/widgetBuilder/components/visualize/utils.tsx 230 as FieldValueType — dataType as FieldValueType

This is informational only and does not block the PR.

@TkDodo
TkDodo marked this pull request as ready for review October 14, 2026 10:51
@TkDodo
TkDodo requested review from a team as code owners October 14, 2026 10:51

@priscilawebdev priscilawebdev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙌

# Conflicts:
#	static/app/views/dashboards/datasetConfig/traceMetrics.tsx
#	static/app/views/dashboards/globalFilter/numericFilterSelector.tsx
@TkDodo
TkDodo enabled auto-merge (squash) October 15, 2026 07:29
@TkDodo
TkDodo merged commit af4319b into master Oct 15, 2026
79 checks passed
@TkDodo
TkDodo deleted the tkdodo/ref/dashboard-dependency-cycles branch October 15, 2026 07:34

This branch was successfully deployed

1 active deployment
Preview — 379442da Deployed Oct 15, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants