Skip to content

test(start): cover prerender crawl request and output boundaries - #8338

Open
Sheraff wants to merge 2 commits into
mainfrom
codex/test-prerender-crawl-boundaries
Open

test(start): cover prerender crawl request and output boundaries#8338
Sheraff wants to merge 2 commits into
mainfrom
codex/test-prerender-crawl-boundaries

Conversation

@Sheraff

@Sheraff Sheraff commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

🎯 Changes

Add a real prerender-build regression test for crawl-discovered traversal and protocol-relative links, including encoded protocol-relative input. A fixture page supplies these links alongside a normal link. The test verifies that normal crawling works, a separate local HTTP server receives no requests, and every generated HTML file stays inside the client output directory.

The cases share one build and HTTP listener. The test uses the public build command and file-route handlers, with temporary output and listener cleanup. Changes are limited to the e2e fixture, its generated route tree, and tests.

Validation: the new build test passes with application TypeScript checks; changed source/test files pass ESLint, and all 21 existing prerender unit tests pass.

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested code changes locally with the relevant test commands, or tests do not apply to this pull request.
  • I fully understand the code in this pull request, including any code generated with AI assistance.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

Summary by CodeRabbit

  • New Features

    • Added prerender crawl handling for dynamic crawl-boundary routes.
    • Supports safe traversal of relative, external, and encoded URLs without generating pages outside the client output.
    • Added build-time configuration for controlled prerender crawling.
  • Tests

    • Added end-to-end coverage verifying generated pages, URL handling, output boundaries, and external request isolation.
    • Added a dedicated build test command with extended timeout support.
  • Documentation

    • Documented the React Start build integration test suite, including setup, execution, and CI behavior.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 10, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-10T08:11:56.845068Z c71083d PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@nx-cloud

nx-cloud Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

View your CI Pipeline Execution ↗ for commit 48468ac

Command Status Duration Result
nx affected --targets=test:eslint,test:unit,tes... ✅ Succeeded 6m 37s View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 1m 58s View ↗

☁️ Nx Cloud last updated this comment at 2026-09-10 13:58:08 UTC

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Changeset Version Preview

2 package(s) bumped directly, 2 bumped as dependents.

🟩 Patch bumps

Package Version Reason
@tanstack/solid-router 1.170.32 → 1.170.33 Changeset
@tanstack/solid-start-client 1.168.31 → 1.168.32 Changeset
@tanstack/solid-start 1.168.49 → 1.168.50 Dependent
@tanstack/solid-start-server 1.167.38 → 1.167.39 Dependent

@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: e1f458e6-aee4-4f85-b7f7-5c9e37230312

📥 Commits

Reviewing files that changed from the base of the PR and between c71083d and 48468ac.

📒 Files selected for processing (3)
  • e2e/react-start/basic/build-tests/README.md
  • e2e/react-start/basic/build-tests/prerender-crawl.test.ts
  • e2e/react-start/basic/package.json

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The React Start example adds a crawl-boundary splat route, enables crawl-specific prerender settings, registers the route in generated types, and adds an end-to-end build test with Nx integration and documentation.

Changes

Prerender crawl boundary

Layer / File(s) Summary
Crawl-boundary route and registration
e2e/react-start/basic/src/routes/crawl-boundaries.$.ts, e2e/react-start/basic/src/routeTree.gen.ts
The example adds /crawl-boundaries/$. The seed response includes safe, traversal, external, and encoded-host links. The generated route tree registers the route and its type surfaces.
Crawl-specific prerender configuration
e2e/react-start/basic/start-mode-config.ts
When E2E_PRERENDER_CRAWL_ORIGIN is set, the configuration crawls /crawl-boundaries/seed with link crawling enabled and fixed retry and concurrency settings.
Prerender crawl validation
e2e/react-start/basic/build-tests/prerender-crawl.test.ts, e2e/react-start/basic/package.json, e2e/react-start/basic/build-tests/README.md
The build test runs the crawl build, checks generated HTML and request boundaries, and cleans temporary output. The package adds the test script and Nx target. The README documents execution and setup.
Estimated code review effort: 3 (Moderate) ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant BuildTest as prerender-crawl.test.ts
  participant Build as Vite build
  participant CrawlRoute as crawl-boundaries.$ route
  participant Output as generated HTML output
  BuildTest->>Build: run crawl build with test environment
  Build->>CrawlRoute: request /crawl-boundaries/seed
  CrawlRoute-->>Build: return crawl-boundary links
  Build->>Output: write prerendered HTML
  BuildTest->>Output: verify links and output boundaries
Loading

Merge Risk: ⚪ Minimal · up to 48468

This adds isolated prerender-crawl coverage for the React Start example without release behavior changes. The generated output and external-link boundaries are validated, so the change is mergeable with normal checks.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ 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%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 5 files. (2 skipped: 2 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies the new start-mode prerender crawl test and its output-boundary coverage.
Description check ✅ Passed The description explains the changes, motivation, validation, cleanup, scope, and release impact. The required sections are present. One checklist item about understanding AI-assisted code remains unc…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 5 files. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/test-prerender-crawl-boundaries

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.

@pkg-pr-new

pkg-pr-new Bot commented Sep 10, 2026

Copy link
Copy Markdown
More templates

@tanstack/arktype-adapter

npm i https://pkg.pr.new/@tanstack/arktype-adapter@8338

@tanstack/eslint-plugin-router

npm i https://pkg.pr.new/@tanstack/eslint-plugin-router@8338

@tanstack/eslint-plugin-start

npm i https://pkg.pr.new/@tanstack/eslint-plugin-start@8338

@tanstack/history

npm i https://pkg.pr.new/@tanstack/history@8338

@tanstack/nitro-v2-vite-plugin

npm i https://pkg.pr.new/@tanstack/nitro-v2-vite-plugin@8338

@tanstack/react-router

npm i https://pkg.pr.new/@tanstack/react-router@8338

@tanstack/react-router-devtools

npm i https://pkg.pr.new/@tanstack/react-router-devtools@8338

@tanstack/react-router-ssr-query

npm i https://pkg.pr.new/@tanstack/react-router-ssr-query@8338

@tanstack/react-start

npm i https://pkg.pr.new/@tanstack/react-start@8338

@tanstack/react-start-client

npm i https://pkg.pr.new/@tanstack/react-start-client@8338

@tanstack/react-start-rsc

npm i https://pkg.pr.new/@tanstack/react-start-rsc@8338

@tanstack/react-start-server

npm i https://pkg.pr.new/@tanstack/react-start-server@8338

@tanstack/router-cli

npm i https://pkg.pr.new/@tanstack/router-cli@8338

@tanstack/router-core

npm i https://pkg.pr.new/@tanstack/router-core@8338

@tanstack/router-devtools

npm i https://pkg.pr.new/@tanstack/router-devtools@8338

@tanstack/router-devtools-core

npm i https://pkg.pr.new/@tanstack/router-devtools-core@8338

@tanstack/router-generator

npm i https://pkg.pr.new/@tanstack/router-generator@8338

@tanstack/router-plugin

npm i https://pkg.pr.new/@tanstack/router-plugin@8338

@tanstack/router-ssr-query-core

npm i https://pkg.pr.new/@tanstack/router-ssr-query-core@8338

@tanstack/router-utils

npm i https://pkg.pr.new/@tanstack/router-utils@8338

@tanstack/router-vite-plugin

npm i https://pkg.pr.new/@tanstack/router-vite-plugin@8338

@tanstack/solid-router

npm i https://pkg.pr.new/@tanstack/solid-router@8338

@tanstack/solid-router-devtools

npm i https://pkg.pr.new/@tanstack/solid-router-devtools@8338

@tanstack/solid-router-ssr-query

npm i https://pkg.pr.new/@tanstack/solid-router-ssr-query@8338

@tanstack/solid-start

npm i https://pkg.pr.new/@tanstack/solid-start@8338

@tanstack/solid-start-client

npm i https://pkg.pr.new/@tanstack/solid-start-client@8338

@tanstack/solid-start-server

npm i https://pkg.pr.new/@tanstack/solid-start-server@8338

@tanstack/start-client-core

npm i https://pkg.pr.new/@tanstack/start-client-core@8338

@tanstack/start-fn-stubs

npm i https://pkg.pr.new/@tanstack/start-fn-stubs@8338

@tanstack/start-plugin-core

npm i https://pkg.pr.new/@tanstack/start-plugin-core@8338

@tanstack/start-server-core

npm i https://pkg.pr.new/@tanstack/start-server-core@8338

@tanstack/start-static-server-functions

npm i https://pkg.pr.new/@tanstack/start-static-server-functions@8338

@tanstack/start-storage-context

npm i https://pkg.pr.new/@tanstack/start-storage-context@8338

@tanstack/valibot-adapter

npm i https://pkg.pr.new/@tanstack/valibot-adapter@8338

@tanstack/virtual-file-routes

npm i https://pkg.pr.new/@tanstack/virtual-file-routes@8338

@tanstack/vue-router

npm i https://pkg.pr.new/@tanstack/vue-router@8338

@tanstack/vue-router-devtools

npm i https://pkg.pr.new/@tanstack/vue-router-devtools@8338

@tanstack/vue-router-ssr-query

npm i https://pkg.pr.new/@tanstack/vue-router-ssr-query@8338

@tanstack/vue-start

npm i https://pkg.pr.new/@tanstack/vue-start@8338

@tanstack/vue-start-client

npm i https://pkg.pr.new/@tanstack/vue-start-client@8338

@tanstack/vue-start-server

npm i https://pkg.pr.new/@tanstack/vue-start-server@8338

@tanstack/zod-adapter

npm i https://pkg.pr.new/@tanstack/zod-adapter@8338

commit: 48468ac

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