Skip to content

[Sig Events] Unified KIs table in Stream details UI#259553

Merged
achyutjhunjhunwala merged 33 commits intoelastic:mainfrom
mykolaharmash:sig-events-stream-details-unified-table
Apr 1, 2026
Merged

[Sig Events] Unified KIs table in Stream details UI#259553
achyutjhunjhunwala merged 33 commits intoelastic:mainfrom
mykolaharmash:sig-events-stream-details-unified-table

Conversation

@mykolaharmash
Copy link
Copy Markdown
Contributor

@mykolaharmash mykolaharmash commented Mar 25, 2026

Closes - https://github.com/elastic/streams-program/issues/1070
This changes replaces the current sig events management UI in the stream details with a unified Knowledge Indicators table that shows both features and queries. Additionally, user can switch into Rules table that focuses on queries that have a backing rule.

Notable changes:

  • Reworked Stream Details “Significant Events” into a unified Knowledge Indicators + Rules tables with search, filtering and bulk actions.
  • Introduced a new task orchestration hook useKnowledgeIndicatorsTask() for KI generation. It improves the flow for starting/canceling generation by giving a user an immediate feedback in the UI.
  • Added reusable details flyout for feature/query KIs. Content of the flyout is intentionally extacted into its own component so it can be reused in other places like feature details flyout and future query promotion flyout sidebar.
  • Reworked the empty state for the Sig Events screen to also use the new useKnowledgeIndicatorsTask() hook
  • Refactored system feature flyout to reuse shared KI feature-details content
CleanShot.2026-03-25.at.16.13.48.mp4

},
});

const filteredRules = useMemo(() => {
Copy link
Copy Markdown
Contributor

@macroscopeapp macroscopeapp bot Mar 25, 2026

Choose a reason for hiding this comment

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

🟠 High rules_table/rules_table.tsx:57

When searchTerm changes and filteredRules shrinks, pagination.pageIndex is not reset to 0. If a user is on page 5 and searches for something matching only 5 rules, pageIndex stays at 4, causing TableTitle to display incorrect counts like "5-5 of 5 Rules" instead of "1-5 of 5 Rules". Consider resetting pageIndex to 0 whenever filteredRules changes.

No longer relevant as of 07ec962

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@mykolaharmash This issue is still relevant. The bot incorrectly says that its no longer relevant. We need fixed

I see you are already handling this for KnowledgeIndicatorTable

We must do the same here

https://github.com/elastic/kibana/pull/259553/changes#diff-7f8434910e26fdeaa4659987d04ef1f7f5b46c2577b715f6cf294448c2e5ebd9R109-R120

@mykolaharmash mykolaharmash changed the title Sig events stream details unified table [Sig Events] Unified KIs table in Stream details UI Mar 25, 2026
@mykolaharmash mykolaharmash marked this pull request as ready for review March 25, 2026 15:31
@mykolaharmash mykolaharmash requested review from a team as code owners March 25, 2026 15:31
@mykolaharmash mykolaharmash added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting labels Mar 25, 2026
@ruflin ruflin added the Feature:SigEvents Significant events feature, related to streams and rules/alerts (RnA) label Mar 26, 2026
@ruflin
Copy link
Copy Markdown
Contributor

ruflin commented Mar 26, 2026

Started some initial testing.

  • Error: I get the error below if I just click "Generate"
    • The generate button, does it trigger KI features and KI query generation?
  • Naming / Description: Likely we need to make some adjustments but we can do this as a follow up.
  • Advanced -> Identify features: I assumes this will go away?
Screenshot 2026-03-26 at 09 36 07 Screenshot 2026-03-26 at 09 36 24

@ruflin
Copy link
Copy Markdown
Contributor

ruflin commented Mar 26, 2026

Tested a bit more. This is heading in the right direction. @boriskirov We need to have a discussion around potentially 2 buttons for LLM selection around KI features and KI query generation or somehow make it a selection or similar.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 26, 2026

📝 Walkthrough

Walkthrough

This pull request restructures the significant events UI layer by replacing the "add/edit significant event flyout" workflow with a new "knowledge indicators and rules" system. The changes remove components for manual and AI-generated event creation (AddSignificantEventFlyout, ManualFlowForm, GeneratedFlowForm, and supporting helpers) and introduce new components for viewing/managing knowledge indicators as features and queries (KnowledgeIndicatorDetailsFlyout, KnowledgeIndicatorsTable, RulesTable). New hooks manage bulk deletion and generation task lifecycle. The main significant events view is rewritten to support filtering by type and status, with generation integrated into an empty state. Minor updates include schema refinements to TaskResult discriminant union shape, API method additions for bulk query deletion, and build manifest dependency expansion.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • 🛠️ Update Documentation: Commit on current branch
  • 🛠️ Update Documentation: Create PR

Comment @coderabbitai help to get the list of available commands and usage tips.

@ruflin
Copy link
Copy Markdown
Contributor

ruflin commented Mar 31, 2026

Did a manual test run and works as expected after setting the global AI settings.

@ruflin
Copy link
Copy Markdown
Contributor

ruflin commented Apr 1, 2026

@mykolaharmash I resolved the merge conflict on this branch to get another run.

Tested the changes locally, works as expected.

@ruflin
Copy link
Copy Markdown
Contributor

ruflin commented Apr 1, 2026

Side note, the url for genai settings changed to http://localhost:5601/app/management/ml/model_settings but we can address this in a follow up PR.

@mykolaharmash mykolaharmash enabled auto-merge (squash) April 1, 2026 07:44
@mykolaharmash mykolaharmash disabled auto-merge April 1, 2026 08:13
@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #37 / Alerting alerts_as_data alerts as data should write alert docs during rule execution with flapping.enabled: true
  • [job] [logs] Jest Tests #1 / buildEsqlFetchSubscribe changing a ES|QL query with no transformational commands should not change state when loading and finished if index pattern and columns are the same

Metrics [docs]

Async chunks

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

id before after diff
streamsApp 1.9MB 1.8MB -16.4KB
Unknown metric groups

ESLint disabled line counts

id before after diff
streamsApp 139 136 -3

Total ESLint disabled count

id before after diff
streamsApp 147 144 -3

History

Comment on lines +46 to +55
const genAiConnectors = useGenAIConnectors({
streamsRepositoryClient: streams.streamsRepositoryClient,
uiSettings: core.uiSettings,
});

const isDefaultAiConnectorMissing =
!genAiConnectors.loading && !Boolean(genAiConnectors.defaultConnector);
const genAiSettingsUrl = core.application.getUrlForApp('management', {
path: GEN_AI_SETTINGS_PATH,
});
Copy link
Copy Markdown
Contributor

@achyutjhunjhunwala achyutjhunjhunwala Apr 1, 2026

Choose a reason for hiding this comment

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

Calling this hook just to read the default connector is an overhead as it also does API call to fetch our other connectors stored. This can be simplified

Suggested change
const genAiConnectors = useGenAIConnectors({
streamsRepositoryClient: streams.streamsRepositoryClient,
uiSettings: core.uiSettings,
});
const isDefaultAiConnectorMissing =
!genAiConnectors.loading && !Boolean(genAiConnectors.defaultConnector);
const genAiSettingsUrl = core.application.getUrlForApp('management', {
path: GEN_AI_SETTINGS_PATH,
});
const defaultConnector = core.uiSettings.get<string>(GEN_AI_SETTINGS_DEFAULT_AI_CONNECTOR);
const isDefaultAiConnectorMissing = !defaultConnector || defaultConnector === 'NO_DEFAULT_CONNECTOR';
const genAiSettingsUrl = core.application.getUrlForApp('management', {
path: GEN_AI_SETTINGS_PATH,
});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we address this in a follow up PR to not have to retrigger the full CI cycle?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good point, I'll address it in a follow up

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@mykolaharmash this would have a slight perf impact (like unnecessary API call).
We can definitely go with this and handle it in next PR, if possible before FF

Copy link
Copy Markdown
Contributor

@achyutjhunjhunwala achyutjhunjhunwala left a comment

Choose a reason for hiding this comment

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

Great work on the changes, but there are 2 changes which we would need bare minimum to go through

},
});

