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

AI Assistant window opens multiple times #204087

Closed
iTiagoCO opened this issue Dec 12, 2024 · 7 comments · Fixed by #209158
Closed

AI Assistant window opens multiple times #204087

iTiagoCO opened this issue Dec 12, 2024 · 7 comments · Fixed by #209158
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Team:Obs AI Assistant Observability AI Assistant

Comments

@iTiagoCO
Copy link

Elastic Cloud AWS - N. Virginia (us-east-1) | Deployment ID 351265 | v8.15.5

Include HAR

When opening the AI ​​Assistant tab, it opens multiple times and darkens the background

Image

@iTiagoCO iTiagoCO added the bug Fixes for quality problems that affect the customer experience label Dec 12, 2024
@botelastic botelastic bot added the needs-team Issues missing a team label label Dec 12, 2024
@iTiagoCO
Copy link
Author

@wayneseymour wayneseymour added the Team:Obs AI Assistant Observability AI Assistant label Dec 13, 2024
@elasticmachine
Copy link
Contributor

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

@botelastic botelastic bot removed the needs-team Issues missing a team label label Dec 13, 2024
@viduni94 viduni94 self-assigned this Jan 13, 2025
@viduni94
Copy link
Contributor

@iTiagoCO
I took a look at this issue and I haven't been able to reproduce it.

Could you confirm whether this issue still exists on your end, and if yes, could you let me know the steps to reproduce (a screen recording if possible)?

@viduni94
Copy link
Contributor

Closing this since it can't be reproduced. I'll re-open the issue if it comes up again.

@viduni94 viduni94 reopened this Jan 25, 2025
@viduni94
Copy link
Contributor

Steps to reproduce:

  1. Click on "Add Data"
  2. Select Kubernetes --> OpenTelemetry: Full Observability
  3. Click on "Explore Kubernetes Cluster Dashboard"
  4. Open the AI Assistant --> Notice the darker overlay

viduni94 added a commit to viduni94/kibana that referenced this issue Jan 28, 2025
viduni94 added a commit to viduni94/kibana that referenced this issue Jan 28, 2025
viduni94 added a commit to viduni94/kibana that referenced this issue Jan 28, 2025
viduni94 added a commit to viduni94/kibana that referenced this issue Jan 30, 2025
@viduni94 viduni94 marked this as a duplicate of #208845 Jan 30, 2025
viduni94 added a commit to viduni94/kibana that referenced this issue Jan 30, 2025
viduni94 added a commit to viduni94/kibana that referenced this issue Jan 30, 2025
viduni94 added a commit to viduni94/kibana that referenced this issue Jan 30, 2025
viduni94 added a commit to viduni94/kibana that referenced this issue Jan 30, 2025
viduni94 added a commit to viduni94/kibana that referenced this issue Jan 30, 2025
@neptunian
Copy link
Contributor

neptunian commented Jan 31, 2025

Hey @viduni94. I added some logs and noticed NavControl can be mounted several times, especially it seems when navigating using URL Locators. They then never become unmounted. So we get a subscription for each mount.

  useEffect(() => {
    console.log('NavControl: mounted');
    return () => {
      console.log('NavControl: unmounted'); // not unmounting?
    };
  }, []);

I'm not sure why an empty function is returned here but I think we need add this instead and it should solve the problem :

         return () => {
            ReactDOM.unmountComponentAtNode(element);
          };

Otherwise I don't think this part of our useEffect ever runs:

  return () => {
      conversationSubscription.unsubscribe();
    };

@viduni94
Copy link
Contributor

Thanks for checking on this @neptunian
I noticed that the nav control re-renders many times as well.

I'll try what you suggested.

viduni94 added a commit to viduni94/kibana that referenced this issue Jan 31, 2025
@viduni94 viduni94 linked a pull request Jan 31, 2025 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Team:Obs AI Assistant Observability AI Assistant
Projects
None yet
5 participants