fix: event type filter dropdown shows all types regardless of selection #19826
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
closes OSS-7322
Summary
Fixes a bug where selecting an event type in the events page filter dropdown caused all other event types to disappear from the dropdown menu. Users were unable to modify their selection or add additional event types.
Root Cause
The
EventsTypeFiltercomponent was receiving acountFilterthat included the currently selected event types. When querying the/events/count-by/eventAPI endpoint with this filter, only the already-selected event types were returned.Solution
Created a separate
countFilterForTypeDropdownthat excludes the event filter but preserves other filters (resource, date range). The dropdown now uses this unfiltered version while the chart/timeline continues using the original filteredcountFilter.Local Testing
Verified the fix works correctly by running the app locally:
Before selecting any event type - all types visible:

After selecting prefect.flow-run. - all types still visible:*

After adding prefect.task-run. - multiple selections work:*

Human Review Checklist
countFilterForTypeDropdowncorrectly excludessearch.eventwhile keepingsearch.resourceand date rangeInteractiveEventsChart) still uses the originalcountFilterfor proper filteringChecklist
<link to issue>"mint.json.Requested by: [email protected] (@desertaxle)
Link to Devin run: https://app.devin.ai/sessions/7826a40e4ef445d29b6623f0fa1a34b4