Skip to content

feat(dashboards): Add a row model for the unified trace metrics visualize list - #132043

Open
edwardgou-sentry wants to merge 9 commits into
masterfrom
edwardgou-sentry/feat/trace-metric-row-model
Open

edwardgou-sentry wants to merge 9 commits into
masterfrom
edwardgou-sentry/feat/trace-metric-row-model

Conversation

@edwardgou-sentry

@edwardgou-sentry edwardgou-sentry commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Adds TraceMetricRow types to model field, aggregate, and equation rows in the trace metric widget builder for the unified visualize view.
Also includes several helper functions to manage editing rows. The new types and helper functions are not used yet and will be leveraged in an upcoming pr.

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

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

📊 Type Coverage Diff

Metric Before After Delta
Coverage 96.13% 96.14% 🟢 +0.01%
Typed 145,510 145,646 🟢 +136
Untyped 5,851 5,852 🔴 +1
🔍 1 new type safety issue introduced

Non-null assertions (!) (1 new)

File Line Detail
static/app/views/dashboards/widgetBuilder/components/visualize/traceMetrics/rowModel.ts 183 referenceMap[token.text]!

This is informational only and does not block the PR.

Comment thread knip.config.ts
entry: [
...productionEntryPoints.map(entry => `${entry}!`),
...frontendWorkspace.entry,
'views/dashboards/widgetBuilder/components/visualize/traceMetrics/rowModel.ts!',

@edwardgou-sentry edwardgou-sentry Nov 20, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

need this for now since file is unused and will cause knip failure. Will be deleted on the first pr that uses the new file.

@edwardgou-sentry
edwardgou-sentry marked this pull request as ready for review November 20, 2026 20:35
@edwardgou-sentry
edwardgou-sentry requested review from a team as code owners November 20, 2026 20:35
@edwardgou-sentry
edwardgou-sentry requested a review from a team November 20, 2026 20:35

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

@narsaynorath narsaynorath 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.

just some comments about the collapsing/non-collapsing functionality from reading a saved query

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

…e row model

A delete or reorder outside the list no longer shifts equation pairs, and labels that match no row stay in the saved text.

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit a3039db. Configure here.

if (!match) {
return;
}
unused.delete(match);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Single-pass equation matching steals exact matches

Medium Severity

Equation pairing in rowsFromFields runs exact-text matching and the unused-row fallback in a single loop over fields. When a new or modified equation appears before an unchanged equation, the fallback consumes the unchanged equation's row from previousEquations, causing the later equation to lose its exact match, row id, labels, and any reserved hidden rows.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit a3039db. Configure here.

This branch was successfully deployed

1 active deployment
Preview — a3039db4 Deployed Nov 23, 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