const filteredRules = useMemo(() => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@mykolaharmash This issue is still relevant. The bot incorrectly says that its no longer relevant. We need fixed

I see you are already handling this for KnowledgeIndicatorTable

We must do the same here

https://github.com/elastic/kibana/pull/259553/changes#diff-7f8434910e26fdeaa4659987d04ef1f7f5b46c2577b715f6cf294448c2e5ebd9R109-R120

Copy link
Copy Markdown
Contributor

@achyutjhunjhunwala achyutjhunjhunwala left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the change

@achyutjhunjhunwala achyutjhunjhunwala enabled auto-merge (squash) April 1, 2026 10:02
@achyutjhunjhunwala achyutjhunjhunwala merged commit 67ae442 into elastic:main Apr 1, 2026
21 checks passed
jeramysoucy pushed a commit to jeramysoucy/kibana that referenced this pull request Apr 1, 2026
Closes - elastic/streams-program#1070
This changes replaces the current sig events management UI in the stream
details with a unified Knowledge Indicators table that shows both
features and queries. Additionally, user can switch into Rules table
that focuses on queries that have a backing rule.

Notable changes:
- Reworked Stream Details “Significant Events” into a unified Knowledge
Indicators + Rules tables with search, filtering and bulk actions.
- Introduced a new task orchestration hook
`useKnowledgeIndicatorsTask()` for KI generation. It improves the flow
for starting/canceling generation by giving a user an immediate feedback
in the UI.
- Added reusable details flyout for feature/query KIs. Content of the
flyout is intentionally extacted into its own component so it can be
reused in other places like feature details flyout and future query
promotion flyout sidebar.
- Reworked the empty state for the Sig Events screen to also use the new
`useKnowledgeIndicatorsTask()` hook
- Refactored system feature flyout to reuse shared KI feature-details
content


https://github.com/user-attachments/assets/41e70d86-91c7-4a1e-944e-69116768292c

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Nicolas Ruflin <spam@ruflin.com>
eokoneyo pushed a commit to davismcphee/kibana that referenced this pull request Apr 2, 2026
Closes - elastic/streams-program#1070
This changes replaces the current sig events management UI in the stream
details with a unified Knowledge Indicators table that shows both
features and queries. Additionally, user can switch into Rules table
that focuses on queries that have a backing rule.

Notable changes:
- Reworked Stream Details “Significant Events” into a unified Knowledge
Indicators + Rules tables with search, filtering and bulk actions.
- Introduced a new task orchestration hook
`useKnowledgeIndicatorsTask()` for KI generation. It improves the flow
for starting/canceling generation by giving a user an immediate feedback
in the UI.
- Added reusable details flyout for feature/query KIs. Content of the
flyout is intentionally extacted into its own component so it can be
reused in other places like feature details flyout and future query
promotion flyout sidebar.
- Reworked the empty state for the Sig Events screen to also use the new
`useKnowledgeIndicatorsTask()` hook
- Refactored system feature flyout to reuse shared KI feature-details
content


https://github.com/user-attachments/assets/41e70d86-91c7-4a1e-944e-69116768292c

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Nicolas Ruflin <spam@ruflin.com>
mykolaharmash added a commit that referenced this pull request Apr 2, 2026
Closes elastic/streams-program#1071

This is a follow up change after [the unified KIs
table](#259553).

* Adds a promotion callout for all unbacked queries
* Adds flyout to inspect/delete suggested queries
* Cleans up a few obsolete files



https://github.com/user-attachments/assets/42f622ee-79de-4a2b-82ac-6948592da8c7

---------

Co-authored-by: Mykola Harmash <mykola.harmash@elastic.co>
Co-authored-by: Mykola Harmash <mykola.harmash@gmail.com>
paulinashakirova pushed a commit to paulinashakirova/kibana that referenced this pull request Apr 2, 2026
Closes - elastic/streams-program#1070
This changes replaces the current sig events management UI in the stream
details with a unified Knowledge Indicators table that shows both
features and queries. Additionally, user can switch into Rules table
that focuses on queries that have a backing rule.

Notable changes:
- Reworked Stream Details “Significant Events” into a unified Knowledge
Indicators + Rules tables with search, filtering and bulk actions.
- Introduced a new task orchestration hook
`useKnowledgeIndicatorsTask()` for KI generation. It improves the flow
for starting/canceling generation by giving a user an immediate feedback
in the UI.
- Added reusable details flyout for feature/query KIs. Content of the
flyout is intentionally extacted into its own component so it can be
reused in other places like feature details flyout and future query
promotion flyout sidebar.
- Reworked the empty state for the Sig Events screen to also use the new
`useKnowledgeIndicatorsTask()` hook
- Refactored system feature flyout to reuse shared KI feature-details
content


https://github.com/user-attachments/assets/41e70d86-91c7-4a1e-944e-69116768292c

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Nicolas Ruflin <spam@ruflin.com>
paulinashakirova pushed a commit to paulinashakirova/kibana that referenced this pull request Apr 2, 2026
Closes elastic/streams-program#1071

This is a follow up change after [the unified KIs
table](elastic#259553).

* Adds a promotion callout for all unbacked queries
* Adds flyout to inspect/delete suggested queries
* Cleans up a few obsolete files



https://github.com/user-attachments/assets/42f622ee-79de-4a2b-82ac-6948592da8c7

---------

Co-authored-by: Mykola Harmash <mykola.harmash@elastic.co>
Co-authored-by: Mykola Harmash <mykola.harmash@gmail.com>
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 Feature:SigEvents Significant events feature, related to streams and rules/alerts (RnA) release_note:skip Skip the PR/issue when compiling release notes v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants