feat(heatmaps): disable heat maps selection for equations#117334
Merged
Conversation
Comment on lines
254
to
260
| )} | ||
| value={visualize.chartType} | ||
| menuTitle="Type" | ||
| options={getMetricsChartTypeOptions(organization)} | ||
| options={getMetricsChartTypeOptions(organization, isVisualizeEquation(visualize))} | ||
| onChange={option => handleChartTypeChange(option.value)} | ||
| /> | ||
| <CompactSelect |
Contributor
There was a problem hiding this comment.
Bug: An equation with chartType: HEATMAP loaded from a URL will attempt to render an unsupported heatmap component, causing an error.
Severity: MEDIUM
Suggested Fix
Add a validation check when loading a VisualizeEquation. If the chartType is HEATMAP, reset it to a default supported chart type. Alternatively, add a guard in the rendering logic within MetricPanel to prevent MetricsHeatMap from being rendered if the metric is an equation, falling back to a supported chart like MetricsGraph.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: static/app/views/explore/metrics/metricPanel/index.tsx#L254-L260
Potential issue: The pull request disables the heatmap chart type option in the UI for
metric equations. However, it does not prevent an equation from being loaded with
`chartType: HEATMAP` if this state is persisted in the URL. When such a URL is loaded,
the `MetricPanel` component will attempt to render a `MetricsHeatMap` for the equation.
This is an unsupported state, which will cause the `heatmapApiOptions` to be enabled and
trigger an API request with an equation expression, leading to an error. The application
should validate the chart type for equations upon loading to prevent this state.
Did we get this right? 👍 / 👎 to inform future reviews.
Member
Author
There was a problem hiding this comment.
it's probably fine for now. Not a huge issue since the api errors out but let's see how many people run into this issue
nsdeschenes
approved these changes
Jun 12, 2026
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.
contributes to DAIN-1682
right now we don't have proper heat maps support for equations. It might get added later idk but we're disabling the option for now. Also let me know if it's cleaner to just not have the Heap Map option instead of disabling it.