Skip to content

Conversation

FaheemOnHub
Copy link
Contributor

@FaheemOnHub FaheemOnHub commented Aug 8, 2025

Notes for Reviewers

1.All the connectivity check buttons,lights , status and versions are working perfectly now. The issue was that the gql subscription was never called , resulting in always null.

2.Enhanced notifications and intermediate-state(amber) , to make user aware of the progress.

SCR-20250808-pwzh
480388950-78162f2b-500e-412d-9d79-ec1fb9cace83.mov
SCR-20250821-lvxl SCR-20250821-lvzh

Signed commits

  • Yes, I signed my commits.

@github-actions github-actions bot added the component/ui User Interface label Aug 8, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Summary of Changes

Hello @FaheemOnHub, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

I've addressed a critical issue where the connectivity check buttons in the UI were not displaying the correct state because the underlying GraphQL subscription was not being properly initialized or updated. My changes ensure that the subscription is always active and responsive to configuration changes, providing accurate and real-time connectivity status in the UI.

Highlights

  • Fix GraphQL Subscription Initialization: I've added an explicit call to mesheryControllerSubscription.initSubscription() to ensure that the GraphQL subscription for controller state is always properly started when initSubscriptions is invoked.
  • Improve Controller State Subscription Logic: I've refactored the useEffect hook that monitors k8sConfig changes. Now, it intelligently checks if mesheryControllerSubscription exists. If it does, the subscription is updated; otherwise, initSubscriptions is called to re-initialize it, ensuring the connectivity state is always accurate.
  • Code Style Consistency: I've wrapped a single-line return statement in initSubscriptions with curly braces for better code style consistency.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments or fill out our survey to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request fixes an issue where GraphQL subscriptions were not being initialized, leading to connectivity status not updating correctly. The changes correctly call initSubscription and also handle initializing the subscription within the useEffect hook when k8sConfig changes. My review includes a suggestion to fix the dependency array of a useEffect to prevent potential bugs from stale closures, which is a critical aspect of working with React hooks.

// eslint-disable-next-line react-hooks/exhaustive-deps
}, [k8sConfig, capabilitiesRegistry]);
Copy link
Contributor

Choose a reason for hiding this comment

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

high

This useEffect hook has missing dependencies. The effect's body uses state and initSubscriptions, but they are not included in the dependency array. This can lead to the effect running with stale values, which can cause subtle bugs that are hard to track down.

The eslint-disable-next-line react-hooks/exhaustive-deps comment should be removed, and the dependency array should be updated to correctly include all values from the outer scope that are used within the effect.

  }, [k8sConfig, capabilitiesRegistry, state, initSubscriptions]);

Copy link

github-actions bot commented Aug 8, 2025

@FaheemOnHub FaheemOnHub temporarily deployed to staging-playground August 8, 2025 12:56 — with GitHub Actions Inactive
n2h9
n2h9 previously approved these changes Aug 12, 2025
@FaheemOnHub FaheemOnHub temporarily deployed to staging-playground August 20, 2025 06:15 — with GitHub Actions Inactive
@FaheemOnHub FaheemOnHub temporarily deployed to staging-playground August 21, 2025 07:48 — with GitHub Actions Inactive
@FaheemOnHub FaheemOnHub temporarily deployed to staging-playground August 21, 2025 08:06 — with GitHub Actions Inactive
@FaheemOnHub FaheemOnHub temporarily deployed to staging-playground August 23, 2025 11:03 — with GitHub Actions Inactive
@FaheemOnHub FaheemOnHub changed the title fix: connectivity check buttons: update state field behaviour fix: connectivity check buttons: update state field behaviour && state indicator enhancement. Aug 23, 2025
@FaheemOnHub FaheemOnHub temporarily deployed to staging-playground August 23, 2025 13:50 — with GitHub Actions Inactive
@FaheemOnHub FaheemOnHub temporarily deployed to staging-playground August 24, 2025 13:22 — with GitHub Actions Inactive
Signed-off-by: FaheemOnHub <faheemmushtaq89@gmail.com>
Signed-off-by: FaheemOnHub <faheemmushtaq89@gmail.com>
Signed-off-by: FaheemOnHub <faheemmushtaq89@gmail.com>
@FaheemOnHub FaheemOnHub force-pushed the fix/connectivity/checkButtons/15454 branch from 867fe96 to 060ee2f Compare August 25, 2025 18:37
@FaheemOnHub FaheemOnHub temporarily deployed to staging-playground August 25, 2025 18:46 — with GitHub Actions Inactive
Copy link

Commit SHA: 060ee2f319414ac34b2addbfedfa8fa2f26d739a

END-TO-END TESTS

  • Testing started at: August 25th 2025, 6:55:40 pm

📦 Test Result Summary

  • ✅ 16 passed
  • ❌ 57 failed
  • ⚠️ 1 flaked
  • ⏩ 16 skipped

