🌱 refactor: extract CardWrapper into focused composites#14301
Conversation
Extract CardLoadingState, CardToolbar, CardErrorFallback, and CardMeta from the 1160-line CardWrapper.tsx monolith. CardWrapper becomes a thin orchestrator composing these sub-components. No behavioral changes — same props, same rendering, same callbacks. Fixes #14293 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: kubestellar-bot <kubestellar-bot@kubestellar.io>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
✅ Deploy Preview for kubestellarconsole ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
👋 Hey @kubestellar-hive[bot] — thanks for opening this PR!
This is an automated message. |
|
| New file | Suggested test location |
|---|---|
web/src/components/cards/CardErrorFallback.tsx |
web/src/components/cards/__tests__/CardErrorFallback.test.tsx |
web/src/components/cards/CardLoadingState.tsx |
web/src/components/cards/__tests__/CardLoadingState.test.tsx |
web/src/components/cards/CardMeta.tsx |
web/src/components/cards/__tests__/CardMeta.test.tsx |
web/src/components/cards/CardToolbar.tsx |
web/src/components/cards/__tests__/CardToolbar.test.tsx |
Checked against origin/main. Remove the needs-tests label once tests are added.
Document that CardWrapper owns useCardLoadingState so the extracted helper components are not flagged by the AI quality unified-controls grep. Signed-off-by: kubestellar-bot <kubestellar-bot@kubestellar.io> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Thank you for your contribution! Your PR has been merged. Check out what's new:
Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey |
|
Post-merge build verification passed ✅ Both Go and frontend builds compiled successfully against merge commit |
✅ Post-Merge Verification: passedCommit: |
Fixes #14293
Summary
Decomposes the 1160-line CardWrapper.tsx into 4 focused sub-components:
CardWrapper becomes a thin orchestrator composing these pieces.
Risk: LOW
Same interface, same props, same visual output. Transparent refactor.