Skip to content

Cluster Admin: Error banner and demo stat styling not tested #11788

@Arpit529Srivastava

Description

@Arpit529Srivastava

User Request

Type: bug
Target: Console Application
Submitted by: @Arpit529Srivastava
Console Request ID: 6fed8f9c-a4c7-4545-bca3-ebd657323e1e

Description

Description
The useClusters error red banner and demo-mode stat block styling on /cluster-admin have no Playwright coverage.

What happened
ClusterAdmin.tsx shows a red error banner when useClusters() returns an error, and passes isDemoData to stats. Neither the error state nor the demo badge/outline on stat blocks is validated by any test.

What I expect
Tests that:

  • Mock GET /api/mcp/clusters to return 500
  • Assert the red error banner is visible with meaningful text
  • Mock empty clusters + not loading → assert stat blocks show demo badge/yellow outline

Steps to reproduce

  • Go to /cluster-admin
  • Simulate cluster API failure
  • No test validates the error banner or demo stat state

Impact

  • Error recovery UX is invisible to CI
  • Demo mode indicators can silently break

SHA: 90b4309

Browser Console Errors (34 captured)
  • [2026-05-04T01:02:10.203Z] warn (console.warn): [cardInstallMap] 21 install-map key(s) do not match any registered card type: opa_violations,kyverno_violations,falco_events,istio_traffic,istio_policies,service_mesh,argocd_apps,argocd_sync,flux_sources,prometheus_alerts,prometheus_rules,grafana_dashboards,helm_releases,tekton_pipelines,tekton_runs,kubevirt_vms,gpu_reservations,llmd_benchmarks,image_vulnerabilities,crossplane_status,knative_services
  • [2026-05-04T01:02:10.632Z] warn (console.warn): [Cache] SQLite Worker unavailable, using IndexedDB fallback: Error: OPFS initialization failed — falling back to IndexedDB
  • [2026-05-04T01:02:10.632Z] warn (console.warn): [Cache] SQLite worker init: using IndexedDB fallback: Error: OPFS initialization failed — falling back to IndexedDB
  • [2026-05-04T01:02:10.944Z] warn (console.warn): [SSE] Connection failed (attempt 1/6, 0 items so far), retrying in 1000ms: SSE fetch failed: 404
  • [2026-05-04T01:02:10.944Z] warn (console.warn): [SSE] Connection failed (attempt 1/6, 0 items so far), retrying in 1000ms: SSE fetch failed: 404
  • [2026-05-04T01:02:11.323Z] error (console.error): [OfflineDetection] Error fetching nodes: TypeError: Failed to fetch
  • [2026-05-04T01:02:11.323Z] warn (console.warn): [OfflineDetection] Node fetch degraded: Failed to fetch
  • [2026-05-04T01:02:11.949Z] warn (console.warn): [SSE] Connection failed (attempt 2/6, 0 items so far), retrying in 2000ms: SSE fetch failed: 404
  • [2026-05-04T01:02:11.949Z] warn (console.warn): [SSE] Connection failed (attempt 2/6, 0 items so far), retrying in 2000ms: SSE fetch failed: 404
  • [2026-05-04T01:02:13.955Z] warn (console.warn): [SSE] Connection failed (attempt 3/6, 0 items so far), retrying in 4000ms: SSE fetch failed: 404
  • [2026-05-04T01:02:13.956Z] warn (console.warn): [SSE] Connection failed (attempt 3/6, 0 items so far), retrying in 4000ms: SSE fetch failed: 404
  • [2026-05-04T01:02:17.966Z] warn (console.warn): [SSE] Connection failed (attempt 4/6, 0 items so far), retrying in 8000ms: SSE fetch failed: 404
  • [2026-05-04T01:02:17.966Z] warn (console.warn): [SSE] Connection failed (attempt 4/6, 0 items so far), retrying in 8000ms: SSE fetch failed: 404
  • [2026-05-04T01:02:26.961Z] warn (console.warn): [SSE] Connection failed (attempt 5/6, 0 items so far), retrying in 16000ms: SSE fetch failed: 404
  • [2026-05-04T01:02:26.961Z] warn (console.warn): [SSE] Connection failed (attempt 5/6, 0 items so far), retrying in 16000ms: SSE fetch failed: 404
  • [2026-05-04T01:02:41.947Z] error (console.error): [OfflineDetection] Error fetching nodes: TypeError: Failed to fetch
  • [2026-05-04T01:02:43.926Z] warn (console.warn): [usePods] Fetch failed: SSE stream error: SSE fetch failed: 404
  • [2026-05-04T01:02:43.930Z] warn (console.warn): [SSE] Connection failed (attempt 1/6, 0 items so far), retrying in 1000ms: SSE fetch failed: 404
  • [2026-05-04T01:02:44.934Z] warn (console.warn): [SSE] Connection failed (attempt 2/6, 0 items so far), retrying in 2000ms: SSE fetch failed: 404
  • [2026-05-04T01:02:46.938Z] warn (console.warn): [SSE] Connection failed (attempt 3/6, 0 items so far), retrying in 4000ms: SSE fetch failed: 404
  • [2026-05-04T01:02:51.924Z] warn (console.warn): [SSE] Connection failed (attempt 4/6, 0 items so far), retrying in 8000ms: SSE fetch failed: 404
  • [2026-05-04T01:02:59.933Z] warn (console.warn): [SSE] Connection failed (attempt 5/6, 0 items so far), retrying in 16000ms: SSE fetch failed: 404
  • [2026-05-04T01:03:11.346Z] error (console.error): [OfflineDetection] Error fetching nodes: TypeError: Failed to fetch
  • [2026-05-04T01:03:16.929Z] warn (console.warn): [usePods] Fetch failed: SSE stream error: SSE fetch failed: 404
  • [2026-05-04T01:03:16.938Z] warn (console.warn): [SSE] Connection failed (attempt 1/6, 0 items so far), retrying in 1000ms: SSE fetch failed: 404
  • [2026-05-04T01:03:18.238Z] warn (console.warn): [SSE] Connection failed (attempt 2/6, 0 items so far), retrying in 2000ms: SSE fetch failed: 404
  • [2026-05-04T01:03:20.242Z] warn (console.warn): [SSE] Connection failed (attempt 3/6, 0 items so far), retrying in 4000ms: SSE fetch failed: 404
  • [2026-05-04T01:03:24.261Z] warn (console.warn): [SSE] Connection failed (attempt 4/6, 0 items so far), retrying in 8000ms: SSE fetch failed: 404
  • [2026-05-04T01:03:32.267Z] warn (console.warn): [SSE] Connection failed (attempt 5/6, 0 items so far), retrying in 16000ms: SSE fetch failed: 404
  • [2026-05-04T01:03:41.346Z] error (console.error): [OfflineDetection] Error fetching nodes: TypeError: Failed to fetch
  • [2026-05-04T01:03:48.930Z] warn (console.warn): [usePods] Fetch failed: SSE stream error: SSE fetch failed: 404
  • [2026-05-04T01:03:48.936Z] warn (console.warn): [SSE] Connection failed (attempt 1/6, 0 items so far), retrying in 1000ms: SSE fetch failed: 404
  • [2026-05-04T01:03:51.019Z] warn (console.warn): [SSE] Connection failed (attempt 2/6, 0 items so far), retrying in 2000ms: SSE fetch failed: 404
  • [2026-05-04T01:03:53.026Z] warn (console.warn): [SSE] Connection failed (attempt 3/6, 0 items so far), retrying in 4000ms: SSE fetch failed: 404
Diagnostics
Field Value
Agent Version dev
Install Method dev
Clusters 13
Agent Connection connected
Browser UA Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36
Browser Platform MacIntel
Browser Language en-US
Screen Resolution 1680x1050
Window Size 1632x969
Page URL http://localhost:5174/

This issue was automatically created from the KubeStellar Console.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ai-fix-requestedhelp wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/bugCategorizes issue or PR as related to a bug.needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.triage/neededNeeds triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions