Skip to content

GRPCRouteDetails uses incorrect section ID copied from HTTPRouteDetails #5051

@NAME-ASHWANIYADAV

Description

@NAME-ASHWANIYADAV

The GRPCRouteDetails component uses the section ID headlamp.httproute-parentrefs instead of headlamp.grpcroute-parentrefs. This appears to be a copy-paste error from HTTPRouteDetails, which uses the same ID for its own parent refs section.

This causes both components to register their extraSections under the same ID, which can lead to:

  • Section identification conflicts in the DetailsGrid
  • Issues with plugins that target sections by their unique ID

File: frontend/src/components/gateway/GRPCRouteDetails.tsx (Line 35)

// Current (incorrect):
id: 'headlamp.httproute-parentrefs',

// Expected:
id: 'headlamp.grpcroute-parentrefs',

For reference, the same ID is correctly used in HTTPRouteDetails.tsx:
https://github.com/headlamp-k8s/headlamp/blob/main/frontend/src/components/gateway/HTTPRouteDetails.tsx#L231

To Reproduce

  1. Navigate to frontend/src/components/gateway/GRPCRouteDetails.tsx
  2. Observe line 35: the section ID is headlamp.httproute-parentrefs
  3. Compare with HTTPRouteDetails.tsx line 231: the same ID is used there
  4. Both components register a section with the identical ID, which is incorrect for GRPCRouteDetails

Environment

  • Installation type: Source (reviewing codebase on main branch)
  • Headlamp Version: latest main

Are you able to fix this issue?

Yes, I will propose a PR with the fix.

Additional Context

I also noticed several leftover console.log debug statements in production code while reviewing the codebase. I plan to include their cleanup in the same PR:

File Issue
clusterRequests.ts:328 console.log(url, requestOptions) in remove() — logs every DELETE API request
HTTPRouteDetails.tsx:154 console.log(namespace, backendRefs) in RuleBackendRefs
NewProjectPopup.tsx:305 console.log({ newValue }) in onChange handler
portforward/index.tsx:350 console.log used instead of console.error for error
useSidebarItems.tsx:68 console.log used instead of console.error for CRD fetch error

Metadata

Metadata

Labels

kind/bugCategorizes issue or PR as related to a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions