Recent searches under the All Messages search field - #3111
Open
ramonsmits wants to merge 2 commits into
Open
Conversation
This was referenced Sep 7, 2026
ramonsmits
force-pushed
the
ramon/audit-search-history
branch
from
September 7, 2026 12:40
b29dc57 to
c517a7f
Compare
Any query that used search text or an endpoint is remembered in this browser (most recent first, capped, no duplicates) behind a History control, with the time-range expressions it ran with: the range is part of a search's identity, entries show it, and rerunning restores it so a history entry is a true "run this exact query again".
Review feedback: a separate "History" dropdown sat next to the search field yet listed whole queries, which felt disconnected. The history now wraps the search field and floats below it when the field gets focus, the way a browser address bar does. Typing narrows the list to entries whose search text or endpoint match; Escape dismisses it and a click in the field brings it back. Each entry still carries the full query (text, endpoint, time range) and reruns all of it. An empty history shows nothing.
ramonsmits
force-pushed
the
ramon/audit-search-history
branch
from
September 7, 2026 15:46
c517a7f to
717d38c
Compare
johnsimons
reviewed
Sep 8, 2026
Comment on lines
+69
to
+76
| function onOutsidePointer(event: PointerEvent) { | ||
| if (open.value && root.value && !root.value.contains(event.target as Node)) open.value = false; | ||
| } | ||
| function onKeydown(event: KeyboardEvent) { | ||
| if (event.key === "Escape") open.value = false; | ||
| } | ||
| onMounted(() => document.addEventListener("pointerdown", onOutsidePointer)); | ||
| onBeforeUnmount(() => document.removeEventListener("pointerdown", onOutsidePointer)); |
Member
There was a problem hiding this comment.
Again, please consider using https://developer.mozilla.org/en-US/docs/Web/API/Popover_API
johnsimons
approved these changes
Sep 8, 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.
Stacked on:
Per-browser history of audit searches with one-click rerun.