docs(solid-start): start-large example #5847
main fromrefs/pull/5847/head·merged by birkskyum(GitHub profile, opens in a new tab) Summary by CodeRabbit#
- New Features
- Added a new comprehensive "start-large" example project for Solid.js demonstrating TanStack Router integration with multiple routing patterns, nested routes, dynamic parameters, search validation, and type-safe navigation setup.
- 1
View your CI Pipeline Execution ↗ for commit 08deea1d6003bed3acfbc871ebac307ec77d5d57
Command Status Duration Result nx affected --targets=test:eslint,test:unit,tes...✅ Succeeded 44s View ↗ nx run-many --target=build --exclude=examples/*...✅ Succeeded 1s View ↗
☁️ Nx Cloud last updated this comment at
2025-11-12 19:45:00UTCMore templates
- 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-router-solid-example-authenticated-routes
- tanstack-router-solid-example-authenticated-routes-firebase
- tanstack-router-solid-example-basic
- tanstack-router-solid-example-basic-default-search-params
- 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-file-based
- tanstack-router-solid-example-basic-ssr-streaming-file-based
- tanstack-router-solid-example-basic-virtual-file-based
- tanstack-router-solid-example-basic-virtual-inside-file-based
- tanstack-router-solid-example-deferred-data
- tanstack-router-solid-i18n-paraglide
- tanstack-router-solid-example-kitchen-sink
- 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-large-file-based
- tanstack-router-solid-example-location-masking
- tanstack-router-solid-example-navigation-blocking
- tanstack-router-solid-example-quickstart
- tanstack-router-solid-example-quickstart-esbuild-file-based
- tanstack-router-solid-example-quickstart-file-based
- tanstack-router-solid-example-quickstart-rspack-file-based
- tanstack-router-solid-example-quickstart-webpack-file-based
- tanstack-router-solid-example-scroll-restoration
- tanstack-solid-start-example-basic
- tanstack-solid-start-example-basic-auth
- tanstack-solid-start-example-basic-cloudflare
- tanstack-solid-start-example-basic-netlify
- tanstack-solid-start-example-basic-nitro
- tanstack-start-example-basic-solid-query
- tanstack-solid-start-example-basic-static
- tanstack-solid-start-bun-hosting
- tanstack-solid-start-example-convex-better-auth
- tanstack-solid-start-example-counter
- tanstack-solid-start-i18n-paraglide
- tanstack-solid-start-example-large
- tanstack-solid-start-streaming-data-from-server-functions
- tanstack-solid-start-example-supabase-basic
- tanstack-router-solid-example-view-transitions
- tanstack-router-solid-example-with-framer-motion
- tanstack-router-solid-example-with-trpc
@tanstack/arktype-adapter
npm i https://pkg.pr.new/TanStack/router/@tanstack/arktype-adapter@5847@tanstack/directive-functions-plugin
npm i https://pkg.pr.new/TanStack/router/@tanstack/directive-functions-plugin@5847@tanstack/eslint-plugin-router
npm i https://pkg.pr.new/TanStack/router/@tanstack/eslint-plugin-router@5847@tanstack/history
npm i https://pkg.pr.new/TanStack/router/@tanstack/history@5847@tanstack/nitro-v2-vite-plugin
npm i https://pkg.pr.new/TanStack/router/@tanstack/nitro-v2-vite-plugin@5847@tanstack/react-router
npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router@5847@tanstack/react-router-devtools
npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-devtools@5847@tanstack/react-router-ssr-query
npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-ssr-query@5847@tanstack/react-start
npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start@5847@tanstack/react-start-client
npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-client@5847@tanstack/react-start-server
npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-server@5847@tanstack/router-cli
npm i https://pkg.pr.new/TanStack/router/@tanstack/router-cli@5847@tanstack/router-core
npm i https://pkg.pr.new/TanStack/router/@tanstack/router-core@5847@tanstack/router-devtools
npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools@5847@tanstack/router-devtools-core
npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools-core@5847@tanstack/router-generator
npm i https://pkg.pr.new/TanStack/router/@tanstack/router-generator@5847@tanstack/router-plugin
npm i https://pkg.pr.new/TanStack/router/@tanstack/router-plugin@5847@tanstack/router-ssr-query-core
npm i https://pkg.pr.new/TanStack/router/@tanstack/router-ssr-query-core@5847@tanstack/router-utils
npm i https://pkg.pr.new/TanStack/router/@tanstack/router-utils@5847@tanstack/router-vite-plugin
npm i https://pkg.pr.new/TanStack/router/@tanstack/router-vite-plugin@5847@tanstack/server-functions-plugin
npm i https://pkg.pr.new/TanStack/router/@tanstack/server-functions-plugin@5847@tanstack/solid-router
npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router@5847@tanstack/solid-router-devtools
npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router-devtools@5847@tanstack/solid-router-ssr-query
npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router-ssr-query@5847@tanstack/solid-start
npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start@5847@tanstack/solid-start-client
npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-client@5847@tanstack/solid-start-server
npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-server@5847@tanstack/start-client-core
npm i https://pkg.pr.new/TanStack/router/@tanstack/start-client-core@5847@tanstack/start-plugin-core
npm i https://pkg.pr.new/TanStack/router/@tanstack/start-plugin-core@5847@tanstack/start-server-core
npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-core@5847@tanstack/start-static-server-functions
npm i https://pkg.pr.new/TanStack/router/@tanstack/start-static-server-functions@5847@tanstack/start-storage-context
npm i https://pkg.pr.new/TanStack/router/@tanstack/start-storage-context@5847@tanstack/valibot-adapter
npm i https://pkg.pr.new/TanStack/router/@tanstack/valibot-adapter@5847@tanstack/virtual-file-routes
npm i https://pkg.pr.new/TanStack/router/@tanstack/virtual-file-routes@5847@tanstack/zod-adapter
npm i https://pkg.pr.new/TanStack/router/@tanstack/zod-adapter@5847commit:
08deea1Actionable comments posted: 7
🧹 Nitpick comments (1)
examples/solid/start-large/src/styles.css (1)
3-30: Consider consolidating the two@layer baseblocks.The file defines two separate
@layer baseblocks (lines 3-11 and 13-30) that could be merged into a single block for better organization.Apply this diff to consolidate:
@layer base { *, ::after, ::before, ::backdrop, ::file-selector-button { border-color: var(--color-gray-200, currentcolor); } -} - -@layer base { + html { color-scheme: light dark; } * { @apply border-gray-200 dark:border-gray-800; } html, body { @apply text-gray-900 bg-gray-50 dark:bg-gray-950 dark:text-gray-200; } .using-mouse * { outline: none !important; } }📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📥 Commits
Reviewing files that changed from the base of the PR and between b5d7227677665a1256d684cf9680428dc0ffa873 and 08deea1d6003bed3acfbc871ebac307ec77d5d57.
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (20)
examples/solid/start-large/.gitignore(1 hunks)examples/solid/start-large/.vscode/settings.json(1 hunks)examples/solid/start-large/package.json(1 hunks)examples/solid/start-large/postcss.config.mjs(1 hunks)examples/solid/start-large/src/createRoutes.mjs(1 hunks)examples/solid/start-large/src/routeTree.gen.ts(1 hunks)examples/solid/start-large/src/router.tsx(1 hunks)examples/solid/start-large/src/routes/__root.tsx(1 hunks)examples/solid/start-large/src/routes/absolute.tsx(1 hunks)examples/solid/start-large/src/routes/index.tsx(1 hunks)examples/solid/start-large/src/routes/linkProps.tsx(1 hunks)examples/solid/start-large/src/routes/params/$paramsPlaceholder.tsx(1 hunks)examples/solid/start-large/src/routes/params/route.tsx(1 hunks)examples/solid/start-large/src/routes/relative.tsx(1 hunks)examples/solid/start-large/src/routes/search/route.tsx(1 hunks)examples/solid/start-large/src/routes/search/searchPlaceholder.tsx(1 hunks)examples/solid/start-large/src/styles.css(1 hunks)examples/solid/start-large/src/typePrimitives.tsx(1 hunks)examples/solid/start-large/tsconfig.json(1 hunks)examples/solid/start-large/vite.config.ts(1 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Use TypeScript in strict mode with extensive type safety across the codebase
Files:
examples/solid/start-large/src/routes/linkProps.tsxexamples/solid/start-large/src/routes/params/route.tsxexamples/solid/start-large/src/routes/__root.tsxexamples/solid/start-large/src/routes/params/$paramsPlaceholder.tsxexamples/solid/start-large/src/routes/search/route.tsxexamples/solid/start-large/src/router.tsxexamples/solid/start-large/src/routes/relative.tsxexamples/solid/start-large/src/typePrimitives.tsxexamples/solid/start-large/vite.config.tsexamples/solid/start-large/src/routes/absolute.tsxexamples/solid/start-large/src/routes/search/searchPlaceholder.tsxexamples/solid/start-large/src/routes/index.tsxexamples/solid/start-large/src/routeTree.gen.ts
**/src/routes/**
📄 CodeRabbit inference engine (AGENTS.md)
Place file-based routes under src/routes/ directories
Files:
examples/solid/start-large/src/routes/linkProps.tsxexamples/solid/start-large/src/routes/params/route.tsxexamples/solid/start-large/src/routes/__root.tsxexamples/solid/start-large/src/routes/params/$paramsPlaceholder.tsxexamples/solid/start-large/src/routes/search/route.tsxexamples/solid/start-large/src/routes/relative.tsxexamples/solid/start-large/src/routes/absolute.tsxexamples/solid/start-large/src/routes/search/searchPlaceholder.tsxexamples/solid/start-large/src/routes/index.tsx
examples/{react,solid}/**
📄 CodeRabbit inference engine (AGENTS.md)
Keep example applications under examples/react/ and examples/solid/
Files:
examples/solid/start-large/src/routes/linkProps.tsxexamples/solid/start-large/src/routes/params/route.tsxexamples/solid/start-large/src/routes/__root.tsxexamples/solid/start-large/src/createRoutes.mjsexamples/solid/start-large/src/routes/params/$paramsPlaceholder.tsxexamples/solid/start-large/src/routes/search/route.tsxexamples/solid/start-large/src/router.tsxexamples/solid/start-large/src/styles.cssexamples/solid/start-large/src/routes/relative.tsxexamples/solid/start-large/src/typePrimitives.tsxexamples/solid/start-large/vite.config.tsexamples/solid/start-large/src/routes/absolute.tsxexamples/solid/start-large/package.jsonexamples/solid/start-large/postcss.config.mjsexamples/solid/start-large/src/routes/search/searchPlaceholder.tsxexamples/solid/start-large/tsconfig.jsonexamples/solid/start-large/src/routes/index.tsxexamples/solid/start-large/src/routeTree.gen.ts
**/package.json
📄 CodeRabbit inference engine (AGENTS.md)
Use workspace:* protocol for internal dependencies in package.json files
Files:
examples/solid/start-large/package.json
🧠 Learnings (11)
📓 Common learnings
Learnt from: CR Repo: TanStack/router PR: 0 File: AGENTS.md:0-0 Timestamp: 2025-09-23T17:36:12.598Z Learning: Applies to docs/{router,start}/** : Place router docs under docs/router/ and start framework docs under docs/start/Learnt from: CR Repo: TanStack/router PR: 0 File: AGENTS.md:0-0 Timestamp: 2025-09-23T17:36:12.598Z Learning: Applies to examples/{react,solid}/** : Keep example applications under examples/react/ and examples/solid/📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR Repo: TanStack/router PR: 0 File: AGENTS.md:0-0 Timestamp: 2025-09-23T17:36:12.598Z Learning: Applies to packages/{react-router,solid-router}/** : Implement React and Solid bindings/components only in packages/react-router/ and packages/solid-router/Applied to files:
examples/solid/start-large/src/routes/linkProps.tsxexamples/solid/start-large/src/routes/params/route.tsxexamples/solid/start-large/src/routes/__root.tsxexamples/solid/start-large/src/createRoutes.mjsexamples/solid/start-large/src/routes/params/$paramsPlaceholder.tsxexamples/solid/start-large/src/routes/search/route.tsxexamples/solid/start-large/src/routes/relative.tsxexamples/solid/start-large/src/typePrimitives.tsxexamples/solid/start-large/src/routes/absolute.tsxexamples/solid/start-large/src/routes/search/searchPlaceholder.tsxexamples/solid/start-large/tsconfig.jsonexamples/solid/start-large/src/routes/index.tsxexamples/solid/start-large/src/routeTree.gen.ts
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR Repo: TanStack/router PR: 0 File: AGENTS.md:0-0 Timestamp: 2025-09-23T17:36:12.598Z Learning: Applies to **/src/routes/** : Place file-based routes under src/routes/ directoriesApplied to files:
examples/solid/start-large/src/routes/params/route.tsxexamples/solid/start-large/src/createRoutes.mjsexamples/solid/start-large/src/routes/relative.tsxexamples/solid/start-large/src/routes/absolute.tsxexamples/solid/start-large/src/routes/index.tsxexamples/solid/start-large/src/routeTree.gen.ts
📚 Learning: 2025-10-08T08:11:47.088Z
Learnt from: nlynzaad Repo: TanStack/router PR: 5402 File: packages/router-generator/tests/generator/no-formatted-route-tree/routeTree.nonnested.snapshot.ts:19-21 Timestamp: 2025-10-08T08:11:47.088Z Learning: Test snapshot files in the router-generator tests directory (e.g., files matching the pattern `packages/router-generator/tests/generator/**/routeTree*.snapshot.ts` or `routeTree*.snapshot.js`) should not be modified or have issues flagged, as they are fixtures used to verify the generator's output and are intentionally preserved as-is.Applied to files:
examples/solid/start-large/src/routes/params/route.tsxexamples/solid/start-large/src/createRoutes.mjsexamples/solid/start-large/src/routes/params/$paramsPlaceholder.tsxexamples/solid/start-large/src/routes/search/route.tsxexamples/solid/start-large/.vscode/settings.jsonexamples/solid/start-large/src/routes/relative.tsxexamples/solid/start-large/src/routes/absolute.tsxexamples/solid/start-large/src/routeTree.gen.ts
📚 Learning: 2025-10-14T18:59:33.990Z
Learnt from: FatahChan Repo: TanStack/router PR: 5475 File: e2e/react-start/basic-prerendering/src/routes/redirect/$target/via-beforeLoad.tsx:8-0 Timestamp: 2025-10-14T18:59:33.990Z Learning: In TanStack Router e2e test files, when a route parameter is validated at the route level (e.g., using zod in validateSearch or param validation), switch statements on that parameter do not require a default case, as the validation ensures only expected values will reach the switch.Applied to files:
examples/solid/start-large/src/routes/params/route.tsxexamples/solid/start-large/src/routes/params/$paramsPlaceholder.tsxexamples/solid/start-large/src/routes/search/route.tsx
📚 Learning: 2025-10-01T18:31:35.420Z
Learnt from: schiller-manuel Repo: TanStack/router PR: 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-large/src/routes/__root.tsxexamples/solid/start-large/src/createRoutes.mjsexamples/solid/start-large/.gitignoreexamples/solid/start-large/.vscode/settings.jsonexamples/solid/start-large/src/routes/relative.tsxexamples/solid/start-large/src/routeTree.gen.ts
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR Repo: TanStack/router PR: 0 File: AGENTS.md:0-0 Timestamp: 2025-09-23T17:36:12.598Z Learning: Applies to packages/{router-cli,router-generator,router-plugin,virtual-file-routes}/** : Keep CLI, generators, bundler plugins, and virtual file routing utilities in their dedicated tooling package directoriesApplied to files:
examples/solid/start-large/src/createRoutes.mjsexamples/solid/start-large/.gitignoreexamples/solid/start-large/src/routeTree.gen.ts
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR Repo: TanStack/router PR: 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-large/src/typePrimitives.tsxexamples/solid/start-large/tsconfig.json
📚 Learning: 2025-11-02T16:16:24.898Z
Learnt from: nlynzaad Repo: TanStack/router PR: 5732 File: packages/start-client-core/src/client/hydrateStart.ts:6-9 Timestamp: 2025-11-02T16:16:24.898Z Learning: In packages/start-client-core/src/client/hydrateStart.ts, the `import/no-duplicates` ESLint disable is necessary for imports from `#tanstack-router-entry` and `#tanstack-start-entry` because both aliases resolve to the same placeholder file (`fake-start-entry.js`) in package.json during static analysis, even though they resolve to different files at runtime.Applied to files:
examples/solid/start-large/package.jsonexamples/solid/start-large/tsconfig.jsonexamples/solid/start-large/src/routeTree.gen.ts
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR Repo: TanStack/router PR: 0 File: AGENTS.md:0-0 Timestamp: 2025-09-23T17:36:12.598Z Learning: Applies to packages/router-core/** : Keep framework-agnostic core router logic in packages/router-core/Applied to files:
examples/solid/start-large/src/routeTree.gen.ts
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR Repo: TanStack/router PR: 0 File: AGENTS.md:0-0 Timestamp: 2025-09-23T17:36:12.598Z Learning: Applies to docs/{router,start}/** : Place router docs under docs/router/ and start framework docs under docs/start/Applied to files:
examples/solid/start-large/src/routeTree.gen.ts
🧬 Code graph analysis (9)
examples/solid/start-large/src/routes/linkProps.tsx (3)
examples/solid/start-large/src/routes/absolute.tsx (1)
Route(3-5)
examples/solid/start-large/src/routes/search/searchPlaceholder.tsx (1)
Route(43-69)
examples/solid/start-large/src/typePrimitives.tsx (4)
customRedirect(15-17)useCustomNavigate(22-25)MyLink(30-32)ListItems(48-50)
examples/solid/start-large/src/routes/params/route.tsx (1)
examples/solid/start-large/src/routes/params/$paramsPlaceholder.tsx (1)
Route(46-63)
examples/solid/start-large/src/routes/__root.tsx (2)
examples/solid/start-large/src/routes/params/$paramsPlaceholder.tsx (1)
Route(46-63)
examples/solid/start-large/src/routes/search/searchPlaceholder.tsx (1)
Route(43-69)
examples/solid/start-large/src/routes/params/$paramsPlaceholder.tsx (2)
examples/solid/start-large/src/routes/params/route.tsx (1)
Route(3-5)
examples/solid/start-large/src/routes/search/searchPlaceholder.tsx (1)
Route(43-69)
examples/solid/start-large/src/routes/search/route.tsx (2)
examples/solid/start-large/src/routes/linkProps.tsx (1)
Route(9-23)
examples/solid/start-large/src/routes/search/searchPlaceholder.tsx (1)
Route(43-69)
examples/solid/start-large/src/routes/relative.tsx (2)
examples/solid/start-large/src/routes/absolute.tsx (1)
Route(3-5)
examples/solid/start-large/src/routes/index.tsx (1)
Route(3-5)
examples/solid/start-large/src/routes/absolute.tsx (2)
examples/solid/start-large/src/routes/index.tsx (1)
Route(3-5)
examples/solid/start-large/src/routes/relative.tsx (1)
Route(3-5)
examples/solid/start-large/src/routes/search/searchPlaceholder.tsx (4)
examples/solid/start-large/src/createRoutes.mjs (1)
search(12-14)
examples/solid/start-large/src/routes/linkProps.tsx (1)
Route(9-23)
examples/solid/start-large/src/routes/params/$paramsPlaceholder.tsx (1)
Route(46-63)
examples/solid/start-large/src/routes/search/route.tsx (1)
Route(8-11)
examples/solid/start-large/src/routeTree.gen.ts (1)
examples/solid/start-large/src/router.tsx (1)
getRouter(5-15)
⏰ 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 (6)
examples/solid/start-large/.vscode/settings.json (1)
1-11: Best practice configuration for autogenerated files.The VSCode settings appropriately configure the workspace to protect the autogenerated
routeTree.gen.tsfile from accidental edits and reduce IDE noise. The glob pattern and three-pronged approach (excluding from file watching, search, and marking readonly) aligns with the guidance that autogenerated files should not be manually modified.examples/solid/start-large/postcss.config.mjs (1)
1-5: LGTM!The PostCSS configuration correctly integrates the Tailwind CSS plugin with standard setup.
examples/solid/start-large/vite.config.ts (1)
1-17: LGTM!The Vite configuration correctly sets up Solid Start with SSR, TypeScript path resolution, and appropriate plugin ordering.
examples/solid/start-large/src/typePrimitives.tsx (1)
1-50: LGTM!The type-safe router primitive wrappers demonstrate proper usage of TypeScript generics and function overloads for type safety. The implementations correctly delegate to the underlying router primitives.
examples/solid/start-large/src/router.tsx (1)
1-15: LGTM!The router initialization correctly integrates Solid Query's QueryClient into the router context and follows standard patterns for TanStack Router setup.
examples/solid/start-large/src/routes/search/route.tsx (1)
1-11: LGTM!The route definition correctly integrates Valibot validation for search parameters and follows standard TanStack Router file-based routing patterns.
examples/solid/start-large/.gitignore lines 1 to 19@@ -0,0 +1,19 @@1+node_modules2+.DS_Store3+dist4+dist-ssr5+*.local6+(gen)7+node_modules8+package-lock.json9+yarn.lock10+11+.DS_Store12+.cache13+.env14+.vercel15+.output16+/build/17+/api/18+/server/build19+/public/build⚠️ Potential issue | 🟡 Minor
Remove duplicate entries.
The file contains duplicate entries for
node_modules(lines 1 and 7) and.DS_Store(lines 2 and 11).Apply this diff to remove the duplicates:
node_modules .DS_Store dist dist-ssr *.local (gen) -node_modules package-lock.json yarn.lock -.DS_Store .cache .env .vercel .output /build/ /api/ /server/build /public/build📝 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.
node_modules .DS_Store dist dist-ssr *.local (gen) package-lock.json yarn.lock .cache .env .vercel .output /build/ /api/ /server/build /public/build🤖 Prompt for AI Agents
In examples/solid/start-large/.gitignore around lines 1 to 19 there are duplicate entries for node_modules and .DS_Store; remove the repeated lines so each pattern appears only once (keep one node_modules and one .DS_Store entry) and ensure the remaining ordering is sensible, leaving the rest of the ignore patterns unchanged.examples/solid/start-large/package.json lines 13 to 21@@ -0,0 +1,21 @@1+{2+ "name": "tanstack-solid-start-example-large",3+ "private": true,4+ "sideEffects": false,5+ "type": "module",6+ "scripts": {7+ "dev": "vite dev",8+ "build": "vite build && tsc --noEmit",9+ "start": "vite start",10+ "gen": "node ./src/createRoutes.mjs",11+ "test:types": "tsc --extendedDiagnostics"12+ },13+ "dependencies": {14+ "@tanstack/solid-query": "^5.90.0",15+ "@tanstack/solid-router": "^1.135.2",16+ "@tanstack/solid-router-devtools": "^1.135.2",17+ "@tanstack/solid-start": "^1.135.2",18+ "solid-js": "^1.9.10",19+ "redaxios": "^0.5.1",20+ "tailwind-merge": "^2.6.0",21+ "valibot": "^1.0.0-beta.15"🛠️ Refactor suggestion | 🟠 Major
Use
workspace:*protocol for internal dependencies.Per the coding guidelines, internal TanStack packages should use the
workspace:*protocol instead of pinned versions to ensure consistency across the monorepo.As per coding guidelines.
Apply this diff:
"dependencies": { - "@tanstack/solid-query": "^5.90.0", - "@tanstack/solid-router": "^1.135.2", - "@tanstack/solid-router-devtools": "^1.135.2", - "@tanstack/solid-start": "^1.135.2", + "@tanstack/solid-query": "workspace:*", + "@tanstack/solid-router": "workspace:*", + "@tanstack/solid-router-devtools": "workspace:*", + "@tanstack/solid-start": "workspace:*", "solid-js": "^1.9.10", "redaxios": "^0.5.1", "tailwind-merge": "^2.6.0", "valibot": "^1.0.0-beta.15" },🤖 Prompt for AI Agents
In examples/solid/start-large/package.json around lines 13 to 21, change internal TanStack package dependency versions to use the workspace:* protocol; specifically replace the pinned versions for @tanstack/solid-query, @tanstack/solid-router, @tanstack/solid-router-devtools, and @tanstack/solid-start with "workspace:*" (leave external packages like solid-js, redaxios, tailwind-merge, valibot unchanged), then save the file.examples/solid/start-large/src/createRoutes.mjs lines 37 to 49@@ -0,0 +29,21 @@29+30+ if (!existsSync('./src/routes/(gen)/params')) {31+ await mkdir('./src/routes/(gen)/params')32+ }33+34+ await writeFile('./src/routes/(gen)/search/route.tsx', searchRoute)35+ await writeFile('./src/routes/(gen)/params/route.tsx', paramsRoute)36+37+ for (let y = 0; y < length; y = y + 1) {38+ const replacedAbsolute = absolute.replaceAll('/absolute', `/absolute${y}`)39+ const replacedRelative = relative.replaceAll('/relative', `/relative${y}`)40+ const replacedSearch = search.replaceAll('searchPlaceholder', `search${y}`)41+ const replacedParams = params.replaceAll('paramsPlaceholder', `param${y}`)42+ await writeFile(`./src/routes/(gen)/absolute${y}.tsx`, replacedAbsolute)43+ await writeFile(`./src/routes/(gen)/relative${y}.tsx`, replacedRelative)44+ await writeFile(`./src/routes/(gen)/search/search${y}.tsx`, replacedSearch)45+ await writeFile(`./src/routes/(gen)/params/$param${y}.tsx`, replacedParams)46+ }47+}48+49+main()🛠️ Refactor suggestion | 🟠 Major
Handle
main()rejections.main()is async and its errors currently surface as unhandled promise rejections. Wrap the call so failures exit cleanly. (tanstack.com)-main() +main().catch((err) => { + console.error(err) + process.exit(1) +})📝 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.
for (let y = 0; y < length; y = y + 1) { const replacedAbsolute = absolute.replaceAll('/absolute', `/absolute${y}`) const replacedRelative = relative.replaceAll('/relative', `/relative${y}`) const replacedSearch = search.replaceAll('searchPlaceholder', `search${y}`) const replacedParams = params.replaceAll('paramsPlaceholder', `param${y}`) await writeFile(`./src/routes/(gen)/absolute${y}.tsx`, replacedAbsolute) await writeFile(`./src/routes/(gen)/relative${y}.tsx`, replacedRelative) await writeFile(`./src/routes/(gen)/search/search${y}.tsx`, replacedSearch) await writeFile(`./src/routes/(gen)/params/$param${y}.tsx`, replacedParams) } } main().catch((err) => { console.error(err) process.exit(1) })🤖 Prompt for AI Agents
In examples/solid/start-large/src/createRoutes.mjs around lines 37 to 49, the top-level async main() call is unhandled and can produce unhandled promise rejections; update the invocation to handle rejections by either awaiting it inside an immediately-invoked async function with try/catch or by appending .catch(err => { console.error(err); process.exit(1); }) to main(), ensuring any thrown error is logged and the process exits with a non-zero code.examples/solid/start-large/src/routes/params/$paramsPlaceholder.tsx lines 33 to 37@@ -0,0 +17,21 @@17+ .inputValidator(params)18+ .client(({ next }) => {19+ const context = { client: { paramsPlaceholder: 'paramsPlaceholder' } }20+ return next({21+ context,22+ sendContext: context,23+ })24+ })25+ .server(({ next }) => {26+ const context = { server: { paramsPlaceholder: 'paramsPlaceholder' } }27+ return next({28+ context,29+ sendContext: context,30+ })31+ })32+33+const fn = createServerFn()34+ .middleware([middleware])35+ .handler(() => {36+ return v.parse(loaderResult, {})37+ })⚠️ Potential issue | 🔴 Critical
Server handler never returns valid data
v.parse(loaderResult, {})runs with an empty object, so Valibot throws before returning. Every call tofn(...)will therefore reject, and the route’s loader/context can never succeed. Return the validated payload from the middleware (e.g. wrap the validated params under theparamskey) instead of parsing{}.const fn = createServerFn() .middleware([middleware]) - .handler(() => { - return v.parse(loaderResult, {}) - }) + .handler(({ data }) => v.parse(loaderResult, { params: data }))examples/solid/start-large/src/routes/params/$paramsPlaceholder.tsx lines 61 to 62@@ -0,0 +42,21 @@42+ return v.parse(loaderResult, {})43+ },44+})45+46+export const Route = createFileRoute('/params/$paramsPlaceholder')({47+ component: ParamsComponent,48+ context: () => ({49+ paramsQueryOptions: queryOptions({50+ queryKey: ['paramsPlaceholder'],51+ queryFn: async () =>52+ await fn({53+ data: {54+ oneParamsPlaceholder: 'oneParamsPlaceholder',55+ twoParamsPlaceholder: 'twoParamsPlaceholder',56+ threeParamsPlaceholder: 'threeParamsPlaceholder',57+ },58+ }),59+ }),60+ }),61+ loader: (opts) =>62+ opts.context.queryClient.ensureQueryData(paramsQueryOptions),⚠️ Potential issue | 🔴 Critical
Loader is using the wrong query options
ensureQueryDatapoints at the module-levelparamsQueryOptions, whosequeryFnstill callsv.parse(loaderResult, {})and never hits your server function. This throws immediately and bypasses the per-request options you placed incontext. Call the query options fromopts.context(and drop the broken global constant) so the loader reuses the server-backed query.-const paramsQueryOptions = queryOptions({ - queryKey: ['paramsPlaceholder'], - queryFn: () => { - return v.parse(loaderResult, {}) - }, -}) - export const Route = createFileRoute('/params/$paramsPlaceholder')({ component: ParamsComponent, context: () => ({ @@ }), loader: (opts) => - opts.context.queryClient.ensureQueryData(paramsQueryOptions), + opts.context.queryClient.ensureQueryData( + opts.context.paramsQueryOptions, + ), })Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In examples/solid/start-large/src/routes/params/$paramsPlaceholder.tsx around lines 61-62, the loader is calling ensureQueryData with the module-level paramsQueryOptions which contains a queryFn that calls v.parse(...) and never invokes the server-backed function; replace that call to use the per-request query options stored on opts.context (e.g. opts.context.paramsQueryOptions or opts.context.queryOptions) so the loader reuses the server-backed queryFn, and remove the broken module-level paramsQueryOptions constant to avoid accidentally referencing it elsewhere.examples/solid/start-large/src/routes/search/searchPlaceholder.tsx lines 6 to 84@@ -0,0 +64,21 @@64+65+ return {66+ search,67+ }68+ },69+})70+71+function SearchComponent() {72+ return (73+ <div class="p-2 space-y-2">74+ <Link75+ to="/search/searchPlaceholder"76+ class="block py-1 text-blue-800 hover:text-blue-600"77+ search={{78+ searchPlaceholder: 'searchPlaceholder',79+ page: 0,80+ offset: 10,81+ search: 'search',82+ rootSearch: 0,83+ }}84+ >⚠️ Potential issue | 🟠 Major
Search schema drops
rootSearch.validateSearchusesv.object. That parser removes keys not declared in the schema, so therootSearchyou pass in the<Link>(and that upstream routes may rely on) gets stripped before loaders run. Either addrootSearchto this schema (with the right validator) or switch tov.objectWithRestif you intentionally need to forward unknown keys. (valibot.dev)🤖 Prompt for AI Agents
In examples/solid/start-large/src/routes/search/searchPlaceholder.tsx around lines 6 to 84, the search schema (v.object) omits the rootSearch key so validateSearch strips it before loaders run; fix by either adding rootSearch to the schema with the correct validator (e.g., rootSearch: v.number() or whatever type upstream expects) or replace v.object(...) with v.objectWithRest(...) to allow unknown keys to pass through, then update any related types/usages to match the chosen validator.examples/solid/start-large/tsconfig.json lines 1 to 23@@ -0,0 +3,21 @@3+ "compilerOptions": {4+ "strict": true,5+ "esModuleInterop": true,6+ "jsx": "preserve",7+ "jsxImportSource": "solid-js",8+ "module": "ESNext",9+ "moduleResolution": "Bundler",10+ "lib": ["DOM", "DOM.Iterable", "ES2022"],11+ "isolatedModules": true,12+ "resolveJsonModule": true,13+ "skipLibCheck": true,14+ "target": "ES2022",15+ "allowJs": true,16+ "forceConsistentCasingInFileNames": true,17+ "baseUrl": ".",18+ "paths": {19+ "~/*": ["./src/*"]20+ },21+ "noEmit": true22+ }23+}⚠️ Potential issue | 🔴 Critical
🧩 Analysis chain
TypeScript configuration is well-configured for Solid.js development.
The configuration appropriately enables strict mode (line 4), preserves JSX for Solid.js (lines 6-7), sets modern compilation targets (ES2022), and includes helpful path aliases for cleaner imports. The setup follows best practices and aligns with the project's TypeScript guidelines.
To ensure consistency across the example projects, could you verify that this configuration aligns with the TypeScript settings in other examples (e.g.,
examples/react/*/tsconfig.jsonorexamples/solid/*/tsconfig.json)? Run the following to compare:
🏁 Script executed:
#!/bin/bash # Description: Compare tsconfig.json configurations across example projects echo "=== Solid examples tsconfig.json files ===" find examples/solid -name "tsconfig.json" -type f | head -10 echo -e "\n=== React examples tsconfig.json files ===" find examples/react -name "tsconfig.json" -type f | head -10 # Show if any other tsconfig.json files exist for comparison if [ -f "examples/solid/*/tsconfig.json" ]; then echo -e "\n=== Comparing strict and target settings ===" for file in $(find examples -name "tsconfig.json" -type f); do echo "$file:" grep -E '"strict"|"target"' "$file" | head -2 done fiLength of output: 1150
--- 🏁 Script executed: ```shell #!/bin/bash # Verify start-large exists and compare TypeScript configurations echo "=== Checking if examples/solid/start-large exists ===" if [ -d "examples/solid/start-large" ]; then echo "✓ Directory exists" ls -la examples/solid/start-large/ | grep tsconfig else echo "✗ Directory does not exist" fi echo -e "\n=== Strict and Target settings across all examples ===" for file in $(find examples -name "tsconfig.json" -type f | sort); do strict=$(grep -o '"strict":\s*[^,}]*' "$file" 2>/dev/null | head -1) target=$(grep -o '"target":\s*"[^"]*' "$file" 2>/dev/null | head -1) echo "$file: $strict | $target" done | head -20 echo -e "\n=== Sample: React basic-file-based tsconfig.json ===" cat examples/react/basic-file-based/tsconfig.json 2>/dev/null | head -20Length of output: 2101
--- 🏁 Script executed: ```shell #!/bin/bash # Compare Solid examples specifically and show existing configuration echo "=== Target settings for Solid examples only ===" for file in $(find examples/solid -name "tsconfig.json" -type f | sort); do target=$(grep -o '"target":\s*"[^"]*' "$file" 2>/dev/null | head -1) echo "$file: $target" done | head -15 echo -e "\n=== Sample Solid example (basic-file-based) full config ===" cat examples/solid/basic-file-based/tsconfig.json 2>/dev/null echo -e "\n=== Sample Solid example (kitchen-sink) full config ===" cat examples/solid/kitchen-sink/tsconfig.json 2>/dev/null | head -25Length of output: 1769
Change target to "ESNext" to align with other Solid examples.
All other Solid examples use
"target": "ESNext"(13 out of 14). The reviewed file uses"ES2022", creating an inconsistency. Change line 14 to match the project standard. Additionally, review whether the extra compiler options (isolatedModules,resolveJsonModule,allowJs,forceConsistentCasingInFileNames,baseUrl,paths,noEmit) are needed for this example or if they should be removed for consistency with simpler Solid examples likeexamples/solid/basic-file-based/tsconfig.json.🤖 Prompt for AI Agents
In examples/solid/start-large/tsconfig.json lines 1-23, the compiler target is set to "ES2022" which is inconsistent with other Solid examples; change "target" to "ESNext" and update that line accordingly; then compare this file to examples/solid/basic-file-based/tsconfig.json and remove any extra compilerOptions that are not needed for the example (e.g., consider dropping isolatedModules, resolveJsonModule, allowJs, forceConsistentCasingInFileNames, baseUrl/paths, noEmit) so the file matches the simpler, consistent set used across other Solid examples.birkskyum(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
Walkthrough#
A new Solid Start example project is added to
examples/solid/start-large/with configuration files, router infrastructure, multiple typed route definitions, utilities, and a route generation script for scalable routing patterns.Changes#
examples/solid/start-large/.gitignore,.vscode/settings.json,tsconfig.json,vite.config.ts,postcss.config.mjs,package.jsonrouteTree.gen.ts).src/router.tsx,src/routes/__root.tsx,src/typePrimitives.tsx,src/styles.csscustomRedirect,useCustomNavigate,MyLink,ListItems) for typed navigation and link composition.src/routes/index.tsx,src/routes/absolute.tsx,src/routes/relative.tsx,src/routes/linkProps.tsx,src/routes/params/route.tsx,src/routes/params/$paramsPlaceholder.tsx,src/routes/search/route.tsx,src/routes/search/searchPlaceholder.tsx$paramsPlaceholder,searchPlaceholder), search validation via valibot, server functions with middleware, and query client integration for data fetching.src/routeTree.gen.ts@tanstack/solid-routerand@tanstack/solid-start, includingFileRoutesByFullPath,FileRoutesByTo,FileRoutesByIdinterfaces, per-path route metadata, and SSR router registration.src/createRoutes.mjsSequence Diagram#
Estimated code review effort#
🎯 3 (Moderate) | ⏱️ ~20 minutes
router.tsxand__root.tsx.routeTree.gen.tscorrectly maps routes, types, and parent/child relationships.Possibly related PRs#
routeTree.gen.tsmodules and corresponding__root.tsxroute definitions with SSR integration.Suggested labels#
ssr,package: solid-router,package: start-server-core,package: start-client-core,documentationSuggested reviewers#
Poem#
Pre-merge checks and finishing touches#
❌ Failed checks (1 warning)
@coderabbitai generate docstringsto improve docstring coverage.✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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