Skip to main content

Playwright visual preview

PR labels select affected Playwright coverage. Use ci:browsers for assertions, ci:visuals for affected assertions/captures/comparisons, or ci:full for the complete suite.

See docs/testing/playwright-image-diffing.md for the committed-baseline image diff workflow. Screenshot preview and image diffing are intentionally separate checks.

Local commands​

  • Smoke public routes and run the local mutation-backed data flow: pnpm test:e2e
  • Capture public route screenshots: pnpm test:e2e:visual (the signed-in account-surfaces suite shares the @visual tag but skips here — it needs a hosted target, see Signed-in screenshots)
  • Compare public route screenshots against baselines: pnpm test:e2e:snapshots
  • Update public route screenshot baselines: pnpm test:e2e:snapshots:update
  • Reuse already-running local services: set PLAYWRIGHT_REUSE_SERVER=true and PLAYWRIGHT_REUSE_CONVEX=true
  • Run the mutation-backed flow against a hosted dev/staging target: set PLAYWRIGHT_BASE_URL and VRDEX_E2E_BROWSER_TOKEN, then run pnpm test:e2e:hosted
  • Run read-only smoke against a hosted production target: set PLAYWRIGHT_BASE_URL, then run pnpm test:e2e:hosted:smoke. Hosted smoke covers production-safe public routes only; fixture-backed profile/search expectations stay local because Vercel must not expose Playwright fixtures.

Local smoke also checks that an event URL with the wrong community returns 404 and gives visitors Search and Discovery links in both themes. The watchable-event fixture checks that the labeled Play control precedes the poster on phones and that the page attaches no video before the viewer presses Play. The event layout flow checks guest and Host schedules and visible action labels at 320, 360, 412, 640, and 768 px in UTC and America/Los_Angeles. The guest fixtures verify that Host routes reject guests without changing the authorized fixture. A date-only fixture without outgoing links has no Links card, and a watchable fixture without a poster keeps the player and event details aligned in one desktop column. A watchable event with a poster pairs the stage with the poster and event details. The flow also checks a tall poster, the sparse Host link, the date-only calendar attachment, and keyboard dismissal of the Report dialog.

The site footer flow checks the Developers and GitHub links share a row at 320, 360, and 412 px, preserves link tab order, and verifies dismissal returns focus to Usage & privacy when analytics settings are enabled.

The World presentation flow checks the VRChat action stays above artwork and fits on phones after platform compatibility. It covers duplicate, distinct, reference-only, and absent URLs, plus sparse and one-sided event fixtures. The sparse World fixture verifies centered placement at 320 px and a text status for the unlisted VRChat link.

The Support flow checks the exact required field names, persistent Message instructions, conditional profile lookup, and mock submission and retry. Public Contact and Privacy request snapshots cover their initial topic states.

The shared shell flow checks that the signed-out 320 px header uses two rows. It also checks that Search opens within the viewport and Escape restores focus.

The public Series flow checks that an empty schedule shows its status rather than a download action. Its direct calendar URL still returns a valid empty feed. The populated fixture verifies four distinct occurrence routes, localized accessible link names, and complete start and end times in the calendar feed. It also checks that a note unique to one night remains visible when the shared series summary is shown only once.

The public Person profile flow verifies that a sparse record keeps identity and ownership actions together at 320 px and on desktop. A separate multi-stream fixture checks the exact clipboard destinations and accessible control names for both playback devices. The media-kit flow covers keyboard disclosure, missing history, and a failed thumbnail on a 320 px layout. It verifies that Retry fits and that the asset keeps its download link. Profile event-card fixtures cover a date-only record with no artwork, host, or summary, plus a long title and earlier Doors in the viewer's timezone. They check natural card height, canonical and external links, and layout at 320 px. The event-only profile fixture checks that an occurrence with no artwork keeps its link and date legible in both themes.

The signed-out contribution smoke checks how Sign in names recognized profile actions. Unknown or rejected return paths keep the generic heading and guidance, and the test never signs in or enters credentials.

PowerShell data-flow run with video:

$env:VRDEX_ENABLE_E2E_HELPERS="true"; $env:VRDEX_E2E_BROWSER_TOKEN="local-playwright-token"; $env:VRDEX_E2E_CONVEX_SECRET="local-convex-e2e-secret"; $env:PLAYWRIGHT_RECORD_VIDEO="true"; pnpm --filter web exec playwright test --grep "@flow" --project=desktop-chromium

POSIX shell data-flow run with video:

VRDEX_ENABLE_E2E_HELPERS=true VRDEX_E2E_BROWSER_TOKEN=local-playwright-token VRDEX_E2E_CONVEX_SECRET=local-convex-e2e-secret PLAYWRIGHT_RECORD_VIDEO=true pnpm --filter web exec playwright test --grep @flow --project=desktop-chromium

PowerShell hosted dev/staging data-flow run:

$env:PLAYWRIGHT_BASE_URL="https://dev.example.test"; $env:PLAYWRIGHT_SKIP_WEBSERVERS="true"; $env:VRDEX_E2E_BROWSER_TOKEN="<browser-token>"; $env:VRDEX_E2E_RUN_ID="manual-$(Get-Date -Format yyyyMMddHHmmss)"; pnpm test:e2e:hosted

POSIX shell hosted dev/staging data-flow run:

PLAYWRIGHT_BASE_URL=https://dev.example.test PLAYWRIGHT_SKIP_WEBSERVERS=true VRDEX_E2E_BROWSER_TOKEN=<browser-token> VRDEX_E2E_RUN_ID="manual-$(date +%Y%m%d%H%M%S)" pnpm test:e2e:hosted

PowerShell hosted production smoke run:

$env:PLAYWRIGHT_BASE_URL="https://vrdex.net"; $env:PLAYWRIGHT_SKIP_WEBSERVERS="true"; pnpm test:e2e:hosted:smoke

POSIX shell hosted production smoke run:

PLAYWRIGHT_BASE_URL=https://vrdex.net PLAYWRIGHT_SKIP_WEBSERVERS=true pnpm test:e2e:hosted:smoke

The local Playwright suite starts a local Convex backend and Next dev server by default.

The focused authentication contract is:

pnpm test:e2e:hosted:auth-session

It is hosted-only. convex/auth.config.ts deliberately pins local deployments to the unresolvable issuer https://clerk-issuer.invalid, so a local backend rejects every Clerk token by design and no test wiring changes that — point PLAYWRIGHT_BASE_URL at a hosted target and supply the Clerk keys below.

The three-browser test:e2e:auth-session-matrix lane was removed with #226. It drove persistent browser profiles to exercise Convex Auth refresh-token rotation; Clerk owns sessions now, so there is nothing of ours left in that path to assert.

Before an authentication-sensitive release, manually check the ordinary remembered-session and explicit-sign-out paths in current Firefox and Safari with default privacy settings. Repeat in Firefox Strict Tracking Protection when practical. Record the browser versions and settings used. Private browsing, extensions, containers, enterprise policy, and Playwright WebKit are separate environments; do not claim coverage for one from results in another.

Setting PLAYWRIGHT_BASE_URL switches Playwright to hosted mode and disables local web servers.

Local webserver runs set token-gated E2E helper defaults so pnpm test:e2e includes the mutation-backed @flow journey without additional env setup.

Profile screenshots use deterministic Next-server fixtures when VRDEX_ENABLE_PLAYWRIGHT_FIXTURES=true. Fixture profiles are disabled when NODE_ENV=production.

The /playwright/event-playback UI tests supply synthetic public authorization responses only for their invented a and b events. The real retained owner, authorization polling, media element, and player adapters still run. These tests cover node retention, playback handoff, SDK controls, and disposal after a null authorization refresh; they do not establish real backend authorization or live provider compatibility.

Captured routes​

  • /
  • /submit
  • /sign-in
  • /account
  • /search?q=aurora
  • /support
  • /privacy/suppression (redirects to /support?topic=owner_opt_out)
  • /playwright/event-editor
  • /playwright-dj-aurora
  • /playwright-afterglow-social
  • /playwright-neon-harbor
  • /playwright-afterglow-social/events/playwright-afterglow-harbor-sessions

Legacy /discover?q=... URLs redirect to /search?q=...; plain /discover redirects to /.

Screenshots are written to apps/web/playwright-artifacts/screenshots and attached to the Playwright report.

Data-flow coverage​

The @flow Playwright test is the first mutation-backed journey. It:

  • opens /submit with a test-only cookie
  • verifies helper POST/DELETE calls are rejected without the Playwright token
  • submits a person profile through the browser
  • writes the profile into Convex through the server-gated E2E route
  • captures the post-submit success state
  • reads the generated public profile page
  • searches discovery for the submitted display name
  • captures screenshots for both readback pages
  • cleans up the E2E-created profile, search document, and audit event by slug

The Home search preview and long-name cases create their own real public profiles through /api/e2e/profile-submissions on a loopback target. Each test searches a unique run tag, uses the returned canonical profile paths, and deletes its records by run ID during fixture teardown. The preview cap checks all eight created records in the server response and five visible options. These cases work against a fresh local backend without a separate pnpm seed:local step. Home/search cases carry @fixture and stay in the local @flow lane; hosted selection excludes them because they require this checkout's UI and local fixture data.

The Search flow also checks an unbroken query at 320 px in both themes and uses the local-only playwright-search-unavailable fixture to distinguish an outage from a confirmed miss.

Auth-backed E2E​

Issue #226 rewired the auth half of the suite onto @clerk/testing. Two of the four specs it covered were not rewired but deleted, because their subject matter went away with Convex Auth rather than changing hands:

  • account-sessions.flow.spec.ts drove reauthentication challenges and session revocation. docs/backend/auth-sessions.md records that the step-up was replaced by in-page confirmations, and nothing in apps/web/src mentions reauth any more.
  • The three-browser matrix in auth-session.flow.spec.ts drove __convexAuth cookies and hand-seeded absolute_expired / invalid_refresh / revoked session rows. _browserSessionAuthority.ts records that Clerk collapsed revoked into plain anonymous.

What runs now:

  • auth-claim.flow.spec.ts — person and community claiming, VRChat adapter claims, and the negative helper-gate check
  • developer-credentials.flow.spec.ts — v0 bearer tokens and OAuth PKCE. Its RECENT_AUTH_REQUIRED step-up block went with the step-up itself.
  • auth-session.flow.spec.ts — rewritten as the seam contract: whether a Clerk session resolves to a verified Convex identity on this deployment. That is what a convex JWT template missing aud or email_verified, or a CLERK_JWT_ISSUER_DOMAIN naming a different instance than the publishable key, actually breaks — none of which a build catches.
  • account-surfaces.visual.spec.ts — signed-in screenshot coverage, described below.

Signed-in screenshots​

Every other visual spec renders a public route or a Playwright fixture route, so the account surfaces — the ones that exist because somebody is signed in — had no screenshot coverage. account-surfaces.visual.spec.ts captures /account, /account/privacy, and /developers/tokens after signing in with a disposable Clerk account.

It is tagged @visual, @flow and @account-visual, which is what places it. pnpm test:e2e:visual runs against local servers, and a local Convex deployment pins clerk-issuer.invalid so it trusts no Clerk instance — sign-in cannot succeed there, and the suite skips.

pnpm test:e2e:hosted does not run it. That command excludes @account-visual, because this is the one suite that needs both projects — the account surfaces have a distinct mobile layout, and the hosted command pins --project=desktop-chromium. Its own command runs both:

pnpm test:e2e:hosted:account-visual

It needs PLAYWRIGHT_BASE_URL, PLAYWRIGHT_SKIP_WEBSERVERS=true, VRDEX_E2E_BROWSER_TOKEN, VRDEX_ENABLE_E2E_AUTH_HELPERS, VRDEX_ENABLE_E2E_CLERK_AUTH, and the staging Clerk pair (NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY, CLERK_SECRET_KEY) — a development instance, since clerkSetup() refuses a production secret key. It needs no new repository settings; CI already holds all of them.

CI runs it twice, for different reasons. Playwright Hosted Data Flow runs it per PR, against staging, which serves main — so it catches a spec that cannot sign in or tears down badly, but cannot vouch for how the PR's own UI renders. Staging Deploy runs it after deployment, where staging holds the merged commit, which is the run that actually photographs the revision under test.

Two switches gate it, and they do not behave the same way:

  • VRDEX_HOSTED_E2E_CLERK_AUTH skips. It is the rollout switch: unset, the suite produces no coverage and says so. Both CI steps are additionally gated on it, so the step reports skipped rather than a success that photographed nothing.
  • VRDEX_HOSTED_E2E_AUTH_HELPERS fails on a hosted target. Deliberately: clerkTestAuthAvailability() throws when Clerk auth is on and the helpers are off, because that combination is a request for auth coverage against a target that cannot provide it. With the helpers off, DELETE /api/e2e/auth answers 403, so the teardown would look successful while every run left a users row keyed to a deleted Clerk identity. That is a misconfiguration to surface, not a state to skip over — and the throw happens at module load, before any test.skip could run.

Assertions name signed-in-only elements exactly — "Personal tokens", "No owned profiles yet" — and assert the signed-out headings are absent. Loose matchers like /tokens/i match "Sign in required", so they pass precisely when the screenshot is worthless.

A fresh account owns no profile, so /account/privacy captures the empty state rather than the field-visibility editor. Capturing the populated editor needs an account that owns a profile, which is what auth-claim.flow.spec.ts builds.

Captures land in apps/web/playwright-artifacts/screenshots and upload with the hosted data-flow artifact. They are not committed baselines: the @snapshot lane diffs Linux-rendered PNGs under apps/web/e2e/__screenshots__, and there is nothing to diff against until a run has produced some worth committing.

Accounts come from apps/web/e2e/clerk-auth.ts: the Clerk Backend API creates the user (which arrives with its email already verified, and so with email_verified in the token), setupClerkTestingToken bypasses bot protection, and a one-time sign-in ticket replaces the removed form. Teardown deletes both sides — the Clerk user and, through /api/e2e/auth, the Convex rows keyed to it. Convex never hears about a Clerk deletion on its own, because provisioning is on-demand from the client rather than webhook-driven.

These specs need Clerk credentials, so they run on hosted targets only and skip locally. Two switches gate them, and they are deliberately separate: VRDEX_HOSTED_E2E_AUTH_HELPERS says the deployment exposes /api/e2e/auth; VRDEX_HOSTED_E2E_CLERK_AUTH says CI holds credentials for that deployment's Clerk instance. With the second unset the auth specs skip; with it set to true and the keys missing they fail rather than skip. That asymmetry is the point — the removed Playwright Auth Session Matrix lane reported green for months over a spec that ran nothing.

Profile submission above is unaffected and still runs locally.

The helper route is disabled unless all of these are true:

  • VRDEX_ENABLE_E2E_HELPERS=true
  • VRDEX_E2E_BROWSER_TOKEN is configured and matches the request cookie or header
  • VRDEX_E2E_CONVEX_SECRET is configured for the server route and Convex helper deployment

The browser token gates the Next.js helper route. The Convex secret is never sent to the browser; the server route passes it to the public Convex E2E mutations so direct Convex calls also need the matching deployment secret.

/api/e2e/auth is back, narrower than before. It no longer mints accounts or sessions — Clerk does both — and its consume-code and set-session-state actions are gone with the Convex Auth tables they named. What is left is the VRDex-side state a claim depends on and no external provider can seed during a test: link-discord writes the Discord verification watermark, record-guild-proof stands in for the Discord OAuth round-trip, and DELETE tears down the Convex rows for an account. It exists as a route rather than direct Convex calls from the specs because VRDEX_E2E_CONVEX_SECRET must not reach the browser or the test runner; Playwright only ever holds the browser token.

Adapter helper routes require VRDEX_ENABLE_E2E_ADAPTER_HELPERS=true and are used only by Convex actions during E2E tests. Local Playwright webserver runs point Convex at local Discord and VRChat/VRCLinking adapter stubs so the UI exercises the real claim actions without real Discord, VRChat, or VRCLinking calls.

Do not enable these helpers in production. They are for local, CI, and disposable preview/dev deployments.

Hosted dev/staging targets must be configured outside this repository before running pnpm test:e2e:hosted:

  • Next/Vercel env: VRDEX_ENABLE_E2E_HELPERS=true
  • Next/Vercel env: VRDEX_E2E_BROWSER_TOKEN=<same value used by Playwright>
  • Next/Vercel env: VRDEX_E2E_CONVEX_SECRET=<non-empty sentinel>
  • Convex env: VRDEX_ENABLE_E2E_HELPERS=true
  • Convex env: VRDEX_E2E_CONVEX_SECRET=<non-empty sentinel>

Hosted extended profile field-visibility E2E additionally requires repository variable VRDEX_HOSTED_E2E_EXTENDED_PROFILE_FLOW=true. Keep it unset until the hosted target has deployed the E2E profile helper version that accepts aliases, bio, role tags, and fieldVisibility in helper payloads.

Hosted auth/claim E2E additionally requires VRDEX_ENABLE_E2E_AUTH_HELPERS=true in both the hosted app and Convex deployment. Keep it unset until the staging auth flow is intentionally enabled; production must never enable it.

It also requires Clerk credentials in the runner, which are repository settings rather than deployment ones:

  • repository variable VRDEX_HOSTED_E2E_CLERK_AUTH=true
  • repository secrets VRDEX_HOSTED_E2E_CLERK_PUBLISHABLE_KEY and VRDEX_HOSTED_E2E_CLERK_SECRET_KEY

These must be the development instance backing the hosted target, not production. clerkSetup() rejects a production secret key outright, and apps/web/scripts/check-vercel-env.mjs already requires pk_test/sk_test on every non-production Vercel build, so the correct pair is the one the target itself runs on.

