Skip to content

[Alert Details] Add investigation guide empty state#223974

Merged
justinkambic merged 12 commits intoelastic:mainfrom
justinkambic:222051/investigation-guide-empty-state
Jun 23, 2025
Merged

[Alert Details] Add investigation guide empty state#223974
justinkambic merged 12 commits intoelastic:mainfrom
justinkambic:222051/investigation-guide-empty-state

Conversation

@justinkambic
Copy link
Contributor

@justinkambic justinkambic commented Jun 13, 2025

Summary

Resolves #222051.

This PR makes a richer empty state UX for the Investigation Guide feature we added to the Alert Details page.

Before, when a rule did not have an investigation guide, the tab on the alert details page dedicated to the feature was disabled. Now, the tab is always enabled. When an investigation guide is present on a rule, a badge will display to indicate the tab contains content.

If the user clicks into the tab when the rule does not have an investigation guide, they will see an empty state with a call to action to create a guide. If the user decides to click the empty state button, it will open the Rule Edit flyout. I have added additional functionality that allows the flyout to take an initialStep prop, so we pre-set the flyout to the Details step which contains the text field the user can use to create their guide.

The copy, iconography, and layout of the tab heading are all in draft state pending some design feedback. I will also add some tests to the code that I have added.

20250613162001

Reviewing this PR

Note to technical writers: You can see the copy added for the empty state here.

Here's a screenshot as well:

image

Technical review

  1. Create a rule that will generate alerts; do not define an Investigation Guide for it
  2. Trigger an alert, and go to the details page
  3. You should see the Investigation guide tab is available, whereas on main it would be disabled
  4. Open the Investigation Guide tab, you should see the empty state with its CTA
  5. Click this button, the rule flyout should open in Edit mode, and the Details step should be pre-selected
  6. Define an investigation guide, this can be any text. Save the rule.
  7. Once you have saved the rule you should see the rule data update in the page. The empty state will be gone and the investigation guide you defined will be there instead.

@justinkambic justinkambic self-assigned this Jun 13, 2025
@justinkambic justinkambic added release_note:enhancement Team:actionable-obs Formerly "obs-ux-management", responsible for SLO, o11y alerting, significant events, & synthetics. labels Jun 13, 2025
@justinkambic justinkambic requested a review from a team as a code owner June 13, 2025 20:30
@justinkambic justinkambic added the backport:version Backport to applied version labels label Jun 13, 2025
@justinkambic justinkambic requested a review from a team as a code owner June 13, 2025 20:30
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-management-team (Team:obs-ux-management)

@github-actions github-actions bot added the author:obs-ux-management PRs authored by the obs ux management team label Jun 13, 2025
@justinkambic justinkambic force-pushed the 222051/investigation-guide-empty-state branch from 21c640a to 24ee038 Compare June 13, 2025 20:33
@justinkambic justinkambic force-pushed the 222051/investigation-guide-empty-state branch from 24ee038 to 80d9d1a Compare June 13, 2025 20:34
docLinks,
ruleTypeRegistry,
actionTypeRegistry,
fieldsMetadata,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Prettier or something in Windsurf rearranged these dependencies, I don't know why.

Copy link
Contributor

@nastasha-solomon nastasha-solomon left a comment

Choose a reason for hiding this comment

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

Thanks for the ping! Left some suggestions below.

Copy link
Contributor

@mgiota mgiota left a comment

Choose a reason for hiding this comment

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

@justinkambic I tested it and I verify that everything works as expected.

  • Investigation guide is always enabled
  • When there is no investigation guide, I can see the empty state
  • When I click on the call to action, the edit flyout opens with Investigation guide tab preselected
  • On save, I can see the rule data update in the page.

As a follow up issue, can we make it a bit prettier, so that it doesn't take the full space?
Screenshot 2025-06-20 at 12 41 05

Copy link
Contributor

@doakalexi doakalexi left a comment

Choose a reason for hiding this comment

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

ResponseOps changes LGTM

@justinkambic justinkambic force-pushed the 222051/investigation-guide-empty-state branch from 6a4810f to 64059f7 Compare June 23, 2025 17:39
@justinkambic justinkambic enabled auto-merge (squash) June 23, 2025 17:43
@justinkambic justinkambic merged commit dd2e7cb into elastic:main Jun 23, 2025
10 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19

https://github.com/elastic/kibana/actions/runs/15833124605

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
observability 1312 1314 +2

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/response-ops-rule-form 186 187 +1

Async chunks

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

