Skip to content

Conversation

@Zylphrex
Copy link
Member

It was possible for the sort by not to be one of the selected fields.

@Zylphrex Zylphrex requested a review from a team as a code owner November 18, 2025 21:57
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Nov 18, 2025
}

const baseVisualize = value.find(isBaseVisualize);
return baseVisualize ? Visualize.fromJSON(baseVisualize) : [];
Copy link
Contributor

Choose a reason for hiding this comment

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

Bug: Support for Multiple Visualizations Broken

The parseVisualizes function uses find() to get only the first BaseVisualize object from the array, discarding any additional visualizations. This breaks support for multiple visualizations that worked in the previous implementation which used filter().flatMap() to process all BaseVisualize objects.

Fix in Cursor Fix in Web

}

return !!value.name && !!value.type;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Bug: Refine isTraceMetric Validation for Null and Types

The isTraceMetric function crashes when value is null because typeof null === 'object' in JavaScript, causing line 27 to attempt property access on null which throws a TypeError. Additionally, the function incorrectly rejects valid TraceMetric objects with empty strings (like {name: '', type: ''} used in defaultMetricQuery) because !!'' evaluates to false. The checks should verify property types instead of truthiness and explicitly exclude null.

Fix in Cursor Fix in Web

Copy link
Member

@gggritso gggritso left a comment

Choose a reason for hiding this comment

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

Makes sense overall, but those anys are a big liability, especially for any of them that parse URL data which could be null or whatever. Worth fixing IMO!

Thanks for the fix 🙏🏻

Copy link
Member

@gggritso gggritso left a comment

Choose a reason for hiding this comment

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

👍🏻

@Zylphrex Zylphrex merged commit aab10a4 into master Nov 20, 2025
47 checks passed
@Zylphrex Zylphrex deleted the txiao/fix/validate-aggregate-sort-bys-for-metrics branch November 20, 2025 15:12
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.

3 participants