Skip to content

[One workflow] Event tab empty state in execute modal#272000

Merged
yngrdyn merged 3 commits into
elastic:mainfrom
yngrdyn:event-driven-triggers_testing-modal_empty-state
Jun 1, 2026
Merged

[One workflow] Event tab empty state in execute modal#272000
yngrdyn merged 3 commits into
elastic:mainfrom
yngrdyn:event-driven-triggers_testing-modal_empty-state

Conversation

@yngrdyn
Copy link
Copy Markdown
Contributor

@yngrdyn yngrdyn commented May 29, 2026

Relates to https://github.com/elastic/security-team/issues/16717.

Summary

When the event tab loads and the trigger-events search returns zero hits, show a dedicated empty state instead of an empty data grid. Copy is honest about time range and KQL (not “no events ever”), and points authors to practical next steps: widen the range, edit the query, open Manual, or fire a real event.

Motivation

Authors testing event-driven workflows often open the event tab before any rows appear in the default window (now-15mnow plus workflow triggerId scope). An empty grid with no explanation reads like a broken search. We need guidance that matches what the API actually returns: zero documents for the current time range and query—not a guarantee that the trigger has never fired.

UX behavior

Empty state renders when:

  • Trigger-event search has finished loading (DataLoadingState.loaded)
  • Search is not in error
  • total === 0
  • Workflows events data view is ready

Two copy variants

Condition Title Guidance
Default workflow trigger scope in KQL (triggerId: …) No events in the selected time range Widen time range, adjust search-bar query, Manual tab, or trigger a real event and refresh
User changed KQL from default scope No events match your search Widen time range, adjust query, or Manual tab

Scope detection uses isDefaultTriggerEventSearchScope() (compares submitted KQL to buildDefaultTriggerEventSearchQuery()).

🎥 Demo

Screen.Recording.2026-05-29.at.23.39.21.mov

@yngrdyn yngrdyn self-assigned this May 29, 2026
@yngrdyn yngrdyn requested a review from a team as a code owner May 29, 2026 21:40
@yngrdyn yngrdyn added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting labels May 29, 2026
@botelastic botelastic Bot added the Team:One Workflow Team label for One Workflow (Workflow automation) label May 29, 2026
@h88 h88 self-requested a review June 1, 2026 07:45
Copy link
Copy Markdown
Contributor

@h88 h88 left a comment

Choose a reason for hiding this comment

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

LGTM.
For consideration: 1- higher test coverage (custom-KQL variant \etc...) 2- consider !isFetching in the empty state condition if you see a "flash"🪩 while refetching (reading the condition / haven't verified locally)

@yngrdyn yngrdyn enabled auto-merge (squash) June 1, 2026 09:11
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
workflowsManagement 1893 1894 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
workflowsManagement 2.5MB 2.5MB +2.1KB

History

cc @yngrdyn

@yngrdyn yngrdyn merged commit 21758ad into elastic:main Jun 1, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:One Workflow Team label for One Workflow (Workflow automation) v9.5.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants