Skip to content

fix: explore filters break when the explore's metrics_view differs in case from the resource name - #9955

Merged
nishantmonu51 merged 1 commit into
mainfrom
fix-dimension-filter
Sep 25, 2026
Merged

nishantmonu51 merged 1 commit into
mainfrom
fix-dimension-filter

Conversation

@nishantmonu51

Copy link
Copy Markdown
Collaborator

Explore dashboards lose all filtering when the explore's metrics_view value is written in a different case than the metrics view resource name. Resource names are case-insensitive in the runtime, so the explore reconciles and renders, but on the frontend clicking a leaderboard value does nothing and the + filter menu shows "No results found". Introduced by the unified expression filter refactor in #9746 (shipped in v0.90.0).

  • MetricsViewsProvider matched the metrics view against the resource list with a case-sensitive comparison, so the provider exposed no dimensions or measures. It now resolves the name case-insensitively while keeping its maps keyed by the requested name.
  • ExploreDashboardConfigProvider named the metrics view by the explore's reference, while the explore routes and Dashboard.svelte use the resource's own name from the GetExplore response. The filter expression ended up keyed under a name the dashboard never read, so once the chip appeared the queries still ran unfiltered. The provider now uses the resource name.
  • DashboardFetchMocks.mockMetricsExplore takes an optional metrics view resource name so tests can model the mismatch the way the runtime returns it.

Steps to reproduce

  1. In any project, name a metrics view file with mixed case, for example AUction_metrics.yaml.
  2. In an explore YAML, reference it in lowercase: metrics_view: auction_metrics.
  3. Open the explore. It loads and shows data.
  4. Click a value in any leaderboard, or open the + filter menu. Before this fix nothing gets filtered and the menu is empty.

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

…in case from the resource name

Resource names are case-insensitive in the runtime, so an explore whose `metrics_view` is written in a different case than the metrics view file still reconciles. On the frontend, `MetricsViewsProvider` looked the metrics view up with a case-sensitive comparison and came up empty, so the filter bar had nothing to offer and click-to-filter no-oped. `ExploreDashboardConfigProvider` also named the metrics view by the explore's reference while the explore routes use the resource name, so the filter expression was keyed under a name the dashboard never read and queries ran unfiltered.

- Resolve the metrics view case-insensitively in `MetricsViewsProvider`.
- Name the metrics view by its resource name in `ExploreDashboardConfigProvider`.
- Let the explore fetch mock carry a metrics view resource name that differs from the explore's reference.
@nishantmonu51
nishantmonu51 merged commit 4dfe041 into main Sep 25, 2026
19 of 20 checks passed
@nishantmonu51
nishantmonu51 deleted the fix-dimension-filter branch September 25, 2026 05:44
nishantmonu51 added a commit that referenced this pull request Sep 25, 2026
…in case from the resource name (#9955)

Resource names are case-insensitive in the runtime, so an explore whose `metrics_view` is written in a different case than the metrics view file still reconciles. On the frontend, `MetricsViewsProvider` looked the metrics view up with a case-sensitive comparison and came up empty, so the filter bar had nothing to offer and click-to-filter no-oped. `ExploreDashboardConfigProvider` also named the metrics view by the explore's reference while the explore routes use the resource name, so the filter expression was keyed under a name the dashboard never read and queries ran unfiltered.

- Resolve the metrics view case-insensitively in `MetricsViewsProvider`.
- Name the metrics view by its resource name in `ExploreDashboardConfigProvider`.
- Let the explore fetch mock carry a metrics view resource name that differs from the explore's reference.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants