[anonymous] › anonymous-walk.spec.ts › loads cpu-dashboard (/cpu-dashboard)
Error: console errors on /cpu-dashboard
+ "WebSocket connection to 'wss://api.spikersoft.com/hubs/dashboard' failed: HTTP Authentication failed; no valid credentials available"
+ "Error: Failed to start the connection: WebSocket failed to connect..."
+ "[pageerror] WebSocket failed to connect..."
Root cause
/cpu-dashboard was declared public (canActivate: [], manifest access: "public"), but CpuDashboardComponent.ngOnInit() unconditionally calls DashboardMetricsService.initialize(), which opens the DashboardHub (/hubs/dashboard) SignalR connection. That hub was role-gated to authenticated staff in #401. Anonymous visitors send an empty access token → WebSocket auth fails → the SignalR client emits a pageerror + console errors → the anonymous-walk console-error assertion fails.
The route was a leftover // TEMPORARY: CPU Metrics Dashboard for testing scaffold left publicly reachable. This effectively completes #401's intent (a public route was still driving the now-staff-only hub).
Gate the route with [AuthGuard, RoleGuard] + roles: [Admin, admin, Staff, staff] to match the hub.
Flip route-manifest.tsaccess: "public" → "admin" so the anonymous walk skips it and route-coverage's guard/access cross-check (accessMismatches) stays consistent (RoleGuard → admin).
Gating (rather than deleting) preserves the dashboard for authenticated staff; noted in a code comment that it can be removed outright if the team no longer needs it.
## Symptom
The `e2e-anonymous` CI job fails on master:
```
[anonymous] › anonymous-walk.spec.ts › loads cpu-dashboard (/cpu-dashboard)
Error: console errors on /cpu-dashboard
+ "WebSocket connection to 'wss://api.spikersoft.com/hubs/dashboard' failed: HTTP Authentication failed; no valid credentials available"
+ "Error: Failed to start the connection: WebSocket failed to connect..."
+ "[pageerror] WebSocket failed to connect..."
```
## Root cause
`/cpu-dashboard` was declared **public** (`canActivate: []`, manifest `access: "public"`), but `CpuDashboardComponent.ngOnInit()` unconditionally calls `DashboardMetricsService.initialize()`, which opens the `DashboardHub` (`/hubs/dashboard`) SignalR connection. That hub was role-gated to authenticated **staff** in #401. Anonymous visitors send an empty access token → WebSocket auth fails → the SignalR client emits a `pageerror` + console errors → the anonymous-walk console-error assertion fails.
The route was a leftover `// TEMPORARY: CPU Metrics Dashboard for testing` scaffold left publicly reachable. This effectively completes #401's intent (a public route was still driving the now-staff-only hub).
## Fix
spikersoft-angular PR (branch `fix/cpu-dashboard-staff-gate-e2e`):
- Gate the route with `[AuthGuard, RoleGuard]` + `roles: [Admin, admin, Staff, staff]` to match the hub.
- Flip `route-manifest.ts` `access: "public"` → `"admin"` so the anonymous walk skips it and route-coverage's guard/access cross-check (`accessMismatches`) stays consistent (`RoleGuard → admin`).
Gating (rather than deleting) preserves the dashboard for authenticated staff; noted in a code comment that it can be removed outright if the team no longer needs it.
Refs #401.
Resolved in spikersoft-angular PR #140 (merged to master). Gated /cpu-dashboard with [AuthGuard, RoleGuard] + staff roles to match the staff-only DashboardHub, and flipped the route-manifest access public → admin so the anonymous E2E walk skips it (route-coverage accessMismatches stays consistent, RoleGuard → admin). The anon suite no longer errors on the staff-gated hub. Closing.
Resolved in spikersoft-angular PR #140 (merged to `master`). Gated `/cpu-dashboard` with `[AuthGuard, RoleGuard]` + staff roles to match the staff-only DashboardHub, and flipped the route-manifest access `public` → `admin` so the anonymous E2E walk skips it (route-coverage `accessMismatches` stays consistent, `RoleGuard → admin`). The anon suite no longer errors on the staff-gated hub. Closing.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Symptom
The
e2e-anonymousCI job fails on master:Root cause
/cpu-dashboardwas declared public (canActivate: [], manifestaccess: "public"), butCpuDashboardComponent.ngOnInit()unconditionally callsDashboardMetricsService.initialize(), which opens theDashboardHub(/hubs/dashboard) SignalR connection. That hub was role-gated to authenticated staff in #401. Anonymous visitors send an empty access token → WebSocket auth fails → the SignalR client emits apageerror+ console errors → the anonymous-walk console-error assertion fails.The route was a leftover
// TEMPORARY: CPU Metrics Dashboard for testingscaffold left publicly reachable. This effectively completes #401's intent (a public route was still driving the now-staff-only hub).Fix
spikersoft-angular PR (branch
fix/cpu-dashboard-staff-gate-e2e):[AuthGuard, RoleGuard]+roles: [Admin, admin, Staff, staff]to match the hub.route-manifest.tsaccess: "public"→"admin"so the anonymous walk skips it and route-coverage's guard/access cross-check (accessMismatches) stays consistent (RoleGuard → admin).Gating (rather than deleting) preserves the dashboard for authenticated staff; noted in a code comment that it can be removed outright if the team no longer needs it.
Refs #401.
Resolved in spikersoft-angular PR #140 (merged to
master). Gated/cpu-dashboardwith[AuthGuard, RoleGuard]+ staff roles to match the staff-only DashboardHub, and flipped the route-manifest accesspublic→adminso the anonymous E2E walk skips it (route-coverageaccessMismatchesstays consistent,RoleGuard → admin). The anon suite no longer errors on the staff-gated hub. Closing.