The KubeStellar Console has 143 cards, 93 stat blocks, 22 dashboards, and 37 modals. Currently:
- Demo mode exists (
useDemoMode.ts) but is not consistently applied - Skeleton components exist (
Skeleton.tsx) but are not uniformly used - Some cards have demo data, many don't
- Switching between demo/live mode doesn't show skeletons consistently
- Cards can appear empty or in undefined states
Goal: Every UI component shows a skeleton with animated refresh icon until data (demo or live) is populated. Mode switching triggers immediate skeleton display. A centralized UnifiedDemo component manages all demo data.
Location: web/src/lib/unified/demo/
demo/
├── UnifiedDemo.tsx # Context provider for demo data
├── UnifiedDemoContext.ts # React context
├── demoDataRegistry.ts # Registry of all demo data generators
├── types.ts # Demo data types
└── generators/ # Per-component demo data
├── cards/ # Demo data for each card type
├── stats/ # Demo data for each stat block
├── dashboards/ # Demo data for dashboard layouts
└── modals/ # Demo data for modals
- UnifiedCard - Wrap with UnifiedDemo, show skeleton until demo/live data ready
- UnifiedStatBlock - Same pattern
- UnifiedStatsSection - Propagate loading state to all blocks
- UnifiedDashboard - Coordinate skeleton states across all cards
- Show skeleton with
animate-spinrefresh icon when:- Initial load (no data yet)
- Switching from demo→live mode
- Switching from live→demo mode
- Data refresh in progress
- Use cached data for instant display when switching to live mode
- Cards populate independently (no global "all cards loaded" state)
- Create
web/src/lib/unified/demo/UnifiedDemo.tsx - Create
UnifiedDemoContext.tswith provider - Create
demoDataRegistry.tsfor registering demo data generators - Create
types.tswith demo data interfaces - Integrate with existing
useDemoModehook - Handle mode switching with skeleton transition
- Add skeleton state that shows until data ready
- Add refresh icon animation during skeleton
- Integrate with UnifiedDemo context
- Support independent population per card
- Never show empty state (skeleton or data only)
- Add skeleton with refresh animation
- Integrate with UnifiedDemo context
- Support independent population
- Add refresh icon animation to all skeleton variants
- Create
SkeletonWithRefreshwrapper component - Ensure animations run during all loading states
- Add demo data for all cards
- Implement skeleton states
- Test mode switching
- Demo data: 12 clusters with varied states
- Stats: clusters, healthy, unhealthy, offline, nodes, cpus, memory, storage, gpus, pods
- Skeleton for cluster cards and stats
- Demo data: deployments, pods, services
- Stats: namespaces, critical, warning, healthy, deployments, pod_issues, deployment_issues
- Skeleton states
- Demo data: varied pod states
- Stats: total_pods, healthy, issues, pending, restarts, clusters
- Skeleton states
- Demo data: node resources
- Skeleton states
- Demo data: deployment statuses
- Skeleton states
- Demo data: service types
- Skeleton states
- Demo data: OLM operators
- Stats: operators, installed, installing, failing, upgrades, subscriptions, crds, clusters
- Skeleton states
- Demo data: releases, charts
- Skeleton states
- Demo data: log entries
- Skeleton states
- Demo data: compute resources
- Stats: nodes, cpus, memory, gpus, tpus, pods, cpu_util, memory_util
- Skeleton states
- Demo data: PVCs, storage classes
- Stats: ephemeral, pvcs, bound, pending, storage_classes
- Skeleton states
- Demo data: services, ingresses
- Stats: services, loadbalancers, nodeport, clusterip, ingresses, endpoints
- Skeleton states
- Demo data: warning/normal events
- Stats: total, warnings, normal, recent, errors
- Skeleton states
- Demo data: security issues
- Stats: issues, critical, high, medium, low, privileged, root
- Skeleton states
- Demo data: compliance checks
- Stats: score, total_checks, passing, failing, warning, critical_findings
- Skeleton states
- Demo data: secrets, certs
- Skeleton states
- Demo data: helm, kustomize, operators
- Stats: total, helm, kustomize, operators, deployed, failed, pending, other
- Skeleton states
- Demo data: alert rules, firing alerts
- Stats: firing, pending, resolved, rules_enabled, rules_disabled
- Skeleton states
- Demo data: cost breakdown
- Stats: total_cost, cpu_cost, memory_cost, storage_cost, network_cost, gpu_cost
- Skeleton states
- Demo data: GPU allocations
- Skeleton states
- Card History (
CardHistory.tsx) - Settings (
Settings.tsx) - User Management (
UserManagement.tsx) - Namespace Manager (
NamespaceManager.tsx)
- cluster_health, cluster_metrics, cluster_focus, cluster_comparison
- cluster_costs, upgrade_status, cluster_resource_tree, cluster_locations
- deployment_status, deployment_issues, deployment_progress
- pod_issues, top_pods, app_status, workload_deployment
- compute_overview, resource_usage, resource_capacity
- gpu_overview, gpu_status, gpu_inventory, gpu_workloads, gpu_usage_trend
- storage_overview, pvc_status
- network_overview, service_status, cluster_network
- service_exports, service_imports, gateway_status, service_topology
- helm_release_status, helm_history, helm_values_diff, chart_versions
- kustomization_status, overlay_comparison, gitops_drift
- argocd_applications, argocd_sync_status, argocd_health
- operator_status, operator_subscriptions, crd_health
- namespace_overview, namespace_quotas, namespace_rbac
- namespace_events, namespace_monitor
- security_issues, event_stream, user_management
- events_timeline, pod_health_trend, resource_trend, gpu_utilization
- console_ai_issues, console_ai_kubeconfig_audit, console_ai_health_check
- active_alerts, alert_rules
- opencost_overview, kubecost_overview
- opa_policies, kyverno_policies
- falco_alerts, trivy_scan, kubescape_scan, policy_violations, compliance_score
- vault_secrets, external_secrets, cert_manager
- prow_jobs, prow_status, prow_history
- llm_inference, llm_models, ml_jobs, ml_notebooks
- github_activity, weather
- kubectl, iframe_embed, network_utils, mobile_browser, stock_market_ticker
- All game cards need loading skeletons (games can show "Loading game..." skeleton)
- configmap_status, secret_status, node_status, job_status, cronjob_status
- daemonset_status, statefulset_status, replicaset_status, hpa_status, pv_status
- ingress_status, namespace_status, limit_range_status, resource_quota_status
- network_policy_status, service_account_status, role_status, role_binding_status
- warning_events, recent_events, event_summary, provider_health
- cluster_groups, deployment_missions, resource_marshall
- workload_deployment, workload_monitor
- console_ai_offline_detection, cluster_health_monitor
- github_ci_monitor, prow_ci_monitor, llmd_stack_monitor
- dynamic_card, rss_feed, pod_crosser
- clusters, healthy, unhealthy, unreachable, nodes, cpus, memory, storage, gpus, pods
- namespaces, critical, warning, healthy, deployments, pod_issues, deployment_issues
- total_pods, healthy, issues, pending, restarts, clusters
- total, helm, kustomize, operators, deployed, failed, pending, other
- ephemeral, pvcs, bound, pending, storage_classes
- services, loadbalancers, nodeport, clusterip, ingresses, endpoints
- issues, critical, high, medium, low, privileged, root
- score, total_checks, passing, failing, warning, critical_findings
- nodes, cpus, memory, gpus, tpus, pods, cpu_util, memory_util
- total, warnings, normal, recent, errors
- total_cost, cpu_cost, memory_cost, storage_cost, network_cost, gpu_cost
- firing, pending, resolved, rules_enabled, rules_disabled
- clusters, healthy, warnings, errors, namespaces, pods
- operators, installed, installing, failing, upgrades, subscriptions, crds, clusters
- AddCardModal, ConfigureCardModal, ReplaceCardModal, ResetDialog
- TemplatesModal, CreateDashboardModal, CardFactoryModal
- StatBlockFactoryModal, CardConfigModal
- ClusterDetailModal, RenameModal, GPUDetailModal
- CPUDetailModal, MemoryDetailModal, StorageDetailModal
- DrillDownModal, FeatureRequestModal, FeedbackModal
- AgentSetupDialog, SetupInstructionsDialog, DeployConfirmDialog
- SyncDialog, SaveResolutionDialog, AlertRuleEditor
- StatsConfigModal (x2), APIKeySettings, ApiKeyPromptModal, WidgetExportModal
- PolicyDetailModal, ClusterOPAModal, QuotaModal, ResourceDetailModal
- GPUDetailModal (alt), InstallModal, GitHubInviteModal, ViolationsModal
- ClusterDrillDown, NodeDrillDown, PodDrillDown, DeploymentDrillDown
- NamespaceDrillDown, ServiceAccountDrillDown
- HelmReleaseDrillDown, KustomizationDrillDown, ArgoAppDrillDown, DriftDrillDown
- ConfigMapDrillDown, SecretDrillDown, CRDDrillDown, YAMLDrillDown
- AlertDrillDown, EventsDrillDown, LogsDrillDown
- GPUNodeDrillDown, ResourcesDrillDown
- OperatorDrillDown, PolicyDrillDown, ReplicaSetDrillDown, MultiClusterSummaryDrillDown
- Test UnifiedDemo context provider
- Test skeleton rendering for each component type
- Test mode switching triggers skeleton
- Test demo→live mode transition shows skeleton then live data
- Test live→demo mode transition shows skeleton then demo data
- Test cached data loads instantly on live mode switch
- Test refresh icon animates during all loading states
- Test all dashboards show skeletons on initial load
- Test mode toggle behavior
- Test no empty card states
- Screenshot each dashboard in skeleton state
- Screenshot each dashboard with demo data
- Verify refresh animations work
web/src/lib/unified/demo/UnifiedDemo.tsxweb/src/lib/unified/demo/UnifiedDemoContext.tsweb/src/lib/unified/demo/demoDataRegistry.tsweb/src/lib/unified/demo/types.tsweb/src/lib/unified/demo/generators/cards/*.ts(143 files)web/src/lib/unified/demo/generators/stats/*.ts(14 files)
web/src/lib/unified/card/UnifiedCard.tsxweb/src/lib/unified/stats/UnifiedStatBlock.tsxweb/src/lib/unified/stats/UnifiedStatsSection.tsxweb/src/lib/unified/dashboard/UnifiedDashboard.tsxweb/src/components/ui/Skeleton.tsx- All 22 dashboard components
- All 143 card components
- All 37 modal components
- All 23 drill-down components
# ALWAYS use startup-oauth.sh to start/restart BE/FE/agent
./startup-oauth.shAll UI testing MUST use Chrome DevTools MCP tools:
mcp__chrome-devtools__navigate_page- Load pagesmcp__chrome-devtools__take_snapshot- Verify DOM elementsmcp__chrome-devtools__click/mcp__chrome-devtools__fill- Interactmcp__chrome-devtools__take_screenshot- Capture visual statemcp__chrome-devtools__list_console_messages- Check for errors
-
Manual Testing (via Chrome MCP):
- Toggle demo mode and verify skeletons appear immediately
- Verify all cards show skeleton until data loads
- Verify refresh icon animates during loading
- Verify no empty/minimized cards (unless user-minimized)
-
Automated Testing:
- Run
npm run testfor unit tests - Run
npx playwright testfor E2E tests
- Run
-
Per-Component Verification:
- Navigate to each dashboard
- Take snapshots to verify DOM structure
- Take screenshots to verify visual state
- Check console for errors
- Total Tasks: 70+ individual tasks
- Components to Update: 225+ (22 dashboards + 143 cards + 37 modals + 23 drill-downs)
- New Infrastructure: UnifiedDemo system with demo data registry
- Key Behavior: Skeleton with refresh animation until data ready, mode switching triggers immediate skeleton