Skip to content

ci: add Vercel deployment with E2E tests on Preview#2

Merged
michellepace merged 8 commits intomainfrom
setup-vercel-deploy
Nov 25, 2025
Merged

ci: add Vercel deployment with E2E tests on Preview#2
michellepace merged 8 commits intomainfrom
setup-vercel-deploy

Conversation

@michellepace
Copy link
Owner

Summary

  • Add Vercel Speed Insights and Web Analytics to monitor real user performance
  • Add new GitHub workflow to run Playwright E2E tests against Vercel Preview deployments
  • Configure Playwright to support external URL testing with Deployment Protection bypass

Changes

Vercel Integration:

  • Speed Insights (@vercel/speed-insights) for Core Web Vitals monitoring
  • Web Analytics (@vercel/analytics) for visitor tracking
  • Both integrated in app/layout.tsx

E2E on Vercel Preview:

  • New test-e2e-vercel.yml workflow triggered by Vercel's repository_dispatch event
  • Playwright config supports BASE_URL env var for external deployments
  • Conditional bypass headers for Deployment Protection (x-vercel-protection-bypass)

Documentation:

  • README updated with Vercel setup instructions and CI diagram
  • Added docs/ask-vercel.md deployment guide

Test plan

  • Verify Vercel project is connected via Git integration (enables repository_dispatch)
  • Create VERCEL_AUTOMATION_BYPASS_SECRET in GitHub Secrets (from Vercel Dashboard)
  • Push to branch → Vercel deploys Preview → triggers E2E workflow
  • Confirm Playwright tests pass against live Preview URL

🤖 Generated with Claude Code

michellepace and others added 4 commits November 25, 2025 11:31
Documentation:
- Add guide for first-time Vercel deployment from `/ask-docs` slash command output
- Cover project import, GitHub Actions coexistence, preview deployments
- Include E2E testing workflow example using `repository_dispatch`
- Reference local documentation collection sources

Captures learning notes for deploying Next.js projects to Vercel, covering the
relationship between Git integration, preview/production environments, and
automated testing workflows.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Dependencies:
- Add @vercel/speed-insights ^1.2.0

Layout:
- Import and render SpeedInsights component in root layout

Enables tracking of Core Web Vitals (LCP, CLS, INP, FCP) from real users.
Metrics appear in the Vercel dashboard after enabling Speed Insights in project
settings and deploying.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Dependencies:
- Add @vercel/analytics ^1.5.0

Layout:
- Import and render Analytics component in root layout

Tracks page views, unique visitors, referrers, geography, and devices. Data appears
in the Vercel dashboard Analytics tab after enabling Web Analytics in project settings
and deploying. Complements Speed Insights (performance) with traffic insights.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Workflow:
- Add `test-e2e-vercel.yml` triggered by Vercel's `repository_dispatch` event
- Checkout exact deployed commit SHA, run tests against live preview URL
- Pass bypass secret for Deployment Protection

Playwright Config:
- Support `BASE_URL` env var for external deployment testing
- Add conditional `extraHTTPHeaders` for Vercel protection bypass
- Skip local webServer when testing against external URL

Docs:
- Update README with Vercel E2E workflow in CI diagram
- Add setup instructions for Deployment Protection bypass secret
- Update `test-e2e.yml` comments to reference new Vercel workflow

Enables automated E2E testing against Vercel Preview deployments before merging,
providing confidence that the deployed application works correctly in the Vercel
environment.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Nov 25, 2025

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

Project Deployment Preview Comments Updated (UTC)
nextjs-base Ready Ready Preview Comment Nov 25, 2025 6:55pm

@coderabbitai
Copy link

coderabbitai bot commented Nov 25, 2025

Summary by CodeRabbit

  • New Features

    • Integrated Vercel Analytics and Speed Insights for enhanced monitoring and performance insights.
    • Added automated end-to-end testing support for Vercel preview deployments.
  • Documentation

    • Updated deployment procedures and CI/CD workflows with Vercel-centric guidance.
    • Documented browser caching optimisation for improved CI pipeline performance.
  • Chores

    • Added Vercel analytics and speed insights dependencies.

✏️ Tip: You can customize this high-level summary in your review settings.

Walkthrough

This PR introduces support for running Playwright E2E tests against Vercel Preview deployments via repository_dispatch triggers. Vercel Analytics and Speed Insights are integrated into the application. Playwright configuration is updated to conditionally use external URLs or local servers. Documentation is refactored to emphasise Vercel-centric CI/CD workflows and browser caching strategies.

Changes

Cohort / File(s) Summary
GitHub Actions Workflows
.github/workflows/test-e2e-vercel.yml
New E2E test workflow triggered by Vercel deployment success events. Checks out commit, sets up Node.js, installs Playwright browsers, runs tests against Vercel-provided BASE_URL with deployment protection bypass, uploads test reports. Concurrency control prevents duplicate runs.
GitHub Actions Workflows
.github/workflows/test-e2e.yml
Updated contextual documentation. Removed multi-line comment block describing planned Vercel steps; added note clarifying workflow tests against localhost built from source, with reference to test-e2e-vercel.yml for Vercel preview tests.
Playwright Configuration
playwright.config.ts
baseURL now derives from BASE_URL environment variable with fallback to localhost. webServer conditionally undefined when BASE_URL set (external deployment), otherwise uses local dev/prod configuration. Adds conditional extraHTTPHeaders to bypass Vercel deployment protection when VERCEL_AUTOMATION_BYPASS_SECRET provided.
Package Dependencies
package.json
Added @vercel/analytics (^1.5.0) and @vercel/speed-insights (^1.2.0) as runtime dependencies.
Application Components
app/layout.tsx
Imports and renders <SpeedInsights /> and <Analytics /> components from Vercel packages in RootLayout body.
Application Components
app/page.tsx
Removed two external anchor links ("Templates" and "Learning") from paragraph content.
Documentation
README.md
Updated project description for Vercel-centric CI/CD narrative. Added test-e2e-vercel.yml workflow reference. Expanded CI/CD section describing Vercel Preview deployment flow, repository_dispatch triggers, and E2E test integration. Replaced Ngrok guidance with Vercel deployment instructions and automation bypass mechanics. Updated workflow reference table.
Documentation
docs/github-setup.md
Removed extensive sections (branch protection, dependency updates, LTS problems, browser caching setup). Replaced with concise "Browser caching on CI?" notes block containing minimal Playwright browser caching fix with impact estimate and source reference.
Documentation
docs/notes.md
Added new "🍑 Browser caching on CI?" section. Documents issue (re-downloading browsers ~200MB+ per run), provides GitHub Actions caching solution for Playwright browsers under ~/.cache/ms-playwright, notes 30–60s workflow improvement and reduced bandwidth usage.

Sequence Diagram(s)

sequenceDiagram
    participant Vercel as Vercel Deployment
    participant GitHub as GitHub Actions
    participant Playwright as Playwright Tests
    participant Artifact as Artifact Storage

    Vercel->>GitHub: repository_dispatch (deployment.success)
    activate GitHub
    GitHub->>GitHub: Checkout commit (SHA from payload)
    GitHub->>GitHub: Setup Node.js + npm cache
    GitHub->>GitHub: npm ci (install dependencies)
    GitHub->>GitHub: Install Playwright browsers
    note over GitHub: BASE_URL from payload<br/>VERCEL_AUTOMATION_BYPASS_SECRET set
    GitHub->>Playwright: Run tests (baseURL = Vercel URL)
    activate Playwright
    Playwright->>Playwright: Include bypass header<br/>in requests
    Playwright-->>Playwright: Test execution
    deactivate Playwright
    GitHub->>Artifact: Upload test report
    deactivate GitHub
Loading
sequenceDiagram
    participant App as Application Build
    participant Config as Playwright Config
    participant LocalServer as Local Dev Server
    participant ExternalURL as External Vercel URL

    App->>Config: Initialise (check BASE_URL env)
    
    alt BASE_URL environment variable set
        Config->>ExternalURL: Use external URL as baseURL
        Config->>Config: webServer = undefined
        Config->>ExternalURL: Add bypass header if secret present
    else BASE_URL not set
        Config->>LocalServer: Start local dev/prod server
        Config->>Config: Use localhost:PORT as baseURL
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Areas requiring attention:

  • playwright.config.ts: Conditional logic for baseURL, webServer, and extraHTTPHeaders needs verification for both localhost and external URL scenarios. Ensure environment variable fallbacks work correctly.
  • test-e2e-vercel.yml: Verify concurrency group logic, timeout settings (10 minutes), and repository_dispatch event handling align with Vercel's webhook payload structure.
  • app/layout.tsx: Confirm Vercel Analytics and Speed Insights initialisation does not impact performance or create hydration mismatches; verify component placement in layout hierarchy.
  • docs/github-setup.md: Verify removed sections (LTS workflows, caching setup) content is adequately replaced or migrated elsewhere in documentation.

