/ai renders blank for anonymous visitors — app-root stays visibility:hidden #309

Closed
opened 2026-07-01 20:27:17 +00:00 by spikerj · 2 comments
Owner

Found by the E2E anonymous walk (epic #307, harness PR spikersoft-angular#90).

Symptom

Navigating to /ai as an anonymous visitor renders a blank page: app-root resolves and Angular bootstraps (ng-version attribute present) but the element remains visibility: hidden for at least 5s. No uncaught exception — the shell just never becomes visible.

Repro

  1. pnpm build && pnpm e2e --grep "loads ai-assistant" in spikersoft-angular.
  2. Or manually: open /ai as an anonymous user — blank page.

Notes

  • Route is declared public in projects/spikersoft/src/routes.ts.
  • The ai-assistant component tree uses visibility/hidden styling (ai-assistant.component.ts / .scss) — suspect an initialization gate (e.g. waiting on auth/profile or a service that never resolves anonymously) keeps the app hidden.
  • Decide: either the page should render a usable anonymous state, or the route should be auth-gated — in which case the route manifest in e2e/support/route-manifest.ts moves it to auth.

Part of epic #307.

Found by the E2E anonymous walk (epic #307, harness PR spikersoft-angular#90). ## Symptom Navigating to `/ai` as an anonymous visitor renders a blank page: `app-root` resolves and Angular bootstraps (`ng-version` attribute present) but the element remains `visibility: hidden` for at least 5s. No uncaught exception — the shell just never becomes visible. ## Repro 1. `pnpm build && pnpm e2e --grep "loads ai-assistant"` in `spikersoft-angular`. 2. Or manually: open `/ai` as an anonymous user — blank page. ## Notes - Route is declared public in `projects/spikersoft/src/routes.ts`. - The ai-assistant component tree uses `visibility`/`hidden` styling (`ai-assistant.component.ts` / `.scss`) — suspect an initialization gate (e.g. waiting on auth/profile or a service that never resolves anonymously) keeps the app hidden. - Decide: either the page should render a usable anonymous state, or the route should be auth-gated — in which case the route manifest in `e2e/support/route-manifest.ts` moves it to `auth`. Part of epic #307.
spikerj added the bug label 2026-07-01 20:27:17 +00:00
Author
Owner

Triage complete — not an app bug; the page renders correctly.

Root cause: /ai renders only the floating chat widget (position: fixed toggle button), so app-root has a zero-height bounding box. Playwright's toBeVisible() treats a zero-size box as hidden, which the walk misread as a blank page. Users actually see the menu bar and the floating chat button.

Fix (in the E2E harness, spikersoft-angular PR #90, commit ee58881): the walk now asserts app-root is attached and mat-toolbar.main-toolbar (a real laid-out element on every route) is visible. This stronger shell assertion immediately caught a genuine crash on /blog — filed as #310.

/ai passes the anonymous walk. Will close when PR #90 merges.

Triage complete — **not an app bug**; the page renders correctly. **Root cause**: `/ai` renders only the floating chat widget (`position: fixed` toggle button), so `app-root` has a zero-height bounding box. Playwright's `toBeVisible()` treats a zero-size box as *hidden*, which the walk misread as a blank page. Users actually see the menu bar and the floating chat button. **Fix** (in the E2E harness, spikersoft-angular PR #90, commit `ee58881`): the walk now asserts `app-root` is *attached* and `mat-toolbar.main-toolbar` (a real laid-out element on every route) is *visible*. This stronger shell assertion immediately caught a genuine crash on `/blog` — filed as #310. `/ai` passes the anonymous walk. Will close when PR #90 merges.
Author
Owner

Resolved in spikersoft-angular PR #90 (merged to master). Not an app bug — zero-height host-element false positive; the walk now asserts app-root attached + mat-toolbar.main-toolbar visible. Closing.

Resolved in spikersoft-angular PR #90 (merged to `master`). Not an app bug — zero-height host-element false positive; the walk now asserts `app-root` attached + `mat-toolbar.main-toolbar` visible. Closing.
Sign in to join this conversation.