[Sig Events] Unified KIs table in Stream details UI#259553
[Sig Events] Unified KIs table in Stream details UI#259553achyutjhunjhunwala merged 33 commits intoelastic:mainfrom
Conversation
…etails-unified-table
…etails-unified-table
…etails-unified-table
...red/streams_app/public/components/sig_events/stream_detail_significant_events_view/index.tsx
Show resolved
Hide resolved
...eam_detail_significant_events_view/knowledge_indicators_table/knowledge_indicators_table.tsx
Show resolved
Hide resolved
...blic/components/stream_detail_significant_events_view/hooks/use_knowledge_indicators_task.ts
Outdated
Show resolved
Hide resolved
...blic/components/sig_events/stream_detail_significant_events_view/rules_table/rules_table.tsx
Show resolved
Hide resolved
…tream-details-unified-table
| }, | ||
| }); | ||
|
|
||
| const filteredRules = useMemo(() => { |
There was a problem hiding this comment.
🟠 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
There was a problem hiding this comment.
@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
...ents/sig_events/stream_detail_significant_events_view/hooks/use_knowledge_indicators_task.ts
Outdated
Show resolved
Hide resolved
…etails-unified-table
…d-table' into sig-events-stream-details-unified-table
|
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. |
📝 WalkthroughWalkthroughThis 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)
Comment |
…etails-unified-table
…etails-unified-table
|
Did a manual test run and works as expected after setting the global AI settings. |
…tream-details-unified-table
…etails-unified-table
|
@mykolaharmash I resolved the merge conflict on this branch to get another run. Tested the changes locally, works as expected. |
|
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. |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
|
| 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, | ||
| }); |
There was a problem hiding this comment.
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
| 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, | |
| }); |
There was a problem hiding this comment.
Can we address this in a follow up PR to not have to retrigger the full CI cycle?
There was a problem hiding this comment.
Good point, I'll address it in a follow up
There was a problem hiding this comment.
@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
achyutjhunjhunwala
left a comment
There was a problem hiding this comment.
Great work on the changes, but there are 2 changes which we would need bare minimum to go through
| }, | ||
| }); | ||
|
|
||
| const filteredRules = useMemo(() => { |
There was a problem hiding this comment.
@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
…d-table' into sig-events-stream-details-unified-table
…etails-unified-table
achyutjhunjhunwala
left a comment
There was a problem hiding this comment.
LGTM, thanks for the change
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>
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>
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>
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>
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>


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:
useKnowledgeIndicatorsTask()for KI generation. It improves the flow for starting/canceling generation by giving a user an immediate feedback in the UI.useKnowledgeIndicatorsTask()hookCleanShot.2026-03-25.at.16.13.48.mp4