[ResponseOps][Alerting v2] Episode details page#260942
Draft
umbopepato wants to merge 7 commits intoelastic:mainfrom
Draft
[ResponseOps][Alerting v2] Episode details page#260942umbopepato wants to merge 7 commits intoelastic:mainfrom
umbopepato wants to merge 7 commits intoelastic:mainfrom
Conversation
Contributor
|
🤖 Jobs for this PR can be triggered through checkboxes. 🚧
ℹ️ To trigger the CI, please tick the checkbox below 👇
|
umbopepato
commented
Apr 2, 2026
| http: HttpStart; | ||
| } | ||
|
|
||
| export function AlertEpisodeActions({ |
Member
Author
There was a problem hiding this comment.
Renamed this to ..Actions since it's generic and used both in the episodes table and details page
Comment on lines
+38
to
+42
| it('omits status badges when episode status is missing', () => { | ||
| render(<RelatedAlertEpisode episode={{ 'episode.id': 'ep-2' }} rule={rule} href="/x" />); | ||
|
|
||
| expect(screen.queryByTestId('relatedAlertEpisodeGrouping')).toBeInTheDocument(); | ||
| }); |
Contributor
There was a problem hiding this comment.
🟢 Low related/related_alert_episode.test.tsx:38
The test 'omits status badges when episode status is missing' on line 38-42 does not verify its stated purpose. It asserts relatedAlertEpisodeGrouping is present, but that element always renders regardless of status. The test passes even when AlertEpisodeStatusBadges is incorrectly rendered. Consider querying for the status badge test ID and asserting it is not in the document.
render(<RelatedAlertEpisode episode={{ 'episode.id': 'ep-2' }} rule={rule} href="/x" />);
- expect(screen.queryByTestId('relatedAlertEpisodeGrouping')).toBeInTheDocument();
+ expect(screen.queryByTestId('relatedAlertEpisodeGrouping')).toBeInTheDocument();
+ expect(screen.queryByTestId('alertEpisodeStatusBadge')).not.toBeInTheDocument();🤖 Copy this AI Prompt to have your agent fix this:
In file x-pack/platform/packages/shared/response-ops/alerting-v2-episodes-ui/components/related/related_alert_episode.test.tsx around lines 38-42:
The test 'omits status badges when episode status is missing' on line 38-42 does not verify its stated purpose. It asserts `relatedAlertEpisodeGrouping` is present, but that element always renders regardless of status. The test passes even when `AlertEpisodeStatusBadges` is incorrectly rendered. Consider querying for the status badge test ID and asserting it is not in the document.
Evidence trail:
x-pack/platform/packages/shared/response-ops/alerting-v2-episodes-ui/components/related/related_alert_episode.test.tsx lines 38-41 - test asserts `relatedAlertEpisodeGrouping` is present
x-pack/platform/packages/shared/response-ops/alerting-v2-episodes-ui/components/related/related_alert_episode.tsx lines 55-67 - `relatedAlertEpisodeGrouping` test ID is on the grouping container which always renders
x-pack/platform/packages/shared/response-ops/alerting-v2-episodes-ui/components/related/related_alert_episode.tsx lines 43-51 - `AlertEpisodeStatusBadges` is conditionally rendered only when `status` is truthy
Contributor
⏳ Build in-progress, with failures
Failed CI StepsTest Failures
History
|
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.
📄 Summary
episode_details_page.tsx) with routing and navigation from the episodes experience.@kbn/alerting-v2-episodes-uicomponents to avoid inconsistencies in folder structure and naming, improves consistency, naming and composition of/queries(esql query builders).fetch_related_alert_episodesAPI wiring and related query/helpers.🧪 Verification steps
✅ Happy Path
⚡️ Edge Cases
❌ Failure Cases
🐞 Known issues
_source.dataextraction query both in terms of functionality and performance📷 Screenshots
⏪ Backport rationale
Not backporting since this is for internal review only, under a feature flag
🔗 References
Closes https://github.com/elastic/rna-program/issues/208
☑️ Checklist
backport:*labels.