Duration: 9 minutes and 28 seconds

Overall Result: 👎 Some tests failed.

[Show/Hide] Test Result Details
Test Browser Test Case Tags Result
1 chromium-meshery-provider Verify that UI components are displayed ⚠️
2 chromium-meshery-provider Transition to disconnected state and then back to connected state
3 chromium-meshery-provider Transition to ignored state and then back to connected state
4 chromium-meshery-provider Transition to not found state and then back to connected state
5 chromium-meshery-provider Delete Kubernetes cluster connections
6 chromium-meshery-provider Logout from current user session
7 chromium-meshery-provider Create a Model
8 chromium-meshery-provider Search a Model and Export it
9 chromium-meshery-provider Import a Model via File Import
10 chromium-meshery-provider Import a Model via Url Import
11 chromium-meshery-provider Import a Model via CSV Import
12 chromium-meshery-provider Common UI elements
13 chromium-meshery-provider imports design via File
14 chromium-meshery-provider Verify Meshery Design Embed Details
15 chromium-meshery-provider imports design via URL
16 chromium-meshery-provider Verify Meshery Catalog Section Details
17 chromium-meshery-provider deletes a published design from the list
18 chromium-meshery-provider Verify Meshery Adapter for Istio Section
19 chromium-meshery-provider Test if Profile button is displayed
20 chromium-meshery-provider deploys a published design to a connected cluster
21 chromium-meshery-provider Add performance profile with load generator fortio
22 chromium-meshery-provider Aggregation Charts are displayed
23 chromium-meshery-provider Toggle "Send Anonymous Usage Statistics"
24 chromium-meshery-provider View detailed result of a performance profile (Graph Visualiser) with load generator fortio
25 chromium-local-provider Verify that UI components are displayed
26 chromium-local-provider Add a cluster connection by uploading kubeconfig file
27 chromium-local-provider Transition to disconnected state and then back to connected state
28 chromium-local-provider Transition to ignored state and then back to connected state
29 chromium-local-provider Transition to not found state and then back to connected state
30 chromium-local-provider Delete Kubernetes cluster connections
31 chromium-meshery-provider Toggle "Send Anonymous Performance Results"
32 chromium-meshery-provider Edit the configuration of a performance profile with load generator fortio and service mesh None
33 chromium-local-provider should verify Design Configurator page elements
34 chromium-local-provider renders design page UI
35 chromium-meshery-provider Compare test of a performance profile with load generator fortio
36 chromium-local-provider should edit design in Design Configurator
37 chromium-local-provider displays published design card correctly
38 chromium-meshery-provider Delete a performance profile with load generator fortio
39 chromium-local-provider Verify Kanvas Snapshot using data-testid
40 chromium-local-provider displays public design card correctly
41 chromium-local-provider Test if Left Navigation Panel is displayed
42 chromium-local-provider Verify Performance Analysis Details
43 chromium-local-provider imports design via File
44 chromium-local-provider Test if Notification button is displayed
45 chromium-local-provider Verify Kanvas Details
46 chromium-local-provider imports design via URL
47 chromium-local-provider Test if Profile button is displayed
48 chromium-local-provider Verify Meshery Docker Extension Details
49 chromium-local-provider deletes a published design from the list
50 chromium-local-provider Logout from current user session
51 chromium-local-provider Verify Meshery Design Embed Details
52 chromium-local-provider deploys a published design to a connected cluster
53 chromium-local-provider Create a Model
54 chromium-local-provider Search a Model and Export it
55 chromium-local-provider Import a Model via File Import
56 chromium-local-provider Import a Model via Url Import
57 chromium-local-provider Import a Model via CSV Import
58 chromium-local-provider Verify Meshery Catalog Section Details
59 chromium-local-provider Common UI elements
60 chromium-local-provider Add performance profile with load generator fortio
61 chromium-local-provider Verify Meshery Adapter for Istio Section
62 chromium-local-provider View detailed result of a performance profile (Graph Visualiser) with load generator fortio
63 chromium-local-provider Aggregation Charts are displayed
64 chromium-local-provider Edit the configuration of a performance profile with load generator fortio and service mesh None
65 chromium-local-provider Toggle "Send Anonymous Usage Statistics"
66 chromium-local-provider Toggle "Send Anonymous Performance Results"
67 chromium-local-provider Compare test of a performance profile with load generator fortio
68 chromium-local-provider Delete a performance profile with load generator fortio
69 chromium-meshery-provider All settings tabs
70 chromium-local-provider All settings tabs
71 chromium-meshery-provider Action buttons on adapters tab
72 chromium-local-provider Action buttons on adapters tab
73 chromium-meshery-provider Grafana elements on metrics tab
74 chromium-local-provider Grafana elements on metrics tab

@FaheemOnHub FaheemOnHub merged commit 3085020 into meshery:master Aug 25, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/ui User Interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[UI] connectivity check buttons: update state field behaviour
2 participants