Skip to content

Conversation

@scttcper
Copy link
Member

@scttcper scttcper commented Nov 7, 2025

adds a template dropdown and moves customize section into a collapsible component

overall feel of the form after these changes

image

template options

image

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Nov 7, 2025
@codecov
Copy link

codecov bot commented Nov 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #102992      +/-   ##
===========================================
- Coverage   80.63%    80.63%   -0.01%     
===========================================
  Files        9020      9020              
  Lines      392592    392572      -20     
  Branches    24972     24969       -3     
===========================================
- Hits       316558    316540      -18     
+ Misses      75637     75635       -2     
  Partials      397       397              

@scttcper scttcper marked this pull request as ready for review November 7, 2025 23:00
@scttcper scttcper requested a review from a team as a code owner November 7, 2025 23:00
Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Bug: Default Value Mismatch Breaks UI

The defaultValue is set to "automatic" but the valid values for resolutionStrategy are 'default' and 'custom'. This will cause the radio field to have an invalid default value that doesn't match any of the available options.

static/app/views/detectors/components/forms/metric/resolveSection.tsx#L133-L134

choices={resolutionStrategyChoices}
defaultValue="automatic"

Fix in Cursor Fix in Web


// Only set query if template has one and user hasn't customized the filter
if (meta.query !== undefined && !currentQuery) {
formContext.form?.setValue(METRIC_DETECTOR_FORM_FIELDS.query, meta.query);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Bug: Template Query Logic Prevents Updates

When switching between templates that both have queries, the query won't update because !currentQuery evaluates to false. After selecting a template with a query, switching to another template with a different query won't apply the new query value since currentQuery is now truthy from the first template.

Fix in Cursor Fix in Web

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