feat(web): refine sprint landing page - #1996
groupthinking wants to merge 5 commits into
Conversation
Clarify the existing YouTube-to-Studio workflow, preserve the shared Workflow Pro checkout path, and add accessible local browser coverage.\n\nRefs #1975
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Repository: groupthinking/EventRelay/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Dependency Review SummaryThe full dependency review summary was too large to display here (13153KB, limit is 1024KB). Please download the artifact named "dependency-review-summary" to view the complete report. |
|
@copilot resolve the merge conflicts in this pull request |
…-landing-page # Conflicts: # apps/web/src/app/page.tsx # apps/web/src/components/billing/ProCheckoutButton.tsx # apps/web/src/components/home/HomePasteForm.tsx # apps/web/src/components/home/HomeProCheckout.tsx # apps/web/src/lib/__tests__/home-sell-surface.test.ts Co-authored-by: groupthinking <154503486+groupthinking@users.noreply.github.com>
Co-authored-by: groupthinking <154503486+groupthinking@users.noreply.github.com>
Resolved. I merged |
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Pull request overview
Refines the web landing page’s first-time visitor flow (YouTube URL → Studio), with additional accessibility/focus treatment and regression/acceptance coverage.
Changes:
- Updated source-level regression assertions for landing page copy and accessibility/focus attributes.
- Updated Playwright smoke coverage to match the revised landing-page conversion path and price display.
- Added a new local-only Playwright landing-page acceptance spec (responsive + invalid URL + keyboard focus).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| apps/web/src/lib/tests/home-sell-surface.test.ts | Expands source-level regression assertions for new landing copy and a11y/focus attributes. |
| apps/web/playwright/smoke.spec.ts | Updates smoke assertions to align with the new landing-page hierarchy and price rendering. |
| apps/web/playwright/landing-page.spec.ts | Adds local-only acceptance checks for layout overflow, invalid URL announcement, and keyboard focusability. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| test.skip( | ||
| !baseURL || !['localhost', '127.0.0.1', '[::1]'].includes(new URL(baseURL).hostname), |
| }); | ||
|
|
||
| async function expectNoHorizontalOverflow(page: Page) { | ||
| expect(await page.evaluate(() => document.documentElement.scrollWidth <= window.innerWidth)).toBe(true); |
| test('Features and playground fold into Home', async ({ page }) => { | ||
| const features = await page.goto('/features'); | ||
| expect(features?.status()).toBeLessThan(400); | ||
| await expect(page).toHaveURL(/\/(\?.*)?$/); |
| expect(home).toContain('Paste a YouTube URL. Continue in Studio.'); | ||
| expect(home).toContain('hashed Video Pack'); | ||
| expect(home).toContain('transcript, event, and action outputs'); |
| expect(home).toContain('HomeProCheckout'); | ||
| expect(home).toContain('Get Pro'); | ||
| expect(home).toContain('workflowProPriceLabel'); | ||
| expect(home).not.toContain('Ship'); |
…a YouTube URL. Continue in Studio.", "Open Studio", "Review the outputs") that do not exist in the rendered home page, so the smoke suite fails against any deployment of this branch.
This commit fixes the issue reported at apps/web/playwright/smoke.spec.ts:61
## Bug
The `Homepage is a sell page...` test in `apps/web/playwright/smoke.spec.ts` asserts DOM content that does not exist on the current home page (`apps/web/src/app/page.tsx`):
- **Heading** — asserted `getByRole('heading', { name: /Paste a YouTube URL. Continue in Studio./i })`. The real `h1` (`id="home-heading"`) is:
> Turn a YouTube URL into a hashed Video Pack in Studio.
A grep for `Continue in Studio` across `apps/web/src` returns zero matches.
- **`getByText('Open Studio')`** — "Open Studio" only appears in `components/StructuredData.tsx` (JSON‑LD inside a `<script>`, not visible) and `app/opengraph-image.tsx` (an OG image, not DOM). No visible DOM text matches, so `.toBeVisible()` fails.
- **`getByText('Review the outputs')`** — this string does not appear anywhere in the source, so the locator resolves to nothing and the assertion fails.
- **`getByText(/Paste a YouTube URL/i).nth(1)`** — previously there were two visible occurrences (the old heading + the intro paragraph). With the heading changed, only the intro paragraph ("Paste a YouTube URL to open Studio and review...") remains, so index `1` no longer exists and `.toBeVisible()` fails.
### Trigger
Running the smoke suite (`Homepage is a sell page with paste action...`) against any real deployment of this branch. Each of the four assertions above resolves to a missing element and times out, failing the test. This is drift: the source-content test `home-sell-surface.test.ts` was aligned to the real string `Turn a YouTube URL into a hashed Video Pack in Studio.`, but the Playwright specs were not updated during the merge-conflict resolution.
## Fix
Aligned the assertions to actual visible copy rendered by `page.tsx` / `HomeProCheckout.tsx`:
- Heading → `/Turn a YouTube URL into a hashed Video Pack in Studio./i` (the real `h1`).
- `.nth(1)` → `.first()` for the single remaining "Paste a YouTube URL" paragraph.
- `Open Studio` → `/Start in Studio/i` (visible `h2` "Start in Studio, then choose the right level of support.").
- `Review the outputs` → `/transcript, event, and action outputs/i` (visible intro paragraph).
The other `h1` assertions in the file target the `/studio` workbench (whose `h1` is "Paste a YouTube URL") and are unaffected.
Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
Co-authored-by: groupthinking <garveyht@gmail.com>
…is never rendered, so `.toBeVisible()` will fail.
This commit fixes the issue reported at apps/web/playwright/landing-page.spec.ts:24
## Bug
`apps/web/playwright/landing-page.spec.ts:24` asserts:
```ts
await expect(page.getByRole('heading', { name: 'Paste a YouTube URL. Continue in Studio.' })).toBeVisible();
```
But the actual `h1` (`id="home-heading"`) rendered in `apps/web/src/app/page.tsx` is:
```
Turn a YouTube URL into a hashed Video Pack in Studio.
```
A grep for `"Continue in Studio"` / `"Paste a YouTube URL. Continue"` across `apps/web/src` returns zero matches, so the asserted heading is never rendered. The exact-name role query resolves to no element and `.toBeVisible()` fails.
## Trigger
Both landing-page acceptance tests (parametrized over the two viewports) run this assertion after `page.goto('/')`, so every run of the landing-page spec against a local `BASE_URL` fails on line 24.
## Fix
Realigned the assertion to the actual rendered `h1` text: `Turn a YouTube URL into a hashed Video Pack in Studio.`. This matches the source string, consistent with how the same PR updated `home-sell-surface.test.ts`.
Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
Co-authored-by: groupthinking <garveyht@gmail.com>
✅ E2E Test Results: ALL TESTS PASSED
Test Output |
Canonical issue
Closes #1975
Outcome
This pull request gives a first-time visitor a clear, accessible YouTube URL-to-Studio path while retaining the existing hashed Video Pack handoff and Workflow Pro checkout integration.
Scope
Risk
6013b5ea.Verification
Verified against commit
6013b5ea.npx turbo run test --force— 127 test files passed; 1,215 tests passed and 27 skipped.npm --workspaces --if-present run type-checknpm --workspace eventrelay-web run lint— passes with three pre-existing warnings inOneLoopStudio.tsxandVideoWorkflowStudio.tsx, outside this PR.Production evidence
Not applicable. This draft intentionally includes no deployment, production checkout attempt, or live conversion claim. Browser verification used a local server and non-production Turnstile placeholder only.
Agent handoff