Skip to content

Conversation

@ANAMASGARD
Copy link

Description

This PR fixes the missing visual connections (edges) between namespace nodes and their child resource nodes in the Remote-Cluster Treeview. The issue caused a broken visual hierarchy where resources appeared under namespaces but without connecting lines, making the parent-child relationships unclear.

Fixes #2301

Screenshot

Screenshot From 2026-01-03 10-57-38

Before (Bug):

  • Namespace nodes showed child resources without connecting lines
  • Visual hierarchy was broken
  • Edges rendered inconsistently during component lifecycle

Root Cause

The edge creation logic in WecsTopology.tsx included a conditional check that prevented edges from being created in certain states:

// BEFORE (Line 834 - Buggy)
if (parent && stateRef.current.isExpanded) {
// edges only created when isExpanded === true
}

Solution

Removed the isExpanded conditional check from edge creation logic. Edges are now always created when a parent-child relationship exists, allowing ReactFlow to properly manage their visibility:
// AFTER (Line 834 - Fixed)
if (parent) {
// edges always created when parent exists
}

…ree view

- Removed conditional isExpanded check that prevented edge creation
- Ensures all parent-child relationships render visual connections
- Fixes inconsistent edge rendering in Remote-Cluster Treeview

Fixes kubestellar#2301
Copilot AI review requested due to automatic review settings January 3, 2026 05:32
@kubestellar-prow
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign btwshivam for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow
Copy link

Hi @ANAMASGARD. Thanks for your PR.

I'm waiting for a kubestellar member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 3, 2026

👋 Hello! @ANAMASGARD Welcome to the Kubestellar.

Thank you for submitting your first Pull Request to KubeStellar. We are delighted to have you in our Universe!
Please make sure to check out our Contribution Guide and feel free to join our Slack channel for any questions.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a visual bug in the Remote-Cluster Treeview where namespace nodes and their child resources appeared without connecting lines (edges). The fix removes an unnecessary conditional check that prevented edge creation during certain component lifecycle states.

Key Changes:

  • Removed the isExpanded condition from the edge creation logic in the createNode function
  • Edges are now consistently created whenever a parent-child relationship exists, allowing ReactFlow to properly manage the visual hierarchy

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@kunal-511 kunal-511 left a comment

Choose a reason for hiding this comment

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

@ANAMASGARD What is this screenshot trying to convey ?

@onkar717
Copy link
Contributor

onkar717 commented Jan 5, 2026

/ok-to-test

@onkar717
Copy link
Contributor

onkar717 commented Jan 5, 2026

@ANAMASGARD do u search is there existing issue is open for that ?

@onkar717
Copy link
Contributor

onkar717 commented Jan 5, 2026

@ANAMASGARD can u please add the correct Screen shot of the missing link between the nodes ? (ns and its child nodes)

@Nupurshivani
Copy link
Contributor

/ok-to-test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

[Bug]: Missing link between namespace(node) and child resource(node) in Remote-Cluster Treeview

4 participants