Dashboard E2E Flake (#578)
For a contributor whose dashboard-surface spec (tests/e2e/specs/dashboard.spec.ts,
dashboard-supervisor, dashboard-analyst, dashboard-customize) times out under
the battery: page.goto waits tens of seconds, then the same page renders
sub-second on the next run. The harness retries nothing
(testing.adoc#e2e-no-retries), so the run that surfaced it is the report —
classify it with the table before touching anything.
Symptom → cause
| Failure text | What the captured artifact shows | Cause |
|---|---|---|
|
The dashboard DOM already rendered; |
A test bug — the wrong Playwright lifecycle event. Every worker page opens a long-lived SSE |
|
A missing or partial DOM (a few of the 13 worker-dashboard panels); canopy-web logs show a truncated upstream fan-out with no handler completion |
A server-side SSR stall: an upstream browned out and an un-budgeted SSR call held the document. Fixed by #1306 (aggregate request deadline, partials preserved); a recurrence is a |
|
The right panels, fewer of them |
A leaked |
The two navigation rules
-
Worker portal — navigate with
gotoPortal(page, url)(tests/e2e/lib/helpers.ts), never barepage.goto. It waits fordomcontentloaded; callers still assert on concrete panel locators, so a genuinely stalled render still fails. A spec file’s FIRST navigation carriesFIRST_LOAD_NAV_TIMEOUT_MS(30 s,helpers.ts) because a cold browser context loads every static; later navigations keep the default budget. -
Applicant portal (Dioxus/WASM) — wait for hydration, not
domcontentloaded. The portal stampsdata-hydrated="1"on<html>after hydration (services/canopy-portal/src/interop.rs), andawaitHydrated(page)(tests/e2e/lib/portal.ts) gates the first wasm-handled interaction on it. ThePUBLIC_PORTAL_PAGESaudits intests/e2e/specs/accessibility.spec.tsstay offgotoPortalfor this reason. Never a click-retry loop.
Verify
Re-run the single spec against the running devstack and read the trace
(testing.adoc#e2e-failure-artifacts): a wait-condition failure disappears once
the navigation uses the right helper; a server-side stall or a count mismatch does
not, and each becomes a fix: issue with the trace attached.
Related
-
Stale JWKS recovery — a different flake with an overlapping empty-dashboard symptom, distinguished by the multi-service 401 cluster in the logs.
gotoPortal; #1284 added the hydration marker; #1306 (closed 2026-08-05) fixed the SSR fan-out. The full investigation is issue #578.