Add hosted Playwright data-flow mode#102
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Playwright Data-Flow PreviewOutcome: success Captured flow:
Artifacts include screenshots, traces, and recorded video for the flow run. |
Playwright Image DiffOutcome: success Changed screenshot baselines: none in this PR. This check compares public route screenshots against committed baselines. Inline images show only added or modified baseline PNGs. |
Playwright Public Screenshot PreviewOutcome: success Screenshots: all public route checks passed on desktop and mobile. Full screenshot set is available in the artifact. Pixel diff baselines are handled by the separate Playwright Image Diff check. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Greptile SummaryThis PR adds a hosted Playwright data-flow mode that runs E2E tests against a deployed target (dev/staging or production) by pointing
Confidence Score: 4/5The PR is safe to merge. All new code paths are gated behind environment variables that are absent in most contexts, the production-block defense-in-depth layer is correctly ordered, and the Convex cleanup logic is consistent with how profiles are stored. The core logic — run-scoped cleanup, hosted mode configuration, and the deployed-health workflow — is well-structured and the token/production guards are correct. The cookie extraction pattern in the submission form is fragile and could silently truncate the runId if the value ever contains apps/web/src/app/submit/profile-submission-form.tsx (cookie extraction); apps/web/package.json (smoke script filter) Important Files Changed
Sequence DiagramsequenceDiagram
participant CI as GitHub Actions
participant PW as Playwright Runner
participant Browser as Browser (Page)
participant Form as E2eSubmissionForm
participant API as /api/e2e/profile-submissions
participant Convex as Convex Backend
CI->>PW: set PLAYWRIGHT_BASE_URL, VRDEX_E2E_BROWSER_TOKEN, VRDEX_E2E_RUN_ID
PW->>Browser: addCookies(vrdex_e2e_token, vrdex_e2e_run_id)
Browser->>Form: read vrdex_e2e_run_id cookie → runId
Form->>API: "POST /api/e2e/profile-submissions {runId, displayName, …}"
API->>API: requireE2eRequest() — token + productionBlocked check
API->>Convex: "mutation e2e.submitProfile {runId, …}"
Convex-->>API: "{slug, profileId, profilePath}"
API-->>Form: "200 {slug}"
Form-->>Browser: navigate to /p/slug
Browser-->>PW: assert profile + discovery visible
alt cleanup — slug captured
PW->>API: "DELETE {slug, runId}"
API->>Convex: "mutation e2e.cleanupProfileBySlug {slug}"
else cleanup — slug not captured
PW->>API: "DELETE {runId}"
API->>Convex: "mutation e2e.cleanupProfilesByRunId {runId}"
Convex->>Convex: index by_sourceSubmitterTokenIdentifier → deleteE2eProfile × n
end
|
Summary
@flowmode viaPLAYWRIGHT_BASE_URL, skipped local web servers, andpnpm test:e2e:hosted.VRDEX_E2E_RUN_IDwhile keeping helpers token-gated and production-blocked by default..env.localdeployment leakage.Refs #100.
Deployed Health Settings
VRDEX_HOSTED_E2E_BASE_URLand repo secretVRDEX_HOSTED_E2E_BROWSER_TOKEN.VRDEX_PRODUCTION_SMOKE_BASE_URL, or a successful productiondeployment_statusURL.all,staging-mutation, andproduction-smoke.Validation
pnpm verify:backend:localpnpm typecheck:backendpnpm test:backendpnpm --filter web lintpnpm --filter web typecheckpnpm --filter web exec playwright test --grep "@flow" --project=desktop-chromium --listVRDEX_ENABLE_E2E_HELPERS=true VRDEX_E2E_BROWSER_TOKEN=local-playwright-token VRDEX_E2E_CONVEX_SECRET=local-convex-e2e-secret pnpm --filter web exec playwright test --grep "@flow" --project=desktop-chromiumpnpm test:e2ePLAYWRIGHT_BASE_URL=https://example.com PLAYWRIGHT_SKIP_WEBSERVERS=true pnpm test:e2e:hosted:smoke -- --listpnpm dlx js-yaml .github/workflows/deployed-health.ymlterraform fmt -checkterraform initterraform validateterraform plan -var "domain_name=vrdex.net" -var "from_email=no-reply@vrdex.net" -detailed-exitcode