Skip to content

🐛 Fix missing isRefreshing in NamespaceRBAC card#4005

Merged
clubanderson merged 1 commit intomainfrom
fix/namespace-rbac-isrefreshing
Mar 31, 2026
Merged

🐛 Fix missing isRefreshing in NamespaceRBAC card#4005
clubanderson merged 1 commit intomainfrom
fix/namespace-rbac-isrefreshing

Conversation

@clubanderson
Copy link
Copy Markdown
Collaborator

Summary

  • Destructure isRefreshing from all data hooks (useClusters, useCachedNamespaces, useCachedK8sRoles, useCachedK8sRoleBindings, useCachedK8sServiceAccounts)
  • Combine all isRefreshing values and pass to useCardLoadingState so CardWrapper can show refresh animation
  • Add RefreshIndicator component to the card header for visual refresh feedback

Fixes #4003

Test plan

  • Verify the NamespaceRBAC card shows the refresh spinner when data hooks are re-fetching
  • Verify the CardWrapper receives isRefreshing and triggers its refresh border animation
  • Verify no regressions in skeleton/empty state behavior
  • Build passes (npm run build)

Destructure isRefreshing from useClusters, useCachedNamespaces,
useCachedK8sRoles, useCachedK8sRoleBindings, and
useCachedK8sServiceAccounts hooks and pass the combined value to
useCardLoadingState. Also add RefreshIndicator to the card header
so users see a visual indicator when data is being refreshed.

Fixes #4003

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Copilot AI review requested due to automatic review settings March 31, 2026 15:45
@kubestellar-prow
Copy link
Copy Markdown
Contributor

[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 clubanderson for approval. For more information see the 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 kubestellar-prow bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Mar 31, 2026
@netlify
Copy link
Copy Markdown

netlify bot commented Mar 31, 2026

Deploy Preview for kubestellarconsole ready!

Name Link
🔨 Latest commit fc306b3
🔍 Latest deploy log https://app.netlify.com/projects/kubestellarconsole/deploys/69cbec0f22eb220008dff4be
😎 Deploy Preview https://deploy-preview-4005.console-deploy-preview.kubestellar.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@kubestellar-prow kubestellar-prow bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Mar 31, 2026
@github-actions
Copy link
Copy Markdown
Contributor

👋 Hey @clubanderson — thanks for opening this PR!

🤖 This project is developed exclusively using AI coding assistants.

Please do not attempt to code anything for this project manually.
All contributions should be authored using an AI coding tool such as:

This ensures consistency in code style, architecture patterns, test coverage,
and commit quality across the entire codebase.


This is an automated message.

@clubanderson clubanderson merged commit b15a728 into main Mar 31, 2026
26 of 27 checks passed
@kubestellar-prow kubestellar-prow bot deleted the fix/namespace-rbac-isrefreshing branch March 31, 2026 15:59
Copy link
Copy Markdown
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 updates the NamespaceRBAC card to properly surface background refresh activity from its data hooks, enabling the CardWrapper refresh animation and adding an in-header refresh indicator.

Changes:

  • Destructures isRefreshing from useClusters and the cached RBAC-related hooks.
  • Combines refresh states and passes isRefreshing into useCardLoadingState for CardWrapper refresh styling.
  • Adds a RefreshIndicator in the card header to visually indicate background updates.

</StatusBadge>
<RefreshIndicator
isRefreshing={isRefreshing}
size="sm"
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

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

RefreshIndicator is rendered without lastUpdated, so when not refreshing it will display the default "pending" label and "Not yet updated" tooltip/aria-label indefinitely. Consider deriving a lastUpdated value from the hooks’ lastRefresh/lastUpdated (e.g., max timestamp across clusters/namespaces/roles/bindings/SAs) and pass it in, or set showLabel={false} if you only want the spinner without the status text.

Suggested change
size="sm"
size="sm"
showLabel={false}

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

Check out what's new:

Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey

@clubanderson
Copy link
Copy Markdown
Collaborator Author

🔄 Auto-Applying Copilot Code Review

Copilot code review found 1 code suggestion(s) and 0 general comment(s).

@copilot Please apply all of the following code review suggestions:

  • web/src/components/cards/NamespaceRBAC.tsx (line 224): size="sm" showLabel={false}

Push all fixes in a single commit. Run cd web && npm run build && npm run lint before committing.


Auto-generated by copilot-review-apply workflow.

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

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. 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.

bug: NamespaceRBAC.tsx - Missing isRefreshing

3 participants