Carry search filters into widget replay search (6.3)#26167
Merged
dennisoelkers merged 1 commit intoMay 29, 2026
Conversation
* Carry search filters into widget replay search Replaying a dashboard widget previously dropped any search filters configured on it — only the query string, time range, streams, and parameters travelled along. ReplaySearchButton now also accepts the widget's `filters` (a `FiltersType` list of `SearchFilter`), serialises them into the local-storage payload that the new search page pulls out via the `session-id` query param, and ensures the session-id is added to the URL whenever filters or parameters are present. NewSearchPage's session reader is widened to extract `filters` from the stored payload and forwards them via `useCreateSavedSearch` → `ViewGenerator` → `QueryGenerator` (which already accepts a 6th `searchFilters` positional arg, just lacking a caller). Also realigns `QueryGenerator`'s `SearchFilter` import to `views/types` to match what `Query.filters` actually stores — the previous `components/event-definitions/event-definitions-types` flavour required fields (`id`, `title`, `disabled`, `negation`) that widget filters don't necessarily carry. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * Add changelog snippet for #26151 --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com> (cherry picked from commit a4d1554)
linuspahl
approved these changes
May 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Note: This is a backport of #26151 to
6.3.Note: This needs a backport to previous versions.
Description
When clicking "Replay search" on a dashboard widget that has search filters configured, the resulting search now includes those filters. Previously they were dropped, so the replayed search returned a broader result set than the widget.
Filters are persisted to local storage under the replay
session-id(alongside parameters) and picked up byNewSearchPagewhen it builds the saved search view.Motivation and Context
Fixes Graylog2/graylog-plugin-enterprise#8869. The replay button promises to land the user on the same search the widget ran, but it was only forwarding query/timerange/streams/parameters — search filters were silently lost.
How Has This Been Tested?
ReplaySearchButton.test.tsx:session-idwhen filters are presentsession-idwhen neither parameters nor filters are present (or filters list is empty)NewSearchPagecan read them backScreenshots (if appropriate):
Types of changes
Checklist: