Skip to content
Source
Sign inSign up
TanStack/router

solid-start netlify vite plugin example #5575

Mergedbirkskyum(GitHub profile, opens in a new tab)merged 4 commits intomain fromrefs/pull/5575/headmerged by birkskyum(GitHub profile, opens in a new tab)

Summary by CodeRabbit

  • New Features

    • Added a Solid Start + Netlify starter with routing, server APIs, dynamic/nested routes, deferred loading, error & not-found UIs, and devtools.
  • Documentation

    • Added README and updated hosting guides with Netlify dev configuration.
  • Style

    • Preconfigured Tailwind, global styles for dark mode, and editor/formatting ignores.
  • Chores

    • Added logging middleware and utilities for posts, users, and SEO; Netlify/Vite project setup and configs.
    1. Walkthrough

      Adds a complete Solid Start example targeted for Netlify: project/config files, Vite/Tailwind/PostCSS setup, generated route tree and router, many file-based routes (pages + APIs), shared UI/error components, utilities (posts, users, seo, logging middleware), and docs/ignore updates.

      Changes

      Cohort / File(s)Summary
      Docs
      docs/start/config.json
      Inserts a second Solid framework example entry pointing to examples/solid/start-basic-netlify.
      Example project metadata & build
      examples/solid/start-basic-netlify/package.json, examples/solid/start-basic-netlify/vite.config.ts, examples/solid/start-basic-netlify/tsconfig.json, examples/solid/start-basic-netlify/netlify.toml, examples/solid/start-basic-netlify/postcss.config.mjs, examples/solid/start-basic-netlify/tailwind.config.mjs
      Adds package, Vite (Netlify/TanStack plugins), TypeScript, Netlify build/dev config, PostCSS and Tailwind configuration.
      Ignore & editor settings
      examples/solid/start-basic-netlify/.gitignore, .../.prettierignore, .../.vscode/settings.json
      Adds ignore rules and editor/Prettier exclusions (notably excluding routeTree.gen.ts).
      Docs & manifest
      examples/solid/start-basic-netlify/README.md, examples/solid/start-basic-netlify/public/site.webmanifest
      Adds README with setup/deploy steps and a PWA web manifest.
      Generated routing core
      examples/solid/start-basic-netlify/src/routeTree.gen.ts, examples/solid/start-basic-netlify/src/router.tsx
      Adds large generated route tree with exported route types and module augmentations; implements getRouter() wired with defaults (preload, error/not-found, scroll restoration).
      Root & shell
      examples/solid/start-basic-netlify/src/routes/__root.tsx
      Adds root route, head/meta/links/scripts, RootDocument shell and devtools inclusion.
      Error & fallback components
      examples/solid/start-basic-netlify/src/components/DefaultCatchBoundary.tsx, .../NotFound.tsx, .../PostError.tsx, .../UserError.tsx
      Adds DefaultCatchBoundary (logs, retry/navigation), NotFound UI, and thin Post/User error wrappers.
      Page/layout routes
      examples/solid/start-basic-netlify/src/routes/_pathlessLayout*, _pathlessLayout/_nested-layout*, index.tsx, posts*.tsx, users*.tsx, deferred.tsx, redirect.tsx, customScript.js.ts
      Adds layouts, nested child routes (route-a/route-b), home, posts listing/detail/deep, users listing/detail, deferred example, redirect route, and a custom JS asset route.
      API routes
      examples/solid/start-basic-netlify/src/routes/api/users.ts, .../api/users.$userId.ts
      Adds server handlers for /api/users and /api/users/{userId} with middleware setting headers/logging and external JSONPlaceholder fetches.
      Utilities & middleware
      examples/solid/start-basic-netlify/src/utils/posts.tsx, .../users.tsx, .../seo.ts, .../loggingMiddleware.tsx
      Adds PostType, fetchPost/fetchPosts server functions, User type, SEO meta helper, and request/response timing logging middleware.
      Styling
      examples/solid/start-basic-netlify/src/styles/app.css
      Adds global Tailwind CSS base, dark-mode rules, and interaction styles.

      Sequence Diagram(s)

      sequenceDiagram
        autonumber
        participant Browser
        participant DevServer as Vite/Netlify Dev
        participant Router as Solid Router (getRouter)
        participant Middleware as logMiddleware
        participant ServerFn as Server Functions / API
        participant Route as File Route (loader/component)
      
        Note left of Browser: navigate to /posts/123
        Browser->>DevServer: HTTP GET /posts/123
        DevServer->>Router: route match -> resolve Route
        Router->>Middleware: run middleware (preLog) [client→server timing]
        Router->>Route: invoke loader
        Route->>ServerFn: call fetchPost / API (/api/users or external)
        ServerFn-->>Route: returns data (or error)
        Router-->>DevServer: render response (HTML / hydration)
        DevServer-->>Browser: HTML + assets
        Browser->>Middleware: client-side logging reads durations (durationToServer, durationFromServer)

      Estimated code review effort

      🎯 3 (Moderate) | ⏱️ ~25 minutes

      • TanStack/router#5567 — Adds a nearly identical Solid Start example for Cloudflare; shares generated routeTree, router, components, and routes.
      • TanStack/router#5558 — Adds parallel Solid Start example scaffolding (generated routeTree, getRouter, DefaultCatchBoundary, NotFound, etc.) matching many files added here.
      • TanStack/router#5563 — Modifies docs/start/config.json entries for Solid examples; touches the same docs configuration.

      Suggested reviewers

      • schiller-manuel
      • brenelz

      Poem

      🐰 In a Netlify burrow the router does spin, routes and APIs tucked neatly within. I hop through the tree, timing logs on my paws— deferred delights and deep-posts applause. Tiny rabbit cheers: examples now begin! 🥕

      Pre-merge checks and finishing touches

      ✅ Passed checks (3 passed)
      Check nameStatusExplanation
      Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
      Title Check✅ PassedThe PR title "solid-start netlify vite plugin example" directly relates to the primary change in the changeset, which is the addition of a complete new example project for Solid Start using Netlify and Vite plugin at examples/solid/start-basic-netlify/. The title is concise, specific, and clearly communicates the main deliverable—a new example demonstrating Solid Start with Netlify integration. A developer scanning the commit history would immediately understand that this PR adds a Solid Start + Netlify example, making it an effective summary of the core change.
      Docstring Coverage✅ PassedNo functions found in the changes. Docstring coverage check skipped.
      ✨ Finishing touches
      🧪 Generate unit tests (beta)
      • Create PR with unit tests
      • Post copyable unit tests in a comment
      • Commit unit tests in branch `start-basic-netlify`

      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.
    2. View your CI Pipeline Execution ↗ for commit 559a3769a38380b6ecd6daa6a33a074947879350

      CommandStatusDurationResult
      nx affected --targets=test:eslint,test:unit,tes...✅ Succeeded<1sView ↗
      nx run-many --target=build --exclude=examples/*...✅ Succeeded2sView ↗

      ☁️ Nx Cloud last updated this comment at 2025-10-21 22:10:06 UTC

    3. More templates

      @tanstack/arktype-adapter

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

      @tanstack/directive-functions-plugin

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

      @tanstack/eslint-plugin-router

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

      @tanstack/history

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

      @tanstack/nitro-v2-vite-plugin

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

      @tanstack/react-router

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

      @tanstack/react-router-devtools

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

      @tanstack/react-router-ssr-query

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

      @tanstack/react-start

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

      @tanstack/react-start-client

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

      @tanstack/react-start-server

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

      @tanstack/router-cli

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

      @tanstack/router-core

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

      @tanstack/router-devtools

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

      @tanstack/router-devtools-core

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

      @tanstack/router-generator

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

      @tanstack/router-plugin

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

      @tanstack/router-ssr-query-core

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

      @tanstack/router-utils

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

      @tanstack/router-vite-plugin

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

      @tanstack/server-functions-plugin

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

      @tanstack/solid-router

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

      @tanstack/solid-router-devtools

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

      @tanstack/solid-router-ssr-query

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

      @tanstack/solid-start

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

      @tanstack/solid-start-client

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

      @tanstack/solid-start-server

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

      @tanstack/start-client-core

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

      @tanstack/start-plugin-core

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

      @tanstack/start-server-core

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

      @tanstack/start-static-server-functions

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

      @tanstack/start-storage-context

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

      @tanstack/valibot-adapter

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

      @tanstack/virtual-file-routes

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

      @tanstack/zod-adapter

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

      commit: 559a376

    4. Actionable comments posted: 14

      🧹 Nitpick comments (15)
      examples/solid/start-basic-netlify/public/site.webmanifest (1)

      2-3: Consider providing example values for the manifest name fields.

      The name and short_name fields are empty. For a complete example, consider adding placeholder values like:

      • "name": "Solid Start Netlify Example"
      • "short_name": "Start Netlify"
      examples/solid/start-basic-netlify/src/components/PostError.tsx (1)

      4-6: Consider if this wrapper component is necessary.

      PostErrorComponent simply forwards the error prop to ErrorComponent without adding any logic. This pattern appears in other examples but could be simplified by using ErrorComponent directly in routes where this is used, unless there's a specific reason to maintain consistency across examples.

      examples/solid/start-basic-netlify/src/utils/posts.tsx (2)

      10-28: Consider input validation and response type checking.

      Two areas for improvement:

      1. Input validation (Line 11): The input validator simply passes the string through without validating it's a valid post ID. Consider validating it's numeric.

      2. Type assertion (Line 27): The API response is cast to PostType without runtime validation. If the external API changes its shape, this could cause issues downstream.

      Example improvement for input validation:

      -export const fetchPost = createServerFn({ method: 'POST' })
      -  .inputValidator((d: string) => d)
      +export const fetchPost = createServerFn({ method: 'POST' })
      +  .inputValidator((d: string) => {
      +    const id = parseInt(d, 10)
      +    if (isNaN(id) || id <= 0) {
      +      throw new Error('Invalid post ID')
      +    }
      +    return d
      +  })
         .handler(async ({ data }) => {

      30-40: Type assertion without validation applies here too.

      The same type assertion pattern from fetchPost applies here (Line 39). Consider runtime validation as mentioned above.

      examples/solid/start-basic-netlify/src/routes/api/users.$userId.ts (1)

      18-19: Remove the eslint-disable; the assertion is fine or replace with runtime validation

      The cast from unknown/any to User is expected here; drop the rule suppression. Optionally, validate shape (e.g., with zod) before returning.

      -          // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
      -          const user = (await res.json()) as User
      +          const user = (await res.json()) as User
      examples/solid/start-basic-netlify/src/components/NotFound.tsx (1)

      1-4: Type children precisely (strict TS) and keep API consistent

      Prefer Solid’s JSX type over any. As per coding guidelines.

       import { Link } from '@tanstack/solid-router'
      +import type { JSX } from 'solid-js'
       
      -export function NotFound({ children }: { children?: any }) {
      +export function NotFound({ children }: { children?: JSX.Element }) {
      examples/solid/start-basic-netlify/src/routes/api/users.ts (1)

      53-60: Minor polish: drop eslint-disable, and add light caching on static example data

      • The type assertion is reasonable; the rule suppression can be removed.
      • Add Cache-Control to make the example nicer for demos.
      -        // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
      -        const data = (await res.json()) as Array<User>
      +        const data = (await res.json()) as Array<User>
      @@
      -        return json(
      -          list.map((u) => ({ id: u.id, name: u.name, email: u.email })),
      -        )
      +        return json(
      +          list.map((u) => ({ id: u.id, name: u.name, email: u.email })),
      +          { headers: { 'Cache-Control': 'public, max-age=60' } },
      +        )
      examples/solid/start-basic-netlify/src/routes/_pathlessLayout/_nested-layout.tsx (1)

      11-28: Optional: use for semantics and accessibility

      Wrap the link row in a nav with an aria-label.

      -      <div class="flex gap-2 border-b">
      +      <nav class="flex gap-2 border-b" aria-label="Nested layout navigation">
      @@
      -      </div>
      +      </nav>
      examples/solid/start-basic-netlify/src/routes/users.tsx (2)

      25-44: Keep loader data type‑pure; render the placeholder separately

      Mixing { id: 'i-do-not-exist', ... } (string id) with User[] weakens type guarantees under strict mode. Render the “non‑existent” item as its own <li> to keep users() typed as User[].

      -      <ul class="list-disc pl-4">
      -        {[
      -          ...users(),
      -          { id: 'i-do-not-exist', name: 'Non-existent User', email: '' },
      -        ].map((user) => {
      -          return (
      -            <li class="whitespace-nowrap">
      -              <Link
      -                to="/users/$userId"
      -                params={{
      -                  userId: String(user.id),
      -                }}
      -                class="block py-1 text-blue-800 hover:text-blue-600"
      -                activeProps={{ class: 'text-black font-bold' }}
      -              >
      -                <div>{user.name}</div>
      -              </Link>
      -            </li>
      -          )
      -        })}
      -      </ul>
      +      <ul class="list-disc pl-4">
      +        {users().map((user) => (
      +          <li class="whitespace-nowrap">
      +            <Link
      +              to="/users/$userId"
      +              params={{ userId: String(user.id) }}
      +              class="block py-1 text-blue-800 hover:text-blue-600"
      +              activeProps={{ class: 'text-black font-bold' }}
      +            >
      +              <div>{user.name}</div>
      +            </Link>
      +          </li>
      +        ))}
      +        <li class="whitespace-nowrap">
      +          <Link
      +            to="/users/$userId"
      +            params={{ userId: 'i-do-not-exist' }}
      +            class="block py-1 text-blue-800 hover:text-blue-600"
      +            activeProps={{ class: 'text-black font-bold' }}
      +          >
      +            <div>Non-existent User</div>
      +          </Link>
      +        </li>
      +      </ul>

      5-15: Tighten loader typing; avoid as

      Make the return type explicit to keep strict type‑safety.

      -  loader: async () => {
      +  loader: async (): Promise<Array<User>> => {
           const res = await fetch('/api/users')
           if (!res.ok) {
             throw new Error('Unexpected status code')
           }
      -    const data = await res.json()
      -    return data as Array<User>
      +    const data: Array<User> = await res.json()
      +    return data
         },
      examples/solid/start-basic-netlify/src/routes/users.$userId.tsx (1)

      14-17: Avoid as cast; keep typed JSON

      -      const data = await res.json()
      -      return data as User
      +      const data: User = await res.json()
      +      return data
      examples/solid/start-basic-netlify/src/utils/seo.ts (1)

      12-30: Skip undefined meta to avoid content="undefined"

      Guard optional fields so only provided tags render.

      -  const tags = [
      -    { title },
      -    { name: 'description', content: description },
      -    { name: 'keywords', content: keywords },
      -    { name: 'twitter:title', content: title },
      -    { name: 'twitter:description', content: description },
      -    { name: 'twitter:creator', content: '@tannerlinsley' },
      -    { name: 'twitter:site', content: '@tannerlinsley' },
      -    { name: 'og:type', content: 'website' },
      -    { name: 'og:title', content: title },
      -    { name: 'og:description', content: description },
      -    ...(image
      -      ? [
      -          { name: 'twitter:image', content: image },
      -          { name: 'twitter:card', content: 'summary_large_image' },
      -          { name: 'og:image', content: image },
      -        ]
      -      : []),
      -  ]
      +  const tags = [
      +    { title },
      +    ...(description ? [{ name: 'description', content: description }] : []),
      +    ...(keywords ? [{ name: 'keywords', content: keywords }] : []),
      +    { name: 'twitter:title', content: title },
      +    ...(description ? [{ name: 'twitter:description', content: description }] : []),
      +    { name: 'twitter:creator', content: '@tannerlinsley' },
      +    { name: 'twitter:site', content: '@tannerlinsley' },
      +    { name: 'og:type', content: 'website' },
      +    { name: 'og:title', content: title },
      +    ...(description ? [{ name: 'og:description', content: description }] : []),
      +    ...(image
      +      ? [
      +          { name: 'twitter:image', content: image },
      +          { name: 'twitter:card', content: 'summary_large_image' },
      +          { name: 'og:image', content: image },
      +        ]
      +      : []),
      +  ]
      examples/solid/start-basic-netlify/src/routes/posts.tsx (1)

      15-32: Preserve Post[] typing; render the fake item separately

      Avoid mixing a string id with real posts to keep types clean.

      -        {[...posts(), { id: 'i-do-not-exist', title: 'Non-existent Post' }].map(
      -          (post) => {
      +        {posts().map((post) => {
                   return (
                     <li class="whitespace-nowrap">
                       <Link
                         to="/posts/$postId"
                         params={{
                           postId: String(post.id),
                         }}
                         class="block py-1 text-blue-800 hover:text-blue-600"
                         activeProps={{ class: 'text-black font-bold' }}
                       >
                         <div>{post.title.substring(0, 20)}</div>
                       </Link>
                     </li>
      -            )
      -          },
      -        )}
      +            )
      +        })}
      +        <li class="whitespace-nowrap">
      +          <Link
      +            to="/posts/$postId"
      +            params={{ postId: 'i-do-not-exist' }}
      +            class="block py-1 text-blue-800 hover:text-blue-600"
      +            activeProps={{ class: 'text-black font-bold' }}
      +          >
      +            <div>Non-existent Post</div>
      +          </Link>
      +        </li>
      examples/solid/start-basic-netlify/src/routes/__root.tsx (1)

      27-30: Correct SEO title: this example is Solid, not React

      -        title:
      -          'TanStack Start | Type-Safe, Client-First, Full-Stack React Framework',
      -        description: `TanStack Start is a type-safe, client-first, full-stack React framework. `,
      +        title:
      +          'TanStack Start | Type-Safe, Client-First, Full-Stack Solid Framework',
      +        description: `TanStack Start is a type-safe, client-first, full-stack Solid framework.`,
      examples/solid/start-basic-netlify/src/routes/deferred.tsx (1)

      41-49: Use JSX children for <Await> instead of the children prop

      Refactor to the canonical JSX children form to satisfy lint and improve readability.

      -      <Suspense fallback={<div>Loading person...</div>}>
      -        <Await
      -          promise={loaderData().deferredPerson}
      -          children={(data) => (
      -            <div data-testid="deferred-person">
      -              {data.name} - {data.randomNumber}
      -            </div>
      -          )}
      -        />
      -      </Suspense>
      +      <Suspense fallback={<div>Loading person...</div>}>
      +        <Await promise={loaderData().deferredPerson}>
      +          {(data) => (
      +            <div data-testid="deferred-person">
      +              {data.name} - {data.randomNumber}
      +            </div>
      +          )}
      +        </Await>
      +      </Suspense>
      -      <Suspense fallback={<div>Loading stuff...</div>}>
      -        <Await
      -          promise={loaderData().deferredStuff}
      -          children={(data) => <h3 data-testid="deferred-stuff">{data}</h3>}
      -        />
      -      </Suspense>
      +      <Suspense fallback={<div>Loading stuff...</div>}>
      +        <Await promise={loaderData().deferredStuff}>
      +          {(data) => <h3 data-testid="deferred-stuff">{data}</h3>}
      +        </Await>
      +      </Suspense>

      Also applies to: 51-55

      📜 Review details

      Configuration used: CodeRabbit UI

      Review profile: CHILL

      Plan: Pro

      📥 Commits

      Reviewing files that changed from the base of the PR and between d6a4352b862d3b6d441528a34d7e01a4693f0319 and ec89ab51cae3de0587a0cd7d2379861ae05d9d29.

      ⛔ Files ignored due to path filters (8)
      • examples/solid/start-basic-netlify/public/android-chrome-192x192.png is excluded by !**/*.png
      • examples/solid/start-basic-netlify/public/android-chrome-512x512.png is excluded by !**/*.png
      • examples/solid/start-basic-netlify/public/apple-touch-icon.png is excluded by !**/*.png
      • examples/solid/start-basic-netlify/public/favicon-16x16.png is excluded by !**/*.png
      • examples/solid/start-basic-netlify/public/favicon-32x32.png is excluded by !**/*.png
      • examples/solid/start-basic-netlify/public/favicon.ico is excluded by !**/*.ico
      • examples/solid/start-basic-netlify/public/favicon.png is excluded by !**/*.png
      • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
      📒 Files selected for processing (41)
      • docs/start/config.json (1 hunks)
      • examples/solid/start-basic-netlify/.gitignore (1 hunks)
      • examples/solid/start-basic-netlify/.prettierignore (1 hunks)
      • examples/solid/start-basic-netlify/.vscode/settings.json (1 hunks)
      • examples/solid/start-basic-netlify/README.md (1 hunks)
      • examples/solid/start-basic-netlify/netlify.toml (1 hunks)
      • examples/solid/start-basic-netlify/package.json (1 hunks)
      • examples/solid/start-basic-netlify/postcss.config.mjs (1 hunks)
      • examples/solid/start-basic-netlify/public/site.webmanifest (1 hunks)
      • examples/solid/start-basic-netlify/src/components/DefaultCatchBoundary.tsx (1 hunks)
      • examples/solid/start-basic-netlify/src/components/NotFound.tsx (1 hunks)
      • examples/solid/start-basic-netlify/src/components/PostError.tsx (1 hunks)
      • examples/solid/start-basic-netlify/src/components/UserError.tsx (1 hunks)
      • examples/solid/start-basic-netlify/src/routeTree.gen.ts (1 hunks)
      • examples/solid/start-basic-netlify/src/router.tsx (1 hunks)
      • examples/solid/start-basic-netlify/src/routes/__root.tsx (1 hunks)
      • examples/solid/start-basic-netlify/src/routes/_pathlessLayout.tsx (1 hunks)
      • examples/solid/start-basic-netlify/src/routes/_pathlessLayout/_nested-layout.tsx (1 hunks)
      • examples/solid/start-basic-netlify/src/routes/_pathlessLayout/_nested-layout/route-a.tsx (1 hunks)
      • examples/solid/start-basic-netlify/src/routes/_pathlessLayout/_nested-layout/route-b.tsx (1 hunks)
      • examples/solid/start-basic-netlify/src/routes/api/users.$userId.ts (1 hunks)
      • examples/solid/start-basic-netlify/src/routes/api/users.ts (1 hunks)
      • examples/solid/start-basic-netlify/src/routes/customScript[.]js.ts (1 hunks)
      • examples/solid/start-basic-netlify/src/routes/deferred.tsx (1 hunks)
      • examples/solid/start-basic-netlify/src/routes/index.tsx (1 hunks)
      • examples/solid/start-basic-netlify/src/routes/posts.$postId.tsx (1 hunks)
      • examples/solid/start-basic-netlify/src/routes/posts.index.tsx (1 hunks)
      • examples/solid/start-basic-netlify/src/routes/posts.tsx (1 hunks)
      • examples/solid/start-basic-netlify/src/routes/posts_.$postId.deep.tsx (1 hunks)
      • examples/solid/start-basic-netlify/src/routes/redirect.tsx (1 hunks)
      • examples/solid/start-basic-netlify/src/routes/users.$userId.tsx (1 hunks)
      • examples/solid/start-basic-netlify/src/routes/users.index.tsx (1 hunks)
      • examples/solid/start-basic-netlify/src/routes/users.tsx (1 hunks)
      • examples/solid/start-basic-netlify/src/styles/app.css (1 hunks)
      • examples/solid/start-basic-netlify/src/utils/loggingMiddleware.tsx (1 hunks)
      • examples/solid/start-basic-netlify/src/utils/posts.tsx (1 hunks)
      • examples/solid/start-basic-netlify/src/utils/seo.ts (1 hunks)
      • examples/solid/start-basic-netlify/src/utils/users.tsx (1 hunks)
      • examples/solid/start-basic-netlify/tailwind.config.mjs (1 hunks)
      • examples/solid/start-basic-netlify/tsconfig.json (1 hunks)
      • examples/solid/start-basic-netlify/vite.config.ts (1 hunks)
      🧰 Additional context used
      📓 Path-based instructions (5)
      **/*.{ts,tsx}

      📄 CodeRabbit inference engine (AGENTS.md)

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

      Files:

      • examples/solid/start-basic-netlify/src/routes/redirect.tsx
      • examples/solid/start-basic-netlify/src/routes/posts.tsx
      • examples/solid/start-basic-netlify/src/components/PostError.tsx
      • examples/solid/start-basic-netlify/src/components/NotFound.tsx
      • examples/solid/start-basic-netlify/src/routes/customScript[.]js.ts
      • examples/solid/start-basic-netlify/src/routes/_pathlessLayout/_nested-layout.tsx
      • examples/solid/start-basic-netlify/src/utils/seo.ts
      • examples/solid/start-basic-netlify/src/components/UserError.tsx
      • examples/solid/start-basic-netlify/src/utils/loggingMiddleware.tsx
      • examples/solid/start-basic-netlify/src/routes/posts.index.tsx
      • examples/solid/start-basic-netlify/src/components/DefaultCatchBoundary.tsx
      • examples/solid/start-basic-netlify/src/routes/users.$userId.tsx
      • examples/solid/start-basic-netlify/src/routes/deferred.tsx
      • examples/solid/start-basic-netlify/src/router.tsx
      • examples/solid/start-basic-netlify/src/routes/posts_.$postId.deep.tsx
      • examples/solid/start-basic-netlify/src/routes/api/users.$userId.ts
      • examples/solid/start-basic-netlify/src/routes/users.tsx
      • examples/solid/start-basic-netlify/src/routes/api/users.ts
      • examples/solid/start-basic-netlify/src/utils/posts.tsx
      • examples/solid/start-basic-netlify/src/routes/index.tsx
      • examples/solid/start-basic-netlify/src/utils/users.tsx
      • examples/solid/start-basic-netlify/src/routes/__root.tsx
      • examples/solid/start-basic-netlify/src/routes/_pathlessLayout.tsx
      • examples/solid/start-basic-netlify/src/routes/posts.$postId.tsx
      • examples/solid/start-basic-netlify/src/routes/_pathlessLayout/_nested-layout/route-b.tsx
      • examples/solid/start-basic-netlify/src/routes/_pathlessLayout/_nested-layout/route-a.tsx
      • examples/solid/start-basic-netlify/src/routes/users.index.tsx
      • examples/solid/start-basic-netlify/vite.config.ts
      • examples/solid/start-basic-netlify/src/routeTree.gen.ts
      **/src/routes/**

      📄 CodeRabbit inference engine (AGENTS.md)

      Place file-based routes under src/routes/ directories

      Files:

      • examples/solid/start-basic-netlify/src/routes/redirect.tsx
      • examples/solid/start-basic-netlify/src/routes/posts.tsx
      • examples/solid/start-basic-netlify/src/routes/customScript[.]js.ts
      • examples/solid/start-basic-netlify/src/routes/_pathlessLayout/_nested-layout.tsx
      • examples/solid/start-basic-netlify/src/routes/posts.index.tsx
      • examples/solid/start-basic-netlify/src/routes/users.$userId.tsx
      • examples/solid/start-basic-netlify/src/routes/deferred.tsx
      • examples/solid/start-basic-netlify/src/routes/posts_.$postId.deep.tsx
      • examples/solid/start-basic-netlify/src/routes/api/users.$userId.ts
      • examples/solid/start-basic-netlify/src/routes/users.tsx
      • examples/solid/start-basic-netlify/src/routes/api/users.ts
      • examples/solid/start-basic-netlify/src/routes/index.tsx
      • examples/solid/start-basic-netlify/src/routes/__root.tsx
      • examples/solid/start-basic-netlify/src/routes/_pathlessLayout.tsx
      • examples/solid/start-basic-netlify/src/routes/posts.$postId.tsx
      • examples/solid/start-basic-netlify/src/routes/_pathlessLayout/_nested-layout/route-b.tsx
      • examples/solid/start-basic-netlify/src/routes/_pathlessLayout/_nested-layout/route-a.tsx
      • examples/solid/start-basic-netlify/src/routes/users.index.tsx
      examples/{react,solid}/**

      📄 CodeRabbit inference engine (AGENTS.md)

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

      Files:

      • examples/solid/start-basic-netlify/src/routes/redirect.tsx
      • examples/solid/start-basic-netlify/netlify.toml
      • examples/solid/start-basic-netlify/src/routes/posts.tsx
      • examples/solid/start-basic-netlify/src/components/PostError.tsx
      • examples/solid/start-basic-netlify/src/components/NotFound.tsx
      • examples/solid/start-basic-netlify/src/routes/customScript[.]js.ts
      • examples/solid/start-basic-netlify/src/routes/_pathlessLayout/_nested-layout.tsx
      • examples/solid/start-basic-netlify/src/utils/seo.ts
      • examples/solid/start-basic-netlify/public/site.webmanifest
      • examples/solid/start-basic-netlify/src/components/UserError.tsx
      • examples/solid/start-basic-netlify/src/utils/loggingMiddleware.tsx
      • examples/solid/start-basic-netlify/src/routes/posts.index.tsx
      • examples/solid/start-basic-netlify/src/components/DefaultCatchBoundary.tsx
      • examples/solid/start-basic-netlify/src/routes/users.$userId.tsx
      • examples/solid/start-basic-netlify/src/routes/deferred.tsx
      • examples/solid/start-basic-netlify/README.md
      • examples/solid/start-basic-netlify/src/router.tsx
      • examples/solid/start-basic-netlify/src/routes/posts_.$postId.deep.tsx
      • examples/solid/start-basic-netlify/src/routes/api/users.$userId.ts
      • examples/solid/start-basic-netlify/src/routes/users.tsx
      • examples/solid/start-basic-netlify/src/routes/api/users.ts
      • examples/solid/start-basic-netlify/src/utils/posts.tsx
      • examples/solid/start-basic-netlify/package.json
      • examples/solid/start-basic-netlify/src/styles/app.css
      • examples/solid/start-basic-netlify/src/routes/index.tsx
      • examples/solid/start-basic-netlify/src/utils/users.tsx
      • examples/solid/start-basic-netlify/postcss.config.mjs
      • examples/solid/start-basic-netlify/src/routes/__root.tsx
      • examples/solid/start-basic-netlify/src/routes/_pathlessLayout.tsx
      • examples/solid/start-basic-netlify/src/routes/posts.$postId.tsx
      • examples/solid/start-basic-netlify/src/routes/_pathlessLayout/_nested-layout/route-b.tsx
      • examples/solid/start-basic-netlify/src/routes/_pathlessLayout/_nested-layout/route-a.tsx
      • examples/solid/start-basic-netlify/src/routes/users.index.tsx
      • examples/solid/start-basic-netlify/tsconfig.json
      • examples/solid/start-basic-netlify/tailwind.config.mjs
      • examples/solid/start-basic-netlify/vite.config.ts
      • examples/solid/start-basic-netlify/src/routeTree.gen.ts
      docs/{router,start}/**

      📄 CodeRabbit inference engine (AGENTS.md)

      Place router docs under docs/router/ and start framework docs under docs/start/

      Files:

      • docs/start/config.json
      **/package.json

      📄 CodeRabbit inference engine (AGENTS.md)

      Use workspace:* protocol for internal dependencies in package.json files

      Files:

      • examples/solid/start-basic-netlify/package.json
      🧠 Learnings (2)
      📚 Learning: 2025-10-01T18:31:35.420Z
      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.

      Applied to files:

      • examples/solid/start-basic-netlify/.vscode/settings.json
      • examples/solid/start-basic-netlify/src/routeTree.gen.ts
      📚 Learning: 2025-09-23T17:36:12.598Z
      Learnt from: CR
      PR: TanStack/router#0
      File: AGENTS.md:0-0
      Timestamp: 2025-09-23T17:36:12.598Z
      Learning: Applies to **/*.{ts,tsx} : Use TypeScript in strict mode with extensive type safety across the codebase

      Applied to files:

      • examples/solid/start-basic-netlify/tsconfig.json
      🧬 Code graph analysis (24)
      examples/solid/start-basic-netlify/src/routes/redirect.tsx (3)
      examples/solid/start-basic-netlify/src/routes/posts.$postId.tsx (1)
      • Route (6-13)
      examples/solid/start-basic-netlify/src/routes/posts.index.tsx (1)
      • Route (3-5)
      examples/solid/start-basic-netlify/src/routes/posts.tsx (1)
      • Route (4-7)
      examples/solid/start-basic-netlify/src/routes/posts.tsx (3)
      examples/solid/start-basic-netlify/src/routes/posts.$postId.tsx (1)
      • Route (6-13)
      examples/solid/start-basic-netlify/src/routes/posts.index.tsx (1)
      • Route (3-5)
      examples/solid/start-basic-netlify/src/utils/posts.tsx (1)
      • fetchPosts (30-40)
      examples/solid/start-basic-netlify/src/components/PostError.tsx (2)
      examples/solid/start-basic/src/components/PostError.tsx (1)
      • PostErrorComponent (3-5)
      examples/solid/start-basic-solid-query/src/routes/posts.$postId.tsx (1)
      • PostErrorComponent (7-9)
      examples/solid/start-basic-netlify/src/components/NotFound.tsx (3)
      examples/solid/start-basic-cloudflare/src/components/NotFound.tsx (1)
      • NotFound (3-25)
      examples/solid/start-basic-solid-query/src/components/NotFound.tsx (1)
      • NotFound (3-25)
      examples/solid/start-basic/src/components/NotFound.tsx (1)
      • NotFound (3-25)
      examples/solid/start-basic-netlify/src/routes/customScript[.]js.ts (1)
      examples/solid/start-basic-netlify/src/routes/__root.tsx (1)
      • Route (16-64)
      examples/solid/start-basic-netlify/src/routes/_pathlessLayout/_nested-layout.tsx (3)
      examples/solid/start-basic-netlify/src/routes/_pathlessLayout.tsx (1)
      • Route (3-5)
      examples/solid/start-basic-netlify/src/routes/_pathlessLayout/_nested-layout/route-a.tsx (1)
      • Route (3-7)
      examples/solid/start-basic-netlify/src/routes/_pathlessLayout/_nested-layout/route-b.tsx (1)
      • Route (3-7)
      examples/solid/start-basic-netlify/src/components/UserError.tsx (1)
      examples/solid/start-basic/src/components/UserError.tsx (1)
      • UserErrorComponent (3-5)
      examples/solid/start-basic-netlify/src/routes/posts.index.tsx (4)
      examples/solid/start-basic-netlify/src/routes/index.tsx (1)
      • Route (4-7)
      examples/solid/start-basic-netlify/src/routes/posts.$postId.tsx (1)
      • Route (6-13)
      examples/solid/start-basic-netlify/src/routes/posts.tsx (1)
      • Route (4-7)
      examples/solid/start-basic-netlify/src/routes/users.index.tsx (1)
      • Route (3-5)
      examples/solid/start-basic-netlify/src/components/DefaultCatchBoundary.tsx (3)
      e2e/solid-start/server-routes/src/components/DefaultCatchBoundary.tsx (1)
      • DefaultCatchBoundary (10-53)
      examples/solid/start-basic-cloudflare/src/components/DefaultCatchBoundary.tsx (1)
      • DefaultCatchBoundary (10-53)
      examples/solid/start-basic/src/components/DefaultCatchBoundary.tsx (1)
      • DefaultCatchBoundary (10-53)
      examples/solid/start-basic-netlify/src/routes/users.$userId.tsx (4)
      examples/solid/start-basic-netlify/src/routes/api/users.$userId.ts (1)
      • Route (5-33)
      examples/solid/start-basic-netlify/src/utils/users.tsx (1)
      • User (1-5)
      examples/solid/start-basic-netlify/src/components/UserError.tsx (1)
      • UserErrorComponent (4-6)
      examples/solid/start-basic-netlify/src/components/NotFound.tsx (1)
      • NotFound (3-25)
      examples/solid/start-basic-netlify/src/routes/deferred.tsx (1)
      examples/solid/start-basic/src/routes/deferred.tsx (2)
      • Deferred (31-62)
      • deferredStuff (19-27)
      examples/solid/start-basic-netlify/src/router.tsx (3)
      examples/solid/start-basic-netlify/src/components/DefaultCatchBoundary.tsx (1)
      • DefaultCatchBoundary (10-53)
      examples/solid/start-basic-netlify/src/components/NotFound.tsx (1)
      • NotFound (3-25)
      examples/solid/start-basic-cloudflare/src/router.tsx (1)
      • getRouter (6-16)
      examples/solid/start-basic-netlify/src/routes/posts_.$postId.deep.tsx (3)
      examples/solid/start-basic-netlify/src/routes/posts.$postId.tsx (1)
      • Route (6-13)
      examples/solid/start-basic-netlify/src/utils/posts.tsx (1)
      • fetchPost (10-28)
      examples/solid/start-basic-netlify/src/components/PostError.tsx (1)
      • PostErrorComponent (4-6)
      examples/solid/start-basic-netlify/src/routes/api/users.$userId.ts (3)
      examples/solid/start-basic-netlify/src/routes/api/users.ts (1)
      • Route (41-64)
      examples/solid/start-basic-netlify/src/routes/users.$userId.tsx (1)
      • Route (6-26)
      examples/solid/start-basic-netlify/src/utils/users.tsx (1)
      • User (1-5)
      examples/solid/start-basic-netlify/src/routes/users.tsx (3)
      examples/solid/start-basic-netlify/src/routes/api/users.ts (1)
      • Route (41-64)
      examples/solid/start-basic-netlify/src/routes/users.$userId.tsx (1)
      • Route (6-26)
      examples/solid/start-basic-netlify/src/utils/users.tsx (1)
      • User (1-5)
      examples/solid/start-basic-netlify/src/routes/api/users.ts (3)
      packages/start-server-core/src/request-response.ts (1)
      • getRequestHeaders (77-80)
      examples/solid/start-basic-netlify/src/routes/api/users.$userId.ts (1)
      • Route (5-33)
      examples/solid/start-basic-netlify/src/utils/users.tsx (1)
      • User (1-5)
      examples/solid/start-basic-netlify/src/routes/index.tsx (4)
      examples/solid/start-basic-netlify/src/routes/api/users.ts (1)
      • Route (41-64)
      examples/solid/start-basic-netlify/src/routes/customScript[.]js.ts (1)
      • Route (3-15)
      examples/solid/start-basic-netlify/src/routes/deferred.tsx (1)
      • Route (18-29)
      examples/solid/start-basic-netlify/src/routes/posts.tsx (1)
      • Route (4-7)
      examples/solid/start-basic-netlify/src/routes/__root.tsx (9)
      examples/solid/start-basic-netlify/src/routes/index.tsx (1)
      • Route (4-7)
      examples/solid/start-basic-netlify/src/routes/_pathlessLayout/_nested-layout/route-a.tsx (1)
      • Route (3-7)
      examples/solid/start-basic-netlify/src/routes/customScript[.]js.ts (1)
      • Route (3-15)
      examples/solid/start-basic-netlify/src/routes/deferred.tsx (1)
      • Route (18-29)
      examples/solid/start-basic-netlify/src/routes/posts.tsx (1)
      • Route (4-7)
      examples/solid/start-basic-netlify/src/routes/users.$userId.tsx (1)
      • Route (6-26)
      examples/solid/start-basic-netlify/src/utils/seo.ts (1)
      • seo (1-33)
      examples/solid/start-basic-netlify/src/components/DefaultCatchBoundary.tsx (1)
      • DefaultCatchBoundary (10-53)
      examples/solid/start-basic-netlify/src/components/NotFound.tsx (1)
      • NotFound (3-25)
      examples/solid/start-basic-netlify/src/routes/_pathlessLayout.tsx (3)
      examples/solid/start-basic-netlify/src/routes/_pathlessLayout/_nested-layout.tsx (1)
      • Route (3-5)
      examples/solid/start-basic-netlify/src/routes/_pathlessLayout/_nested-layout/route-a.tsx (1)
      • Route (3-7)
      examples/solid/start-basic-netlify/src/routes/_pathlessLayout/_nested-layout/route-b.tsx (1)
      • Route (3-7)
      examples/solid/start-basic-netlify/src/routes/posts.$postId.tsx (4)
      examples/solid/start-basic-netlify/src/routes/posts_.$postId.deep.tsx (1)
      • Route (5-12)
      examples/solid/start-basic-netlify/src/utils/posts.tsx (1)
      • fetchPost (10-28)
      examples/solid/start-basic-netlify/src/components/PostError.tsx (1)
      • PostErrorComponent (4-6)
      examples/solid/start-basic-netlify/src/components/NotFound.tsx (1)
      • NotFound (3-25)
      examples/solid/start-basic-netlify/src/routes/_pathlessLayout/_nested-layout/route-b.tsx (3)
      examples/solid/start-basic-netlify/src/routes/_pathlessLayout.tsx (1)
      • Route (3-5)
      examples/solid/start-basic-netlify/src/routes/_pathlessLayout/_nested-layout.tsx (1)
      • Route (3-5)
      examples/solid/start-basic-netlify/src/routes/_pathlessLayout/_nested-layout/route-a.tsx (1)
      • Route (3-7)
      examples/solid/start-basic-netlify/src/routes/_pathlessLayout/_nested-layout/route-a.tsx (3)
      examples/solid/start-basic-netlify/src/routes/_pathlessLayout.tsx (1)
      • Route (3-5)
      examples/solid/start-basic-netlify/src/routes/_pathlessLayout/_nested-layout.tsx (1)
      • Route (3-5)
      examples/solid/start-basic-netlify/src/routes/_pathlessLayout/_nested-layout/route-b.tsx (1)
      • Route (3-7)
      examples/solid/start-basic-netlify/src/routes/users.index.tsx (3)
      examples/solid/start-basic-netlify/src/routes/api/users.ts (1)
      • Route (41-64)
      examples/solid/start-basic-netlify/src/routes/posts.index.tsx (1)
      • Route (3-5)
      examples/solid/start-basic-netlify/src/routes/users.$userId.tsx (1)
      • Route (6-26)
      examples/solid/start-basic-netlify/src/routeTree.gen.ts (1)
      examples/solid/start-basic-netlify/src/router.tsx (1)
      • getRouter (6-16)
      🪛 Biome (2.1.2)
      examples/solid/start-basic-netlify/src/routes/deferred.tsx

      [error] 43-43: Avoid passing children using a prop

      The canonical way to pass children in React is to use JSX elements

      (lint/correctness/noChildrenProp)


      [error] 53-53: Avoid passing children using a prop

      The canonical way to pass children in React is to use JSX elements

      (lint/correctness/noChildrenProp)

      ⏰ 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). (3)
      • GitHub Check: Preview
      • GitHub Check: Test
      • GitHub Check: autofix
      🔇 Additional comments (23)
      examples/solid/start-basic-netlify/.prettierignore (1)

      1-4: LGTM!

      The ignore patterns are appropriate for this example project, correctly excluding generated files, lock files, build artifacts, and static assets from Prettier formatting.

      examples/solid/start-basic-netlify/.gitignore (1)

      1-9: LGTM!

      The ignore patterns appropriately exclude build artifacts, dependency folders, environment files, and Netlify-specific directories.

      examples/solid/start-basic-netlify/netlify.toml (1)

      1-3: LGTM!

      The Netlify build configuration correctly specifies the Vite build command and the appropriate publish directory for client assets.

      examples/solid/start-basic-netlify/.vscode/settings.json (1)

      1-11: LGTM!

      The VS Code settings appropriately exclude the auto-generated routeTree.gen.ts from file watching and search, and mark it as read-only to prevent accidental modifications. This aligns with best practices for generated files.

      Based on learnings

      examples/solid/start-basic-netlify/public/site.webmanifest (1)

      6-13: The icon files referenced in the manifest are present and correctly located.

      Both android-chrome-192x192.png and android-chrome-512x512.png exist in the examples/solid/start-basic-netlify/public/ directory. The manifest references are valid, and no action is required.

      Likely an incorrect or invalid review comment.

      examples/solid/start-basic-netlify/src/routes/users.index.tsx (1)

      1-16: LGTM!

      The route definition and component implementation are correct. The use of <a href> for the API endpoint is appropriate here, as it allows users to navigate directly to view the JSON response.

      examples/solid/start-basic-netlify/tailwind.config.mjs (1)

      1-4: LGTM!

      The Tailwind configuration is minimal but complete for this example. The content pattern correctly targets all TypeScript and JavaScript source files.

      examples/solid/start-basic-netlify/postcss.config.mjs (1)

      1-6: LGTM!

      Standard PostCSS configuration with Tailwind CSS and Autoprefixer plugins. This correctly supports the styling infrastructure for the example.

      examples/solid/start-basic-netlify/tsconfig.json (1)

      1-23: LGTM!

      The TypeScript configuration correctly enables strict mode and is properly set up for Solid.js with preserved JSX and the correct import source. The path alias configuration and module settings are appropriate for this example.

      Based on learnings

      examples/solid/start-basic-netlify/src/components/UserError.tsx (1)

      1-6: LGTM!

      The error component correctly wraps the framework's ErrorComponent with proper typing. While this duplicates the pattern from examples/solid/start-basic/src/components/UserError.tsx, maintaining self-contained examples is appropriate for ease of use.

      examples/solid/start-basic-netlify/src/routes/customScript[.]js.ts (1)

      1-15: LGTM!

      The route correctly demonstrates serving custom JavaScript content with the appropriate Content-Type header. This is a valid pattern for dynamically generated assets in the framework.

      examples/solid/start-basic-netlify/src/components/DefaultCatchBoundary.tsx (1)

      1-53: LGTM! Consistent error boundary implementation.

      The component follows the established pattern from other Solid Start examples and provides appropriate error handling with navigation options.

      examples/solid/start-basic-netlify/src/routes/redirect.tsx (1)

      1-9: LGTM! Standard redirect implementation.

      The route correctly uses beforeLoad with throw redirect() to perform a redirect to /posts.

      examples/solid/start-basic-netlify/src/utils/users.tsx (1)

      1-5: LGTM! Clean type definition.

      The User type is properly structured and used consistently across the route files.

      examples/solid/start-basic-netlify/src/router.tsx (1)

      1-16: LGTM! Standard router configuration.

      The router is properly configured with route tree, error handling, and scroll restoration following the established pattern from other examples.

      examples/solid/start-basic-netlify/src/routes/posts.index.tsx (1)

      1-9: LGTM! Standard index route.

      The posts index route follows the expected pattern and provides a simple placeholder message.

      examples/solid/start-basic-netlify/src/routes/_pathlessLayout.tsx (1)

      1-16: LGTM! Correct pathless layout implementation.

      The layout properly uses Outlet to render nested routes and follows the expected pattern for pathless routes.

      examples/solid/start-basic-netlify/src/styles/app.css (1)

      1-22: LGTM! Standard Tailwind configuration with dark mode.

      The CSS properly sets up Tailwind directives and provides sensible dark mode defaults. The .using-mouse class is a good UX pattern for removing focus outlines during mouse interaction.

      examples/solid/start-basic-netlify/src/routes/_pathlessLayout/_nested-layout/route-a.tsx (1)

      1-11: LGTM

      Straightforward route; matches the nested path and renders as expected.

      examples/solid/start-basic-netlify/src/routes/_pathlessLayout/_nested-layout/route-b.tsx (1)

      3-11: LGTM

      Route and component are correct and consistent with route-a.

      examples/solid/start-basic-netlify/src/routes/posts.$postId.tsx (1)

      6-13: Route wiring, loader, and notFound are solid

      Loader, error boundary, and notFound integration look correct. The deep-link target matches the generated full path. Nice.

      examples/solid/start-basic-netlify/src/routes/posts_.$postId.deep.tsx (1)

      5-12: LGTM: Deep route loader and error boundary

      Loader/error wiring and route path mapping look correct for the deep view.

      examples/solid/start-basic-netlify/src/routeTree.gen.ts (1)

      1-10: Autogenerated: no manual review

      routeTree.gen.ts is generated by TanStack Router; skip manual edits/review. Based on learnings

      docs/start/config.json lines 333 to 335
      @@ -329,3 +329,7 @@
      329329 {
      330330 "label": "Cloudflare Vite Plugin",
      331331 "to": "framework/solid/examples/start-basic-cloudflare"
      332+ },
      333+ {
      334+ "label": "Cloudflare Vite Plugin",
      335+ "to": "framework/solid/examples/start-basic-netlify"

      ⚠️ Potential issue | 🟠 Major

      Fix the incorrect label for the Netlify example.

      The label says "Cloudflare Vite Plugin" but points to start-basic-netlify. This creates a duplicate label (line 330 already has "Cloudflare Vite Plugin") and misrepresents the example's purpose.

      Apply this diff to correct the label:

                   {
      -              "label": "Cloudflare Vite Plugin",
      +              "label": "Netlify Vite Plugin",
                     "to": "framework/solid/examples/start-basic-netlify"
                   }
      📝 Committable suggestion

      ‼️ IMPORTANT Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

                  {
                    "label": "Netlify Vite Plugin",
                    "to": "framework/solid/examples/start-basic-netlify"
      🤖 Prompt for AI Agents
      In docs/start/config.json around lines 333 to 335, the menu item incorrectly
      uses the label "Cloudflare Vite Plugin" while linking to the Netlify example;
      update the label to "Netlify" (or "Netlify Example"/"Netlify Adapter" per repo
      convention) so it correctly describes the target and avoids duplicating the
      Cloudflare label; keep the "to" value as
      "framework/solid/examples/start-basic-netlify".
      examples/solid/start-basic-netlify/package.json lines 11 to 15Outdated
      @@ -0,0 +1,15 @@
      1+{
      2+ "name": "tanstack-solid-start-example-basic-netlify",
      3+ "private": true,
      4+ "sideEffects": false,
      5+ "type": "module",
      6+ "scripts": {
      7+ "dev": "vite dev",
      8+ "build": "vite build && tsc --noEmit",
      9+ "preview": "vite preview"
      10+ },
      11+ "dependencies": {
      12+ "@tanstack/solid-router": "^1.133.20",
      13+ "@tanstack/solid-router-devtools": "^1.133.20",
      14+ "@tanstack/solid-start": "^1.133.20",
      15+ "solid-js": "^1.9.5"

      ⚠️ Potential issue | 🔴 Critical

      Use workspace protocol for internal TanStack dependencies.

      The internal @tanstack/* dependencies should use the workspace:* protocol instead of version ranges. This ensures proper monorepo linking and consistency.

      As per coding guidelines

      Apply this diff:

         "dependencies": {
      -    "@tanstack/solid-router": "^1.133.20",
      -    "@tanstack/solid-router-devtools": "^1.133.20",
      -    "@tanstack/solid-start": "^1.133.20",
      +    "@tanstack/solid-router": "workspace:*",
      +    "@tanstack/solid-router-devtools": "workspace:*",
      +    "@tanstack/solid-start": "workspace:*",
           "solid-js": "^1.9.5"
         },
      📝 Committable suggestion

      ‼️ IMPORTANT Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

        "dependencies": {
          "@tanstack/solid-router": "workspace:*",
          "@tanstack/solid-router-devtools": "workspace:*",
          "@tanstack/solid-start": "workspace:*",
          "solid-js": "^1.9.5"
      🤖 Prompt for AI Agents
      In examples/solid/start-basic-netlify/package.json around lines 11 to 15, the
      @tanstack/* dependencies use version ranges instead of the workspace protocol;
      update those entries to use "workspace:*" for "@tanstack/solid-router",
      "@tanstack/solid-router-devtools", and "@tanstack/solid-start" so they resolve
      to the monorepo workspace packages (leave "solid-js" unchanged).
      examples/solid/start-basic-netlify/README.md lines 29 to 37Outdated
      @@ -0,0 +17,21 @@
      17+### Build for Production
      18+
      19+```bash
      20+pnpm build
      21+```
      22+
      23+### Deploy to Netlify
      24+
      25+```sh
      26+netlify deploy
      27+```
      28+
      29+## Accessing bindings
      30+
      31+You can access Cloudflare bindings in server functions by using importable `env`:
      32+
      33+```ts
      34+import { env } from 'cloudflare:workers'
      35+```
      36+
      37+See `src/routes/index.tsx` for an example.

      ⚠️ Potential issue | 🟠 Major

      Incorrect documentation: Cloudflare references in Netlify example.

      This section references Cloudflare bindings and cloudflare:workers, but this is a Netlify example. The content appears to be copied from the Cloudflare example and needs to be updated with Netlify-specific documentation.

      Remove or replace this section with Netlify-specific documentation. If Netlify has similar environment variable or binding access patterns, document those instead.

      -## Accessing bindings
      -
      -You can access Cloudflare bindings in server functions by using importable `env`:
      -
      -```ts
      -import { env } from 'cloudflare:workers'
      -```
      -
      -See `src/routes/index.tsx` for an example.
      +## Netlify Environment Variables
      +
      +You can access environment variables in server functions using Netlify's runtime:
      +
      +```ts
      +// Access environment variables in server functions
      +const value = process.env.YOUR_ENV_VAR
      +```
      🤖 Prompt for AI Agents
      In examples/solid/start-basic-netlify/README.md around lines 29 to 37, the
      section incorrectly references Cloudflare bindings and the import statement
      `import { env } from 'cloudflare:workers'`; remove that Cloudflare-specific
      content and replace it with Netlify-specific guidance: delete the incorrect
      import and wording, and add a brief "Netlify Environment Variables" subsection
      that explains accessing environment variables in server functions via
      process.env and points to the example usage in src/routes/index.tsx for
      reference.
      examples/solid/start-basic-netlify/src/routes/__root.tsx lines 51 to 53Outdated
      @@ -0,0 +33,21 @@
      33+ { rel: 'stylesheet', href: appCss },
      34+ {
      35+ rel: 'apple-touch-icon',
      36+ sizes: '180x180',
      37+ href: '/apple-touch-icon.png',
      38+ },
      39+ {
      40+ rel: 'icon',
      41+ type: 'image/png',
      42+ sizes: '32x32',
      43+ href: '/favicon-32x32.png',
      44+ },
      45+ {
      46+ rel: 'icon',
      47+ type: 'image/png',
      48+ sizes: '16x16',
      49+ href: '/favicon-16x16.png',
      50+ },
      51+ { rel: 'manifest', href: '/site.webmanifest', color: '#fffff' },
      52+ { rel: 'icon', href: '/favicon.ico' },
      53+ ],

      ⚠️ Potential issue | 🟡 Minor

      Remove invalid color on manifest link; add theme-color meta

      link[rel="manifest"] doesn’t support color, and the value #fffff is invalid. Use a meta[name="theme-color"] instead.

      -      { rel: 'manifest', href: '/site.webmanifest', color: '#fffff' },
      +      { rel: 'manifest', href: '/site.webmanifest' },
      -    meta: [
      +    meta: [
             { charset: 'utf-8' },
             { name: 'viewport', content: 'width=device-width, initial-scale=1' },
      +      { name: 'theme-color', content: '#ffffff' },
             ...seo({
               title:

      Also applies to: 18-31

      🤖 Prompt for AI Agents
      In examples/solid/start-basic-netlify/src/routes/__root.tsx around lines 51-53
      (and also apply same change for lines 18-31), remove the invalid color attribute
      from the manifest link (link[rel="manifest"] does not support a color property
      and the value "#fffff" is an invalid hex), and instead add a meta tag
      meta[name="theme-color"] with a valid hex value such as "#ffffff" (placed inside
      the head alongside other meta tags); ensure the manifest link only includes rel
      and href, and use a correctly formatted 6-digit hex for theme-color.
      examples/solid/start-basic-netlify/src/routes/__root.tsx lines 69 to 75Outdated
      @@ -0,0 +55,21 @@
      55+ {
      56+ src: '/customScript.js',
      57+ type: 'text/javascript',
      58+ },
      59+ ],
      60+ }),
      61+ errorComponent: DefaultCatchBoundary,
      62+ notFoundComponent: () => <NotFound />,
      63+ shellComponent: RootDocument,
      64+})
      65+
      66+function RootDocument({ children }: { children: Solid.JSX.Element }) {
      67+ return (
      68+ <html>
      69+ <head>
      70+ <HydrationScript />
      71+ </head>
      72+ <body>
      73+ <HeadContent />
      74+ <div class="p-2 flex gap-2 text-lg">
      75+ <Link

      ⚠️ Potential issue | 🟠 Major

      Place <HeadContent /> in <head> (not body)

      Head elements should render inside <head> for correct SSR/CSR hydration.

         <head>
      -    <HydrationScript />
      +    <HydrationScript />
      +    <HeadContent />
         </head>
         <body>
      -    <HeadContent />

      Also applies to: 73-74

      🤖 Prompt for AI Agents
      In examples/solid/start-basic-netlify/src/routes/__root.tsx around lines 69 to
      75 (also applies to lines 73-74), the <HeadContent /> component is incorrectly
      rendered inside the <body>; move the <HeadContent /> component into the <head>
      element (so head contains both <HydrationScript /> and <HeadContent />) to
      ensure head elements are rendered during SSR/CSR hydration, and remove the
      <HeadContent /> instance from the body.
      examples/solid/start-basic-netlify/src/routes/_pathlessLayout/_nested-layout.tsx lines 12 to 27Outdated
      @@ -0,0 +7,21 @@
      7+function LayoutComponent() {
      8+ return (
      9+ <div>
      10+ <div>I'm a nested layout</div>
      11+ <div class="flex gap-2 border-b">
      12+ <Link
      13+ to="/route-a"
      14+ activeProps={{
      15+ class: 'font-bold',
      16+ }}
      17+ >
      18+ Go to route A
      19+ </Link>
      20+ <Link
      21+ to="/route-b"
      22+ activeProps={{
      23+ class: 'font-bold',
      24+ }}
      25+ >
      26+ Go to route B
      27+ </Link>

      ⚠️ Potential issue | 🔴 Critical

      Fix Link paths: they’re absolute to root now, not nested under this layout

      Using “/route-a” and “/route-b” navigates to root paths that likely don’t exist. Point to the nested routes.

               <Link
      -          to="/route-a"
      +          to="/_pathlessLayout/_nested-layout/route-a"
      @@
               <Link
      -          to="/route-b"
      +          to="/_pathlessLayout/_nested-layout/route-b"

      Committable suggestion skipped: line range outside the PR's diff.

      🤖 Prompt for AI Agents
      In
      examples/solid/start-basic-netlify/src/routes/_pathlessLayout/_nested-layout.tsx
      around lines 12 to 27, the Link components use absolute paths ("/route-a",
      "/route-b") which point to the app root instead of the nested routes; change
      them to relative paths (e.g., "route-a" or "./route-a" and "route-b" or
      "./route-b") so navigation resolves under this layout, keeping the existing
      activeProps intact.
      examples/solid/start-basic-netlify/src/routes/api/users.$userId.ts lines 8 to 29Outdated
      @@ -0,0 +9,21 @@
      9+ console.info(`Fetching users by id=${params.userId}... @`, request.url)
      10+ try {
      11+ const res = await fetch(
      12+ 'https://jsonplaceholder.typicode.com/users/' + params.userId,
      13+ )
      14+ if (!res.ok) {
      15+ throw new Error('Failed to fetch user')
      16+ }
      17+
      18+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
      19+ const user = (await res.json()) as User
      20+
      21+ return json({
      22+ id: user.id,
      23+ name: user.name,
      24+ email: user.email,
      25+ })
      26+ } catch (e) {
      27+ console.error(e)
      28+ return json({ error: 'User not found' }, { status: 404 })
      29+ }

      ⚠️ Potential issue | 🟠 Major

      Don’t collapse all failures into 404; validate userId and preserve upstream status

      • Validate params.userId (must be a positive integer) and return 400 if invalid.
      • If upstream returns 404, pass it through; for other non-OK statuses/network errors, use 5xx (e.g., 502) instead of 404.

      Apply:

      -      GET: async ({ params, request }) => {
      -        console.info(`Fetching users by id=${params.userId}... @`, request.url)
      -        try {
      -          const res = await fetch(
      -            'https://jsonplaceholder.typicode.com/users/' + params.userId,
      -          )
      -          if (!res.ok) {
      -            throw new Error('Failed to fetch user')
      -          }
      -
      -          // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
      -          const user = (await res.json()) as User
      -
      -          return json({
      -            id: user.id,
      -            name: user.name,
      -            email: user.email,
      -          })
      -        } catch (e) {
      -          console.error(e)
      -          return json({ error: 'User not found' }, { status: 404 })
      -        }
      -      },
      +      GET: async ({ params, request }) => {
      +        console.info(`Fetching users by id=${params.userId}... @`, request.url)
      +        const id = Number(params.userId)
      +        if (!Number.isInteger(id) || id <= 0) {
      +          return json({ error: 'Invalid userId' }, { status: 400 })
      +        }
      +        try {
      +          const res = await fetch(
      +            'https://jsonplaceholder.typicode.com/users/' + id,
      +          )
      +          if (res.status === 404) {
      +            return json({ error: 'User not found' }, { status: 404 })
      +          }
      +          if (!res.ok) {
      +            return json({ error: 'Upstream error' }, { status: 502 })
      +          }
      +          const user = (await res.json()) as User
      +          return json({ id: user.id, name: user.name, email: user.email })
      +        } catch (e) {
      +          console.error(e)
      +          return json({ error: 'Upstream fetch failed' }, { status: 502 })
      +        }
      +      },
      🤖 Prompt for AI Agents
      In examples/solid/start-basic-netlify/src/routes/api/users.$userId.ts around
      lines 8 to 29, validate params.userId as a positive integer and return a 400
      JSON response if invalid; when calling the upstream API, if the response status
      is 404 return that 404 through to the client, for any other non-OK upstream
      status return a 502 (or other appropriate 5xx) preserving the upstream
      status/message in the response body, and for network or thrown errors catch them
      and return a 502 with error details logged and included in the JSON error
      response.
      examples/solid/start-basic-netlify/src/routes/api/users.ts lines 6 to 13Outdated
      @@ -0,0 +1,13 @@
      1+import { createFileRoute } from '@tanstack/solid-router'
      2+import { getRequestHeaders } from '@tanstack/solid-start/server'
      3+import { createMiddleware, json } from '@tanstack/solid-start'
      4+import type { User } from '~/utils/users'
      5+
      6+const userLoggerMiddleware = createMiddleware().server(async ({ next }) => {
      7+ console.info('In: /users')
      8+ console.info('Request Headers:', getRequestHeaders())
      9+ const result = await next()
      10+ result.response.headers.set('x-users', 'true')
      11+ console.info('Out: /users')
      12+ return result
      13+})

      ⚠️ Potential issue | 🟠 Major

      Avoid logging full request headers (cookies/auth may leak)

      Log a safe subset instead of the entire header object.

         console.info('In: /users')
      -  console.info('Request Headers:', getRequestHeaders())
      +  // Avoid logging full headers (may include cookies/auth). Log a safe subset:
      +  const headers = getRequestHeaders() as Record<string, string | undefined>
      +  console.info('Request meta:', {
      +    host: headers.host,
      +    'user-agent': headers['user-agent'],
      +  })
      🤖 Prompt for AI Agents
      In examples/solid/start-basic-netlify/src/routes/api/users.ts around lines 6 to
      13, the middleware is currently logging the entire request headers which may
      leak sensitive values (cookies, Authorization); change the logging to record
      only a safe subset (e.g., method, url/path, content-type, user-agent, and any
      non-sensitive custom headers) or explicitly exclude sensitive header keys
      (cookie, authorization, set-cookie) before logging, and keep the rest of the
      middleware behavior unchanged.
      examples/solid/start-basic-netlify/src/routes/index.tsx lines 9 to 13Outdated
      @@ -0,0 +1,13 @@
      1+import { createFileRoute } from '@tanstack/solid-router'
      2+import { createServerFn } from '@tanstack/solid-start'
      3+
      4+export const Route = createFileRoute('/')({
      5+ loader: () => getData(),
      6+ component: Home,
      7+})
      8+
      9+const getData = createServerFn().handler(() => {
      10+ return {
      11+ message: `Running in ${navigator.userAgent}`,
      12+ }
      13+})

      ⚠️ Potential issue | 🔴 Critical

      Bug: navigator is not available in server functions

      createServerFn().handler runs on the server; navigator.userAgent will throw. Read the user agent from the request headers instead.

      Apply this fix:

      -const getData = createServerFn().handler(() => {
      -  return {
      -    message: `Running in ${navigator.userAgent}`,
      -  }
      -})
      +const getData = createServerFn({ method: 'GET' }).handler(({ request }) => {
      +  const ua = request.headers.get('user-agent') ?? 'unknown'
      +  return {
      +    message: `Running in ${ua}`,
      +  }
      +})
      🤖 Prompt for AI Agents
      In examples/solid/start-basic-netlify/src/routes/index.tsx around lines 9 to 13,
      the server function uses navigator.userAgent which is not available on the
      server; change the handler to read the user agent from the incoming request
      headers (e.g., extract userAgent = request.headers.get('user-agent') ||
      'unknown') and return the message using that value instead of navigator; ensure
      the handler signature accepts the request/event parameter so you can access
      headers and provide a safe default if the header is missing.
      examples/solid/start-basic-netlify/src/routes/users.$userId.tsx line 1Outdated
      @@ -0,0 +1 @@
      1+import { createFileRoute } from '@tanstack/solid-router'

      🛠️ Refactor suggestion | 🟠 Major

      Handle 404 with router’s notFound to use notFoundComponent

      Right now any non‑OK throws a generic error, so errorComponent renders and notFoundComponent never triggers. Throw router notFound() on 404.

      -import { createFileRoute } from '@tanstack/solid-router'
      +import { createFileRoute, notFound } from '@tanstack/solid-router'
      -      if (!res.ok) {
      -        throw new Error('Unexpected status code')
      -      }
      +      if (!res.ok) {
      +        if (res.status === 404) throw notFound()
      +        throw new Error('Unexpected status code')
      +      }

      Committable suggestion skipped: line range outside the PR's diff.

      🤖 Prompt for AI Agents
      In examples/solid/start-basic-netlify/src/routes/users.$userId.tsx around line
      1, the route currently throws a generic error on any non-OK fetch which causes
      the router to show errorComponent instead of the notFoundComponent; add an
      import for the router helper (notFound) from '@tanstack/solid-router' and change
      the 404 handling to throw notFound() when response.status === 404, leaving other
      non-OK responses to throw the generic error so notFoundComponent is used for
      404s.
      examples/solid/start-basic-netlify/src/routes/users.$userId.tsx lines 2 to 3Outdated
      @@ -0,0 +1,3 @@
      1+import { createFileRoute } from '@tanstack/solid-router'
      2+import { NotFound } from 'src/components/NotFound'
      3+import { UserErrorComponent } from 'src/components/UserError'

      ⚠️ Potential issue | 🔴 Critical

      🧩 Analysis chain

      Unify import aliases; src/* may not resolve

      Elsewhere (e.g., __root.tsx) imports use ~/*. Use the same alias (or a relative path) to avoid Vite/TS path resolution issues.

      -import { NotFound } from 'src/components/NotFound'
      -import { UserErrorComponent } from 'src/components/UserError'
      +import { NotFound } from '~/components/NotFound'
      +import { UserErrorComponent } from '~/components/UserError'

      Run to verify aliases:


      🏁 Script executed:

      #!/bin/bash
      # Check tsconfig path aliases include "src/*" or "~/*"
      rg -nC2 '"paths"\s*:' tsconfig*.json
      rg -n "'src/\*'|'~/\*'" tsconfig*.json -C1

      Length of output: 0


      🏁 Script executed:

      #!/bin/bash
      # Find all tsconfig files in the repository
      fd -n tsconfig examples/solid/start-basic-netlify/ || true
      fd -n tsconfig . --type f --max-depth 3 | head -20
      
      # Check if path alias config exists in the example directory
      cat examples/solid/start-basic-netlify/tsconfig.json 2>/dev/null || echo "No tsconfig in example root"
      
      # Also check vite config for path resolution
      fd -n vite.config examples/solid/start-basic-netlify/ || true

      Length of output: 1236


      🏁 Script executed:

      #!/bin/bash
      # Check the actual imports in the file under review
      cat examples/solid/start-basic-netlify/src/routes/users.\$userId.tsx
      
      # Also check __root.tsx to confirm the pattern
      cat examples/solid/start-basic-netlify/src/routes/__root.tsx | head -20

      Length of output: 1758


      Fix import aliases to use ~/ — src/ is not configured

      The tsconfig.json only defines "~/*": ["./src/*"] as a path alias. Imports using src/* directly will fail to resolve. Align with the pattern used in __root.tsx and other files.

      -import { NotFound } from 'src/components/NotFound'
      -import { UserErrorComponent } from 'src/components/UserError'
      +import { NotFound } from '~/components/NotFound'
      +import { UserErrorComponent } from '~/components/UserError'
      📝 Committable suggestion

      ‼️ IMPORTANT Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

      import { NotFound } from '~/components/NotFound'
      import { UserErrorComponent } from '~/components/UserError'
      🤖 Prompt for AI Agents
      In examples/solid/start-basic-netlify/src/routes/users.$userId.tsx around lines
      2-3, the file imports use the non-existent alias "src/"; replace those with the
      configured path alias "~/" so imports read from "~/components/NotFound" and
      "~/components/UserError" respectively to match tsconfig.json and other project
      files.
      examples/solid/start-basic-netlify/src/utils/loggingMiddleware.tsx lines 3 to 26Outdated
      @@ -0,0 +6,21 @@
      6+
      7+ return ctx.next({
      8+ context: {
      9+ clientTime,
      10+ },
      11+ sendContext: {
      12+ clientTime,
      13+ },
      14+ })
      15+ })
      16+ .server(async (ctx) => {
      17+ const serverTime = new Date()
      18+
      19+ return ctx.next({
      20+ sendContext: {
      21+ serverTime,
      22+ durationToServer:
      23+ serverTime.getTime() - ctx.context.clientTime.getTime(),
      24+ },
      25+ })
      26+ })

      ⚠️ Potential issue | 🔴 Critical

      Add null checks and TypeScript types for safer middleware.

      The server handler accesses ctx.context.clientTime without verifying it exists. If context propagation fails, line 23 will throw a runtime error. Additionally, this file lacks TypeScript type annotations, violating the coding guideline for strict type safety.

      Apply this diff to add safety checks and types:

      +interface TimingContext {
      +  clientTime?: Date
      +  serverTime?: Date
      +  durationToServer?: number
      +}
      +
      -const preLogMiddleware = createMiddleware({ type: 'function' })
      +const preLogMiddleware = createMiddleware<TimingContext>({ type: 'function' })
         .client(async (ctx) => {
           const clientTime = new Date()
       
           return ctx.next({
             context: {
               clientTime,
             },
             sendContext: {
               clientTime,
             },
           })
         })
         .server(async (ctx) => {
      +    if (!ctx.context.clientTime) {
      +      console.warn('clientTime not found in context')
      +      return ctx.next()
      +    }
      +
           const serverTime = new Date()
       
           return ctx.next({
             sendContext: {
               serverTime,
               durationToServer:
                 serverTime.getTime() - ctx.context.clientTime.getTime(),
             },
           })
         })

      As per coding guidelines.

      🤖 Prompt for AI Agents
      In examples/solid/start-basic-netlify/src/utils/loggingMiddleware.tsx around
      lines 3 to 26, the server middleware reads ctx.context.clientTime without safety
      or TypeScript types; add explicit TypeScript generics for the middleware context
      shape (e.g., clientTime?: Date and serverTime?: Date), type the createMiddleware
      call and its client/server handlers, and add null/undefined checks in the server
      handler so you only call ctx.context.clientTime.getTime() when clientTime is a
      valid Date (otherwise compute durationToServer as undefined or 0). Ensure the
      client handler sets a typed clientTime Date, validate/guard ctx.context before
      use on the server, and update return types to reflect optional durationToServer.
      examples/solid/start-basic-netlify/src/utils/loggingMiddleware.tsx lines 28 to 41Outdated
      @@ -0,0 +21,21 @@
      21+ serverTime,
      22+ durationToServer:
      23+ serverTime.getTime() - ctx.context.clientTime.getTime(),
      24+ },
      25+ })
      26+ })
      27+
      28+export const logMiddleware = createMiddleware({ type: 'function' })
      29+ .middleware([preLogMiddleware])
      30+ .client(async (ctx) => {
      31+ const res = await ctx.next()
      32+
      33+ const now = new Date()
      34+ console.log('Client Req/Res:', {
      35+ duration: now.getTime() - res.context.clientTime.getTime(),
      36+ durationToServer: res.context.durationToServer,
      37+ durationFromServer: now.getTime() - res.context.serverTime.getTime(),
      38+ })
      39+
      40+ return res
      41+ })

      ⚠️ Potential issue | 🔴 Critical

      Add defensive checks for context properties.

      The client handler accesses multiple context properties (clientTime, durationToServer, serverTime) without verifying they exist. If any timing data is missing from the response context, lines 35-37 will throw runtime errors.

      Apply this diff to add safety checks and types:

      -export const logMiddleware = createMiddleware({ type: 'function' })
      +export const logMiddleware = createMiddleware<TimingContext>({ type: 'function' })
         .middleware([preLogMiddleware])
         .client(async (ctx) => {
           const res = await ctx.next()
       
      +    if (res.context.clientTime && res.context.serverTime && res.context.durationToServer != null) {
      -    const now = new Date()
      -    console.log('Client Req/Res:', {
      -      duration: now.getTime() - res.context.clientTime.getTime(),
      -      durationToServer: res.context.durationToServer,
      -      durationFromServer: now.getTime() - res.context.serverTime.getTime(),
      -    })
      +      const now = new Date()
      +      console.log('Client Req/Res:', {
      +        duration: now.getTime() - res.context.clientTime.getTime(),
      +        durationToServer: res.context.durationToServer,
      +        durationFromServer: now.getTime() - res.context.serverTime.getTime(),
      +      })
      +    } else {
      +      console.warn('Incomplete timing data in response context')
      +    }
       
           return res
         })

      As per coding guidelines.

      Committable suggestion skipped: line range outside the PR's diff.

      🤖 Prompt for AI Agents
      In examples/solid/start-basic-netlify/src/utils/loggingMiddleware.tsx around
      lines 28 to 41, the client handler assumes res.context and its timing fields
      exist; add defensive checks and simple types so missing timing data won't throw.
      Update the handler to (1) validate res and res.context before using them, (2)
      guard access to clientTime and serverTime and compute durations only when those
      Dates exist (use optional chaining and fallback numeric values or skip that
      part), (3) treat durationToServer as possibly undefined and provide a fallback
      or omit it from the log, and (4) narrow the middleware client context type so
      these fields are optional (e.g., Date | undefined, number | undefined) to force
      compile-time checks; log a clear message when timing data is absent instead of
      accessing properties unconditionally.
      examples/solid/start-basic-netlify/vite.config.ts lines 11 to 18Outdated
      @@ -0,0 +1,18 @@
      1+import { defineConfig } from 'vite'
      2+import tsConfigPaths from 'vite-tsconfig-paths'
      3+import netlify from '@netlify/vite-plugin-tanstack-start'
      4+import { tanstackStart } from '@tanstack/solid-start/plugin/vite'
      5+import viteSolid from 'vite-plugin-solid'
      6+
      7+export default defineConfig({
      8+ server: {
      9+ port: 3000,
      10+ },
      11+ plugins: [
      12+ tsConfigPaths({
      13+ projects: ['./tsconfig.json'],
      14+ }),
      15+ netlify(),
      16+ tanstackStart(),
      17+ viteSolid({ ssr: true }),
      18+ ],

      ⚠️ Potential issue | 🔴 Critical

      🧩 Analysis chain

      Verify the plugin order with Netlify documentation.

      Vite plugin order can affect behavior. Please confirm that the current order (tsConfigPaths → netlify → tanstackStart → viteSolid) aligns with Netlify's recommended configuration for TanStack Start projects.


      🌐 Web query:

      What is the recommended Vite plugin order for @netlify/vite-plugin-tanstack-start with TanStack Solid Start?

      💡 Result:

      Use tanstackStart() first, then @netlify/vite-plugin-tanstack-start, then vite-plugin-solid. Example:

      plugins: [ tanstackStart(), netlify(), viteSolid({ ssr: true }), ]

      Sources: Netlify TanStack Start docs and TanStack Solid hosting guide. [1][2]

      References [1] Netlify — TanStack Start setup. [2] TanStack Start (Solid) — Hosting (shows same plugin order).


      Fix plugin order: tanstackStart() must come before netlify().

      The recommended Vite plugin order is tanstackStart(), netlify(), then viteSolid, but the current code places netlify() before tanstackStart(). This reversed order may cause build or runtime issues. Update to:

      plugins: [
        tsConfigPaths({
          projects: ['./tsconfig.json'],
        }),
        tanstackStart(),
        netlify(),
        viteSolid({ ssr: true }),
      ],
      🤖 Prompt for AI Agents
      In examples/solid/start-basic-netlify/vite.config.ts around lines 11 to 18, the
      Vite plugin order is incorrect: netlify() is placed before tanstackStart(),
      which can cause build/runtime issues; reorder the plugins so tanstackStart()
      appears before netlify() (keeping tsConfigPaths first and viteSolid({ ssr: true
      }) last).
    5. brenelz(GitHub profile, opens in a new tab) approved these changes

    6. Actionable comments posted: 0

      🧹 Nitpick comments (1)
      docs/start/framework/react/guide/hosting.md (1)

      119-129: Minor documentation clarity issue: Duplicate "Netlify" section header.

      Lines 119 and 129 both define the same "Netlify" section header. Consider consolidating them or using distinct subheadings (e.g., "Netlify ⭐ Official Partner" for setup and "Netlify Configuration" for the technical details) to improve clarity.

      📜 Review details

      Configuration used: CodeRabbit UI

      Review profile: CHILL

      Plan: Pro

      📥 Commits

      Reviewing files that changed from the base of the PR and between 30c44d6382aeaeac8d8ebb9e70cf836f0d7ee2c9 and 559a3769a38380b6ecd6daa6a33a074947879350.

      📒 Files selected for processing (2)
      • docs/start/framework/react/guide/hosting.md (1 hunks)
      • docs/start/framework/solid/guide/hosting.md (1 hunks)
      ✅ Files skipped from review due to trivial changes (1)
      • docs/start/framework/solid/guide/hosting.md
      🧰 Additional context used
      📓 Path-based instructions (2)
      docs/**/*.{md,mdx}

      📄 CodeRabbit inference engine (AGENTS.md)

      Use internal docs links relative to the docs/ folder (e.g., ./guide/data-loading)

      Files:

      • docs/start/framework/react/guide/hosting.md
      docs/{router,start}/**

      📄 CodeRabbit inference engine (AGENTS.md)

      Place router docs under docs/router/ and start framework docs under docs/start/

      Files:

      • docs/start/framework/react/guide/hosting.md
      ⏰ 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 (1)
      docs/start/framework/react/guide/hosting.md (1)

      151-153: LGTM! The Netlify dev configuration looks good.

      The addition of the [dev] section correctly specifies the dev command and port for local development via the Netlify CLI. This aligns with the PR's goal of providing end-to-end Netlify workflow guidance across frameworks.

Sign in to join this conversation.