Files
Portfolio/tests/browser
LucaP 26e5ff01fd perf: compile scene shaders off-thread before the first frame
I warm the world's programs with renderer.compileAsync() at the end of the
async build, with the composer's scene target bound so tone mapping and
output colour space key the same programs the composer draws with, and with
hidden subtrees revealed so the light count matches the frame-0 warm render.
The wait is capped at 2.5 s; the warm render stays as the safety net for the
post passes, texture uploads and anything a slow or extension-less driver
left. Test builds report renderer.info.programs, and a browser spec pins zero
program growth after frame 0.

On the Intel ARL laptop the frame-0 task drops from ~1.74 s to ~0.34 s with a
pixel-identical first frame; measurements in
docs/overnight/compile-async-results.md.
2026-10-12 18:34:12 +03:00
..

Browser characterization tests

These Playwright tests lock the observable portfolio behavior at the browser boundary. Ordinary suites exercise the built dist/ output through the local preview server. The resilience suite additionally creates an authenticated, ephemeral test client: Playwright owns the raw per-run token, while only its SHA-256 digest enters that temporary bundle. Global fault hooks are absent from and rejected in production artifacts.

Run

Build the preview artifacts, then run the whole browser suite:

npm run build:preview
npm run test:browser

Run only the Phase 2 journey gate:

npm run test:browser -- tests/browser/journey-integration.spec.ts tests/browser/reduced-motion.spec.ts tests/browser/static-fallback.spec.ts tests/browser/bfcache-lifecycle.spec.ts

Add a case

  1. Name the concrete regression the case catches.
  2. Use literal inputs and expected browser-visible results.
  3. Install scene-instrumentation.ts before navigation when resource counts or platform calls are the observable boundary.
  4. Prefer browser-owned page.addInitScript() or routing. A lifecycle fault that requires an application seam must use one of the closed F1–F13 hook names and the authenticated helper.
  5. Run the new case against both configured Chromium profiles, then run the full suite.

Never copy credentials, private project identifiers, or private URLs into a fixture. Use clearly fake values when a credential-shaped input is required.

Browser evidence status

  • Executable here: current Playwright Chromium 151, desktop and a simulated mobile viewport. The simulated viewport is responsive evidence only and is not described as a physical Pixel result.
  • Pending because no runnable binary/channel is installed: current Firefox, WebKit/Safari, Edge, and the actual previous-stable desktop majors. Installed Chromium 148/145 builds are older retained binaries, not the required previous-stable 150 evidence, so they are not mislabeled or substituted.
  • Pending physical release evidence: current iOS Safari on iPhone 13 and Android Chromium on Pixel 6, including physical-drive.v1.

These pending cells remain release checkpoints; this repository does not turn missing hardware or browser binaries into passing emulation results.