docs(solid-start): start-basic-cloudflare example #5567
main fromrefs/pull/5567/head·merged 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
View your CI Pipeline Execution ↗ for commit 3550bf76ed72e88800f8bb822d780ccef9a701ed
Command Status Duration Result nx affected --targets=test:eslint,test:unit,tes...✅ Succeeded 49s View ↗ nx run-many --target=build --exclude=examples/*...✅ Succeeded 3s View ↗
☁️ Nx Cloud last updated this comment at
2025-10-21 15:26:20UTCMore templates
- tanstack-router-solid-example-basic
- tanstack-router-solid-example-basic-devtools-panel
- tanstack-router-solid-example-basic-file-based
- tanstack-router-solid-example-basic-non-nested-devtools
- tanstack-router-solid-example-basic-solid-query
- tanstack-router-solid-example-basic-solid-query-file-based
- tanstack-router-solid-example-basic-ssr-streaming-file-based
- tanstack-router-solid-example-kitchen-sink-file-based
- tanstack-router-solid-example-kitchen-sink-solid-query
- tanstack-router-solid-example-kitchen-sink-solid-query-file-based
- tanstack-router-solid-example-quickstart-file-based
- tanstack-solid-start-example-bare
- tanstack-solid-start-example-basic
- tanstack-solid-start-example-basic-auth
- tanstack-solid-start-example-basic-cloudflare
- tanstack-start-example-basic-solid-query
- tanstack-solid-start-example-basic-static
- tanstack-router-react-example-authenticated-routes
- tanstack-router-react-example-authenticated-routes-firebase
- tanstack-router-react-example-basic
- tanstack-router-react-example-basic-default-search-params
- tanstack-router-react-example-basic-devtools-panel
- tanstack-router-react-example-basic-file-based
- tanstack-router-react-example-basic-non-nested-devtools
- tanstack-router-react-example-react-query
- tanstack-router-react-example-basic-react-query-file-based
- tanstack-router-react-example-basic-ssr-file-based
- tanstack-router-react-example-basic-ssr-streaming-file-based
- tanstack-router-react-example-basic-virtual-file-based
- tanstack-router-react-example-basic-virtual-inside-file-based
- tanstack-router-react-example-deferred-data
- tanstack-router-i18n-paraglide
- tanstack-router-react-example-kitchen-sink
- tanstack-router-react-example-kitchen-sink-file-based
- tanstack-router-react-example-kitchen-sink-react-query
- tanstack-router-react-example-kitchen-sink-react-query-file-based
- tanstack-router-react-example-large-file-based
- tanstack-router-react-example-location-masking
- tanstack-router-react-example-navigation-blocking
- tanstack-router-react-example-quickstart
- tanstack-router-react-example-quickstart-esbuild-file-based
- tanstack-router-react-example-quickstart-file-based
- tanstack-router-react-example-quickstart-rspack-file-based
- tanstack-router-react-example-quickstart-webpack-file-based
- router-monorepo-react-query
- router-mono-simple
- router-mono-simple-lazy
- tanstack-router-react-example-scroll-restoration
- tanstack-search-validator-adapters
- tanstack-start-example-bare
- tanstack-start-example-basic
- tanstack-start-example-basic-auth
- tanstack-start-example-basic-cloudflare
- tanstack-start-example-basic-react-query
- tanstack-start-example-basic-static
- tanstack-start-bun-hosting
- tanstack-start-example-clerk-basic
- tanstack-start-example-convex-trellaux
- tanstack-start-example-counter
- tanstack-start-i18n-paraglide
- tanstack-start-example-large
- tanstack-start-example-material-ui
- tanstack-start-streaming-data-from-server-functions
- tanstack-start-example-supabase-basic
- tanstack-start-tailwind-v4
- tanstack-start-example-trellaux
- tanstack-start-example-workos
- tanstack-router-react-example-view-transitions
- tanstack-router-react-example-with-framer-motion
- tanstack-router-react-example-with-trpc
- tanstack-router-react-example-with-trpc-react-query
@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@5567commit:
3550bf7Actionable comments posted: 13
🧹 Nitpick comments (9)
examples/solid/start-basic-cloudflare/public/site.webmanifest (1)
2-3: Consider populating example values fornameandshort_name.The manifest file is well-structured, but the
nameandshort_namefields 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.jsproperly integrates with the script reference in__root.tsx, and theContent-Typeheader 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
.tsrather than.tsxto 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 withcontent: undefinedFilter tags so only entries with defined
contentare 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 typesElsewhere the project imports
Uservia~/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 insideHead elements should be emitted from within
<head>, not<body>.<head> - <HydrationScript /> + <HydrationScript /> + <HeadContent /> </head> <body> - <HeadContent />
68-68: Add html lang for a11ySet document language.
- <html> + <html lang="en">examples/solid/start-basic-cloudflare/src/routes/posts.$postId.tsx (1)
2-2: Use consistent path alias for importsStick 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.pngis excluded by!**/*.pngexamples/solid/start-basic-cloudflare/public/android-chrome-512x512.pngis excluded by!**/*.pngexamples/solid/start-basic-cloudflare/public/apple-touch-icon.pngis excluded by!**/*.pngexamples/solid/start-basic-cloudflare/public/favicon-16x16.pngis excluded by!**/*.pngexamples/solid/start-basic-cloudflare/public/favicon-32x32.pngis excluded by!**/*.pngexamples/solid/start-basic-cloudflare/public/favicon.icois excluded by!**/*.icoexamples/solid/start-basic-cloudflare/public/favicon.pngis excluded by!**/*.pngpnpm-lock.yamlis 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.jsoncexamples/solid/start-basic-cloudflare/src/styles/app.cssexamples/solid/start-basic-cloudflare/src/utils/seo.tsexamples/solid/start-basic-cloudflare/README.mdexamples/solid/start-basic-cloudflare/src/components/UserError.tsxexamples/solid/start-basic-cloudflare/src/routes/deferred.tsxexamples/solid/start-basic-cloudflare/src/utils/users.tsxexamples/solid/start-basic-cloudflare/src/components/PostError.tsxexamples/solid/start-basic-cloudflare/src/routes/posts.index.tsxexamples/solid/start-basic-cloudflare/src/utils/posts.tsxexamples/solid/start-basic-cloudflare/src/routes/users.index.tsxexamples/solid/start-basic-cloudflare/src/routes/_pathlessLayout/_nested-layout/route-a.tsxexamples/solid/start-basic-cloudflare/public/site.webmanifestexamples/solid/start-basic-cloudflare/src/routes/users.$userId.tsxexamples/solid/start-basic-cloudflare/src/components/DefaultCatchBoundary.tsxexamples/solid/start-basic-cloudflare/package.jsonexamples/solid/start-basic-cloudflare/postcss.config.mjsexamples/solid/start-basic-cloudflare/src/routes/api/users.$userId.tsexamples/solid/start-basic-cloudflare/src/routes/_pathlessLayout.tsxexamples/solid/start-basic-cloudflare/src/routes/posts_.$postId.deep.tsxexamples/solid/start-basic-cloudflare/src/routes/posts.tsxexamples/solid/start-basic-cloudflare/src/routes/users.tsxexamples/solid/start-basic-cloudflare/tsconfig.jsonexamples/solid/start-basic-cloudflare/src/routes/_pathlessLayout/_nested-layout/route-b.tsxexamples/solid/start-basic-cloudflare/src/routes/index.tsxexamples/solid/start-basic-cloudflare/src/routes/customScript[.]js.tsexamples/solid/start-basic-cloudflare/src/router.tsxexamples/solid/start-basic-cloudflare/tailwind.config.mjsexamples/solid/start-basic-cloudflare/src/routes/_pathlessLayout/_nested-layout.tsxexamples/solid/start-basic-cloudflare/src/routes/__root.tsxexamples/solid/start-basic-cloudflare/src/routeTree.gen.tsexamples/solid/start-basic-cloudflare/src/routes/posts.$postId.tsxexamples/solid/start-basic-cloudflare/src/routes/redirect.tsxexamples/solid/start-basic-cloudflare/src/utils/loggingMiddleware.tsxexamples/solid/start-basic-cloudflare/src/components/NotFound.tsxexamples/solid/start-basic-cloudflare/vite.config.tsexamples/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.tsexamples/solid/start-basic-cloudflare/src/components/UserError.tsxexamples/solid/start-basic-cloudflare/src/routes/deferred.tsxexamples/solid/start-basic-cloudflare/src/utils/users.tsxexamples/solid/start-basic-cloudflare/src/components/PostError.tsxexamples/solid/start-basic-cloudflare/src/routes/posts.index.tsxexamples/solid/start-basic-cloudflare/src/utils/posts.tsxexamples/solid/start-basic-cloudflare/src/routes/users.index.tsxexamples/solid/start-basic-cloudflare/src/routes/_pathlessLayout/_nested-layout/route-a.tsxexamples/solid/start-basic-cloudflare/src/routes/users.$userId.tsxexamples/solid/start-basic-cloudflare/src/components/DefaultCatchBoundary.tsxexamples/solid/start-basic-cloudflare/src/routes/api/users.$userId.tsexamples/solid/start-basic-cloudflare/src/routes/_pathlessLayout.tsxexamples/solid/start-basic-cloudflare/src/routes/posts_.$postId.deep.tsxexamples/solid/start-basic-cloudflare/src/routes/posts.tsxexamples/solid/start-basic-cloudflare/src/routes/users.tsxexamples/solid/start-basic-cloudflare/src/routes/_pathlessLayout/_nested-layout/route-b.tsxexamples/solid/start-basic-cloudflare/src/routes/index.tsxexamples/solid/start-basic-cloudflare/src/routes/customScript[.]js.tsexamples/solid/start-basic-cloudflare/src/router.tsxexamples/solid/start-basic-cloudflare/src/routes/_pathlessLayout/_nested-layout.tsxexamples/solid/start-basic-cloudflare/src/routes/__root.tsxexamples/solid/start-basic-cloudflare/src/routeTree.gen.tsexamples/solid/start-basic-cloudflare/src/routes/posts.$postId.tsxexamples/solid/start-basic-cloudflare/src/routes/redirect.tsxexamples/solid/start-basic-cloudflare/src/utils/loggingMiddleware.tsxexamples/solid/start-basic-cloudflare/src/components/NotFound.tsxexamples/solid/start-basic-cloudflare/vite.config.tsexamples/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.tsxexamples/solid/start-basic-cloudflare/src/routes/posts.index.tsxexamples/solid/start-basic-cloudflare/src/routes/users.index.tsxexamples/solid/start-basic-cloudflare/src/routes/_pathlessLayout/_nested-layout/route-a.tsxexamples/solid/start-basic-cloudflare/src/routes/users.$userId.tsxexamples/solid/start-basic-cloudflare/src/routes/api/users.$userId.tsexamples/solid/start-basic-cloudflare/src/routes/_pathlessLayout.tsxexamples/solid/start-basic-cloudflare/src/routes/posts_.$postId.deep.tsxexamples/solid/start-basic-cloudflare/src/routes/posts.tsxexamples/solid/start-basic-cloudflare/src/routes/users.tsxexamples/solid/start-basic-cloudflare/src/routes/_pathlessLayout/_nested-layout/route-b.tsxexamples/solid/start-basic-cloudflare/src/routes/index.tsxexamples/solid/start-basic-cloudflare/src/routes/customScript[.]js.tsexamples/solid/start-basic-cloudflare/src/routes/_pathlessLayout/_nested-layout.tsxexamples/solid/start-basic-cloudflare/src/routes/__root.tsxexamples/solid/start-basic-cloudflare/src/routes/posts.$postId.tsxexamples/solid/start-basic-cloudflare/src/routes/redirect.tsxexamples/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.jsonexamples/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 codebaseApplied 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.gitignorepatterns 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
beforeLoadhook withthrow 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.tsas 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
Outletcomponent.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:
- Path resolution (tsConfigPaths)
- Environment setup (cloudflare)
- 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/usersis 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
createServerFnwith input validators and handlers. TheslowServerFnappropriately 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
childrenprop usage in theAwaitcomponent, but this is a React-specific rule. In Solid.js, theAwaitcomponent correctly accepts achildrenprop 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
preLogMiddlewareproperly captures timing data on both client and server phases:- Client phase: records
clientTimeand sends it to the server viasendContext - Server phase: records
serverTime, calculatesdurationToServer, and sends both back viasendContext
The use of
sendContextensures timing data flows correctly across the client-server boundary.
28-41: LGTM! Middleware composition and timing logic are correct.The
logMiddlewareeffectively:- Composes
preLogMiddlewareto gather timing data - Waits for the complete request/response cycle
- 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: LGTMLoader wiring, link params, and UI rendering look correct for the example.
examples/solid/start-basic-cloudflare/src/utils/posts.tsx (1)
10-28: Looks solidServer 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 OKFetch, 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 reviewrouteTree.gen.tsis 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 neededVerification confirms that
apple-touch-icon.png,favicon-32x32.png,favicon-16x16.png, andsite.webmanifestall exist inexamples/solid/start-basic-cloudflare/public/. No 404 risks.@@ -0,0 +29,21 @@29+ Try Again30+ </button>31+ {isRoot ? (32+ <Link33+ to="/"34+ class={`px-2 py-1 bg-gray-600 dark:bg-gray-700 rounded text-white uppercase font-extrabold`}35+ >36+ Home37+ </Link>38+ ) : (39+ <Link40+ to="/"41+ class={`px-2 py-1 bg-gray-600 dark:bg-gray-700 rounded text-white uppercase font-extrabold`}42+ onClick={(e) => {43+ e.preventDefault()44+ window.history.back()45+ }}46+ >47+ Go Back48+ </Link>49+ )}⚠️ Potential issue | 🔴 Critical
Call the accessor returned by useMatch
useMatchreturns a function; useisRoot()in JSX condition.- {isRoot ? ( + {isRoot() ? (🤖 Prompt for AI Agents
In examples/solid/start-basic-cloudflare/src/components/DefaultCatchBoundary.tsx around lines 31 to 49, the JSX uses the accessor returned by useMatch as a value (isRoot) instead of calling it; update the conditional to call the accessor (use isRoot()) wherever it is used in the JSX so the boolean result is evaluated, i.e., replace occurrences of isRoot with isRoot() in that block to ensure the match check runs and the correct branch is rendered.✅ Addressed in commit eee3e78
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
colorisn’t valid on a manifest link, and#fffffis not a valid hex code. Removecolorhere and add a propertheme-colormeta.- { 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+ <Link13+ to="/route-a"14+ activeProps={{15+ class: 'font-bold',16+ }}17+ >18+ Go to route A19+ </Link>20+ <Link21+ to="/route-b"⚠️ Potential issue | 🔴 Critical
Broken navigation: links point to non-existent paths
to="/route-a"andto="/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-assertion19+ const user = (await res.json()) as User20+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 result13+})⚠️ 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().handlerruns on the server.navigatordoesn’t exist in Workers and will throw. Also, importingcloudflare:workersat 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:workersimport 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.@@ -0,0 +4,21 @@4+5+export const Route = createFileRoute('/posts_/$postId/deep')({6+ loader: async ({ params: { postId } }) =>7+ fetchPost({8+ data: postId,9+ }),10+ errorComponent: PostErrorComponent,11+ component: PostDeepComponent,12+})13+14+function PostDeepComponent() {15+ const post = Route.useLoaderData()16+17+ return (18+ <div class="p-2 space-y-2">19+ <Link to="/posts" class="block py-1 text-blue-800 hover:text-blue-600">20+ ← All Posts21+ </Link>22+ <h4 class="text-xl font-bold underline">{post.title}</h4>23+ <div class="text-sm">{post.body}</div>24+ </div>⚠️ Potential issue | 🔴 Critical
Bug: loader data accessor must be invoked (Solid signal).
Route.useLoaderData()returns an accessor; usingpost.title/post.bodywill be undefined. Invoke the accessor.function PostDeepComponent() { const post = Route.useLoaderData() return ( <div class="p-2 space-y-2"> <Link to="/posts" class="block py-1 text-blue-800 hover:text-blue-600"> ← All Posts </Link> - <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> </div> ) }Optional: since you already return a Promise from
fetchPost, you can dropasyncon the loader for clarity.-export const Route = createFileRoute('/posts_/$postId/deep')({ - loader: async ({ params: { postId } }) => +export const Route = createFileRoute('/posts_/$postId/deep')({ + loader: ({ params: { postId } }) => fetchPost({ data: postId, }),📝 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.
function PostDeepComponent() { const post = Route.useLoaderData() return ( <div class="p-2 space-y-2"> <Link to="/posts" class="block py-1 text-blue-800 hover:text-blue-600"> ← All Posts </Link> <h4 class="text-xl font-bold underline">{post().title}</h4> <div class="text-sm">{post().body}</div> </div> ) }🤖 Prompt for AI Agents
In examples/solid/start-basic-cloudflare/src/routes/posts_.$postId.deep.tsx around lines 14 to 24, the code calls Route.useLoaderData() but treats the returned Solid accessor as a plain object (using post.title and post.body), which yields undefined; fix by invoking the accessor to retrieve the data (e.g., const post = Route.useLoaderData()(); then use post.title and post.body), and optionally remove the unnecessary async from the loader since fetchPost already returns a Promise.✅ Addressed in commit eee3e78
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 User17+ } 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 tonotFound().-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.@@ -0,0 +21,21 @@21+ errorComponent: UserErrorComponent,22+ component: UserComponent,23+ notFoundComponent: () => {24+ return <NotFound>User not found</NotFound>25+ },26+})27+28+function UserComponent() {29+ const user = Route.useLoaderData()30+31+ return (32+ <div class="space-y-2">33+ <h4 class="text-xl font-bold underline">{user.name}</h4>34+ <div class="text-sm">{user.email}</div>35+ <div>36+ <a37+ href={`/api/users/${user.id}`}38+ class="text-blue-800 hover:text-blue-600 underline"39+ >40+ View as JSON41+ </a>⚠️ Potential issue | 🔴 Critical
Call loader data accessor in JSX
useLoaderDatareturns an accessor. Useuser()when reading fields.- <h4 class="text-xl font-bold underline">{user.name}</h4> - <div class="text-sm">{user.email}</div> + <h4 class="text-xl font-bold underline">{user().name}</h4> + <div class="text-sm">{user().email}</div> @@ - href={`/api/users/${user.id}`} + href={`/api/users/${user().id}`}📝 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.
<h4 class="text-xl font-bold underline">{user().name}</h4> <div class="text-sm">{user().email}</div> <div> <a href={`/api/users/${user().id}`} class="text-blue-800 hover:text-blue-600 underline" > View as JSON </a>🤖 Prompt for AI Agents
In examples/solid/start-basic-cloudflare/src/routes/users.$userId.tsx around lines 33 to 41, the component is treating the value returned by useLoaderData as a plain object but Solid's useLoaderData returns an accessor; update the JSX to call the accessor when reading fields (e.g., replace user.name, user.email, user.id with user().name, user().email, user().id) so the rendered values come from user().✅ Addressed in commit eee3e78
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 !importantprevents keyboard users from seeing focus indicators, which is a WCAG violation. Consider using:focus-visibleto 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:
- Cloudflare Wrangler configuration docs (wrangler.jsonc support). [developers.cloudflare.com — Configuration].
- Cloudflare Pages/Workers docs showing compatibility_flags / nodejs_compat usage. [developers.cloudflare.com — Pages/Functions & config].
- 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.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 redundantasynckeyword.Since
fetchPostalready returns a Promise, theasynckeyword is unnecessary. For consistency withposts.$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.tsxexamples/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.tsxexamples/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
useMatchhook 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.titleand.body(lines 22-23). This is the proper pattern for Solid.js signals returned byuseLoaderData().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/deepincludes an underscore, creating URLs like/posts_/123/deep. If the intended path is/posts/$postId/deep, the filename should beposts.$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 -60Length 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().titleandpost().bodyinstead ofpost.titleandpost.body.On lines 22-23, the code accesses
post.titleandpost.bodydirectly. However, the loader returns data that should be accessed as a function (likeposts.$postId.tsxdoes withpost().title). Both routes use the samefetchPostfunction, 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.tsxis intentional—TanStack Router generates the route ID as/posts_/$postId/deepfor 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.github-actions[bot](GitHub profile, opens in a new tab) added labelsdocumentation
birkskyum(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
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 reviewcommand 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#
examples/solid/start-basic-cloudflare/.gitignore,.../.prettierignore,.../.vscode/settings.json,.../package.json,.../tsconfig.json,.../wrangler.jsoncexamples/solid/start-basic-cloudflare/vite.config.ts,.../postcss.config.mjs,.../tailwind.config.mjs,.../src/styles/app.cssexamples/solid/start-basic-cloudflare/src/routeTree.gen.tsexamples/solid/start-basic-cloudflare/src/router.tsx,.../src/components/DefaultCatchBoundary.tsx,.../NotFound.tsx,.../PostError.tsx,.../UserError.tsxexamples/solid/start-basic-cloudflare/src/routes/__root.tsx,.../_pathlessLayout.tsx,.../_nested-layout.tsx,.../route-a.tsx,.../route-b.tsxexamples/solid/start-basic-cloudflare/src/routes/posts.tsx,.../posts.index.tsx,.../posts.$postId.tsx,.../posts_.$postId.deep.tsxexamples/solid/start-basic-cloudflare/src/routes/users.tsx,.../users.index.tsx,.../users.$userId.tsxexamples/solid/start-basic-cloudflare/src/routes/api/users.ts,.../api/users.$userId.ts,.../customScript.js.ts,.../deferred.tsx,.../index.tsx,.../redirect.tsxexamples/solid/start-basic-cloudflare/src/utils/posts.tsx,.../users.tsx,.../seo.ts,.../loggingMiddleware.tsxexamples/solid/start-basic-cloudflare/README.md,.../public/site.webmanifestSequence Diagram(s)#
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.
Possibly related PRs#
Suggested labels#
package: solid-start,documentationSuggested reviewers#
Poem#
Pre-merge checks and finishing touches#
❌ Failed checks (1 warning)
@coderabbitai generate docstringsto improve docstring coverage.✅ Passed checks (2 passed)
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