Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Obs AI Assistant] Fix multiple flyouts #209158

Merged
merged 1 commit into from
Jan 31, 2025

Conversation

viduni94
Copy link
Contributor

@viduni94 viduni94 commented Jan 31, 2025

Closes #204087

Summary

Problem

The Nav Control component re-renders multiple times in certain workflows. But this is not unmounted correctly, allowing multiple subscriptions.

Solution

Unmount the component correctly so that conversationSubscription.unsubscribe(); is called.

Checklist

  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines

@viduni94 viduni94 added release_note:fix v9.0.0 Team:Obs AI Assistant Observability AI Assistant backport:version Backport to applied version labels v8.18.0 labels Jan 31, 2025
@viduni94 viduni94 self-assigned this Jan 31, 2025
@viduni94 viduni94 marked this pull request as ready for review January 31, 2025 18:18
@viduni94 viduni94 requested a review from a team as a code owner January 31, 2025 18:18
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ai-assistant (Team:Obs AI Assistant)

@viduni94 viduni94 linked an issue Jan 31, 2025 that may be closed by this pull request
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
observabilityAIAssistantApp 14.8KB 14.9KB +29.0B

cc @viduni94

@viduni94 viduni94 merged commit 50b8776 into elastic:main Jan 31, 2025
24 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.16, 8.17, 8.18, 9.0

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

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 31, 2025
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 31, 2025
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 31, 2025
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 31, 2025
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.16
8.17
8.18
9.0

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

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Jan 31, 2025
# Backport

This will backport the following commits from `main` to `8.18`:
- [[Obs AI Assistant] Fix multiple flyouts
(#209158)](#209158)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Viduni
Wickramarachchi","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-01-31T19:59:01Z","message":"[Obs
AI Assistant] Fix multiple flyouts
(#209158)","sha":"50b8776b1fb6e7e6e2a96a8b61edc499579bf260","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","v9.0.0","Team:Obs
AI
Assistant","backport:version","v8.18.0","v8.16.4","v8.17.2","v9.1.0"],"title":"[Obs
AI Assistant] Fix multiple
flyouts","number":209158,"url":"https://github.com/elastic/kibana/pull/209158","mergeCommit":{"message":"[Obs
AI Assistant] Fix multiple flyouts
(#209158)","sha":"50b8776b1fb6e7e6e2a96a8b61edc499579bf260"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.16","8.17"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.16","label":"v8.16.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.17","label":"v8.17.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/209158","number":209158,"mergeCommit":{"message":"[Obs
AI Assistant] Fix multiple flyouts
(#209158)","sha":"50b8776b1fb6e7e6e2a96a8b61edc499579bf260"}}]}]
BACKPORT-->

Co-authored-by: Viduni Wickramarachchi <[email protected]>
kibanamachine added a commit that referenced this pull request Jan 31, 2025
# Backport

This will backport the following commits from `main` to `8.16`:
- [[Obs AI Assistant] Fix multiple flyouts
(#209158)](#209158)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Viduni
Wickramarachchi","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-01-31T19:59:01Z","message":"[Obs
AI Assistant] Fix multiple flyouts
(#209158)","sha":"50b8776b1fb6e7e6e2a96a8b61edc499579bf260","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","v9.0.0","Team:Obs
AI
Assistant","backport:version","v8.18.0","v8.16.4","v8.17.2","v9.1.0"],"title":"[Obs
AI Assistant] Fix multiple
flyouts","number":209158,"url":"https://github.com/elastic/kibana/pull/209158","mergeCommit":{"message":"[Obs
AI Assistant] Fix multiple flyouts
(#209158)","sha":"50b8776b1fb6e7e6e2a96a8b61edc499579bf260"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.16","8.17"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.16","label":"v8.16.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.17","label":"v8.17.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/209158","number":209158,"mergeCommit":{"message":"[Obs
AI Assistant] Fix multiple flyouts
(#209158)","sha":"50b8776b1fb6e7e6e2a96a8b61edc499579bf260"}}]}]
BACKPORT-->

Co-authored-by: Viduni Wickramarachchi <[email protected]>
kibanamachine added a commit that referenced this pull request Jan 31, 2025
# Backport

This will backport the following commits from `main` to `8.17`:
- [[Obs AI Assistant] Fix multiple flyouts
(#209158)](#209158)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Viduni
Wickramarachchi","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-01-31T19:59:01Z","message":"[Obs
AI Assistant] Fix multiple flyouts
(#209158)","sha":"50b8776b1fb6e7e6e2a96a8b61edc499579bf260","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","v9.0.0","Team:Obs
AI
Assistant","backport:version","v8.18.0","v8.16.4","v8.17.2","v9.1.0"],"title":"[Obs
AI Assistant] Fix multiple
flyouts","number":209158,"url":"https://github.com/elastic/kibana/pull/209158","mergeCommit":{"message":"[Obs
AI Assistant] Fix multiple flyouts
(#209158)","sha":"50b8776b1fb6e7e6e2a96a8b61edc499579bf260"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.16","8.17"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.16","label":"v8.16.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.17","label":"v8.17.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/209158","number":209158,"mergeCommit":{"message":"[Obs
AI Assistant] Fix multiple flyouts
(#209158)","sha":"50b8776b1fb6e7e6e2a96a8b61edc499579bf260"}}]}]
BACKPORT-->

Co-authored-by: Viduni Wickramarachchi <[email protected]>
Copy link
Member

@sorenlouv sorenlouv left a comment

Choose a reason for hiding this comment

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

Good find!

kibanamachine added a commit that referenced this pull request Feb 1, 2025
# Backport

This will backport the following commits from `main` to `9.0`:
- [[Obs AI Assistant] Fix multiple flyouts
(#209158)](#209158)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Viduni
Wickramarachchi","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-01-31T19:59:01Z","message":"[Obs
AI Assistant] Fix multiple flyouts
(#209158)","sha":"50b8776b1fb6e7e6e2a96a8b61edc499579bf260","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","v9.0.0","Team:Obs
AI
Assistant","backport:version","v8.18.0","v8.16.4","v8.17.2","v9.1.0"],"title":"[Obs
AI Assistant] Fix multiple
flyouts","number":209158,"url":"https://github.com/elastic/kibana/pull/209158","mergeCommit":{"message":"[Obs
AI Assistant] Fix multiple flyouts
(#209158)","sha":"50b8776b1fb6e7e6e2a96a8b61edc499579bf260"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.16","8.17"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.16","label":"v8.16.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.17","label":"v8.17.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/209158","number":209158,"mergeCommit":{"message":"[Obs
AI Assistant] Fix multiple flyouts
(#209158)","sha":"50b8776b1fb6e7e6e2a96a8b61edc499579bf260"}}]}]
BACKPORT-->

Co-authored-by: Viduni Wickramarachchi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AI Assistant window opens multiple times
5 participants