Possibly related PRs

  • PR #2: Modifies Playwright E2E setup and GitHub Actions workflows (playwright.config.ts, E2E test workflows), providing foundational E2E infrastructure.
  • PR #1: Introduces Playwright E2E pipeline with Vercel preview deployment support (test-e2e-vercel.yml, BASE_URL handling, deployment protection bypass), directly extending the E2E testing setup.

Poem

🐰 A rabbit's ode to Vercel's flight,
With Preview URLs shining bright,
Analytics hop, Speed Insights gleam,
E2E tests fulfil the dream—
From dispatch to browsers cached,
Each deployment put to test at last!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarises the main objective: adding Vercel deployment with E2E tests on Preview, which aligns with the changeset's primary focus.
Description check ✅ Passed The description is well-structured and directly related to the changeset, covering Vercel integration, E2E workflow setup, configuration changes, and documentation updates.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch setup-vercel-deploy

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8de85eb and 1b3756d.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (8)
  • .github/workflows/test-e2e-vercel.yml (1 hunks)
  • .github/workflows/test-e2e.yml (1 hunks)
  • README.md (4 hunks)
  • app/layout.tsx (2 hunks)
  • docs/ask-vercel.md (1 hunks)
  • docs/github-setup.md (0 hunks)
  • package.json (1 hunks)
  • playwright.config.ts (3 hunks)
💤 Files with no reviewable changes (1)
  • docs/github-setup.md
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{ts,tsx,js,jsx,md,json}

📄 CodeRabbit inference engine (CLAUDE.md)

Use British English spelling and conventions throughout the codebase

Files:

  • README.md
  • app/layout.tsx
  • docs/ask-vercel.md
  • package.json
  • playwright.config.ts
**/app/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/app/**/*.{ts,tsx}: Use App Router for all routing (located in /app directory), not Pages Router
Server Components by default - use "use client" directive only when component requires interactivity

Files:

  • app/layout.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Use import alias @/* for imports (e.g., import { foo } from "@/lib/utils") instead of relative paths

Files:

  • app/layout.tsx
  • playwright.config.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Avoid manual useMemo and useCallback unless necessary, as React Compiler provides automatic memoisation

Files:

  • app/layout.tsx
  • playwright.config.ts
🧠 Learnings (1)
📚 Learning: 2025-11-24T20:25:52.625Z
Learnt from: michellepace
Repo: michellepace/nextjs-base PR: 1
File: .github/workflows/test-e2e.yml:42-43
Timestamp: 2025-11-24T20:25:52.625Z
Learning: In Playwright configuration, Mobile Safari projects require the webkit browser binary to be installed, even though they are not "Desktop WebKit" projects. The distinction is between project configuration (which browser/device combination to test) and binary requirements (which browser engine binaries need to be installed). For example, a Mobile Safari project using devices["iPhone 12"] needs `npx playwright install webkit` even if no Desktop Safari/WebKit project is configured.

Applied to files:

  • playwright.config.ts
🪛 LanguageTool
README.md

[uncategorized] ~52-~52: The official name of this software platform is spelled with a capital “H”.
Context: ...sts browsers, uploads reports) | | 🚀 [.github/workflows/test-e2e-vercel.yml](.github/...

(GITHUB)


[uncategorized] ~52-~52: The official name of this software platform is spelled with a capital “H”.
Context: ...? .github/workflows/test-e2e-vercel.yml | GitHub...

(GITHUB)

docs/ask-vercel.md

[style] ~61-~61: Would you like to use the Oxford spelling “Authorize”? The spelling ‘Authorise’ is also correct.
Context: ...t Git Repository", select GitHub 3. Authorise Vercel to access your repositories 4. F...

(OXFORD_SPELLING_Z_NOT_S)


[uncategorized] ~175-~175: Use a comma before ‘so’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...you use Protection Bypass for Automation so your test environments can reach your d...

(COMMA_COMPOUND_SENTENCE_2)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Run E2E Tests
🔇 Additional comments (15)
.github/workflows/test-e2e.yml (1)

14-16: LGTM! Clear documentation distinguishing localhost vs Vercel Preview testing.

The added comments effectively clarify that this workflow tests against a locally built instance, whilst the new test-e2e-vercel.yml workflow handles Vercel Preview deployments. This helps maintainers understand the separation of concerns between the two E2E testing approaches.

playwright.config.ts (3)

13-16: LGTM! Clean BASE_URL configuration with sensible fallback.

The conditional BASE_URL logic properly prioritises the environment variable for external deployments whilst falling back to localhost for local/CI testing. This aligns well with the dual testing strategy (localhost in test-e2e.yml, Vercel Preview in test-e2e-vercel.yml).


98-109: LGTM! Correct conditional webServer configuration.

Properly skips starting a local server when BASE_URL is set (external deployment testing), and maintains the existing local server setup otherwise. This prevents unnecessary resource consumption and port conflicts when testing against Vercel Preview URLs.


44-54: Header names are correct and match Vercel's current specification.

The HTTP header names x-vercel-protection-bypass (required) and x-vercel-set-bypass-cookie (optional) in the playwright.config.ts implementation match Vercel's documented API specification. The values are also correctly assigned: the bypass header uses the environment secret and the cookie header is set to "true".

app/layout.tsx (1)

1-2: LGTM! Correct Next.js-specific imports for Vercel integrations.

Using the /next entry points ensures optimal integration with Next.js's rendering strategy and handles client/server component boundaries correctly.

docs/ask-vercel.md (1)

61-61: British spelling is correct as per coding guidelines.

The use of "Authorise" is correct British English spelling, which aligns with the project's coding guidelines. The static analysis suggestion for Oxford spelling "Authorize" should be disregarded in this context.

Based on coding guidelines requiring British English spelling.

.github/workflows/test-e2e-vercel.yml (5)

1-15: LGTM! Clear documentation explaining the workflow's purpose and integration.

The header comments effectively document how Vercel triggers this workflow via repository_dispatch, the event payload structure, and the testing flow. The reference to Vercel's documentation is helpful for maintainers.


27-29: Excellent documentation of deployment protection requirements.

Proactively documenting the need for Protection Bypass for Automation helps prevent common integration issues when teams enable Vercel's deployment protection features.


42-44: LGTM! Correct SHA-based checkout ensures test accuracy.

Using the exact commit SHA from Vercel's payload (client_payload.git.sha) ensures Playwright tests run against the same code that was deployed, preventing race conditions from newer commits.


56-58: LGTM! Browser installation aligns with Playwright configuration.

Installing both chromium and webkit is correct. The webkit binary is required for the Mobile Safari project configured in playwright.config.ts (line 82-85), even though it uses an iPhone device profile.

Based on learnings about Playwright browser requirements for Mobile Safari projects.


64-70: LGTM! Proper environment variable configuration for Vercel Preview testing.

The BASE_URL correctly uses the deployment URL from Vercel's payload, and the VERCEL_AUTOMATION_BYPASS_SECRET is properly sourced from GitHub secrets. This enables Playwright to test the live Preview deployment whilst bypassing deployment protection.

README.md (3)

52-52: LGTM! Clear workflow description in configuration table.

Accurately documents the new Vercel Preview E2E testing workflow, triggered by Vercel deployments. The static analysis suggestion about "GitHub" capitalisation is a false positive—this is correctly formatted as a file path.


108-117: LGTM! Vercel Preview deployment integration well-documented.

The CI/CD flow diagram effectively illustrates how Vercel Preview deployments trigger E2E tests via repository_dispatch, showing the parallel testing strategy (PR-triggered localhost tests + Vercel-triggered Preview tests). This helps developers understand the complete testing workflow.


214-228: LGTM! Clear Vercel setup instructions with security guidance.

The setup instructions effectively cover:

  • Initial project deployment
  • Analytics verification (referencing layout.tsx)
  • Optional branch protection integration
  • E2E testing via repository_dispatch
  • Bypass secret configuration for deployment protection

The step-by-step bypass secret setup (Vercel Dashboard → GitHub Secrets) is particularly helpful for first-time users.

package.json (1)

24-25: No compatibility issues identified.

Both @vercel/analytics v1.5.0 and @vercel/speed-insights v1.2.0 are compatible with Next.js 16 and React 19. The packages are correctly placed as runtime dependencies.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1b3756d and 1164795.

📒 Files selected for processing (1)
  • README.md (5 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js,jsx,md,json}

📄 CodeRabbit inference engine (CLAUDE.md)

Use British English spelling and conventions throughout the codebase

Files:

  • README.md
🧠 Learnings (1)
📚 Learning: 2025-11-24T20:44:21.032Z
Learnt from: michellepace
Repo: michellepace/nextjs-base PR: 1
File: evals/actions.md:0-0
Timestamp: 2025-11-24T20:44:21.032Z
Learning: The `evals/` directory in the nextjs-base repository contains personal documentation and notes, not production code, so it doesn't require the same rigor as workflow files (e.g., placeholder references like `@<SHA>` are acceptable).

Applied to files:

  • README.md
🪛 LanguageTool
README.md

[uncategorized] ~52-~52: The official name of this software platform is spelled with a capital “H”.
Context: ...sts browsers, uploads reports) | | 🚀 [.github/workflows/test-e2e-vercel.yml](.github/...

(GITHUB)


[uncategorized] ~52-~52: The official name of this software platform is spelled with a capital “H”.
Context: ...? .github/workflows/test-e2e-vercel.yml | GitHub...

(GITHUB)

🔇 Additional comments (5)
README.md (5)

3-3: Excellent rewrite of project tagline—clear Vercel-centred narrative.

The updated description succinctly communicates the modern tooling, CI/CD automation, and deployment strategy. The punctuation (em dash usage) and phrasing are polished and professional.


52-52: New workflow table entry is clear and well-integrated.

The line correctly documents the new E2E-on-Vercel workflow. Table formatting and description are consistent with existing entries.


108-117: CI/CD diagram extension aligns well with Vercel Preview workflow.

The new diagram section clearly illustrates how Vercel's repository_dispatch event triggers the E2E workflow on the live Preview deployment. The visual hierarchy and step-by-step flow are easy to follow and directly support the PR's test plan objectives.


212-212: Reference to docs/github-setup.md is clear.

The note correctly points readers to additional GitHub setup guidance. Ensure docs/github-setup.md exists and is up to date with branch ruleset and workflow status check instructions.


214-228: Vercel deployment section is comprehensive and actionable.

The instructions clearly cover:

  • Vercel project setup and deployment
  • Speed Insights/Web Analytics enablement
  • Optional Vercel status check integration
  • Critical bypass secret setup for Deployment Protection

This directly addresses the PR test plan checklist (VERCEL_AUTOMATION_BYPASS_SECRET creation). The step-by-step guidance for navigating Vercel Dashboard → Project Settings and GitHub → Secrets is precise and easy to follow.

Comment on lines 172 to 189
(1) Use Ngrok to Test App From Phone

```markdown
1. Sign up and follow https://dashboard.ngrok.com/get-started/setup/linux
2. Then: (Terminal 1: `npm run dev`) + (Terminal 2: `ngrok http 3000`)
3. Ngork gives a url to connect from phone (shareable)
```

(2) How Vitest Pieces Work Together

```markdown
1. When you run npm test, Vitest loads vitest.config.ts
2. The config tells Vitest to use jsdom and load `vitest.setup.ts`
3. Your test files can use global test functions and extended matchers
4. The @/* import alias works in tests thanks to `vite-tsconfig-paths`
5. React components are compiled with React Compiler (matching prod)
```

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Restructured "Quick Notes"—verify section completeness and navigation.

The section has been reorganised with Ngrok, Vitest, and GitHub items. For clarity, ensure the section heading is properly demarcated (consider adding a line break or section separator before item (1)) so readers understand this is a standalone "troubleshooting/reference" area distinct from the CI/CD workflow documentation above.

Consider adding a brief intro line before item (1) to contextualise these notes (e.g., "The following are quick reference notes for common tasks and setup questions:"), so the purpose of the section is immediately clear.

🤖 Prompt for AI Agents
In README.md around lines 172 to 189, the "Quick Notes" items (Ngrok, Vitest,
GitHub) are not clearly separated from the preceding CI/CD content; add a clear
section separator (a blank line plus a heading like "Quick Reference" or a
horizontal rule) immediately before item (1) and insert a one-sentence intro
line such as "The following are quick reference notes for common tasks and setup
questions:" above the numbered entries so readers understand this is a
standalone troubleshooting/reference block.

michellepace and others added 3 commits November 25, 2025 22:26
- Group by branch name (git.ref) to cancel in-progress runs on same branch
- Prevents wasted CI minutes when rapid commits trigger multiple deployments

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Documentation:

- Remove docs/ask-vercel.md (outdated curated Vercel docs, now superseded)
- Consolidate github-setup.md to retain only browser caching note
- Create docs/notes.md for implementation notes and tips
- Remove rough notes reference from README.md

The ask-vercel.md file contained initial research notes that are no longer needed
now that Vercel E2E integration is implemented. Remaining useful content (browser
caching tip) moved to a dedicated notes file.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Removes Templates and Learning center links from the homepage paragraph,
keeping only the question prompt.

Reduces visual clutter on the landing page. External resource links are still
available in the Documentation button.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/github-setup.md (1)

7-7: Use en dash for numeric ranges.

Per typographical conventions, numeric ranges should use an en dash (–) rather than a hyphen (-).

-**Issue:** Browsers re-downloaded every run (~200MB+), wasting 30-60 seconds.
+**Issue:** Browsers re-downloaded every run (~200MB+), wasting 30–60 seconds.
♻️ Duplicate comments (1)
README.md (1)

170-171: Add introductory context before Quick Notes items.

The "Quick Notes" section lacks an introductory sentence to contextualise the grouped items, similar to the concern flagged in a previous review. Adding a brief intro line (e.g., "The following are quick reference notes for common tasks and setup questions:") immediately after the section heading would improve clarity and signal that this is a standalone reference area distinct from the CI/CD workflow documentation.

 ## 📝 Quick Notes
 
+(The following are quick reference notes for common tasks and setup questions:)
+
 (1) Use Ngrok to Test App From Phone
📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1164795 and da79047.

📒 Files selected for processing (5)
  • .github/workflows/test-e2e-vercel.yml (1 hunks)
  • README.md (5 hunks)
  • app/page.tsx (1 hunks)
  • docs/github-setup.md (1 hunks)
  • docs/notes.md (1 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{ts,tsx,js,jsx,md,json}

📄 CodeRabbit inference engine (CLAUDE.md)

Use British English spelling and conventions throughout the codebase

Files:

  • docs/github-setup.md
  • docs/notes.md
  • app/page.tsx
  • README.md
**/app/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/app/**/*.{ts,tsx}: Use App Router for all routing (located in /app directory), not Pages Router
Server Components by default - use "use client" directive only when component requires interactivity

