Skip to content
Source
Sign inSign up
TanStack/router

docs(solid-start): start-basic-cloudflare example #5567

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

Summary by CodeRabbit

  • Documentation
    • Added a new example project demonstrating Solid Start integration with Cloudflare Workers, including sample routes, components, and deployment configuration.
    1. Warning

      Rate limit exceeded

      @birkskyum has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 10 minutes and 7 seconds before requesting another review.

      ⌛ How to resolve this issue?

      After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

      We recommend that you space out your commits to avoid hitting the rate limit.

      🚦 How do rate limits work?

      CodeRabbit enforces hourly rate limits for each developer per organization.

      Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

      Please see our FAQ for further information.

      📥 Commits

      Reviewing files that changed from the base of the PR and between eee3e7889f931d89721a28e4e37182a82b159719 and 3550bf76ed72e88800f8bb822d780ccef9a701ed.

      📒 Files selected for processing (2)
      • docs/start/config.json (2 hunks)
      • examples/solid/start-basic-cloudflare/vite.config.ts (1 hunks)

      Walkthrough

      Adds a complete Solid Start example configured for Cloudflare Workers: project config, build tooling, Tailwind/PostCSS, generated strongly-typed route tree, router factory, file-based routes (pages and APIs), components, utilities (fetchers, SEO, middleware), styles, and README.

      Changes

      Cohort / File(s)Summary
      Project config & tooling
      examples/solid/start-basic-cloudflare/.gitignore, .../.prettierignore, .../.vscode/settings.json, .../package.json, .../tsconfig.json, .../wrangler.jsonc
      IDE, git, Prettier ignores, package scripts/deps, TypeScript settings, and Cloudflare Wrangler config added for the example.
      Build & CSS
      examples/solid/start-basic-cloudflare/vite.config.ts, .../postcss.config.mjs, .../tailwind.config.mjs, .../src/styles/app.css
      Vite config with Cloudflare SSR and plugins; PostCSS and Tailwind configs; base Tailwind stylesheet with theme utilities.
      Generated routing
      examples/solid/start-basic-cloudflare/src/routeTree.gen.ts
      Generated, strongly-typed route tree with route constants, file-path/type maps, and module augmentations for TanStack integrations.
      Router & boundaries
      examples/solid/start-basic-cloudflare/src/router.tsx, .../src/components/DefaultCatchBoundary.tsx, .../NotFound.tsx, .../PostError.tsx, .../UserError.tsx
      Router factory exposing getRouter(), default error and not-found components, and small error wrappers.
      Root & layouts
      examples/solid/start-basic-cloudflare/src/routes/__root.tsx, .../_pathlessLayout.tsx, .../_nested-layout.tsx, .../route-a.tsx, .../route-b.tsx
      App root route, document shell, navigation, and nested/pathless layout routes.
      Posts routes
      examples/solid/start-basic-cloudflare/src/routes/posts.tsx, .../posts.index.tsx, .../posts.$postId.tsx, .../posts_.$postId.deep.tsx
      Posts list, index, dynamic post detail (with loader/error handling), and nested deep view.
      Users routes
      examples/solid/start-basic-cloudflare/src/routes/users.tsx, .../users.index.tsx, .../users.$userId.tsx
      Users listing and dynamic user detail routes wired to /api/users endpoints with loaders and error handling.
      API & special routes
      examples/solid/start-basic-cloudflare/src/routes/api/users.ts, .../api/users.$userId.ts, .../customScript.js.ts, .../deferred.tsx, .../index.tsx, .../redirect.tsx
      Server endpoints (users list and single user), custom JS asset endpoint, deferred loaders, home route exposing env, and a redirect route.
      Utilities & types
      examples/solid/start-basic-cloudflare/src/utils/posts.tsx, .../users.tsx, .../seo.ts, .../loggingMiddleware.tsx
      Data fetchers (createServerFn), Post/User types, SEO tag helper, and timing/logging middleware.
      Docs & assets
      examples/solid/start-basic-cloudflare/README.md, .../public/site.webmanifest
      Example README with run/deploy instructions and a web manifest asset.

      Sequence Diagram(s)

      sequenceDiagram
        participant Client
        participant Router as getRouter()
        participant RouteTree as routeTree
        participant Loader as Loader/Handler
        participant Server as Cloudflare Worker
      
        Client->>Router: Navigate / request
        Router->>RouteTree: match route
        alt static route/component
          RouteTree->>Client: render component (hydration)
        else server-side loader or API
          Router->>Loader: run loader or server handler
          Loader->>Server: fetch external data / perform logic
          Server-->>Loader: response
          Loader-->>Router: loader data / Response
          Router-->>Client: rendered page / Response
        end
      
        alt error
          Loader-->>Router: throw
          Router->>Client: DefaultCatchBoundary / NotFound
        end

      Estimated code review effort

      🎯 4 (Complex) | ⏱️ ~45 minutes

      Rationale: many new files but patterned; heavy generated routeTree plus router, server handlers, middleware, and interdependent loaders warrant careful review.

      • TanStack/router#5254 — parallel start-basic-cloudflare example (React vs Solid); closely mirrors routing and example structure.
      • TanStack/router#5558 — overlapping Solid Start example scaffolding including routeTree.gen.ts and router/getRouter implementations.
      • TanStack/router#5556 — similar addition of Solid Start routes, utilities, and example configuration.

      Suggested labels

      package: solid-start, documentation

      Suggested reviewers

      • schiller-manuel

      Poem

      🐰 In burrows of code I hop and cheer, Routes and loaders now appear, Cloudflare winds whisper "deploy", Nested paths bring rabbits joy, Hopping home — the app runs clear! 🥕

      Pre-merge checks and finishing touches

      ❌ Failed checks (1 warning)
      Check nameStatusExplanationResolution
      Docstring Coverage⚠️ WarningDocstring coverage is 0.00% which is insufficient. The required threshold is 80.00%.You can run @coderabbitai generate docstrings to improve docstring coverage.
      ✅ Passed checks (2 passed)
      Check nameStatusExplanation
      Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
      Title Check✅ PassedThe title "docs(solid-start): start-basic-cloudflare example" accurately reflects the main change in the PR, which is the addition of a complete new example project at examples/solid/start-basic-cloudflare/. The title is specific, concise, and uses a clear conventional format with the scope (solid-start) and description (start-basic-cloudflare example) that conveys the primary purpose of the changeset. The title is not vague, misleading, or off-topic, and a developer scanning the history would immediately understand that this PR adds a new example for Solid Start with Cloudflare Workers integration.

      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 3550bf76ed72e88800f8bb822d780ccef9a701ed

      CommandStatusDurationResult
      nx affected --targets=test:eslint,test:unit,tes...✅ Succeeded49sView ↗
      nx run-many --target=build --exclude=examples/*...✅ Succeeded3sView ↗

      ☁️ Nx Cloud last updated this comment at 2025-10-21 15:26:20 UTC

    3. More templates

      @tanstack/arktype-adapter

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

      @tanstack/directive-functions-plugin

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

      @tanstack/eslint-plugin-router

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

      @tanstack/history

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

      @tanstack/nitro-v2-vite-plugin

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

      @tanstack/react-router

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

      @tanstack/react-router-devtools

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

      @tanstack/react-router-ssr-query

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

      @tanstack/react-start

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

      @tanstack/react-start-client

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

      @tanstack/react-start-server

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

      @tanstack/router-cli

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

      @tanstack/router-core

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

      @tanstack/router-devtools

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

      @tanstack/router-devtools-core

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

      @tanstack/router-generator

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

      @tanstack/router-plugin

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

      @tanstack/router-ssr-query-core

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

      @tanstack/router-utils

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

      @tanstack/router-vite-plugin

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

      @tanstack/server-functions-plugin

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

      @tanstack/solid-router

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

      @tanstack/solid-router-devtools

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

      @tanstack/solid-router-ssr-query

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

      @tanstack/solid-start

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

      @tanstack/solid-start-client

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

      @tanstack/solid-start-server

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

      @tanstack/start-client-core

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

      @tanstack/start-plugin-core

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

      @tanstack/start-server-core

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

      @tanstack/start-static-server-functions

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

      @tanstack/start-storage-context

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

      @tanstack/valibot-adapter

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

      @tanstack/virtual-file-routes

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

      @tanstack/zod-adapter

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

      commit: 3550bf7

    4. Actionable comments posted: 13

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

      2-3: Consider populating example values for name and short_name.

      The manifest file is well-structured, but the name and short_name fields are left empty. While this is acceptable for a template, it would be more helpful to include placeholder values that users can customize (e.g., "Solid Start Cloudflare") to provide a better example and guide.

      -  "name": "",
      -  "short_name": "",
      +  "name": "Solid Start Cloudflare",
      +  "short_name": "SS Cloudflare",
      examples/solid/start-basic-cloudflare/src/routes/customScript[.]js.ts (1)

      1-15: LGTM! Clean example of serving dynamic JavaScript via route handler.

      This implementation correctly demonstrates serving custom JavaScript content through a file-based route. The route path /customScript.js properly integrates with the script reference in __root.tsx, and the Content-Type header is correctly set.

      Optional enhancement: Consider adding charset to the Content-Type header for completeness:

      -            'Content-Type': 'application/javascript',
      +            'Content-Type': 'application/javascript; charset=utf-8',

      While browsers typically assume UTF-8 by default, explicitly specifying the charset follows best practices and can prevent edge-case encoding issues.

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

      1-5: Consider using .ts extension instead of .tsx.

      Since this file contains only a type definition with no JSX, the file extension should be .ts rather than .tsx to follow TypeScript conventions.

      examples/solid/start-basic-cloudflare/src/components/NotFound.tsx (1)

      3-25: Tighten prop typing for better DX.

      Type children more precisely to avoid any.

      -import { Link } from '@tanstack/solid-router'
      +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-cloudflare/src/utils/seo.ts (1)

      12-33: Avoid emitting meta tags with content: undefined

      Filter tags so only entries with defined content are emitted (while preserving the { title } entry).

      Apply:

      @@
      -  const tags = [
      +  const tags = [
           { title },
           { name: 'description', content: description },
           { name: 'keywords', content: keywords },
      @@
      -  return tags
      +  // Keep { title } and drop meta entries with undefined content
      +  return tags.filter((t) =>
      +    'content' in t ? t.content != null : true,
      +  )
      examples/solid/start-basic-cloudflare/src/routes/users.tsx (1)

      1-17: Consistent imports for shared types

      Elsewhere the project imports User via ~/utils/users. For consistency and easier refactors, consider switching this file to the same alias.

      Apply:

      -import type { User } from '../utils/users'
      +import type { User } from '~/utils/users'
      examples/solid/start-basic-cloudflare/src/routes/__root.tsx (2)

      69-74: Render HeadContent inside

      Head elements should be emitted from within <head>, not <body>.

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

      68-68: Add html lang for a11y

      Set document language.

      -    <html>
      +    <html lang="en">
      examples/solid/start-basic-cloudflare/src/routes/posts.$postId.tsx (1)

      2-2: Use consistent path alias for imports

      Stick to ~ like elsewhere for consistency and TS path mapping.

      -import { fetchPost } from '../utils/posts'
      +import { fetchPost } from '~/utils/posts'
      📜 Review details

      Configuration used: CodeRabbit UI

      Review profile: CHILL

      Plan: Pro

      📥 Commits

      Reviewing files that changed from the base of the PR and between 2fd8de5d87c64dc7084c52a92d5d710d3875a46c and 54139a0a0b7e7cebd44eeaa93e2f8cd52265a3c2.

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

      📄 CodeRabbit inference engine (AGENTS.md)

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

      Files:

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

      📄 CodeRabbit inference engine (AGENTS.md)

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

      Files:

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

      📄 CodeRabbit inference engine (AGENTS.md)

      Place file-based routes under src/routes/ directories

      Files:

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

      📄 CodeRabbit inference engine (AGENTS.md)

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

      Files:

      • examples/solid/start-basic-cloudflare/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-cloudflare/.vscode/settings.json
      • examples/solid/start-basic-cloudflare/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-cloudflare/tsconfig.json
      🧬 Code graph analysis (24)
      examples/solid/start-basic-cloudflare/src/utils/seo.ts (1)
      examples/solid/start-basic/src/utils/seo.ts (1)
      • title (1-33)
      examples/solid/start-basic-cloudflare/src/components/UserError.tsx (2)
      examples/solid/start-basic/src/components/UserError.tsx (1)
      • UserErrorComponent (3-5)
      examples/solid/start-basic-solid-query/src/routes/users.$userId.tsx (1)
      • UserErrorComponent (7-9)
      examples/solid/start-basic-cloudflare/src/routes/deferred.tsx (1)
      examples/solid/start-basic/src/routes/deferred.tsx (1)
      • Deferred (31-62)
      examples/solid/start-basic-cloudflare/src/routes/posts.index.tsx (3)
      examples/solid/start-basic-cloudflare/src/routes/posts_.$postId.deep.tsx (1)
      • Route (5-12)
      examples/solid/start-basic-cloudflare/src/routes/posts.$postId.tsx (1)
      • Route (6-13)
      examples/solid/start-basic-cloudflare/src/routes/posts.tsx (1)
      • Route (4-7)
      examples/solid/start-basic-cloudflare/src/routes/users.index.tsx (3)
      examples/solid/start-basic-cloudflare/src/routes/api/users.ts (1)
      • Route (41-64)
      examples/solid/start-basic-cloudflare/src/routes/posts.index.tsx (1)
      • Route (3-5)
      examples/solid/start-basic-cloudflare/src/routes/users.$userId.tsx (1)
      • Route (6-26)
      examples/solid/start-basic-cloudflare/src/routes/_pathlessLayout/_nested-layout/route-a.tsx (3)
      examples/solid/start-basic-cloudflare/src/routes/_pathlessLayout.tsx (1)
      • Route (3-5)
      examples/solid/start-basic-cloudflare/src/routes/_pathlessLayout/_nested-layout.tsx (1)
      • Route (3-5)
      examples/solid/start-basic-cloudflare/src/routes/_pathlessLayout/_nested-layout/route-b.tsx (1)
      • Route (3-7)
      examples/solid/start-basic-cloudflare/src/routes/users.$userId.tsx (4)
      examples/solid/start-basic-cloudflare/src/routes/api/users.$userId.ts (1)
      • Route (5-33)
      examples/solid/start-basic-cloudflare/src/utils/users.tsx (1)
      • User (1-5)
      examples/solid/start-basic-cloudflare/src/components/UserError.tsx (1)
      • UserErrorComponent (4-6)
      examples/solid/start-basic-cloudflare/src/components/NotFound.tsx (1)
      • NotFound (3-25)
      examples/solid/start-basic-cloudflare/src/components/DefaultCatchBoundary.tsx (3)
      e2e/solid-start/server-routes/src/components/DefaultCatchBoundary.tsx (1)
      • DefaultCatchBoundary (10-53)
      examples/solid/start-basic/src/components/DefaultCatchBoundary.tsx (1)
      • DefaultCatchBoundary (10-53)
      examples/react/start-basic-cloudflare/src/components/DefaultCatchBoundary.tsx (1)
      • DefaultCatchBoundary (10-53)
      examples/solid/start-basic-cloudflare/src/routes/api/users.$userId.ts (3)
      examples/solid/start-basic-cloudflare/src/routes/api/users.ts (1)
      • Route (41-64)
      examples/solid/start-basic-cloudflare/src/routes/users.$userId.tsx (1)
      • Route (6-26)
      examples/solid/start-basic-cloudflare/src/utils/users.tsx (1)
      • User (1-5)
      examples/solid/start-basic-cloudflare/src/routes/_pathlessLayout.tsx (3)
      examples/solid/start-basic-cloudflare/src/routes/_pathlessLayout/_nested-layout.tsx (1)
      • Route (3-5)
      examples/solid/start-basic-cloudflare/src/routes/_pathlessLayout/_nested-layout/route-a.tsx (1)
      • Route (3-7)
      examples/solid/start-basic-cloudflare/src/routes/_pathlessLayout/_nested-layout/route-b.tsx (1)
      • Route (3-7)
      examples/solid/start-basic-cloudflare/src/routes/posts_.$postId.deep.tsx (4)
      examples/solid/start-basic-cloudflare/src/routes/posts.$postId.tsx (1)
      • Route (6-13)
      examples/solid/start-basic-cloudflare/src/utils/posts.tsx (1)
      • fetchPost (10-28)
      examples/solid/start-basic-cloudflare/src/components/PostError.tsx (1)
      • PostErrorComponent (4-6)
      examples/solid/start-basic/src/routes/posts_.$postId.deep.tsx (1)
      • PostDeepComponent (14-26)
      examples/solid/start-basic-cloudflare/src/routes/posts.tsx (2)
      examples/solid/start-basic-cloudflare/src/routes/posts.$postId.tsx (1)
      • Route (6-13)
      examples/solid/start-basic-cloudflare/src/utils/posts.tsx (1)
      • fetchPosts (30-40)
      examples/solid/start-basic-cloudflare/src/routes/users.tsx (3)
      examples/solid/start-basic-cloudflare/src/routes/users.index.tsx (1)
      • Route (3-5)
      examples/solid/start-basic-cloudflare/src/routes/api/users.ts (1)
      • Route (41-64)
      examples/solid/start-basic-cloudflare/src/utils/users.tsx (1)
      • User (1-5)
      examples/solid/start-basic-cloudflare/src/routes/_pathlessLayout/_nested-layout/route-b.tsx (4)
      examples/solid/start-basic-cloudflare/src/routes/_pathlessLayout.tsx (1)
      • Route (3-5)
      examples/solid/start-basic-cloudflare/src/routes/_pathlessLayout/_nested-layout.tsx (1)
      • Route (3-5)
      examples/solid/start-basic-cloudflare/src/routes/_pathlessLayout/_nested-layout/route-a.tsx (1)
      • Route (3-7)
      examples/solid/start-basic-solid-query/src/routes/_pathlessLayout/_nested-layout/route-b.tsx (1)
      • LayoutBComponent (9-11)
      examples/solid/start-basic-cloudflare/src/routes/index.tsx (3)
      examples/solid/start-basic-cloudflare/src/routes/posts.$postId.tsx (1)
      • Route (6-13)
      examples/solid/start-basic-cloudflare/src/routes/posts.tsx (1)
      • Route (4-7)
      examples/solid/start-basic-cloudflare/worker-configuration.d.ts (1)
      • env (7814-7814)
      examples/solid/start-basic-cloudflare/src/routes/customScript[.]js.ts (1)
      examples/solid/start-basic-cloudflare/src/routes/__root.tsx (1)
      • Route (16-64)
      examples/solid/start-basic-cloudflare/src/router.tsx (2)
      examples/solid/start-basic-cloudflare/src/components/DefaultCatchBoundary.tsx (1)
      • DefaultCatchBoundary (10-53)
      examples/solid/start-basic-cloudflare/src/components/NotFound.tsx (1)
      • NotFound (3-25)
      examples/solid/start-basic-cloudflare/src/routes/_pathlessLayout/_nested-layout.tsx (3)
      examples/solid/start-basic-cloudflare/src/routes/_pathlessLayout.tsx (1)
      • Route (3-5)
      examples/solid/start-basic-cloudflare/src/routes/_pathlessLayout/_nested-layout/route-a.tsx (1)
      • Route (3-7)
      examples/solid/start-basic-cloudflare/src/routes/_pathlessLayout/_nested-layout/route-b.tsx (1)
      • Route (3-7)
      examples/solid/start-basic-cloudflare/src/routes/__root.tsx (16)
      examples/solid/start-basic-cloudflare/src/routes/posts_.$postId.deep.tsx (1)
      • Route (5-12)
      examples/solid/start-basic-cloudflare/src/routes/users.index.tsx (1)
      • Route (3-5)
      examples/solid/start-basic-cloudflare/src/routes/_pathlessLayout.tsx (1)
      • Route (3-5)
      examples/solid/start-basic-cloudflare/src/routes/_pathlessLayout/_nested-layout.tsx (1)
      • Route (3-5)
      examples/solid/start-basic-cloudflare/src/routes/_pathlessLayout/_nested-layout/route-a.tsx (1)
      • Route (3-7)
      examples/solid/start-basic-cloudflare/src/routes/_pathlessLayout/_nested-layout/route-b.tsx (1)
      • Route (3-7)
      examples/solid/start-basic-cloudflare/src/routes/customScript[.]js.ts (1)
      • Route (3-15)
      examples/solid/start-basic-cloudflare/src/routes/deferred.tsx (1)
      • Route (18-29)
      examples/solid/start-basic-cloudflare/src/routes/index.tsx (1)
      • Route (5-8)
      examples/solid/start-basic-cloudflare/src/routes/posts.$postId.tsx (1)
      • Route (6-13)
      examples/solid/start-basic-cloudflare/src/routes/posts.index.tsx (1)
      • Route (3-5)
      examples/solid/start-basic-cloudflare/src/routes/posts.tsx (1)
      • Route (4-7)
      examples/solid/start-basic-cloudflare/src/routes/users.$userId.tsx (1)
      • Route (6-26)
      examples/solid/start-basic-cloudflare/src/utils/seo.ts (1)
      • seo (1-33)
      examples/solid/start-basic-cloudflare/src/components/DefaultCatchBoundary.tsx (1)
      • DefaultCatchBoundary (10-53)
      examples/solid/start-basic-cloudflare/src/components/NotFound.tsx (1)
      • NotFound (3-25)
      examples/solid/start-basic-cloudflare/src/routeTree.gen.ts (2)
      e2e/react-router/js-only-file-based/src/routeTree.gen.js (12)
      • PathlessLayoutRoute (21-24)
      • IndexRoute (30-34)
      • PostsIndexRoute (35-39)
      • PostsPostIdRoute (40-44)
      • PathlessLayoutNestedLayoutRoute (45-49)
      • PathlessLayoutNestedLayoutRouteBRoute (50-55)
      • PathlessLayoutNestedLayoutRouteARoute (56-61)
      • PathlessLayoutRouteWithChildren (86-88)
      • PathlessLayoutNestedLayoutRouteWithChildren (77-80)
      • PathlessLayoutNestedLayoutRouteChildren (72-75)
      • PathlessLayoutRouteChildren (82-84)
      • rootRouteChildren (90-94)
      examples/solid/start-basic-cloudflare/src/router.tsx (1)
      • getRouter (6-16)
      examples/solid/start-basic-cloudflare/src/routes/posts.$postId.tsx (4)
      examples/solid/start-basic-cloudflare/src/routes/posts_.$postId.deep.tsx (1)
      • Route (5-12)
      examples/solid/start-basic-cloudflare/src/utils/posts.tsx (1)
      • fetchPost (10-28)
      examples/solid/start-basic-cloudflare/src/components/PostError.tsx (1)
      • PostErrorComponent (4-6)
      examples/solid/start-basic-cloudflare/src/components/NotFound.tsx (1)
      • NotFound (3-25)
      examples/solid/start-basic-cloudflare/src/routes/redirect.tsx (2)
      examples/solid/start-basic-cloudflare/src/routes/posts.index.tsx (1)
      • Route (3-5)
      examples/solid/start-basic-cloudflare/src/routes/posts.tsx (1)
      • Route (4-7)
      examples/solid/start-basic-cloudflare/src/components/NotFound.tsx (3)
      examples/solid/start-basic-solid-query/src/components/NotFound.tsx (1)
      • NotFound (3-25)
      e2e/solid-start/server-routes/src/components/NotFound.tsx (1)
      • NotFound (3-25)
      examples/solid/start-basic/src/components/NotFound.tsx (1)
      • NotFound (3-25)
      examples/solid/start-basic-cloudflare/src/routes/api/users.ts (3)
      packages/start-server-core/src/request-response.ts (1)
      • getRequestHeaders (77-80)
      examples/solid/start-basic-cloudflare/src/routes/api/users.$userId.ts (1)
      • Route (5-33)
      examples/solid/start-basic-cloudflare/src/utils/users.tsx (1)
      • User (1-5)
      🪛 Biome (2.1.2)
      examples/solid/start-basic-cloudflare/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). (2)
      • GitHub Check: Test
      • GitHub Check: Preview
      🔇 Additional comments (28)
      examples/solid/start-basic-cloudflare/.gitignore (1)

      1-6: Appropriate .gitignore patterns for a Solid Start + Cloudflare example.

      The entries correctly exclude build outputs (dist), caches (.cache), environment files (.env), Wrangler CLI state (.wrangler), Node dependencies, and system files. This is a well-chosen set for the example project.

      examples/solid/start-basic-cloudflare/.prettierignore (1)

      1-4: LGTM! Appropriate ignore patterns.

      The ignore patterns correctly exclude generated files (routeTree.gen.ts, worker-configuration.d.ts), lock files, and public directories from formatting.

      examples/solid/start-basic-cloudflare/README.md (1)

      1-43: LGTM! Clear and comprehensive documentation.

      The README provides all necessary commands and helpful context about accessing Cloudflare bindings. The import pattern import { env } from 'cloudflare:workers' is correct for Cloudflare Workers.

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

      1-9: LGTM! Correct redirect implementation.

      The route correctly uses the beforeLoad hook with throw redirect() to perform navigation, which is the proper pattern for TanStack Router.

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

      1-11: LGTM! Appropriate settings for generated files.

      These settings correctly treat the autogenerated routeTree.gen.ts as readonly and exclude it from watching and search, which prevents accidental modifications and improves editor performance. Based on learnings.

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

      1-18: LGTM! Proper Tailwind setup with theme support.

      The Tailwind directives and custom base layer correctly configure light/dark mode theming with appropriate color schemes.

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

      1-16: LGTM! Correct pathless layout implementation.

      The route correctly uses the underscore prefix convention for pathless layouts and properly renders nested routes via the Outlet component.

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

      1-4: LGTM! Proper Tailwind configuration.

      The configuration correctly specifies the content paths for Tailwind to scan, and includes proper JSDoc type annotation for IDE support.

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

      1-6: LGTM!

      The PostCSS configuration is correct and follows standard practices for integrating Tailwind CSS and Autoprefixer. The empty configuration objects will use the default settings from both plugins.

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

      1-11: LGTM!

      The route definition follows the correct file-based routing pattern for TanStack Router. The path string matches the file location, and the component implementation is straightforward.

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

      1-23: LGTM!

      The TypeScript configuration is well-structured with strict mode enabled, proper Solid.js JSX settings, and appropriate module resolution for a Vite-based project. The path alias configuration aligns with the vite-tsconfig-paths plugin usage.

      As per coding guidelines.

      examples/solid/start-basic-cloudflare/vite.config.ts (1)

      7-19: Plugin order looks correct for Solid Start + Cloudflare SSR.

      The configuration properly sequences:

      1. Path resolution (tsConfigPaths)
      2. Environment setup (cloudflare)
      3. Framework integration (tanstackStart, viteSolid)

      This order ensures that path aliases are resolved first, then the Cloudflare SSR environment is configured, and finally the Solid.js and TanStack Start transformations are applied.

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

      7-16: LGTM!

      The use of a regular <a> tag for the API endpoint link is correct. Since /api/users is an API route that returns JSON (not a client-side route), a standard anchor tag is appropriate for triggering the browser to fetch and potentially display/download the JSON response.

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

      1-11: LGTM!

      The route definition correctly follows the file-based routing pattern, consistent with the sibling route-a.tsx file. The implementation is clean and straightforward.

      examples/solid/start-basic-cloudflare/src/routes/deferred.tsx (3)

      5-16: Server functions defined correctly.

      The server functions properly use createServerFn with input validators and handlers. The slowServerFn appropriately simulates async work with a 1-second delay, which is useful for demonstrating deferred data loading.


      18-29: Loader correctly demonstrates deferred data loading.

      The loader returns a mix of immediately resolved data (person) and deferred promises (deferredStuff, deferredPerson), which effectively demonstrates streaming SSR capabilities with Solid Start.


      40-55: Biome lint warnings are false positives for Solid.js.

      The static analysis tool (Biome) flags the children prop usage in the Await component, but this is a React-specific rule. In Solid.js, the Await component correctly accepts a children prop as a render function, which is the idiomatic pattern for this framework.

      The Suspense/Await implementation is correct for Solid.js and properly handles the deferred data loading with appropriate fallback states.

      examples/solid/start-basic-cloudflare/src/utils/loggingMiddleware.tsx (2)

      3-26: LGTM! Context passing is correctly implemented.

      The preLogMiddleware properly captures timing data on both client and server phases:

      • Client phase: records clientTime and sends it to the server via sendContext
      • Server phase: records serverTime, calculates durationToServer, and sends both back via sendContext

      The use of sendContext ensures timing data flows correctly across the client-server boundary.


      28-41: LGTM! Middleware composition and timing logic are correct.

      The logMiddleware effectively:

      1. Composes preLogMiddleware to gather timing data
      2. Waits for the complete request/response cycle
      3. Calculates and logs three useful metrics:
        • Total round-trip duration
        • Client-to-server latency
        • Server-to-client latency

      This provides valuable performance insights for debugging SSR applications.

      examples/solid/start-basic-cloudflare/src/components/PostError.tsx (1)

      4-6: LGTM — simple, correct passthrough wrapper.

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

      3-5: LGTM — index route wiring looks correct.

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

      4-6: LGTM — consistent with PostErrorComponent.

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

      6-16: LGTM — router factory is well-configured for SSR (new instance per call).

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

      4-38: LGTM

      Loader wiring, link params, and UI rendering look correct for the example.

      examples/solid/start-basic-cloudflare/src/utils/posts.tsx (1)

      10-28: Looks solid

      Server fns, typing, and notFound handling are correct and consistent with usage in routes.

      Also applies to: 30-40

      examples/solid/start-basic-cloudflare/src/routes/api/users.ts (1)

      45-61: GET handler is straightforward and OK

      Fetch, sanitize, and respond with json; headers from middleware applied. Nice.

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

      7-10: Autogenerated file — no manual review

      routeTree.gen.ts is generated and should not be edited; skipping review. Based on learnings.

      examples/solid/start-basic-cloudflare/src/routes/__root.tsx (1)

      33-50: All favicon and manifest assets are present—no action needed

      Verification confirms that apple-touch-icon.png, favicon-32x32.png, favicon-16x16.png, and site.webmanifest all exist in examples/solid/start-basic-cloudflare/public/. No 404 risks.

      OutdatedResolvedby coderabbitai[bot](GitHub profile, opens in a new tab)
      examples/solid/start-basic-cloudflare/src/routes/__root.tsx lines 26 to 31Outdated
      @@ -0,0 +11,21 @@
      11+import { DefaultCatchBoundary } from '~/components/DefaultCatchBoundary'
      12+import { NotFound } from '~/components/NotFound'
      13+import appCss from '~/styles/app.css?url'
      14+import { seo } from '~/utils/seo'
      15+
      16+export const Route = createRootRoute({
      17+ head: () => ({
      18+ meta: [
      19+ {
      20+ charset: 'utf-8',
      21+ },
      22+ {
      23+ name: 'viewport',
      24+ content: 'width=device-width, initial-scale=1',
      25+ },
      26+ ...seo({
      27+ title:
      28+ 'TanStack Start | Type-Safe, Client-First, Full-Stack React Framework',
      29+ description: `TanStack Start is a type-safe, client-first, full-stack React framework. `,
      30+ }),
      31+ ],

      ⚠️ Potential issue | 🟡 Minor

      Align SEO text with Solid Start + Cloudflare example

      Title/description mention “React framework” but this example is Solid Start on Cloudflare. Update copy.

      Apply:

      -      ...seo({
      -        title:
      -          'TanStack Start | Type-Safe, Client-First, Full-Stack React Framework',
      -        description: `TanStack Start is a type-safe, client-first, full-stack React framework. `,
      -      }),
      +      ...seo({
      +        title: 'TanStack Router + Solid Start (Cloudflare)',
      +        description: 'Example Solid Start app using TanStack Router on Cloudflare Workers.',
      +      }),
      📝 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.

            ...seo({
              title: 'TanStack Router + Solid Start (Cloudflare)',
              description: 'Example Solid Start app using TanStack Router on Cloudflare Workers.',
            }),
          ],
      🤖 Prompt for AI Agents
      In examples/solid/start-basic-cloudflare/src/routes/__root.tsx around lines 26
      to 31, the SEO title and description incorrectly reference "React framework";
      update them to mention "Solid Start" and Cloudflare instead. Replace the title
      with wording like "Start | Type-Safe, Client-First, Full-Stack Solid Start on
      Cloudflare" and change the description to describe Solid Start on Cloudflare
      (e.g., "Solid Start is a type-safe, client-first, full-stack framework running
      on Cloudflare."). Ensure messaging consistently references Solid Start and
      Cloudflare rather than React.
      examples/solid/start-basic-cloudflare/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

      Fix manifest link: invalid attribute and hex

      color isn’t valid on a manifest link, and #fffff is not a valid hex code. Remove color here and add a proper theme-color meta.

      -      { rel: 'manifest', href: '/site.webmanifest', color: '#fffff' },
      +      { rel: 'manifest', href: '/site.webmanifest' },

      Also add in meta:

             ...seo({
               title: 'TanStack Router + Solid Start (Cloudflare)',
               description: 'Example Solid Start app using TanStack Router on Cloudflare Workers.',
             }),
      +      { name: 'theme-color', content: '#ffffff' },
      📝 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.

            { rel: 'manifest', href: '/site.webmanifest' },
            { rel: 'icon', href: '/favicon.ico' },
          ],
      🤖 Prompt for AI Agents
      In examples/solid/start-basic-cloudflare/src/routes/__root.tsx around lines 51
      to 53, the <link rel="manifest"> entry incorrectly includes a nonstandard color
      attribute and an invalid hex value; remove the color property from the manifest
      link and instead add a proper <meta name="theme-color" content="#ffffff"> (or
      another valid 6‑digit hex) in the document head; ensure the manifest link only
      includes rel and href and that the theme-color meta is added to the meta array.
      examples/solid/start-basic-cloudflare/src/routes/_pathlessLayout/_nested-layout.tsx lines 12 to 21Outdated
      @@ -0,0 +1,21 @@
      1+import { Link, Outlet, createFileRoute } from '@tanstack/solid-router'
      2+
      3+export const Route = createFileRoute('/_pathlessLayout/_nested-layout')({
      4+ component: LayoutComponent,
      5+})
      6+
      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"

      ⚠️ Potential issue | 🔴 Critical

      Broken navigation: links point to non-existent paths

      to="/route-a" and to="/route-b" won’t match the defined nested routes. Use relative targets under the nested layout.

      Apply:

      -        <Link
      -          to="/route-a"
      +        <Link
      +          to="./route-a"
      @@
      -        <Link
      -          to="/route-b"
      +        <Link
      +          to="./route-b"
      📝 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.

              <Link
                to="./route-a"
                activeProps={{
                  class: 'font-bold',
                }}
              >
                Go to route A
              </Link>
              <Link
                to="./route-b"
      🤖 Prompt for AI Agents
      In
      examples/solid/start-basic-cloudflare/src/routes/_pathlessLayout/_nested-layout.tsx
      around lines 12 to 21, the Link components use absolute targets (to="/route-a"
      and to="/route-b") that do not match the nested routes; change them to relative
      targets under the nested layout by replacing the leading slash with a relative
      path (e.g., to="./route-a" and to="./route-b" or to="route-a" depending on
      router conventions) so the links resolve to the nested routes.
      examples/solid/start-basic-cloudflare/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

      Handle invalid IDs, distinguish 404 vs 5xx, and guard the response shape

      Right now, non-numeric IDs and upstream non-404 failures both become 404s, and an empty JSON response could return undefined fields. Tighten validation and error mapping.

      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 user id=${params.userId} @`, request.url)
      +        try {
      +          const id = Number(params.userId)
      +          if (!Number.isInteger(id) || id <= 0) {
      +            return json({ error: 'Invalid user id' }, { status: 400 })
      +          }
      +
      +          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) {
      +            throw new Error(`Upstream error: ${res.status}`)
      +          }
      +
      +          const user = (await res.json()) as unknown as User
      +          if (!user || typeof (user as { id?: unknown }).id !== 'number') {
      +            return json({ error: 'User not found' }, { status: 404 })
      +          }
      +
      +          return json({
      +            id: user.id,
      +            name: user.name,
      +            email: user.email,
      +          })
      +        } catch (e) {
      +          console.error('GET /api/users/:id failed', e)
      +          return json({ error: 'Internal server error' }, { status: 500 })
      +        }
      +      },

      Additionally, consider using a consistent import path for User (e.g., ~/utils/users) across files.

      🤖 Prompt for AI Agents
      In examples/solid/start-basic-cloudflare/src/routes/api/users.$userId.ts around
      lines 8 to 29, validate params.userId (return json error 400 if missing or not a
      positive integer), map upstream fetch status: if res.status === 404 return
      json({ error: 'User not found' }, { status: 404 }), if res.ok is false for other
      statuses return json({ error: 'Upstream error' }, { status: 502 }), and wrap
      parsing by checking the parsed object has required fields (id, name, email)
      before returning them—otherwise return json({ error: 'Invalid user data' }, {
      status: 502 }); also catch and log exceptions and return a 500 on unexpected
      errors. Finally, use the consistent import path for the User type (e.g., import
      { User } from '~/utils/users') across files.
      examples/solid/start-basic-cloudflare/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 | 🟡 Minor

      Avoid logging full request headers in production

      Header logs can include sensitive info. Gate behind DEV or reduce.

      -  console.info('In: /users')
      -  console.info('Request Headers:', getRequestHeaders())
      +  console.info('In: /users')
      +  if (import.meta.env?.DEV) {
      +    console.info('Request Headers:', getRequestHeaders())
      +  }
      📝 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.

      const userLoggerMiddleware = createMiddleware().server(async ({ next }) => {
        console.info('In: /users')
        if (import.meta.env?.DEV) {
          console.info('Request Headers:', getRequestHeaders())
        }
        const result = await next()
        result.response.headers.set('x-users', 'true')
        console.info('Out: /users')
        return result
      })
      🤖 Prompt for AI Agents
      In examples/solid/start-basic-cloudflare/src/routes/api/users.ts around lines 6
      to 13, the middleware is logging full request headers which can expose sensitive
      data; update the middleware to avoid logging all headers in production by gating
      header logging behind a development-only check (e.g., NODE_ENV === 'development'
      or app config), or instead log a safe subset (non-sensitive headers) or a
      redacted representation of headers; implement the gate/redaction so that in
      non-dev environments no full headers are printed.
      examples/solid/start-basic-cloudflare/src/routes/index.tsx lines 2 to 15Outdated
      @@ -0,0 +1,15 @@
      1+import { createFileRoute } from '@tanstack/solid-router'
      2+import { createServerFn } from '@tanstack/solid-start'
      3+import { env } from 'cloudflare:workers'
      4+
      5+export const Route = createFileRoute('/')({
      6+ loader: () => getData(),
      7+ component: Home,
      8+})
      9+
      10+const getData = createServerFn().handler(() => {
      11+ return {
      12+ message: `Running in ${navigator.userAgent}`,
      13+ myVar: env.MY_VAR,
      14+ }
      15+})

      ⚠️ Potential issue | 🔴 Critical

      Fix server crash: navigator is undefined on Cloudflare Workers; also import env only on the server

      createServerFn().handler runs on the server. navigator doesn’t exist in Workers and will throw. Also, importing cloudflare:workers at module scope can pull it into client builds.

      Apply:

      @@
      -import { createServerFn } from '@tanstack/solid-start'
      -import { env } from 'cloudflare:workers'
      +import { createServerFn } from '@tanstack/solid-start'
      @@
      -const getData = createServerFn().handler(() => {
      -  return {
      -    message: `Running in ${navigator.userAgent}`,
      -    myVar: env.MY_VAR,
      -  }
      -})
      +const getData = createServerFn().handler(async () => {
      +  // Import server-only binding inside the server function to avoid client bundling.
      +  const { env } = await import('cloudflare:workers')
      +  return {
      +    // Guard navigator access for server runtime
      +    message: `Running in ${globalThis.navigator?.userAgent ?? 'Cloudflare Worker'}`,
      +    myVar: env.MY_VAR,
      +  }
      +})

      This prevents server crashes and keeps the cloudflare:workers import out of client bundles.

      🤖 Prompt for AI Agents
      In examples/solid/start-basic-cloudflare/src/routes/index.tsx around lines 2 to
      15, the server handler currently uses navigator.userAgent (which doesn't exist
      in Cloudflare Workers) and imports cloudflare:workers at module scope (which can
      leak into client bundles); to fix, remove the top-level import of env, instead
      dynamically import or require the cloudflare:workers module inside the server
      handler (e.g., await import('cloudflare:workers')) so env is only referenced at
      runtime on the server, and replace direct navigator access with a safe fallback
      (use typeof navigator !== 'undefined' ? navigator.userAgent : request headers or
      a fallback string obtained inside the handler) so the handler never throws in
      Workers.
      OutdatedResolvedby coderabbitai[bot](GitHub profile, opens in a new tab)
      examples/solid/start-basic-cloudflare/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

      Fix import aliases to match project config

      Use ~ alias (or consistent baseUrl) to avoid resolution failures.

      -import { NotFound } from 'src/components/NotFound'
      -import { UserErrorComponent } from 'src/components/UserError'
      +import { NotFound } from '~/components/NotFound'
      +import { UserErrorComponent } from '~/components/UserError'
      🤖 Prompt for AI Agents
      In examples/solid/start-basic-cloudflare/src/routes/users.$userId.tsx around
      lines 2 to 3, the imports use 'src/...' which doesn't match the project's '~'
      path alias; update the import specifiers to use the alias (e.g. import {
      NotFound } from '~/components/NotFound' and import { UserErrorComponent } from
      '~/components/UserError') or alternatively ensure tsconfig/jsconfig
      baseUrl/paths are configured consistently for 'src' if you prefer that pattern
      so the resolver matches the project's alias configuration.
      examples/solid/start-basic-cloudflare/src/routes/users.$userId.tsx lines 6 to 20Outdated
      @@ -0,0 +1,20 @@
      1+import { createFileRoute } from '@tanstack/solid-router'
      2+import { NotFound } from 'src/components/NotFound'
      3+import { UserErrorComponent } from 'src/components/UserError'
      4+import type { User } from '../utils/users'
      5+
      6+export const Route = createFileRoute('/users/$userId')({
      7+ loader: async ({ params: { userId } }) => {
      8+ try {
      9+ const res = await fetch('/api/users/' + userId)
      10+ if (!res.ok) {
      11+ throw new Error('Unexpected status code')
      12+ }
      13+
      14+ const data = await res.json()
      15+
      16+ return data as User
      17+ } catch {
      18+ throw new Error('Failed to fetch user')
      19+ }
      20+ },

      🛠️ Refactor suggestion | 🟠 Major

      Return notFound on 404 to trigger notFoundComponent

      Currently all failures throw a generic Error, bypassing notFoundComponent. Map 404 to notFound().

      -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

      ‼️ 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 { createFileRoute, notFound } from '@tanstack/solid-router'
      
      export const Route = createFileRoute('/users/$userId')({
        loader: async ({ params: { userId } }) => {
          try {
            const res = await fetch('/api/users/' + userId)
            if (!res.ok) {
              if (res.status === 404) {
                throw notFound()
              }
              throw new Error('Unexpected status code')
            }
      
            const data = await res.json()
      
            return data as User
          } catch {
            throw new Error('Failed to fetch user')
          }
        },
      🤖 Prompt for AI Agents
      In examples/solid/start-basic-cloudflare/src/routes/users.$userId.tsx around
      lines 6 to 20, the loader currently throws a generic Error for all failures
      which bypasses the route's notFoundComponent; update the loader so that after
      the fetch you check res.status (or res.ok) and if res.status === 404 call and
      return notFound() instead of throwing, otherwise for other non-ok statuses throw
      a descriptive Error; also ensure notFound is imported from your
      routing/framework module at the top of the file.
      OutdatedResolvedby coderabbitai[bot](GitHub profile, opens in a new tab)
      examples/solid/start-basic-cloudflare/src/styles/app.css lines 19 to 21Outdated
      @@ -0,0 +1,21 @@
      1+@tailwind base;
      2+@tailwind components;
      3+@tailwind utilities;
      4+
      5+@layer base {
      6+ html {
      7+ color-scheme: light dark;
      8+ }
      9+
      10+ * {
      11+ @apply border-gray-200 dark:border-gray-800;
      12+ }
      13+
      14+ html,
      15+ body {
      16+ @apply text-gray-900 bg-gray-50 dark:bg-gray-950 dark:text-gray-200;
      17+ }
      18+
      19+ .using-mouse * {
      20+ outline: none !important;
      21+ }

      ⚠️ Potential issue | 🟠 Major

      Accessibility concern: blanket outline removal harms keyboard navigation.

      Removing all outlines with outline: none !important prevents keyboard users from seeing focus indicators, which is a WCAG violation. Consider using :focus-visible to remove outlines only when appropriate, or implement custom focus styles instead.

      Apply this diff to use a more accessible approach:

      -  .using-mouse * {
      -    outline: none !important;
      -  }
      +  .using-mouse *:focus:not(:focus-visible) {
      +    outline: none;
      +  }

      This removes outlines only when focus is applied via mouse (not keyboard), without using !important.

      📝 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.

        .using-mouse *:focus:not(:focus-visible) {
          outline: none;
        }
      🤖 Prompt for AI Agents
      In examples/solid/start-basic-cloudflare/src/styles/app.css around lines 19-21,
      the rule ".using-mouse * { outline: none !important; }" removes focus outlines
      for all users; change it to only suppress outlines for elements focused via
      mouse and remove the !important, e.g. target focused elements that are not
      focus-visible by replacing the selector with ".using-mouse
      *:focus:not(:focus-visible) { outline: none; }" and add or ensure an accessible
      custom focus style for :focus-visible so keyboard users retain a clear focus
      indicator.
      examples/solid/start-basic-cloudflare/wrangler.jsonc lines 1 to 10Outdated
      @@ -0,0 +1,10 @@
      1+{
      2+ "$schema": "node_modules/wrangler/config-schema.json",
      3+ "name": "tanstack-start-app",
      4+ "compatibility_date": "2025-09-24",
      5+ "compatibility_flags": ["nodejs_compat"],
      6+ "main": "@tanstack/solid-start/server-entry",
      7+ "vars": {
      8+ "MY_VAR": "Hello from Cloudflare",
      9+ },
      10+}

      ⚠️ Potential issue | 🔴 Critical

      🧩 Analysis chain

      Please verify Wrangler format, entry point, and flags.

      • Confirm that your Wrangler version supports wrangler.jsonc (JSONC with trailing commas). If not, switch to wrangler.json (remove trailing commas) or wrangler.toml.
      • Ensure "main" = "@tanstack/solid-start/server-entry" is the intended Worker entry for this example; some setups point "main" to the built worker file instead.
      • Double‑check whether "nodejs_compat" is still the correct flag for your chosen compatibility_date.

      You can run a quick web check for the latest guidance:

      Optionally, consider a more specific name than "tanstack-start-app" to avoid collisions when deploying multiple examples.


      🌐 Web query:

      Does Cloudflare Wrangler support wrangler.jsonc, and is nodejs_compat still valid as of October 2025? For Solid Start on Cloudflare Workers, what should the wrangler "main" entry point be?

      💡 Result:

      Short answers:

      • Yes — Wrangler supports wrangler.jsonc (Wrangler v3.91.0+; Cloudflare recommends wrangler.jsonc for new projects). [1]

      • Yes — the nodejs_compat / nodejs compatibility flag is still a valid compatibility flag (shown in Cloudflare docs and examples for Workers/Pages and framework guides). [2][3]

      • For Solid Start on Cloudflare Workers, point Wrangler's "main" at the built server entry — typically .output/server/index.mjs (most SolidStart builds produce .output/server/index.mjs as the Worker entry). Use that path as "main" in wrangler.jsonc. [3][4]

      Sources:

      1. Cloudflare Wrangler configuration docs (wrangler.jsonc support). [developers.cloudflare.com — Configuration].
      2. Cloudflare Pages/Workers docs showing compatibility_flags / nodejs_compat usage. [developers.cloudflare.com — Pages/Functions & config].
      3. Framework guides / examples (SolidStart / server builds and example wrangler main = .output/server/index.mjs). [developers.cloudflare.com framework guides / SolidStart examples / Sentry SolidStart docs].

      Fix "main" entry point — should reference the built server output, not the package entry.

      The wrangler.jsonc format and nodejs_compat flag are correct. However, the "main" field is incorrect:

      • Current: "main": "@tanstack/solid-start/server-entry" (package entry point)
      • Should be: "main": ".output/server/index.mjs" (or the actual built output path from your SolidStart build)

      For Solid Start on Cloudflare Workers, Wrangler's "main" should point to the built server entry — typically .output/server/index.mjs produced after the build.

      Optionally, consider a more specific app name than "tanstack-start-app" to avoid collisions when deploying multiple examples.

      🤖 Prompt for AI Agents
      In examples/solid/start-basic-cloudflare/wrangler.jsonc around lines 1 to 10,
      the "main" field incorrectly points to the package entry
      "@tanstack/solid-start/server-entry" instead of the built server output; update
      "main" to reference the Solid Start build output (for example
      ".output/server/index.mjs" or the actual path your build produces) so Wrangler
      loads the built server entry at deploy time, and optionally rename "name" from
      "tanstack-start-app" to a more specific app name to avoid deployment collisions.
    5. Actionable comments posted: 1

      ♻️ Duplicate comments (1)
      examples/solid/start-basic-cloudflare/src/components/DefaultCatchBoundary.tsx (1)

      19-51: LGTM! Past issue resolved.

      The JSX structure correctly calls isRoot() as a function on line 31, addressing the previous review comment. The implementation is consistent with other examples in the codebase and follows Solid.js patterns correctly.

      🧹 Nitpick comments (1)
      examples/solid/start-basic-cloudflare/src/routes/posts_.$postId.deep.tsx (1)

      6-6: Consider removing redundant async keyword.

      Since fetchPost already returns a Promise, the async keyword is unnecessary. For consistency with posts.$postId.tsx (shown in relevant snippets), consider removing it.

      Apply this diff:

      -  loader: async ({ params: { postId } }) =>
      +  loader: ({ params: { postId } }) =>
           fetchPost({
             data: postId,
           }),
      📜 Review details

      Configuration used: CodeRabbit UI

      Review profile: CHILL

      Plan: Pro

      📥 Commits

      Reviewing files that changed from the base of the PR and between 54139a0a0b7e7cebd44eeaa93e2f8cd52265a3c2 and eee3e7889f931d89721a28e4e37182a82b159719.

      📒 Files selected for processing (4)
      • examples/solid/start-basic-cloudflare/src/components/DefaultCatchBoundary.tsx (1 hunks)
      • examples/solid/start-basic-cloudflare/src/routes/index.tsx (1 hunks)
      • examples/solid/start-basic-cloudflare/src/routes/posts_.$postId.deep.tsx (1 hunks)
      • examples/solid/start-basic-cloudflare/src/routes/users.$userId.tsx (1 hunks)
      🚧 Files skipped from review as they are similar to previous changes (2)
      • examples/solid/start-basic-cloudflare/src/routes/index.tsx
      • examples/solid/start-basic-cloudflare/src/routes/users.$userId.tsx
      🧰 Additional context used
      📓 Path-based instructions (3)
      **/*.{ts,tsx}

      📄 CodeRabbit inference engine (AGENTS.md)

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

      Files:

      • examples/solid/start-basic-cloudflare/src/routes/posts_.$postId.deep.tsx
      • examples/solid/start-basic-cloudflare/src/components/DefaultCatchBoundary.tsx
      **/src/routes/**

      📄 CodeRabbit inference engine (AGENTS.md)

      Place file-based routes under src/routes/ directories

      Files:

      • examples/solid/start-basic-cloudflare/src/routes/posts_.$postId.deep.tsx
      examples/{react,solid}/**

      📄 CodeRabbit inference engine (AGENTS.md)

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

      Files:

      • examples/solid/start-basic-cloudflare/src/routes/posts_.$postId.deep.tsx
      • examples/solid/start-basic-cloudflare/src/components/DefaultCatchBoundary.tsx
      🧬 Code graph analysis (2)
      examples/solid/start-basic-cloudflare/src/routes/posts_.$postId.deep.tsx (3)
      examples/solid/start-basic-cloudflare/src/routes/posts.$postId.tsx (1)
      • Route (6-13)
      examples/solid/start-basic-cloudflare/src/utils/posts.tsx (1)
      • fetchPost (10-28)
      examples/solid/start-basic-cloudflare/src/components/PostError.tsx (1)
      • PostErrorComponent (4-6)
      examples/solid/start-basic-cloudflare/src/components/DefaultCatchBoundary.tsx (3)
      e2e/solid-start/server-routes/src/components/DefaultCatchBoundary.tsx (1)
      • DefaultCatchBoundary (10-53)
      examples/solid/start-basic-solid-query/src/components/DefaultCatchBoundary.tsx (1)
      • DefaultCatchBoundary (10-53)
      examples/solid/start-basic/src/components/DefaultCatchBoundary.tsx (1)
      • DefaultCatchBoundary (10-53)
      ⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
      • GitHub Check: Test
      🔇 Additional comments (3)
      examples/solid/start-basic-cloudflare/src/components/DefaultCatchBoundary.tsx (2)

      1-8: LGTM!

      Imports are clean and properly organized with correct type annotations.


      10-15: LGTM!

      Component setup and hook usage follow Solid.js patterns correctly. The useMatch hook is properly configured with a select function that returns a boolean accessor.

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

      14-26: LGTM! Previous signal accessor bug has been fixed.

      The component correctly invokes post() as an accessor before accessing .title and .body (lines 22-23). This is the proper pattern for Solid.js signals returned by useLoaderData().

      examples/solid/start-basic-cloudflare/src/routes/posts_.$postId.deep.tsx line 5
      @@ -0,0 +1,5 @@
      1+import { Link, createFileRoute } from '@tanstack/solid-router'
      2+import { fetchPost } from '../utils/posts'
      3+import { PostErrorComponent } from '~/components/PostError'
      4+
      5+export const Route = createFileRoute('/posts_/$postId/deep')({

      ⚠️ Potential issue | 🔴 Critical

      🧩 Analysis chain

      Verify the route path underscore is intentional.

      The route path /posts_/$postId/deep includes an underscore, creating URLs like /posts_/123/deep. If the intended path is /posts/$postId/deep, the filename should be posts.$postId.deep.tsx (without the underscore).

      Run the following script to check for related route patterns:


      🏁 Script executed:

      #!/bin/bash
      # Description: Check for posts route patterns to verify if underscore is intentional
      
      # Find all posts-related route files
      fd -e tsx -e ts 'posts' examples/solid/start-basic-cloudflare/src/routes/
      
      # Search for route definitions and Link components referencing posts paths
      rg -n --type=tsx --type=ts -C2 "to=\"/posts" examples/solid/start-basic-cloudflare/

      Length of output: 291


      I need to verify the file contents and check how this route is referenced in the codebase. The rg search had a syntax issue, so let me try with corrected commands.


      🏁 Script executed:

      #!/bin/bash
      # View the actual file to understand the route definition and check for intent
      echo "=== File content of posts_.$postId.deep.tsx ==="
      cat examples/solid/start-basic-cloudflare/src/routes/posts_.$postId.deep.tsx
      
      echo -e "\n=== File content of posts.$postId.tsx for comparison ==="
      cat examples/solid/start-basic-cloudflare/src/routes/posts.$postId.tsx
      
      echo -e "\n=== Search for references to /posts_ or /posts/ routes ==="
      rg -n "posts" examples/solid/start-basic-cloudflare/src/ --type tsx -C2 | head -60

      Length of output: 369


      🏁 Script executed:

      #!/bin/bash
      # Use proper quoting to handle filenames with special characters
      
      echo "=== File content of posts_.\$postId.deep.tsx ==="
      cat 'examples/solid/start-basic-cloudflare/src/routes/posts_.$postId.deep.tsx'
      
      echo -e "\n=== File content of posts.\$postId.tsx for comparison ==="
      cat 'examples/solid/start-basic-cloudflare/src/routes/posts.$postId.tsx'
      
      echo -e "\n=== Search for Link/navigation references to posts routes ==="
      rg -n "posts" examples/solid/start-basic-cloudflare/src/ -C2 2>/dev/null | head -80
      
      echo -e "\n=== Check if underscore route is referenced anywhere ==="
      rg -n "posts_" examples/solid/start-basic-cloudflare/src/ 2>/dev/null || echo "No references to posts_ found"

      Length of output: 10391


      Fix accessor pattern for loader data: use post().title and post().body instead of post.title and post.body.

      On lines 22-23, the code accesses post.title and post.body directly. However, the loader returns data that should be accessed as a function (like posts.$postId.tsx does with post().title). Both routes use the same fetchPost function, so the accessor pattern should be consistent.

      -      <h4 class="text-xl font-bold underline">{post.title}</h4>
      -      <div class="text-sm">{post.body}</div>
      +      <h4 class="text-xl font-bold underline">{post().title}</h4>
      +      <div class="text-sm">{post().body}</div>

      Note: The underscore in the filename posts_.$postId.deep.tsx is intentional—TanStack Router generates the route ID as /posts_/$postId/deep for internal tracking, but the actual URL path is /posts/$postId/deep (without underscore), which is correct.

      🤖 Prompt for AI Agents
      In examples/solid/start-basic-cloudflare/src/routes/posts_.$postId.deep.tsx (see
      around lines 22-23), the loader data is being accessed as properties (post.title
      and post.body) but should use the accessor function pattern; change post.title
      to post().title and post.body to post().body so the component calls the loader
      accessor function like the other route that uses fetchPost.

Sign in to join this conversation.