Skip to content

Conversation

schiller-manuel
Copy link
Contributor

@schiller-manuel schiller-manuel commented Oct 3, 2025

Summary by CodeRabbit

  • Refactor
    • Simplified the React Start basic example: removed server middleware/handlers, loader logic, SSR nonce, and the custom server entry; streamlined router configuration.
    • Removed deprecated demo utilities and an unused server option in the core client for a leaner setup.
  • Chores
    • Simplified build configuration by removing example-specific start/server entries and the custom base URL, reducing setup complexity.

Copy link

nx-cloud bot commented Oct 3, 2025

View your CI Pipeline Execution ↗ for commit a4cd7bf

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

☁️ Nx Cloud last updated this comment at 2025-10-03 21:57:55 UTC

Copy link
Contributor

coderabbitai bot commented Oct 3, 2025

Walkthrough

Removes example “start” and server entry points, middleware, serialization, SSR nonce usage, and related type augmentations from the React Start basic example. Updates route registration types to import from @tanstack/react-start. Deletes a sample Foo class. Adjusts Vite plugin config. Drops a test property from RouteServerOptions.

Changes

Cohort / File(s) Summary
Example app routing/middleware cleanup
examples/react/start-basic/src/routeTree.gen.ts, examples/react/start-basic/src/router.tsx, examples/react/start-basic/src/routes/__root.tsx, examples/react/start-basic/src/routes/index.tsx
Switch type import to createStart; remove Register.config augmentation. Remove SSR nonce usage and related import. Delete exported middlewares and server handlers. Simplify routes to component-only definitions.
Start/server entry removal
examples/react/start-basic/src/start.tsx, examples/react/start-basic/src/server.ts, examples/react/start-basic/vite.config.ts
Delete start instance, middleware, serialization adapter, Test class, and module augmentation. Remove custom server fetch entry. Drop Vite base and tanstackStart start/server entry options.
Sample utility removal
examples/react/start-basic/src/Foo.ts
Delete exported class Foo and its methods.
Core API surface tweak
packages/start-client-core/src/serverRoute.ts
Remove optional test property from RouteServerOptions.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Browser
  participant Router
  participant Server
  participant Start as React Start

  rect rgba(230,240,255,0.6)
  note over Router,Start: Previous flow (with start instance, SSR nonce, server entry)
  Browser->>Server: HTTP request
  Server->>Start: handler.fetch(request, { context, nonce })
  Start->>Router: createRouter({ ssr: { nonce }, middlewares })
  Router-->>Browser: HTML/JS (nonce applied)
  end

  rect rgba(240,255,230,0.6)
  note over Browser,Router: New flow (simplified, no custom start/server, no nonce)
  Browser->>Router: App bootstrap
  Router-->>Browser: HTML/JS (no SSR nonce, no custom middlewares)
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

package: react-start

Suggested reviewers

  • chorobin

Poem

I nibbled the nonce and middleware twine,
Hopped past the server—no fetch this time.
Start seeds scattered, simpler rows grow,
Routes bloom lightly where breezes blow.
Thump, thump—clean paths under moonlit hue,
Less burrow clutter, more room to chew. 🥕🐇

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title Check ⚠️ Warning The title “fix: remove test type” only references a single property removal, whereas this PR removes numerous exported classes, middleware utilities, example configuration files, and server setup across multiple modules. It fails to summarize the broad scope of the changes and does not convey the main intent of the refactoring. Consequently, the title is too narrow and misleading for someone scanning the repository history. Please update the title to reflect the full scope of the refactor, for example “chore: remove legacy example middleware, test utilities, and start configurations” so it clearly summarizes the primary changes.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ 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 fix-test-type

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b826734 and a4cd7bf.

📒 Files selected for processing (9)
  • examples/react/start-basic/src/Foo.ts (0 hunks)
  • examples/react/start-basic/src/routeTree.gen.ts (1 hunks)
  • examples/react/start-basic/src/router.tsx (0 hunks)
  • examples/react/start-basic/src/routes/__root.tsx (0 hunks)
  • examples/react/start-basic/src/routes/index.tsx (0 hunks)
  • examples/react/start-basic/src/server.ts (0 hunks)
  • examples/react/start-basic/src/start.tsx (0 hunks)
  • examples/react/start-basic/vite.config.ts (0 hunks)
  • packages/start-client-core/src/serverRoute.ts (0 hunks)
💤 Files with no reviewable changes (8)
  • packages/start-client-core/src/serverRoute.ts
  • examples/react/start-basic/src/routes/__root.tsx
  • examples/react/start-basic/src/Foo.ts
  • examples/react/start-basic/src/router.tsx
  • examples/react/start-basic/src/routes/index.tsx
  • examples/react/start-basic/src/server.ts
  • examples/react/start-basic/vite.config.ts
  • examples/react/start-basic/src/start.tsx
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use TypeScript in strict mode with extensive type safety across the codebase

Files:

  • examples/react/start-basic/src/routeTree.gen.ts
examples/{react,solid}/**

📄 CodeRabbit inference engine (AGENTS.md)

Keep example applications under examples/react/ and examples/solid/

Files:

  • examples/react/start-basic/src/routeTree.gen.ts
⏰ 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). (2)
  • GitHub Check: Preview
  • GitHub Check: Test
🔇 Additional comments (2)
examples/react/start-basic/src/routeTree.gen.ts (2)

442-447: LGTM! Module augmentation is clean and simplified.

The Register interface augmentation correctly declares SSR support and types the router. The removal of the config property (as mentioned in the AI summary) simplifies the type augmentation and aligns with the PR objective of cleaning up type definitions.


441-441: Remove unused createStart import from routeTree.gen.ts
The createStart type imported at line 441 is never used; update the generator to stop emitting this import.

⛔ Skipped due to learnings
Learnt from: schiller-manuel
PR: TanStack/router#5330
File: e2e/react-start/custom-basepath/src/routeTree.gen.ts:58-61
Timestamp: 2025-10-01T18:31:35.420Z
Learning: Do not review files named `routeTree.gen.ts` in TanStack Router repositories, as these are autogenerated files that should not be manually modified.

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

Copy link

pkg-pr-new bot commented Oct 3, 2025

More templates

@tanstack/arktype-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/arktype-adapter@5358

@tanstack/directive-functions-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/directive-functions-plugin@5358

@tanstack/eslint-plugin-router

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

@tanstack/history

npm i https://pkg.pr.new/TanStack/router/@tanstack/history@5358

@tanstack/nitro-v2-vite-plugin

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

@tanstack/react-router

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

@tanstack/react-router-devtools

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

@tanstack/react-router-ssr-query

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

@tanstack/react-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start@5358

@tanstack/react-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-client@5358

@tanstack/react-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-server@5358

@tanstack/router-cli

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

@tanstack/router-core

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

@tanstack/router-devtools

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

@tanstack/router-devtools-core

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

@tanstack/router-generator

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

@tanstack/router-plugin

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

@tanstack/router-ssr-query-core

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

@tanstack/router-utils

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

@tanstack/router-vite-plugin

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

@tanstack/server-functions-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/server-functions-plugin@5358

@tanstack/solid-router

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

@tanstack/solid-router-devtools

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

@tanstack/solid-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start@5358

@tanstack/solid-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-client@5358

@tanstack/solid-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-server@5358

@tanstack/start-client-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-client-core@5358

@tanstack/start-plugin-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-plugin-core@5358

@tanstack/start-server-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-core@5358

@tanstack/start-static-server-functions

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

@tanstack/start-storage-context

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-storage-context@5358

@tanstack/valibot-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/valibot-adapter@5358

@tanstack/virtual-file-routes

npm i https://pkg.pr.new/TanStack/router/@tanstack/virtual-file-routes@5358

@tanstack/zod-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/zod-adapter@5358

commit: a4cd7bf

@schiller-manuel schiller-manuel merged commit 2ba5665 into main Oct 4, 2025
6 checks passed
@schiller-manuel schiller-manuel deleted the fix-test-type branch October 4, 2025 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant