[Observability] Page attachment type #225295
Conversation
…ke/kibana into feat/cases-link-attachment
…ke/kibana into feat/cases-link-attachment
…ke/kibana into feat/cases-page-attachment
a3a9ecf to
479cf7c
Compare
|
|
||
| export const pageAttachmentPersistedStateSchema = z.object({ | ||
| /** | ||
| * The type of page or page asset, e.g., 'dashboard', 'synthetics-test-run', 'slo-history', etc |
There was a problem hiding this comment.
Why do we need type here?
There was a problem hiding this comment.
It's basically a sub-type to help us make future decisions about how to render this page, how to evaluate it in LLM analysis, etc.
There was a problem hiding this comment.
@jasonrhodes Michael and I had actually discussed this over zoom last week. I should have put the reply here for reference.
michaelolo24
left a comment
There was a problem hiding this comment.
Thank you for responding to all of the feedback here! LGTM!
benakansara
left a comment
There was a problem hiding this comment.
LGTM. I have a few observations.
- When creating a new case from monitor details page, the Actions popover doesn't close and once in create case form, it's not possible to move or remove it manually.
- Should we allow right click on this link?
- When I click on "Add to case", loading animation is shown next to "Run test manually" instead of "Add to case".
| "extraPublicDirs": [ | ||
| "common" | ||
| "common", | ||
| "public/client/attachment_framework/types" |
There was a problem hiding this comment.
I wonder if we should move these types to common?
...servability/plugins/synthetics/public/apps/synthetics/components/monitor_details/actions.tsx
Outdated
Show resolved
Hide resolved
…synthetics/components/monitor_details/actions.tsx Co-authored-by: Bena Kansara <69037875+benakansara@users.noreply.github.com>
…miniqueclarke/kibana into feat/observability-generic-attachment
...bility/plugins/synthetics/public/apps/synthetics/components/monitor_details/actions.test.tsx
Outdated
Show resolved
Hide resolved
…synthetics/components/monitor_details/actions.test.tsx
...bility/plugins/synthetics/public/apps/synthetics/components/monitor_details/actions.test.tsx
Outdated
Show resolved
Hide resolved
…synthetics/components/monitor_details/actions.test.tsx
...bility/plugins/synthetics/public/apps/synthetics/components/monitor_details/actions.test.tsx
Outdated
Show resolved
Hide resolved
…synthetics/components/monitor_details/actions.test.tsx
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Public APIs missing exports
Page load bundle
Unknown metric groupsAPI count
async chunk count
ESLint disabled line counts
Total ESLint disabled count
History
|
Closes elastic#226073 ## Summary This PR defines a generic "page" attachment type which can be used to attach any page in Kibana to a case. The attachment type is then implemented for the Synthetics monitor details page. <img width="1066" alt="Screenshot 2025-06-25 at 10 43 15 PM" src="https://github.com/user-attachments/assets/6b55bf8f-b9ca-476f-b4ca-634b8e17d461" /> ## Overview See [implementation issue](elastic#226073) and [its parent meta](elastic#226072) for more details on the "why" as well as our short-term future plans for extending this page attachment idea. ## Technical details 1. [The type definition for the attachment persisted state](https://github.com/elastic/kibana/pull/225295/files#diff-682c62b478a2d1aea2a471733166259185c1ba4534e293abec015abd64cc4c27) 2. [The attachment spec](https://github.com/elastic/kibana/pull/225295/files#diff-2083a0a3bb7f475e6b8a50a061c2a0a78499b416f5d7465aaa3171a8dd8971fa) 3. [The Synthetics implementation](https://github.com/elastic/kibana/pull/225295/files#diff-302cdc10545ddfaf8eae433954a03c7cd21b94c4f2f0706364ce50c1edf36a3b) ## Testing 1. Add the `xpack.observabilityShared.unsafe.investigativeExperienceEnabled: true` feature flag. 2. Create a Synthetics monitor. The easiest way to do so is to create a cluster via oblt cli and attach your local Kibana to it. 3. Visit the Synthetics monitor details page. 4. Click the Add to Case Button 8. Ensure the attachment is added successfully via toast. Click View Case 9. You should see the name of the monitor hyperlinked in the attachment comment. You should also see a Go to Monitor button in the comment actions. Lastly, you should see a Go To Monitor button in the actions dropdown. 10. When you visit each link, you should be navigated back to the monitor details history page, with the time range as absolute value for the time range the user was viewing at the time they added the attachment. ## Appendix 1. [Persistable state attachment type docs](https://docs.elastic.dev/reops/attachment-framework-persistable-state) --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Bena Kansara <bena.kansara@elastic.co> Co-authored-by: Bena Kansara <69037875+benakansara@users.noreply.github.com>
Closes elastic#226073 ## Summary This PR defines a generic "page" attachment type which can be used to attach any page in Kibana to a case. The attachment type is then implemented for the Synthetics monitor details page. <img width="1066" alt="Screenshot 2025-06-25 at 10 43 15 PM" src="https://github.com/user-attachments/assets/6b55bf8f-b9ca-476f-b4ca-634b8e17d461" /> ## Overview See [implementation issue](elastic#226073) and [its parent meta](elastic#226072) for more details on the "why" as well as our short-term future plans for extending this page attachment idea. ## Technical details 1. [The type definition for the attachment persisted state](https://github.com/elastic/kibana/pull/225295/files#diff-682c62b478a2d1aea2a471733166259185c1ba4534e293abec015abd64cc4c27) 2. [The attachment spec](https://github.com/elastic/kibana/pull/225295/files#diff-2083a0a3bb7f475e6b8a50a061c2a0a78499b416f5d7465aaa3171a8dd8971fa) 3. [The Synthetics implementation](https://github.com/elastic/kibana/pull/225295/files#diff-302cdc10545ddfaf8eae433954a03c7cd21b94c4f2f0706364ce50c1edf36a3b) ## Testing 1. Add the `xpack.observabilityShared.unsafe.investigativeExperienceEnabled: true` feature flag. 2. Create a Synthetics monitor. The easiest way to do so is to create a cluster via oblt cli and attach your local Kibana to it. 3. Visit the Synthetics monitor details page. 4. Click the Add to Case Button 8. Ensure the attachment is added successfully via toast. Click View Case 9. You should see the name of the monitor hyperlinked in the attachment comment. You should also see a Go to Monitor button in the comment actions. Lastly, you should see a Go To Monitor button in the actions dropdown. 10. When you visit each link, you should be navigated back to the monitor details history page, with the time range as absolute value for the time range the user was viewing at the time they added the attachment. ## Appendix 1. [Persistable state attachment type docs](https://docs.elastic.dev/reops/attachment-framework-persistable-state) --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Bena Kansara <bena.kansara@elastic.co> Co-authored-by: Bena Kansara <69037875+benakansara@users.noreply.github.com>
Closes elastic#226073 ## Summary This PR defines a generic "page" attachment type which can be used to attach any page in Kibana to a case. The attachment type is then implemented for the Synthetics monitor details page. <img width="1066" alt="Screenshot 2025-06-25 at 10 43 15 PM" src="https://github.com/user-attachments/assets/6b55bf8f-b9ca-476f-b4ca-634b8e17d461" /> ## Overview See [implementation issue](elastic#226073) and [its parent meta](elastic#226072) for more details on the "why" as well as our short-term future plans for extending this page attachment idea. ## Technical details 1. [The type definition for the attachment persisted state](https://github.com/elastic/kibana/pull/225295/files#diff-682c62b478a2d1aea2a471733166259185c1ba4534e293abec015abd64cc4c27) 2. [The attachment spec](https://github.com/elastic/kibana/pull/225295/files#diff-2083a0a3bb7f475e6b8a50a061c2a0a78499b416f5d7465aaa3171a8dd8971fa) 3. [The Synthetics implementation](https://github.com/elastic/kibana/pull/225295/files#diff-302cdc10545ddfaf8eae433954a03c7cd21b94c4f2f0706364ce50c1edf36a3b) ## Testing 1. Add the `xpack.observabilityShared.unsafe.investigativeExperienceEnabled: true` feature flag. 2. Create a Synthetics monitor. The easiest way to do so is to create a cluster via oblt cli and attach your local Kibana to it. 3. Visit the Synthetics monitor details page. 4. Click the Add to Case Button 8. Ensure the attachment is added successfully via toast. Click View Case 9. You should see the name of the monitor hyperlinked in the attachment comment. You should also see a Go to Monitor button in the comment actions. Lastly, you should see a Go To Monitor button in the actions dropdown. 10. When you visit each link, you should be navigated back to the monitor details history page, with the time range as absolute value for the time range the user was viewing at the time they added the attachment. ## Appendix 1. [Persistable state attachment type docs](https://docs.elastic.dev/reops/attachment-framework-persistable-state) --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Bena Kansara <bena.kansara@elastic.co> Co-authored-by: Bena Kansara <69037875+benakansara@users.noreply.github.com>
This reverts commit 33a9007.
This reverts commit 33a9007.
This reverts commit 33a9007.
This reverts commit 33a9007.
This reverts commit 33a9007.
This reverts commit 33a9007. I reviewed the files and resolved the merge conflicts. I didn’t fully revert the PR, instead I cherry-picked the following: - Locator enhancement (covering for time range and tabId) - Actions - Bug fix for running tests manually with required permissions - Route config updates (covering Actions and tabs) - Import adjustments ## Note These PRs need to be merged first in the order they are listed: - #236872 - <del>https://github.com/elastic/kibana/pull/236869</del> - #237064 --------- Co-authored-by: Panagiota Mitsopoulou <giota85@gmail.com>
…ic#236958) This reverts commit 33a9007. I reviewed the files and resolved the merge conflicts. I didn’t fully revert the PR, instead I cherry-picked the following: - Locator enhancement (covering for time range and tabId) - Actions - Bug fix for running tests manually with required permissions - Route config updates (covering Actions and tabs) - Import adjustments ## Note These PRs need to be merged first in the order they are listed: - elastic#236872 - <del>https://github.com/elastic/kibana/pull/236869</del> - elastic#237064 --------- Co-authored-by: Panagiota Mitsopoulou <giota85@gmail.com>
Closes #226073
Summary
This PR defines a generic "page" attachment type which can be used to attach any page in Kibana to a case. The attachment type is then implemented for the Synthetics monitor details page.
Overview
See implementation issue and its parent meta for more details on the "why" as well as our short-term future plans for extending this page attachment idea.
Technical details
Testing
xpack.observabilityShared.unsafe.investigativeExperienceEnabled: truefeature flag.Appendix