The Playwright Data Flow job also runs the dated-connection claim regression and the host-only staff grant/revocation flow against the current PR's local Next and Convex servers for same-repository PRs. It runs before the broad flow suite so that the auth startup and test receive the available job budget. Local Next and Playwright both use localhost; Next normalizes loopback IP URLs to that host, and Clerk preserves it in its middleware rewrite. Mixing 127.0.0.1 as the browser origin with that rewrite causes Next to proxy the request back to itself. The isolated Convex URL remains unchanged. It reuses those development keys and repository variable VRDEX_STAGING_CLERK_JWT_ISSUER_DOMAIN. The issuer/key precheck rejects a production publishable key or mismatched issuer; the step rejects a missing or production secret key. The local environment sync applies the explicit issuer override supported by convex/auth.config.ts. No hosted backend is changed. This step requires exactly two passing, non-skipped tests in its separate JSON report and retains separate browser artifacts. Forks receive no keys.

The hosted copy of this regression uses the existing deployment revision check. When staging serves another revision, it reports inapplicable before creating fixtures. That result is not signed-in acceptance for the PR; the current-branch local step must execute and pass the strict completion/date assertions.

Owner: BASIC (repository owner) holds the Clerk dashboard and GitHub repository-settings access for both. There is no shared or team-held copy.

What the secret key can do: create, read, and delete users on the staging Clerk development instance, and mint sign-in tickets for them. It cannot touch the production tenant — a separate instance with separate keys — and it is never placed on a deployment, only in the Actions runner.

Rotating the secret key only — the common case, and what compromise or maintainer turnover calls for. The instance, its publishable key, and the issuer are unchanged:

  1. In the Clerk dashboard, on the development instance for the VRDex application, open API keys and rotate the secret key.
  2. gh secret set VRDEX_HOSTED_E2E_CLERK_SECRET_KEY.
  3. Re-run Deploy Staging, then confirm with pnpm test:e2e:hosted:auth-session.

Moving staging to a different Clerk instance — a recreated instance, or a deliberate migration. This is a manual sequence, not a workflow input. It is done rarely and by hand, and automating it inside Staging Deploy would mean rolling back two providers and rewriting a repository variable from CI to be correct.

The order matters because the pre-deploy check compares the configured issuer against the key the deployment currently serves, and that check never skips:

  1. On the new instance, create the JWT template named exactly convex from Clerk's Convex preset. Templates do not carry across instances, and no issuer check can see this — they compare hosts — so a move without it passes every comparison while Clerk cannot mint the token Convex expects.
  2. Set the Vercel staging NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY and CLERK_SECRET_KEY to the new instance's pair, and deploy Vercel so staging serves them. Staging authentication is down from here until step 4, because Convex still trusts the old issuer. That window is inherent to changing two providers that must agree; it is short and expected, not a fault.
  3. gh variable set VRDEX_STAGING_CLERK_JWT_ISSUER_DOMAIN --body https://<new-frontend-api-host>, then gh secret set for both VRDEX_HOSTED_E2E_CLERK_PUBLISHABLE_KEY and VRDEX_HOSTED_E2E_CLERK_SECRET_KEY.
  4. Run Deploy Staging. The pre-deploy check now compares the new issuer against the new key staging already serves, so it agrees and the deploy proceeds.
  5. Confirm with pnpm test:e2e:hosted:auth-session. This is what actually proves the JWT template, since it asserts a Clerk session resolves to a verified Convex identity.

Doing step 3 before step 2 makes step 4 abort at the pre-deploy check, which is the guard working: the issuer would not match what staging serves.

Hosted developer-credential E2E additionally requires repository variable VRDEX_HOSTED_E2E_DEVELOPER_CREDENTIALS=true. Keep it unset until the hosted target has deployed the developer token routes, OAuth app registration routes, and OAuth token endpoints under test.

Hosted adapter E2E additionally requires VRDEX_ENABLE_E2E_ADAPTER_HELPERS=true in the hosted app and these Convex env values on the shared development deployment:

  • DISCORD_API_BASE_URL=<hosted app URL>/api/e2e/adapters/discord
  • DISCORD_BOT_TOKEN=<staging-only adapter token>
  • VRCHAT_PROOF_ADAPTER_URL=<hosted app URL>/api/e2e/adapters/vrchat-proof
  • VRCLINKING_PROOF_ADAPTER_URL=<hosted app URL>/api/e2e/adapters/vrchat-proof
  • VRCHAT_PROOF_ADAPTER_BEARER_TOKEN=<staging-only adapter token>
  • VRCLINKING_ADAPTER_CAPABILITY_KEY=<staging-only signing key> — signs the per-delegation capability the VRCLinking adapter verifies as VRDEX_VRCLINKING_CAPABILITY_KEY. Keep it distinct from the bearer token

Selected same-repository PR browser coverage requires VRDEX_HOSTED_E2E_AUTH_HELPERS=true, VRDEX_HOSTED_E2E_CLERK_AUTH=true, the matching development Clerk keys, browser token and Convex preview deploy key. Configure them before enabling selected candidate runs. Their absence fails candidate acceptance, it does not skip coverage. Other deployed-health features retain their separate optional switches: extended profile fields, provider adapters and developer credentials. Keep those switches unset until their matching capabilities are configured.

VERCEL_ENV=production blocks the E2E route unless VRDEX_ALLOW_PRODUCTION_E2E_HELPERS=true is explicitly set. Keep that override unset for VRDex production.

The signed-in auth/account suites reserve the disposable email before creation and stop browser activity before cleanup. Their shared helper requires a successful deletion followed by an empty response before deleting an authenticated Clerk identity. A bounded three-pass drain cannot cancel already accepted backend work. Unsettled or failed cleanup fails the test and preserves the known Clerk identity for recovery. Browser-close failures are recorded while cleanup is still attempted.

Each data-flow run uses a unique VRDEX_E2E_RUN_ID prefix and creates only e2e:-attributed profiles. Cleanup deletes by slug on the happy path and can fall back to deleting profiles for the run ID if the slug was not captured.

CI behavior​

The API/MCP, backend and restream host prerequisite steps prefer the official HTTPS Ubuntu archive. Shared mirror setup removes the previously preferred kernel mirror and Azure archive entries while preserving other mirror-list fallbacks. APT HTTP and HTTPS connection/data inactivity timeouts are 15 seconds with one retry. These are acquisition bounds, not total transaction deadlines. Ubuntu package-signature verification and existing job time limits remain in place. Installation keeps its five-minute bound. The native transport gate still uses its packaged runtime. Docker container creation has a 30-second startup bound within a seven-minute outer deadline and an eight-minute CI step. This preserves the native suite's full allowance. Playwright browser installs in baseline, deployed-health, and staging workflows, plus synthetic-media installation, prepare the same mirror and acquisition settings through .github/scripts/configure-ubuntu-mirror.mjs before installing dependencies. These install steps have a ten-minute timeout for system dependencies and browser downloads. The helper logs the effective mirror list and retains Ubuntu package signature verification and the existing HTTPS fallbacks. Runners without a mirror-list file explicitly report that their configured sources remain in use. Linux tests execute the helper against disposable missing, empty, unterminated and repeated mirror lists, including preservation of existing fallbacks.

Default PR CI runs lint, types, unit tests, docs, API/MCP checks, backend bootstrap and the web build. Broad script contracts and native restream work run for relevant changes or ci:full; main retains both. Build and production-release dependencies are unchanged.

Labels when a normal PR run startsBrowser assertionsReview screenshots and image comparisons
NoneNOT SELECTEDNOT SELECTED
ci:browsersAffected suitesNOT SELECTED
ci:visuals, alone or with ci:browsersAffected suitesAffected surfaces
ci:fullComplete existing suiteAll existing comparisons

Agents select ci:browsers for UI, authentication and navigation changes. Add ci:visuals when screenshot evidence or baseline comparisons are needed. Small UI fixes must not select ci:full by default. Reserve it for an explicit complete run or cross-cutting changes and explain the reason in the PR.

The selector snapshots changed paths and labels. Timeline changes select home/timeline flows and, with visuals, the timeline image cases. Profile and event surfaces select their flow families and public image specs. Player changes select media acceptance and Storybook; stories select Storybook additively. Shared UI primitives, security-sensitive and unmapped application changes conservatively select broad coverage. New isolated surfaces need an explicit mapping and regression case in .github/scripts/ci-scopes.cjs before narrowing. See targeted PR CI.

Selected candidate preview acceptance requires a same-repository PR and nonempty passing browser/backend evidence, including full commit and both Convex URLs. It never uses shared staging as PR evidence. Forks do not receive private browser credentials and cannot claim this acceptance. See candidate preview acceptance.

Only selected jobs run. Storybook is not built for an unrelated timeline fix. Auth and media steps inside the data-flow job are selected independently; its ordinary flow invocation receives a quoted filename pattern. Main pushes skip PR-only browser jobs; production deployment controls remain unchanged.

The local data-flow job allows 70 minutes when it runs the full serial flow suite and composed-media acceptance together. Other selections have 45 minutes. A run of the combined suite reached the 45-minute limit after the serial flows and the first four playback tests passed.

In browsers-only mode, selected Storybook component assertions run with PLAYWRIGHT_CAPTURE_SCREENSHOTS=false. Affected public-route assertions also run without review captures. Review captures and image-diff jobs require ci:visuals or ci:full. Functional flows keep their existing failure screenshots, traces, and videos; those do not establish that review screenshots were collected.

With ci:visuals, selected preview jobs collect review screenshots and their corresponding image-diff jobs compare committed baselines. Requested comparisons fail on mismatches, runtime failures, cancellation or unexpected skips. CI never updates baselines.

Add labels before a normal PR run (opened, synchronized, reopened or marked ready for review). Label edits do not start application CI. Each run snapshots its selected jobs, scopes and full-suite flag. Later label changes do not rewrite that run's results. Removing a selection label preserves failed history and records changed coverage; ci:full implies both browser and visual selection. A new normal run records current coverage.

Local commands keep their current defaults, including review screenshot collection. Set PLAYWRIGHT_CAPTURE_SCREENSHOTS=false only when intentionally exercising assertions without review captures. This switch does not disable toHaveScreenshot comparisons. There is no browser-only or visual-only manual workflow dispatch.

When browsers are selected, the optional Playwright Hosted Data Flow job runs on same-repository PRs. It requires both settings to execute hosted tests:

  • repository variable VRDEX_HOSTED_E2E_BASE_URL
  • repository secret VRDEX_HOSTED_E2E_BROWSER_TOKEN

When configured, the job runs pnpm test:e2e:hosted with PLAYWRIGHT_BASE_URL, PLAYWRIGHT_SKIP_WEBSERVERS=true, PLAYWRIGHT_RECORD_VIDEO=true, and a GitHub Actions run-scoped VRDEX_E2E_RUN_ID. Extended profile, auth, adapter, and developer-credential flows skip unless VRDEX_HOSTED_E2E_EXTENDED_PROFILE_FLOW, VRDEX_HOSTED_E2E_AUTH_HELPERS, VRDEX_HOSTED_E2E_ADAPTER_HELPERS, and VRDEX_HOSTED_E2E_DEVELOPER_CREDENTIALS are explicitly set to true.

The final PR Verification Report runs after core checks and the selected Playwright/Storybook jobs. It validates core results, run selection, expected job results, and required browser artifacts, then updates one marker-based PR comment. Unselected browser coverage, the Storybook build, and comparisons appear as NOT SELECTED. Browsers-only previews do not claim screenshot success. Invalid selection, a core failure, missing selected evidence, cancellation, or an unexpected result fails verification. The report checks the current PR head before publication and discloses later label changes. Historical success never substitutes for unselected coverage.

Changed baselines appear as a complete inline image gallery inside a collapsed details section, pinned to the PR head. The producer jobs do not write PR comments. The report also removes legacy per-job comments.

The Deployed Health Checks workflow runs after merges to main, after successful GitHub deployment status events for production deployments, on a daily schedule, and through manual dispatch. It has two independent checks:

  • Hosted Data Flow Health uses VRDEX_HOSTED_E2E_BASE_URL and VRDEX_HOSTED_E2E_BROWSER_TOKEN to run scheduled or manually dispatched mutation-backed hosted flow checks against a dev/staging target.
  • Production Smoke Health uses the production deployment status URL when the workflow was triggered by a successful production deployment, otherwise VRDEX_PRODUCTION_SMOKE_BASE_URL, to run read-only public route smoke against production.

Manual dispatch can run all, staging-mutation, or production-smoke. The optional base_url override applies only when dispatching a single selected target. The deployed health workflow uploads artifacts and fails the workflow on test failure, but it does not create GitHub issues automatically.

The merge-triggered Staging Deploy workflow runs the auth-session contract after the matching Convex and Vercel deployment is live, which is the point of running it there: on a push it fired while those deployments were still going out, so it asserted against the previous deployment and reported that as the health of this one. Scheduled and manually dispatched staging health repeat the same contract.

The contract asserts that a Clerk session resolves to a verified Convex identity on that deployment. It uses only disposable @e2e.vrdex.net accounts created on the staging Clerk development instance and deleted in the same run, and the staging helper boundary. With VRDEX_HOSTED_E2E_CLERK_AUTH unset it skips; with it set and the Clerk keys absent it fails.

Both staging Playwright runs write to distinct report and results directories, because Playwright clears those when a run starts and the second invocation would otherwise discard the first run's evidence before it was uploaded.

Production authenticated smoke is a separate manual one-shot option. Supply a fresh base64-encoded Playwright storage state for the disposable production test account, select production_auth, and discard the state after the run. The runner performs no business/domain mutation; normal authentication refresh rotation may still occur. Its dedicated configuration disables traces, screenshots, video, and reports, and prints only one of: missing_state, configuration_missing, auth_state_rejected, transport_failure, server_failure, or passed. Do not enable it on schedules or upload its output as an artifact.

Current hosted mutation target: https://staging.vrdex.net, backed by the shared Convex development deployment. The deployed health workflow run 26695304658 passed staging-mutation after the Vercel staging custom domain was configured.

Home timeline evidence​

home-timeline.flow.spec.ts runs the real Home composition with unique run-owned local public events and profiles. home-timeline.visual.spec.ts compares desktop and mobile snapshots for ordinary browsing (long title, missing logo and original transparent 120×60 community artwork), selected poster, overlapping purple My night, empty range, failed range and the 81-slot detail fixture. A settled empty range without saved plans uses a single 94px public row. The clock is fixed at October 26, 2026 21:30 UTC; configured browser timezone is UTC. Every case owns and exactly cleans its records through the gated helper. The default, prefetch and detail scenarios share that ownership boundary.

Event pages and roster pages use separate client queries. eventTimeline.listPublic returns event identities with empty slots and performers arrays and a non-null initial roster cursor bound to the event and range. The controller drains eventTimeline.listPublicRoster independently before reporting complete coverage. Empty roster phases keep loading active; exhausting the bounded read budget keeps the partial state and More action. This separation respects Convex's single pagination budget across nested queries.

Timeline fixtures hold a local cross-process lease for their backend from creation through exact owned cleanup. Unique IDs protect writes, but fixed-date public queries see every concurrent run, so the timeline fixture lifetime is exclusive across files, workers and desktop/mobile projects. Other tests remain parallel. An interrupted worker leaves a lease in the OS temporary directory; acquisition times out with its path rather than deleting another run's records. Clean the interrupted run through the gated helper before removing that lease. Failed cleanup preserves a marker with the owning run ID and fails waiting fixtures immediately. Zero-count cleanup after an attempted create also blocks: a disconnected POST can still commit after DELETE reads zero. Test failures followed by exact owned cleanup release normally. Only fixture setup/teardown has a 150-second budget to include the bounded 120-second lease wait; test bodies keep their existing timeout.

Cleanup DELETE retries once after a connection reset, using the same run ID. Creation POST and state-change PATCH keep their existing retry behavior. A successful cleanup still requires valid JSON with exact owned counts. Exhausted resets, HTTP errors, malformed JSON and count mismatches keep the lease blocked, including a retry that returns zero after the first deletion's response was lost.

home-timeline-time-regressions.flow.spec.ts covers fractional CSS zoom panning, date navigation and Back restoration, plus event and selected-set details with a New York URL timezone in a UTC browser. Its rollback case uses the same guarded fixture creator with a November 1, 2026 start instant; it checks both occurrences of 1:30 AM and a set crossing the offset change. The inspector has one timezone/hour-format indicator. Its event and set times use the same browser-derived 12/24-hour preference as the toolbar, including en-GB coverage. Each set instant converts independently across DST; repeated offsets are omitted from performer rows.

The logo's run-specific HTTPS .invalid URL passes through the real canonical public host projection. Only that exact image request is served original artwork bytes from the gated local fixture-assets route. Public query responses remain real. Failure cases replace selected transport results with errors; they never invent successful event data. No hosted writes or production admission changes are involved. All timeline cases carry @fixture, excluded by hosted selection.

Existing Home snapshots keep their shared January 1, 2025 clock and wait for a settled schedule before capture. Timeline images use the existing screenshot threshold (0.2) and maximum pixel-difference ratio (0.002). Review actual desktop and mobile images before updating committed baselines. Keep unrelated route baselines unchanged.

pnpm --filter web exec playwright test home-timeline.flow.spec.ts home-timeline-time-regressions.flow.spec.ts home-timeline.visual.spec.ts homepage-search.flow.spec.ts --workers=2

Home discovery evidence​

home-discovery.flow.spec.ts mounts actual Home with the local backend. It checks one inspector across Schedule and Discover, independent card/panel saves and favorites, whole-event Included semantics, native modified event links, club profile navigation, keyboard/touch actions, Back/reload persistence, fractional-offset time, focus after a ranked invoker disappears, and live publication/host suppression. A failed public refresh removes obsolete cards; Retry can restore only currently eligible public data. A controlled minute tick expires a selected event, refills from already-inspected candidates without new discovery registrations, and preserves the selected inspector and fallback focus. Failure injection changes transport success into an error, never fabricates successful query results. The preference initializer runs once per fresh storage key and preserves later actions across navigation. The existing timeline regression files retain pending pan/Back and DST coverage.

home-discovery.visual.spec.ts compares actual mixed and sparse Home on desktop and mobile. Cold-start captures retain the ordinary local public pool without fixing its arbitrary equal-score order; they are review images, not deterministic ranking baselines. Sparse uses an October 2036 clock to exclude permanent 2026 local seed events while keeping all public query/ranking code real. Mixed uses October 26, 2026. Run-owned IDs feed a test-only session seed that fixes visual ties; no production ranking input or whole-card mask is changed. Full-page captures start at the top so sticky mobile navigation does not cover Discover.

home-discovery-states.storybook.spec.ts covers mixed, cold-start, sparse, complete-empty, partial, failed, loading, missing-artwork, missing-public-genre, and long-label states. It also checks one or two clubs with no events, and two events with no clubs. On desktop the confirmed-empty group gets a narrower column, and on mobile the groups still stack. These are visual-only fixtures, not evidence of backend admission, privacy or actions. Live privacy and actions are covered by the actual Home flows. Both capture suites preserve threshold 0.2 and maximum pixel difference ratio 0.002.

The dense local scenario contains 240 near-term events and a day-120 match. The normal benchmark observes individual homeDiscovery:* additions in Convex ModifyQuerySet frames and pending protocol revalidations, retaining only counts and elapsed times. Cold first responses use at most three concurrent logical reads. Favorite changes can synchronously reuse cached first values and still register more than three wire revalidations together; the warm rebuild records that separate burst, repeated argument/journal counts and latency. The logical first-value bound is not a strict backend or wire concurrency limit. It also checks unmount cleanup and Back recreation. Its shared-load benchmark moves Schedule to day five, keeps roster loading active, and measures search input, Schedule toolbar and independent inspector interactions without waiting for Schedule readiness. It records Schedule's eventual state/delay separately. These are local measurements, not a latency SLA. Backend fixture unit instrumentation records query calls and returned rows; physical database billing/read counts are not inferred from WebSocket counts.

On unexpected Home failures, fixture diagnostics attach browser errors, failed request paths and document visibility/focus. For local anonymous bootstrap investigation, VRDEX_E2E_BOOT_DIAGNOSTICS=true also records exception locations and a narrow source excerpt after a fault. It retains no auth or WebSocket frames and enables the debugger only after an exception, preserving normal startup.

The existing timeline full-page baselines also include Discover. Their timeline-visual scenario retains the original eight Schedule events and adds two future events with score-separated public genre evidence. Its ten events, five profiles and ten slots share one atomic run. Favorite IDs belong only to the new DJ/club, so existing Schedule emphasis and My night actions stay intact. Snapshots explicitly await those real public cards, the favorite-person summary and their images, including inspector captures whose viewport includes Discover. The dense inspector visual uses detail-visual: the original detail fixture (81 selected-event slots plus two manual entries) with the same two owned future recommendations and three new profiles. Its exact cleanup is ten events, six profiles, 89 slots and two lineup entries; the ordinary detail counts stay unchanged. The empty-range visual navigates to November 2036 and asserts that Next event is absent, avoiding the rolling local seed in November 2026. The dense saved-set flow navigates to November 2036 for its empty outside-cache range; the previous November 2026 date can contain the ordinary rolling local seed.

The fixed-date backend-origin lease remains exclusive only around owned fixture lifetimes, through exact cleanup. The selected suite still uses two workers; there is no blanket serialization. Both sparse and dense scenarios use the same loopback-only helper boundary and cleanup ownership checks.

pnpm --filter web exec playwright test home-discovery.flow.spec.ts home-discovery.visual.spec.ts home-timeline.flow.spec.ts home-timeline-review.flow.spec.ts home-timeline-time-regressions.flow.spec.ts home-timeline.visual.spec.ts homepage-search.flow.spec.ts --project=desktop-chromium --project=mobile-chromium --workers=2
pnpm --filter web exec playwright test home-discovery-states.storybook.spec.ts --config playwright.storybook.config.mjs --workers=2

The existing light Home snapshot uses the same owned visual scenario with a January 1, 2025 clock and January 6 fixture start, keeping its empty Schedule while future recommendations span separate bands. Only Home is scoped to that fixture; other public route snapshots retain their existing setup.

A bounded read-only Home smoke can use the documented PLAYWRIGHT_BASE_URL and PLAYWRIGHT_SKIP_WEBSERVERS options against a locally served production build without enabling production fixture admission. The Task 5b investigation checked cold load, Browse/Back, reload, live cards, enhanced inspector/focus and search on both devices, rejecting page errors and creating no backend records. That diagnostic source is retained with its evidence rather than registered as an unleased automatic fixture case in CI.

Local Home fixture recovery​

After a successful create, the fixture writes an atomic, nonsecret ownership manifest before the test body. It lives in .playwright-fixtures/<backend-hash>.json under the Playwright working directory. VRDEX_HOME_FIXTURE_MANIFEST_DIR can select another durable local artifact directory. It records the backend origin, run ID, owner PID, event/profile/slot/lineup-entry IDs and exact expected cleanup counts. Detail runs include their two authored lineup-entry IDs. It contains no tokens, secrets or public response snapshots.

Verified exact cleanup removes the manifest. Failed or interrupted cleanup keeps it and the blocking temporary lease. An unresolved manifest also blocks a new fixture if the OS temporary lease has disappeared. Neither PID age nor a reset, HTTP success alone, zero counts or a missing temporary lock proves cleanup. There is no automatic lease deletion or takeover.

For recovery, first verify the original worker has stopped and inspect only that manifest and lease. Restore the same anonymous local backend origin and gated web helper configuration. Use the existing authenticated DELETE /api/e2e/home-timeline with only the recorded runId; the route and backend independently enforce loopback, enablement, credentials and exact ownership. Compare the response with every recorded expected count. Only exact verified cleanup permits removing that manifest and lease. If a reset may have committed cleanup or counts differ, retain both artifacts and inspect those exact owned IDs against the same backend before authorizing manual recovery. Do not reseed, delete foreign records, weaken gates or infer success from zeros. The local credential value stays in the request environment, outside artifacts.

The manifest/lease/reset boundary tests use actual child processes and local HTTP connections. They cover interruption before cleanup, durable ownership after loss of a temporary lock, exact cleanup removal, disconnected creates and cleanup resets both before and after commit.

A create that loses its response may have no successful-create manifest. Keep its lease and original error, then establish that the original backend operation has finished before checking exact run-owned records. Zero cleanup counts alone do not rule out a late commit. Manual lease release must compare its complete owner contents immediately before removal. Temporary inspection, if explicitly approved, stays internal, read-only, guarded and limited to that exact run; remove it, regenerate functions and verify it is unavailable before continuing. The fixture attaches nonsecret create stage and HTTP status on failure. A second cleanup error preserves the primary exception as its cause.

Compact My night cases check accessible descriptions for overlap, partial lineup and favorite markers, plus a heading on mixed fallback removal lists.

My night and Next saved exclude expired selections without deleting saved history. Timed selections expire at their end; open-ended selections use the shared six-hour runtime window for display only. Date-only selections use the backend's end-of-date grace through UTC-12. The timeline flow regression mixes ended and upcoming saves, checks Next saved, then advances three days and checks that old selections stay hidden while the stored history remains intact. At the storage limit, Schedule offers Clear past selections so new saves can be added. The action preserves upcoming and unresolved references.

Broadcast Candidate Acceptance first checks changed paths. Schedule-only timeline components, helpers, fixtures and documentation skip the expensive browser/native rehearsal. Broadcast/runtime, shared application dependencies, lockfile and its CI workflow changes select it. A successful unselected check reports NOT SELECTED without requiring native artifacts. Selected runs still require assertions and current evidence, and use the same pinned local Convex backend as backend checks.

Home polish measurement​

The October 29 polish uses the five native behavior cases in home-discovery.flow.spec.ts for slow geometry, failed initial load/Retry, inspector and reading-position retention, complete large-roster names and usable cold search. These remain in the @flow CI lane.

home-polish-performance.flow.spec.ts is a manual @measurement harness:

HOME_MEASUREMENT_REVISION=feature pnpm --filter web exec playwright test home-polish-performance.flow.spec.ts --project=desktop-chromium --project=mobile-chromium --workers=2

Use one explicit local backend/web owner and the normal exclusive fixture lease. The harness prewarms Home and hydrates a disposable context before measuring a fresh browser context, then repeated navigation in that context and a bounded 1500ms hold of real transport frames. Both revisions use the same fixture writer, device, assets, system TLS flag and server prewarm. Heavy checks run afterward.

Artwork routing can disable HTTP cache in Playwright. "Warm" therefore means repeated navigation in the same context, not guaranteed HTTP cache hits. Pending images can be lazy or offscreen; they are not evidence of a network failure or unready section.

Readiness times start at document initialization and exclude request/TTFB and compiler startup. The fixed test clock carries its monotonic time across navigations, so the harness records and subtracts each document's origin and checks times against its observed window. Image inventory distinguishes loaded, pending, failed and absent images. A card without an image can be a legitimate fallback. Raw layout shifts include recent-input flags. CLS excludes those recent-input shifts and takes the maximum session sum. A session continues only when the next eligible shift is less than one second after the previous eligible shift and less than five seconds after the session start. One observation per phase is local evidence, not a latency SLA. Subscription registration counts describe protocol work separately from logical scheduler limits.

October 29 combined verification​

The local evidence covers 146 distinct desktop/mobile behavior cases and 18 native visual cases through preserved failed runs plus focused passing reruns. Storybook passed 30/30. All 16 affected native and 18 affected Storybook baselines were visually reviewed before acceptance, with existing thresholds.

Canonical web/backend types, web/Markdown lint, generated verification and web and Storybook builds passed. The web build required the documented system TLS flag. Default Node file-isolated commands failed under this harness; separate real-file processes produced 1011 passing web cases across the full inventory and scoped MCP timeout rerun. Backend initially passed 2302/2303; the unrelated cleanup timing file passed 9/9 serially afterward. Raw failures remain evidence.

The paired local measurement completed all ordinary and dense section loads. Ordinary feature CLS was zero; dense schedule readiness was about 19–24 seconds on both revisions, with pending offscreen/lazy artwork and legitimate fallback cards. One feature slow desktop dense observation had CLS 0.131625. This is not proof of faster cold loading or zero movement for arbitrary content.

The profiler's session-window calculation was corrected after these measurements. The frozen execution source/hash and raw artifacts remain the historical method, which summed all eligible shifts. A read-only recomputation with the corrected helper matched all 24 recorded phase values exactly; each phase had at most one eligible shift. No browser measurement was repeated for this correction.

Across all four matched fixture/device cases, a favorite action registered 16 event-candidate, two club-candidate and two event-signal subscriptions on the baseline, and zero of those on the feature. Both registered one profile-signal batch; the feature also registered one selected-card membership batch. These are protocol registrations, separate from logical first-value scheduling and backend query execution.

Full command outputs, raw observations, coverage composition, VLM notes and recovery proofs are retained at /workspace/previews/vrdex-home-polish/task-7 in the execution workspace. The controller owns whole-branch review and selected browser/visual CI.

Ubuntu package prerequisites​

Baseline browser and media jobs use .github/scripts/configure-ubuntu-mirror.mjs before APT dependency installation. It applies the MIT Ubuntu mirror to direct source files and mirror lists, retaining distribution suites, components and signing configuration. Regional EC2 Ubuntu mirrors are rewritten or removed too, so APT cannot retain them as equally ranked alternatives. The helper also disables the runner's Ubuntu 26.04 Microsoft package feed for these jobs. Browser and media prerequisites come from signed Ubuntu repositories. tests/scripts/ubuntu-mirror.test.mjs covers both source formats, regional mirrors, third-party preservation and idempotence.