User Request
Type: bug
Target: Console Application
Submitted by: @Abhishek-Punhani
Console Request ID: c3d558bc-7d35-4ac0-ab1e-21dcfc4a6d53
Description
ArgoCD cards (especially ArgoCD Applications) can incorrectly show demo data + demo badge even when ArgoCD is installed and healthy in the cluster.
Observed by user:
- ArgoCD pods are all
Running in argocd namespace (kubectl get po -A confirms).
- UI still shows
Demo badge and mock-looking app list (api-gateway, monitoring-stack, etc.).
- Integration banner (
Install ArgoCD...) is shown even in this live cluster context.
Impact
- False impression that ArgoCD is not installed.
- Users cannot trust card state or data provenance.
- Operational decision-making is affected (live GitOps status hidden behind mock fallback).
Affected files
Current behavior (from implementation)
1) Hook falls back to mock data aggressively
In useArgoCDApplications:
- It calls
/api/gitops/argocd/applications.
- It accepts live data only when:
result.isDemoData === false and
result.items.length > 0
- Otherwise it throws and falls back to
getMockArgoApplications(clusterNames) with isDemoData=true.
This means demo can be shown for multiple non-demo situations:
- backend endpoint unavailable/error,
- backend returns
{ isDemoData: true },
- backend returns empty
items temporarily.
2) Argo cards always show integration banner
All three cards render the "ArgoCD Integration / Install ArgoCD" notice unconditionally (not gated by isDemoData or missing integration).
So even with live data, the card still implies ArgoCD needs installation.
3) Data source mismatch likely in local-agent workflows
useArgoCD uses backend /api/gitops/* only, and does not use local-agent data paths. If cluster data is available via local agent but backend GitOps endpoint is not ready/reachable, it still falls to demo.
Why user can reproduce despite healthy pods
kubectl confirms ArgoCD is running in-cluster, but UI demo mode is controlled by hook fetch path and response flags, not by pod existence. If /api/gitops/argocd/* cannot return live app data, the hook intentionally emits mock data.
Existing tests found
There are existing tests, but they miss critical live-vs-demo correctness scenarios:
Coverage gap highlights:
- No robust test proving live API response suppresses demo fallback in real-world edge cases.
- Tests currently assert integration banner rendering in live mode (which reinforces the incorrect UX).
- No test ensuring banner is conditional on
isDemoData/missing integration state.
- No test asserting behavior when backend returns temporary empty list vs true demo fallback.
Expected behavior
- If ArgoCD live API is reachable with real data, card must not show demo badge.
- Integration/install banner should show only when appropriate (e.g., explicit demo mode or confirmed missing integration), not always.
- Empty live datasets should not automatically become synthetic mock datasets unless explicitly configured as demo fallback.
- If backend GitOps endpoint is unavailable but cluster connectivity exists, show clear error/limited state instead of silently replacing with mock data.
Proposed fix direction
-
Tighten fallback policy in useArgoCD.ts:
- Distinguish between:
- explicit demo (
isDemoData=true),
- live empty result (
items=[]),
- backend failure.
- Avoid auto-generating mock applications for live-empty or transient failures unless explicitly allowed.
-
Make integration banner conditional in cards:
- Render install/integration notice only when:
- explicit demo fallback, or
- confirmed ArgoCD not integrated.
- Hide it for live data mode.
-
Surface source/diagnostic state:
- Expose a source state (
live, demo, error) from hooks.
- Cards use that state for badge and messaging.
-
Optional: add local-agent fallback for ArgoCD data where feasible.
Test scenarios to add (detailed)
Hook tests (useArgoCD)
- Live API success (
isDemoData=false, non-empty items) -> isDemoData=false, no mock generation.
- Live API success with empty items -> remains live empty state (not forced mock demo).
- API non-200 with
{ isDemoData:true } -> explicit demo state.
- API failure/network error -> error state (or controlled fallback), not silent fake apps by default.
- Cache contains demo data but fresh live response arrives -> switch to live.
- Cache contains live data and refresh fails transiently -> keep live stale data, avoid instant demo flip.
- Cluster list available but GitOps endpoint unavailable -> no false "Argo installed missing" inference.
Card tests (ArgoCDApplications, ArgoCDHealth, ArgoCDSyncStatus)
- Integration banner hidden in live mode.
- Integration banner visible only in demo/missing-integration mode.
- Demo badge appears only when hook marks demo.
- Live mode + empty data shows empty state message, not mock apps.
- Live mode + refresh error shows non-demo error/limited state text.
- Regression: with live data (
api-gateway real object), card should not include canned mock set generated from clusters.
Acceptance criteria
- ArgoCD cards do not show
Demo when live ArgoCD data is available.
- Integration banner is conditional and not always displayed.
- Demo fallback does not mask live-empty or transient-error states.
- Added tests cover live/demo/error/empty transitions and pass.
This issue was automatically created from the KubeStellar Console.
User Request
Type: bug
Target: Console Application
Submitted by: @Abhishek-Punhani
Console Request ID: c3d558bc-7d35-4ac0-ab1e-21dcfc4a6d53
Description
ArgoCD cards (especially
ArgoCD Applications) can incorrectly show demo data + demo badge even when ArgoCD is installed and healthy in the cluster.Observed by user:
Runninginargocdnamespace (kubectl get po -Aconfirms).Demobadge and mock-looking app list (api-gateway,monitoring-stack, etc.).Install ArgoCD...) is shown even in this live cluster context.Impact
Affected files
Current behavior (from implementation)
1) Hook falls back to mock data aggressively
In
useArgoCDApplications:/api/gitops/argocd/applications.result.isDemoData === falseandresult.items.length > 0getMockArgoApplications(clusterNames)withisDemoData=true.This means demo can be shown for multiple non-demo situations:
{ isDemoData: true },itemstemporarily.2) Argo cards always show integration banner
All three cards render the "ArgoCD Integration / Install ArgoCD" notice unconditionally (not gated by
isDemoDataor missing integration).So even with live data, the card still implies ArgoCD needs installation.
3) Data source mismatch likely in local-agent workflows
useArgoCDuses backend/api/gitops/*only, and does not use local-agent data paths. If cluster data is available via local agent but backend GitOps endpoint is not ready/reachable, it still falls to demo.Why user can reproduce despite healthy pods
kubectlconfirms ArgoCD is running in-cluster, but UI demo mode is controlled by hook fetch path and response flags, not by pod existence. If/api/gitops/argocd/*cannot return live app data, the hook intentionally emits mock data.Existing tests found
There are existing tests, but they miss critical live-vs-demo correctness scenarios:
Coverage gap highlights:
isDemoData/missing integration state.Expected behavior
Proposed fix direction
Tighten fallback policy in
useArgoCD.ts:isDemoData=true),items=[]),Make integration banner conditional in cards:
Surface source/diagnostic state:
live,demo,error) from hooks.Optional: add local-agent fallback for ArgoCD data where feasible.
Test scenarios to add (detailed)
Hook tests (
useArgoCD)isDemoData=false, non-empty items) ->isDemoData=false, no mock generation.{ isDemoData:true }-> explicit demo state.Card tests (
ArgoCDApplications,ArgoCDHealth,ArgoCDSyncStatus)api-gatewayreal object), card should not include canned mock set generated from clusters.Acceptance criteria
Demowhen live ArgoCD data is available.This issue was automatically created from the KubeStellar Console.