Skip to content

Conversation

@kahirokunn
Copy link
Member

@kahirokunn kahirokunn commented Dec 9, 2025

Summary

This PR fixes duplicated CustomResourceDefinition entries in the in-cluster sidebar by de-duplicating CRDs within each group when building the sidebar items.

Related Issue

N/A

Changes

  • Updated useSidebarItems CRD grouping logic to avoid pushing duplicate CRDs into a group's subList.
  • Ensured subList initialization is robust when a group entry already exists.
  • Kept the existing alphabetical sorting behavior for CRD sidebar entries.

Steps to Test

  1. Start Headlamp and connect to a cluster that exposes multiple CRDs.
  2. Open the in-cluster sidebar and navigate to Custom Resources.
  3. Expand a CRD group and verify that each CRD appears only once per group, with no duplicate entries.

Screenshots (if applicable)

Before

After

Notes for the Reviewer

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 9, 2025
@kahirokunn kahirokunn marked this pull request as draft December 9, 2025 07:42
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 9, 2025
Signed-off-by: kahirokunn <okinakahiro@gmail.com>
@kahirokunn kahirokunn changed the title frontend: Deduplicate namespaces from multi-cluster lists in autocomplete frontend: Deduplicate CRDs in sidebar items Dec 9, 2025
@kahirokunn kahirokunn marked this pull request as ready for review December 9, 2025 07:58
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 9, 2025
Copy link
Contributor

@sniok sniok left a comment

Choose a reason for hiding this comment

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

nice fix, thanks!

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 9, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kahirokunn, skoeva, sniok

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

The pull request process is described 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

@sniok
Copy link
Contributor

sniok commented Dec 10, 2025

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 10, 2025
@k8s-ci-robot k8s-ci-robot merged commit 99dffe6 into kubernetes-sigs:main Dec 10, 2025
12 checks passed
@illume illume added this to the v0.39.0 milestone Dec 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants