Skip to content

Bundle E2E coverage gates#110

Open
BASIC-BIT wants to merge 4 commits into
mainfrom
test/e2e-coverage-bundle
Open

Bundle E2E coverage gates#110
BASIC-BIT wants to merge 4 commits into
mainfrom
test/e2e-coverage-bundle

Conversation

@BASIC-BIT
Copy link
Copy Markdown
Owner

@BASIC-BIT BASIC-BIT commented May 31, 2026

What changed

  • Added E2E coverage for profile field visibility, including unlisted fields visible on direct profile pages but absent from discovery/search, and private role fields hidden everywhere public.
  • Added local E2E Discord and VRChat/VRCLinking adapter stubs that are reached through the real Convex claim actions, covering community admin verification plus VRChat and VRCLinking proof-code claims.
  • Wired hosted extended-profile, auth, and adapter flow opt-in variables through PR, deployed-health, and staging-deploy workflows while keeping those hosted paths skipped until staging is explicitly configured.
  • Added Terraform stacks for the hosted PostHog project and Vercel PostHog env vars, plus docs for project 447783 and the import/apply path.
  • Documented the hosted helper env matrix and the Convex custom-domain runbook, including the remaining Convex Pro/dashboard DNS gate.

Why

Refs #100. This bundles the next E2E/deployment slices without enabling production mutation helpers or requiring real Discord, VRChat, VRCLinking, or SES calls in CI, and records the new VRDex PostHog project setup in checked-in infrastructure.

Verification

  • pnpm --filter web lint
  • pnpm --filter web typecheck
  • pnpm typecheck:backend
  • pnpm verify:backend:local
  • pnpm test:backend
  • Full local @flow Playwright run on desktop Chromium
  • pnpm test:e2e
  • Targeted local profile field-visibility Playwright run on desktop Chromium
  • Targeted local community and VRChat/VRCLinking adapter claim Playwright run on desktop Chromium
  • Hosted skip probe against https://staging.vrdex.net returned 1 skipped for the extended profile field-visibility flow while the repo opt-in variable is unset
  • pnpm --filter web check:vercel-env
  • terraform fmt -check -recursive infra/terraform
  • terraform validate in infra/terraform/posthog
  • terraform validate in infra/terraform/vercel
  • git diff --check

Risk notes

  • Hosted extended-profile, auth, and adapter flows remain opt-in via repository variables and matching staging/Convex capabilities.
  • The PostHog personal API key and project ingestion key are intentionally not committed; Terraform requires local/provider secret values before apply/import.
  • Production Vercel builds now fail if any E2E helper switch is enabled.
  • Staging deploy automation is still blocked until VERCEL_TOKEN is added as a GitHub secret.
  • Convex custom domains still require Convex Pro and provider-generated DNS records before Route 53 can be updated.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 31, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
vr-dex-web Ready Ready Preview, Comment May 31, 2026 5:55am

Request Review

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 31, 2026

Playwright Hosted Data-Flow

Outcome: success
Target: https://staging.vrdex.net
Hosted extended profile flow: skipped
Hosted auth helpers: skipped
Hosted adapter helpers: skipped
Run: https://github.com/BASIC-BIT/VRDex/actions/runs/26704767013
Artifact: playwright-hosted-data-flow

This optional check runs the mutation-backed profile flow against a configured hosted dev/staging target with isolated E2E test data.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 31, 2026

Playwright Data-Flow Preview

Outcome: success
Run: https://github.com/BASIC-BIT/VRDex/actions/runs/26704767013
Artifact: playwright-data-flow

Captured flow:

  • test-gated profile submission form
  • gated helper rejection without the Playwright token
  • Convex profile creation
  • submission success state
  • public profile page readback
  • discovery search readback

Artifacts include screenshots, traces, and recorded video for the flow run.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 31, 2026

Playwright Image Diff

Outcome: success
Run: https://github.com/BASIC-BIT/VRDex/actions/runs/26704767013
Artifact: playwright-image-diff

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.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 31, 2026

Playwright Public Screenshot Preview

Outcome: success
Run: https://github.com/BASIC-BIT/VRDex/actions/runs/26704767013
Artifact: playwright-public-preview

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.

@BASIC-BIT BASIC-BIT marked this pull request as ready for review May 31, 2026 05:35
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 31, 2026

Greptile Summary

This PR bundles three new E2E coverage slices — profile field-visibility, community admin verification via Discord, and VRChat/VRCLinking proof-code claims — along with local adapter stubs that let Convex claim actions run end-to-end without real external API calls. All hosted paths remain opt-in via repository variables and are skipped by default until staging is explicitly configured.

  • Profile field-visibility test asserts unlisted aliases/bio appear on direct profile pages but are absent from discovery, and that private role tags are hidden everywhere public.
  • Adapter claim test exercises the full community Discord-admin flow and both VRChat and VRCLinking proof-code flows against new local stub routes, all properly gated by VRDEX_ENABLE_E2E_ADAPTER_HELPERS and blocked on production builds.
  • Workflow and docs updates thread the three new opt-in variables through baseline-checks, deployed-health, and staging-deploy, and document the hosted helper env matrix and the Convex custom-domain runbook.

Confidence Score: 4/5

Safe to merge; all new adapter routes are gated behind multiple opt-in flags and blocked from production builds.

The adapter stubs and extended-profile helper are well-guarded and opt-in by default. The two findings are both in the new E2E test file: the VRCLinking claim section skips the intermediate proof-code visibility assertion that the parallel VRChat block includes, and optionalText is called twice per field in the Convex mutation. Neither affects production behaviour, but the missing assertion could let a silent failure in the create-proof step go undetected during a test run.

apps/web/e2e/auth-claim.flow.spec.ts — the VRCLinking proof block is missing the intermediate VRDEX- code assertion present in the VRChat block directly above it.

Important Files Changed

Filename Overview
apps/web/e2e/auth-claim.flow.spec.ts Adds community/VRChat/VRCLinking adapter claim test and shared helper functions; VRCLinking section is missing an intermediate proof-code assertion present in the VRChat block.
apps/web/e2e/profile-submission.flow.spec.ts Adds field-visibility E2E test covering unlisted aliases/bio on direct profile and private role tags hidden everywhere; logic and cleanup are straightforward.
apps/web/playwright.config.mjs Wires VRDEX_ENABLE_E2E_ADAPTER_HELPERS and adapter stub URLs into the local env block; VRCLINKING_PROOF_ADAPTER_URL intentionally sharing the vrchat-proof stub is documented.
apps/web/scripts/check-vercel-env.mjs Adds production-only guard that fails the Vercel build if any E2E helper switch is enabled; correctly scoped to production only to allow staging opt-in.
apps/web/src/app/api/e2e/adapters/discord/[...path]/route.ts New E2E Discord adapter stub; properly gated by VRDEX_ENABLE_E2E_HELPERS, VRDEX_ENABLE_E2E_ADAPTER_HELPERS, production block, and Bot token match; only responds to e2e- prefixed guild IDs.
apps/web/src/app/api/e2e/adapters/vrchat-proof/route.ts New VRChat/VRCLinking proof stub; gated identically to the Discord stub; verifies only e2e- prefixed target IDs with VRDEX- proof codes.
apps/web/src/app/api/e2e/profile-submissions/route.ts Extends profile-submission helper to accept headline, bio, about, region, timezone, pronouns, and fieldVisibility; helper functions reduce duplication cleanly.
convex/e2e.ts Adds fieldVisibility schema and extended profile fields to the E2E submitProfile mutation; optionalText is called twice per field which is a minor style issue.
.github/workflows/baseline-checks.yml Threads extended-profile, auth, and adapter opt-in variables through the hosted E2E step and both PR comment steps; changes are mechanical and correct.
.github/workflows/deployed-health.yml Same opt-in variable wiring as baseline-checks.yml; mechanical and correct.
.github/workflows/staging-deploy.yml Adds the three opt-in env vars to the hosted E2E step; no logic changes, all paths remain skipped until variables are set.
scripts/sync-convex-local-env.mjs Adds the five new adapter env var names to the local Convex sync list so they are propagated to the local dev Convex deployment during Playwright runs.
docs/deployment/convex-environments.md Documents adapter env vars and expands the Convex custom domain runbook into a numbered step-by-step process.
docs/deployment/vercel-preview.md Documents new adapter toggle and token variables for staging; adds the three new optional GitHub Actions repository variables to the staging configuration table.
docs/testing/playwright-visual-preview.md Expands the hosted E2E setup section with adapter stub requirements and clarifies that all three new hosted flows skip unless their respective repository variables are set.

Comments Outside Diff (1)

  1. apps/web/e2e/auth-claim.flow.spec.ts, line 412-414 (link)

    P2 Missing proof-code visibility assertion before VRCLinking claim check

    The VRChat proof section (lines ~398–401) asserts that a VRDEX- proof code is visible before clicking "Check proof now", giving the test a clear intermediate checkpoint. The VRCLinking section skips that assertion and goes straight to "Check proof now". If the proof code was never rendered (e.g., the create-proof step failed silently but still returned 200), the verify step could succeed against a stale or empty code, giving a false-green signal.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: apps/web/e2e/auth-claim.flow.spec.ts
    Line: 412-414
    
    Comment:
    **Missing proof-code visibility assertion before VRCLinking claim check**
    
    The VRChat proof section (lines ~398–401) asserts that a `VRDEX-` proof code is visible before clicking "Check proof now", giving the test a clear intermediate checkpoint. The VRCLinking section skips that assertion and goes straight to `"Check proof now"`. If the proof code was never rendered (e.g., the create-proof step failed silently but still returned 200), the verify step could succeed against a stale or empty code, giving a false-green signal.
    
    
    
    How can I resolve this? If you propose a fix, please make it concise.
Prompt To Fix All With AI
Fix the following 2 code review issues. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 2
apps/web/e2e/auth-claim.flow.spec.ts:412-414
**Missing proof-code visibility assertion before VRCLinking claim check**

The VRChat proof section (lines ~398–401) asserts that a `VRDEX-` proof code is visible before clicking "Check proof now", giving the test a clear intermediate checkpoint. The VRCLinking section skips that assertion and goes straight to `"Check proof now"`. If the proof code was never rendered (e.g., the create-proof step failed silently but still returned 200), the verify step could succeed against a stale or empty code, giving a false-green signal.

```suggestion
    await page.getByRole("button", { name: "Create proof code" }).click();
    await expect(page.getByText(/Proof code created/i)).toBeVisible();
    await expect(page.getByText(/VRDEX-/)).toBeVisible();
    await page.getByRole("button", { name: "Check proof now" }).click();
    await expect(page.getByText(/Proof verified as claimed verified/i)).toBeVisible();

    await page.goto(`/p/${vrcLinkingPersonSlug}`);
```

### Issue 2 of 2
convex/e2e.ts:285-289
`optionalText` is called twice per field — once for the condition check and once for the value. Since this is a pure helper with no side effects it's not a correctness bug, but it's verbose and allocates twice. Capturing the result in a local variable avoids the redundancy.

```suggestion
      ...(() => {
        const headline = optionalText(args.headline, 160);
        const bio = optionalText(args.bio, 600);
        const about = optionalText(args.about, 1_200);
        const region = optionalText(args.region, 80);
        const timezone = optionalText(args.timezone, 80);
        return {
          ...(headline !== undefined ? { headline } : {}),
          ...(bio !== undefined ? { bio } : {}),
          ...(about !== undefined ? { about } : {}),
          ...(region !== undefined ? { region } : {}),
          ...(timezone !== undefined ? { timezone } : {}),
        };
      })(),
```

Reviews (1): Last reviewed commit: "Gate hosted extended profile flow" | Re-trigger Greptile

Comment thread convex/e2e.ts Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant