🐛 fix: demo deployment versions showing "unknown", rss_feed in cluster-admin layout, ArgoCD stat hardcoded to 0#12711
Conversation
|
[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!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
👋 Hey @RajdeepKushwaha5 — thanks for opening this PR!
This is an automated message. |
|
👋 Welcome to the KubeStellar community! 💖 Thanks and congrats 🎉 for opening your first PR here! We're excited to have you contributing. Before merge, please ensure:
📬 If you're using KubeStellar in your organization, please add your name to our Adopters list. 🙏 It really helps the project gain momentum and credibility — a small contribution back with a big impact. Resources:
A maintainer will review your PR soon. Hope you have a great time here! 🌟 ~~~~~~~~~~ 🌟 📬 If you like KubeStellar, please ⭐ star ⭐ our repo to support it! 🙏 It really helps the project gain momentum and credibility — a small contribution back with a big impact. |
There was a problem hiding this comment.
Pull request overview
Fixes three demo-mode/UI issues in the KubeStellar Console by improving demo deployment metadata, aligning the Cluster Admin default layout with the 21-card spec, and wiring the Deploy dashboard’s ArgoCD stat to real/demo application data.
Changes:
- Add
imagefields to demo deployments so version labels no longer render as"unknown". - Remove the
rss_feedcard from the Cluster Admin default layout to restore the expected 21-card configuration. - Replace the hardcoded ArgoCD stat value in
Deploy.tsxwith data fromuseArgoCDApplications().
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
web/src/hooks/useCachedData/demoData.ts |
Adds realistic image tags to demo deployments so UI version extraction works. |
web/src/config/dashboards/cluster-admin.ts |
Removes rss_feed from the default Cluster Admin card list to match the 21-card spec. |
web/src/components/deploy/Deploy.tsx |
Uses useArgoCDApplications() to display the actual ArgoCD app count (demo or live). |
79cec21 to
0c209e5
Compare
0c209e5 to
04bca60
Compare
There was a problem hiding this comment.
Scanner Review
Merge conflict: This PR conflicts with #12708 (now merged) on demoData.ts. The demo deployment image fix (Bug 1) is already resolved.
Remaining changes:
- cluster-admin.ts — Removing
rss_feedfrom default layout: valid change, but needs its own issue/PR - Deploy.tsx — Wiring ArgoCD stat to
useArgoCDApplications(): valid fix, but also needs its own issue/PR
Action needed: This PR needs to be rebased on main to resolve the demoData.ts conflict. Since Bug 1 is already fixed, the demoData changes should be dropped. Consider splitting the remaining two fixes into separate PRs, each with a corresponding issue.
… cluster-admin, wire ArgoCD stat to real data - getDemoDeployments: add image field to all 6 entries so Deployment Status card shows version tags instead of 'unknown' in demo mode - cluster-admin default layout: remove rss_feed card (was 22nd card, breaking the expected 21-card spec from issue kubestellar#11786) - Deploy page: replace hardcoded argocd stat value:0 with useArgoCDApplications() count so the stat block reflects actual app count in both demo and live mode Signed-off-by: RajdeepKushwaha5 <rjdprocks9977@gmail.com>
04bca60 to
3bda3f7
Compare
There was a problem hiding this comment.
Code review: One minor convention issue.
Array safety in web/src/components/deploy/Deploy.tsx:56: argoCDApps.length should use the defensive pattern (argoCDApps || []).length per CLAUDE.md array safety rules. The same hook is guarded with || [] in DeploymentRiskScore.tsx:145 — this should be consistent.
Otherwise the fix looks correct.
✅ Post-Merge Verification: passedCommit: |
Summary
This PR fixes three UI bugs found while navigating the KubeStellar Console in Demo Mode:
Bug 1 — Deployment Status card shows "unknown" for all version labels
getDemoDeployments()indemoData.tsdefined all 6 demo deployments without animagefield. TheDeploymentStatuscard callsextractImageTag(deployment.image), andextractImageTag(undefined)returns'unknown'by design. Added realistic image tags to all 6 demo entries so users see meaningful version labels (nginx:1.25,redis:7, etc.) instead ofunknown.Bug 2 —
rss_feedcard included in Cluster Admin default layout (22 cards instead of 21)cluster-admin.tsdefault config containedrss_feedas a 22nd card, breaking the expected 21-card layout spec. An RSS news feed is irrelevant to cluster administration. Removed the entry. This also fixes the failing Playwright test that asserts exactly 21 default cards.Bug 3 — ArgoCD Apps stat block hardcoded to
0on/deploydashboardDeploy.tsxreturned{ value: 0, isDemo: true }unconditionally for theargocdstat block, regardless of actual data or demo mode. Replaced withuseArgoCDApplications()so the stat reflects the real app count (43 in demo mode, live count when connected).Files changed
web/src/hooks/useCachedData/demoData.ts— addimagefield to all demo deploymentsweb/src/config/dashboards/cluster-admin.ts— removerss_feedfrom default layoutweb/src/components/deploy/Deploy.tsx— wire ArgoCD stat touseArgoCDApplications()Test plan
/deployin Demo Mode → Deployment Status card shows image tags (nginx:1.25,redis:7, etc.) instead ofunknown/cluster-admin→ Restore Default Layout → confirm 21 cards total, no RSS Feed card/deploy→ Stats Overview → ArgoCD Apps shows43in Demo Mode instead of0npx playwright test e2e/cluster-admin-cards.spec.ts→ 21-card layout test passes🤖 Generated with Claude Code