Skip to content

Recent searches under the All Messages search field - #3111

Open
ramonsmits wants to merge 2 commits into
ramon/audit-query-barfrom
ramon/audit-search-history
Open

Recent searches under the All Messages search field#3111
ramonsmits wants to merge 2 commits into
ramon/audit-query-barfrom
ramon/audit-search-history

Conversation

@ramonsmits

Copy link
Copy Markdown
Member

Stacked on:

Per-browser history of audit searches with one-click rerun.

  • Any query that used search text or an endpoint is remembered in this browser (most recent first, capped at 10, no duplicates), together with the time-range expressions it ran with. The range is part of a search's identity, and rerunning restores it, so an entry is a true "run this exact query again"
  • Review feedback applied: instead of a separate "History" dropdown, the recent searches float under the search field while it has focus, the way a browser address bar does. Typing narrows the list to entries whose search text or endpoint match; Escape dismisses it; a click in the field brings it back. An empty history shows nothing

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
ramonsmits force-pushed the ramon/audit-search-history branch from c517a7f to 717d38c Compare September 7, 2026 15:46
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));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Improvement Improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants