Skip to content

feat: Add conditions to Dashboard filters; Support filter multi-select#1969

Merged
kodiakhq[bot] merged 3 commits intomainfrom
drew/dashboard-filter-where
Mar 24, 2026
Merged

feat: Add conditions to Dashboard filters; Support filter multi-select#1969
kodiakhq[bot] merged 3 commits intomainfrom
drew/dashboard-filter-where

Conversation

@pulpdrew
Copy link
Copy Markdown
Contributor

Summary

This PR improves dashboard filters

  1. Dashboard filters can now have an associated WHERE condition which filters the rows from which filter values will be queried.
  2. Multiple values can now be selected for a single dashboard filter

Screenshots or video

Multiple values can now be selected for a single filters:

Screenshot 2026-03-23 at 12 31 02 PM

Filters now have an optional condition, which filters the values which show up in the dropdown:

Screenshot 2026-03-23 at 12 30 44 PM Screenshot 2026-03-23 at 12 30 54 PM

This also applies to Preset Dashboard Filters

Screenshot 2026-03-23 at 12 33 34 PM

How to test locally or on Vercel

This can be partially tested in the preview environment, but testing the following requires running locally

  1. Preset dashboard filters
  2. External API support

References

  • Linear Issue: Closes HDX-3631 Closes HDX-2987
  • Related PRs:

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 23, 2026

🦋 Changeset detected

Latest commit: d7aa746

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@hyperdx/common-utils Patch
@hyperdx/api Patch
@hyperdx/app Patch
@hyperdx/otel-collector Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hyperdx-oss Ready Ready Preview, Comment Mar 24, 2026 6:04pm

Request Review

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 23, 2026

Knip - Unused Code Analysis

⚪ No changes detected (231 issues on both main and PR)

What is this?

Knip finds unused files, dependencies, and exports in your codebase.
This comment compares the PR branch against main to detect regressions.

Run yarn knip locally to see full details.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 23, 2026

PR Review

  • whereLanguage not optional in DashboardFilterSchema (types.ts:721) → Should be SearchConditionLanguageSchema.optional(). The form submit handler explicitly sets whereLanguage: undefined when where is empty, and existing filters in the DB lack this field — both will fail Zod validation or produce type errors. All other paired optional fields in the codebase (e.g. havingLanguage) use .optional().

  • ⚠️ calls[resultIndex] could be undefined during async transitions (useDashboardFilterValues.tsx:216) → calls and results are parallel only after sources load; add a guard: if (!call) return [] before accessing call.keys.

  • ⚠️ E2E test uses fragile parent selector (dashboard.spec.ts:538) → filterSelect.locator('..') is a brittle DOM traversal; prefer a test-id or role selector on the chip/pill element instead.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 23, 2026

E2E Test Results

All tests passed • 93 passed • 3 skipped • 967s

Status Count
✅ Passed 93
❌ Failed 0
⚠️ Flaky 1
⏭️ Skipped 3

Tests ran across 4 shards in parallel.

View full report →

@pulpdrew pulpdrew force-pushed the drew/dashboard-filter-where branch from c6872fe to 20e69f3 Compare March 23, 2026 16:46
@pulpdrew pulpdrew requested review from a team and karl-power and removed request for a team March 23, 2026 16:57
@kodiakhq kodiakhq bot merged commit 275dc94 into main Mar 24, 2026
14 of 15 checks passed
@kodiakhq kodiakhq bot deleted the drew/dashboard-filter-where branch March 24, 2026 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants