feat(tracemetrics): Disable Save As for equations#113089
feat(tracemetrics): Disable Save As for equations#113089narsaynorath merged 2 commits intomasterfrom
Conversation
Adds a tooltip and disables the button for the equation. Also filters it out from "All Metrics"
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 542cd44. Configure here.
| const visualize = metricQuery.queryParams.visualizes[0]!; | ||
| return { | ||
| key: `add-to-dashboard-${index}`, | ||
| label: `${metricQuery.label ?? getVisualizeLabel(index, isVisualizeEquation(metricQuery.queryParams.visualizes[0]!))}: ${ |
There was a problem hiding this comment.
"All Metrics" silently no-ops when all queries are equations
Medium Severity
The "All Metrics" submenu option appears whenever metricQueries.length > 1, but the onAction handler filters out all equations before calling addToDashboard. If every query is an equation, the filter produces an empty array, and addToDashboard silently returns with no user feedback. The option remains visible and enabled despite being a no-op, which is inconsistent with the individual equation items being properly disabled with tooltips.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 542cd44. Configure here.
There was a problem hiding this comment.
Not an issue. You can't remove the last metric.
Thought it was necessary, double checked that it was not


Adds a tooltip and disables the button for the equation. Also filters it out from "All Metrics"