Skip to content

bug: #4001

@XxSURYANSHxX

Description

@XxSURYANSHxX

Describe the bug

In web/src/components/cards/NetworkPolicyCoverage.tsx, the isRefreshing state is not destructured from useCachedPods() and is not passed to the useCardLoadingState configuration object. This violates the documented component pattern for card loading states as defined in the project's development guidelines.

Environment

  • Browser: (e.g., Chrome 120)
  • OS: Windows 11
  • KC Version: (Latest)
  • Kubernetes cluster type: N/A (Frontend code bug)

Steps To Reproduce

  1. Review the source code for web/src/components/cards/NetworkPolicyCoverage.tsx.
  2. Observe line 16: const { pods, isLoading, isDemoFallback, isFailed, consecutiveFailures } = useCachedPods()
  3. Observe the useCardLoadingState call on line 18 where isRefreshing is omitted from the options.
  4. Note that isRefreshing is completely missing, preventing the card from showing the proper background refresh indicator during data updates.

Expected Behavior

The component should extract isRefreshing from the data hook (useCachedPods) and pass it properly to useCardLoadingState so that background refreshes are indicated smoothly in the UI without triggering the full skeleton loader.

Browser Console / Backend Logs

N/A (Identified via static code review)

Want to contribute?

  • I would like to work on this issue.

Additional Context

Discovered during a code review looking for genuine coding pattern violations regarding isDemoData and isRefreshing wiring.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.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