id before after diff
apm 2.6MB 2.6MB +87.0B
datasetQuality 418.5KB 418.6KB +87.0B
discover 1.1MB 1.1MB +87.0B
infra 1.1MB 1.1MB +87.0B
ml 5.4MB 5.4MB +87.0B
monitoring 630.0KB 630.1KB +87.0B
observability 1.3MB 1.3MB +1.5KB
slo 988.1KB 988.2KB +87.0B
synthetics 1.0MB 1.0MB +87.0B
transform 623.4KB 623.5KB +87.0B
triggersActionsUi 1.5MB 1.5MB +89.0B
uptime 490.4KB 490.5KB +87.0B
total +2.5KB

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
@kbn/response-ops-rule-form 7 8 +1
Unknown metric groups

API count

id before after diff
@kbn/response-ops-rule-form 187 188 +1

History

cc @justinkambic

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.19 Backport failed because of merge conflicts

You might need to backport the following PRs to 8.19:
- [Observabililty] [Alert details] Fix active tab when opening new alert from Related alerts tab (#224287)
- [Observability] [Serverless] Introduce custom roles (#219861)
- [Observability Alerting] Refetch alert detail rule data on edit flyout submit (#222118)

Manual backport

To create the backport manually run:

node scripts/backport --pr 223974

Questions ?

Please refer to the Backport tool documentation

justinkambic added a commit to justinkambic/kibana that referenced this pull request Jun 24, 2025
## Summary

Resolves elastic#222051.

This PR makes a richer empty state UX for the Investigation Guide
feature we added to the Alert Details page.

Before, when a rule did not have an investigation guide, the tab on the
alert details page dedicated to the feature was disabled. Now, the tab
is always enabled. When an investigation guide is present on a rule, a
badge will display to indicate the tab contains content.

If the user clicks into the tab when the rule does not have an
investigation guide, they will see an empty state with a call to action
to create a guide. If the user decides to click the empty state button,
it will open the Rule Edit flyout. I have added additional functionality
that allows the flyout to take an `initialStep` prop, so we pre-set the
flyout to the `Details` step which contains the text field the user can
use to create their guide.

The copy, iconography, and layout of the tab heading are all in draft
state pending some design feedback. I will also add some tests to the
code that I have added.

![20250613162001](https://github.com/user-attachments/assets/5310e371-ebcb-4d42-acbc-86816817e042)

## Reviewing this PR

_Note to technical writers:_ You can see the copy added for the empty
state
[here](https://github.com/elastic/kibana/pull/223974/files#diff-71b439414e4974e2decb0f25c136f52ccea4b49ebe393af68dfc5fd184d56e1cR37).

Here's a screenshot as well:

<img width="375" alt="image"
src="https://github.com/user-attachments/assets/491d87ac-b473-484e-82cd-45a1bd197c61"
/>

### Technical review

1. Create a rule that will generate alerts; _do not_ define an
Investigation Guide for it
1. Trigger an alert, and go to the details page
1. You should see the Investigation guide tab is available, whereas on
`main` it would be disabled
1. Open the Investigation Guide tab, you should see the empty state with
its CTA
1. Click this button, the rule flyout should open in Edit mode, and the
Details step should be pre-selected
1. Define an investigation guide, this can be any text. Save the rule.
1. Once you have saved the rule you should see the rule data update in
the page. The empty state will be gone and the investigation guide you
defined will be there instead.

(cherry picked from commit dd2e7cb)

# Conflicts:
#	src/platform/packages/shared/response-ops/rule_form/src/rule_form.tsx
@justinkambic
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
8.19

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

justinkambic added a commit that referenced this pull request Jun 24, 2025
…225173)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[Alert Details] Add investigation guide empty state
(#223974)](#223974)

<!--- Backport version: 10.0.0 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Justin
Kambic","email":"jk@elastic.co"},"sourceCommit":{"committedDate":"2025-06-23T19:19:17Z","message":"[Alert
Details] Add investigation guide empty state (#223974)\n\n##
Summary\n\nResolves #222051.\n\nThis PR makes a richer empty state UX
for the Investigation Guide\nfeature we added to the Alert Details
page.\n\nBefore, when a rule did not have an investigation guide, the
tab on the\nalert details page dedicated to the feature was disabled.
Now, the tab\nis always enabled. When an investigation guide is present
on a rule, a\nbadge will display to indicate the tab contains
content.\n\nIf the user clicks into the tab when the rule does not have
an\ninvestigation guide, they will see an empty state with a call to
action\nto create a guide. If the user decides to click the empty state
button,\nit will open the Rule Edit flyout. I have added additional
functionality\nthat allows the flyout to take an `initialStep` prop, so
we pre-set the\nflyout to the `Details` step which contains the text
field the user can\nuse to create their guide.\n\nThe copy, iconography,
and layout of the tab heading are all in draft\nstate pending some
design feedback. I will also add some tests to the\ncode that I have
added.\n\n\n![20250613162001](https://github.com/user-attachments/assets/5310e371-ebcb-4d42-acbc-86816817e042)\n\n##
Reviewing this PR\n\n_Note to technical writers:_ You can see the copy
added for the
empty\nstate\n[here](https://github.com/elastic/kibana/pull/223974/files#diff-71b439414e4974e2decb0f25c136f52ccea4b49ebe393af68dfc5fd184d56e1cR37).\n\nHere's
a screenshot as well:\n\n<img width=\"375\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/491d87ac-b473-484e-82cd-45a1bd197c61\"\n/>\n\n###
Technical review\n\n1. Create a rule that will generate alerts; _do not_
define an\nInvestigation Guide for it\n1. Trigger an alert, and go to
the details page\n1. You should see the Investigation guide tab is
available, whereas on\n`main` it would be disabled\n1. Open the
Investigation Guide tab, you should see the empty state with\nits
CTA\n1. Click this button, the rule flyout should open in Edit mode, and
the\nDetails step should be pre-selected\n1. Define an investigation
guide, this can be any text. Save the rule.\n1. Once you have saved the
rule you should see the rule data update in\nthe page. The empty state
will be gone and the investigation guide you\ndefined will be there
instead.","sha":"dd2e7cb5f238df3b04f0aeebf1335496085e51a5","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement","Team:obs-ux-management","backport:version","v9.1.0","v8.19.0","author:obs-ux-management"],"title":"[Alert
Details] Add investigation guide empty
state","number":223974,"url":"https://github.com/elastic/kibana/pull/223974","mergeCommit":{"message":"[Alert
Details] Add investigation guide empty state (#223974)\n\n##
Summary\n\nResolves #222051.\n\nThis PR makes a richer empty state UX
for the Investigation Guide\nfeature we added to the Alert Details
page.\n\nBefore, when a rule did not have an investigation guide, the
tab on the\nalert details page dedicated to the feature was disabled.
Now, the tab\nis always enabled. When an investigation guide is present
on a rule, a\nbadge will display to indicate the tab contains
content.\n\nIf the user clicks into the tab when the rule does not have
an\ninvestigation guide, they will see an empty state with a call to
action\nto create a guide. If the user decides to click the empty state
button,\nit will open the Rule Edit flyout. I have added additional
functionality\nthat allows the flyout to take an `initialStep` prop, so
we pre-set the\nflyout to the `Details` step which contains the text
field the user can\nuse to create their guide.\n\nThe copy, iconography,
and layout of the tab heading are all in draft\nstate pending some
design feedback. I will also add some tests to the\ncode that I have
added.\n\n\n![20250613162001](https://github.com/user-attachments/assets/5310e371-ebcb-4d42-acbc-86816817e042)\n\n##
Reviewing this PR\n\n_Note to technical writers:_ You can see the copy
added for the
empty\nstate\n[here](https://github.com/elastic/kibana/pull/223974/files#diff-71b439414e4974e2decb0f25c136f52ccea4b49ebe393af68dfc5fd184d56e1cR37).\n\nHere's
a screenshot as well:\n\n<img width=\"375\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/491d87ac-b473-484e-82cd-45a1bd197c61\"\n/>\n\n###
Technical review\n\n1. Create a rule that will generate alerts; _do not_
define an\nInvestigation Guide for it\n1. Trigger an alert, and go to
the details page\n1. You should see the Investigation guide tab is
available, whereas on\n`main` it would be disabled\n1. Open the
Investigation Guide tab, you should see the empty state with\nits
CTA\n1. Click this button, the rule flyout should open in Edit mode, and
the\nDetails step should be pre-selected\n1. Define an investigation
guide, this can be any text. Save the rule.\n1. Once you have saved the
rule you should see the rule data update in\nthe page. The empty state
will be gone and the investigation guide you\ndefined will be there
instead.","sha":"dd2e7cb5f238df3b04f0aeebf1335496085e51a5"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/223974","number":223974,"mergeCommit":{"message":"[Alert
Details] Add investigation guide empty state (#223974)\n\n##
Summary\n\nResolves #222051.\n\nThis PR makes a richer empty state UX
for the Investigation Guide\nfeature we added to the Alert Details
page.\n\nBefore, when a rule did not have an investigation guide, the
tab on the\nalert details page dedicated to the feature was disabled.
Now, the tab\nis always enabled. When an investigation guide is present
on a rule, a\nbadge will display to indicate the tab contains
content.\n\nIf the user clicks into the tab when the rule does not have
an\ninvestigation guide, they will see an empty state with a call to
action\nto create a guide. If the user decides to click the empty state
button,\nit will open the Rule Edit flyout. I have added additional
functionality\nthat allows the flyout to take an `initialStep` prop, so
we pre-set the\nflyout to the `Details` step which contains the text
field the user can\nuse to create their guide.\n\nThe copy, iconography,
and layout of the tab heading are all in draft\nstate pending some
design feedback. I will also add some tests to the\ncode that I have
added.\n\n\n![20250613162001](https://github.com/user-attachments/assets/5310e371-ebcb-4d42-acbc-86816817e042)\n\n##
Reviewing this PR\n\n_Note to technical writers:_ You can see the copy
added for the
empty\nstate\n[here](https://github.com/elastic/kibana/pull/223974/files#diff-71b439414e4974e2decb0f25c136f52ccea4b49ebe393af68dfc5fd184d56e1cR37).\n\nHere's
a screenshot as well:\n\n<img width=\"375\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/491d87ac-b473-484e-82cd-45a1bd197c61\"\n/>\n\n###
Technical review\n\n1. Create a rule that will generate alerts; _do not_
define an\nInvestigation Guide for it\n1. Trigger an alert, and go to
the details page\n1. You should see the Investigation guide tab is
available, whereas on\n`main` it would be disabled\n1. Open the
Investigation Guide tab, you should see the empty state with\nits
CTA\n1. Click this button, the rule flyout should open in Edit mode, and
the\nDetails step should be pre-selected\n1. Define an investigation
guide, this can be any text. Save the rule.\n1. Once you have saved the
rule you should see the rule data update in\nthe page. The empty state
will be gone and the investigation guide you\ndefined will be there
instead.","sha":"dd2e7cb5f238df3b04f0aeebf1335496085e51a5"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
akowalska622 pushed a commit to akowalska622/kibana that referenced this pull request Jun 25, 2025
## Summary

Resolves elastic#222051.

This PR makes a richer empty state UX for the Investigation Guide
feature we added to the Alert Details page.

Before, when a rule did not have an investigation guide, the tab on the
alert details page dedicated to the feature was disabled. Now, the tab
is always enabled. When an investigation guide is present on a rule, a
badge will display to indicate the tab contains content.

If the user clicks into the tab when the rule does not have an
investigation guide, they will see an empty state with a call to action
to create a guide. If the user decides to click the empty state button,
it will open the Rule Edit flyout. I have added additional functionality
that allows the flyout to take an `initialStep` prop, so we pre-set the
flyout to the `Details` step which contains the text field the user can
use to create their guide.

The copy, iconography, and layout of the tab heading are all in draft
state pending some design feedback. I will also add some tests to the
code that I have added.


![20250613162001](https://github.com/user-attachments/assets/5310e371-ebcb-4d42-acbc-86816817e042)

## Reviewing this PR

_Note to technical writers:_ You can see the copy added for the empty
state
[here](https://github.com/elastic/kibana/pull/223974/files#diff-71b439414e4974e2decb0f25c136f52ccea4b49ebe393af68dfc5fd184d56e1cR37).

Here's a screenshot as well:

<img width="375" alt="image"
src="https://github.com/user-attachments/assets/491d87ac-b473-484e-82cd-45a1bd197c61"
/>

### Technical review

1. Create a rule that will generate alerts; _do not_ define an
Investigation Guide for it
1. Trigger an alert, and go to the details page
1. You should see the Investigation guide tab is available, whereas on
`main` it would be disabled
1. Open the Investigation Guide tab, you should see the empty state with
its CTA
1. Click this button, the rule flyout should open in Edit mode, and the
Details step should be pre-selected
1. Define an investigation guide, this can be any text. Save the rule.
1. Once you have saved the rule you should see the rule data update in
the page. The empty state will be gone and the investigation guide you
defined will be there instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author:obs-ux-management PRs authored by the obs ux management team backport:version Backport to applied version labels release_note:enhancement Team:actionable-obs Formerly "obs-ux-management", responsible for SLO, o11y alerting, significant events, & synthetics. v8.19.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Incident Management] [Alert Details] [Investigation Guide] Empty State

6 participants