Files:

  • app/page.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Use import alias @/* for imports (e.g., import { foo } from "@/lib/utils") instead of relative paths

Files:

  • app/page.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Avoid manual useMemo and useCallback unless necessary, as React Compiler provides automatic memoisation

Files:

  • app/page.tsx
🧠 Learnings (1)
📚 Learning: 2025-11-24T20:44:21.032Z
Learnt from: michellepace
Repo: michellepace/nextjs-base PR: 1
File: evals/actions.md:0-0
Timestamp: 2025-11-24T20:44:21.032Z
Learning: The `evals/` directory in the nextjs-base repository contains personal documentation and notes, not production code, so it doesn't require the same rigor as workflow files (e.g., placeholder references like `@<SHA>` are acceptable).

Applied to files:

  • docs/github-setup.md
  • README.md
🪛 LanguageTool
docs/notes.md

[uncategorized] ~4-~4: The official name of this software platform is spelled with a capital “H”.
Context: ...ing on CI? Cache Playwright Browsers (.github/workflows/test-e2e.yml) Issue: Bro...

(GITHUB)


[typographical] ~6-~6: If specifying a range, consider using an en dash instead of a hyphen.
Context: ...downloaded every run (~200MB+), wasting 30-60 seconds. Fix: ```yaml - name: Get...

(HYPHEN_TO_EN)

README.md

[uncategorized] ~52-~52: The official name of this software platform is spelled with a capital “H”.
Context: ...sts browsers, uploads reports) | | 🚀 [.github/workflows/test-e2e-vercel.yml](.github/...

(GITHUB)


[uncategorized] ~52-~52: The official name of this software platform is spelled with a capital “H”.
Context: ...? .github/workflows/test-e2e-vercel.yml | GitHub...

(GITHUB)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Run E2E Tests
🔇 Additional comments (9)
docs/notes.md (1)

1-30: Clear documentation on CI caching strategy.

This addition effectively communicates a practical optimisation for Playwright browser caching. The issue–fix–impact structure is easy to follow, and the YAML snippet with placeholders will help developers implement this pattern.

docs/github-setup.md (1)

1-31: Effective caching strategy documentation.

The section clearly explains the issue, provides a ready-to-use YAML solution, and quantifies the impact. The placeholder @<SHA> for the GitHub Actions version is acceptable in documentation context.

README.md (3)

52-52: New Vercel E2E workflow reference is well positioned.

The addition of the test-e2e-vercel.yml workflow entry in the configuration table (Line 52) correctly describes its purpose and aligns with the new CI/CD narrative centring on Vercel Preview deployments.


108-116: Vercel Preview deployment flow is clearly documented.

The updated CI/CD diagram (lines 108–116) effectively illustrates how Vercel Preview deployments trigger the repository_dispatch event and subsequent E2E tests. This complements the existing local and GitHub Actions workflow documentation and clearly shows the integration point.


212-226: Vercel deployment instructions are thorough and actionable.

Section (4) provides clear, step-by-step guidance for Vercel setup, including the Deployment Protection bypass secret configuration. The instructions correctly reference the repository_dispatch trigger and link to relevant documentation.

.github/workflows/test-e2e-vercel.yml (4)

1-43: Workflow structure and concurrency control are well-implemented.

The addition of concurrency control (lines 29–31) properly addresses the earlier suggestion to avoid wasteful CI minutes from overlapping Vercel deployments. Grouping by git.ref (branch name) rather than URL ensures that rapid successive deployments on the same branch cancel prior runs correctly. The explicit if: github.event_name == 'repository_dispatch' guard (line 41) adds necessary safety.


66-76: Environment variable handling for Preview deployment testing is correct.

The workflow properly extracts the Vercel Preview URL from github.event.client_payload.url and passes it as BASE_URL to Playwright (line 73). The VERCEL_AUTOMATION_BYPASS_SECRET (line 76) correctly references the GitHub secret for Deployment Protection bypass, which playwright.config.ts should conditionally apply to request headers.


78-84: Artifact upload strategy is robust.

The use of if: ${{ !cancelled() }} (line 80) ensures the test report is uploaded unless the workflow was explicitly cancelled, providing useful diagnostics even on timeout or unexpected failure. The 30-day retention window (line 84) is reasonable for post-deployment diagnostics.


64-64: I'll help you verify the browser test matrix coverage. Let me search for the Playwright configuration and understand the full test matrix.
<function_calls>


#!/bin/bash

Find playwright.config.ts and test-e2e.yml files

fd -name "playwright.config.*" -o -name "test-e2e.yml"


</function_calls>
<function_calls>


#!/bin/bash

Search for playwright configuration to see all defined projects

rg -A 20 "projects" --type ts | head -100


</function_calls>
<function_calls>


#!/bin/bash

Get the content of test-e2e.yml to see what browsers it installs

cat -n .github/workflows/test-e2e.yml | head -80


</function_calls>
<function_calls>


#!/bin/bash

Get the content of test-e2e-vercel.yml to see full context

cat -n .github/workflows/test-e2e-vercel.yml


</function_calls>

@michellepace michellepace merged commit 267afdf into main Nov 25, 2025
6 checks passed
@michellepace michellepace deleted the setup-vercel-deploy branch November 25, 2025 19:03
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