Skip to content

Conversation

@birkskyum
Copy link
Member

@birkskyum birkskyum commented Nov 12, 2025

Screenshot 2025-11-12 at 20 40 05

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.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 12, 2025

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

Cohort / File(s) Summary
Configuration & Setup
examples/solid/start-large/.gitignore, .vscode/settings.json, tsconfig.json, vite.config.ts, postcss.config.mjs, package.json
Adds project-wide configuration including dependency management, TypeScript strict mode with Solid.js JSX, Vite + TanStack Solid Start plugin setup with SSR, Tailwind CSS integration via PostCSS, and VS Code workspace settings (excludes and readonly for generated routeTree.gen.ts).
Router & App Infrastructure
src/router.tsx, src/routes/__root.tsx, src/typePrimitives.tsx, src/styles.css
Establishes root route with SSR context (QueryClient), TanStack Router Devtools integration, and Tailwind-based styling with CSS variables and light/dark mode support. Exports type-safe routing primitives (customRedirect, useCustomNavigate, MyLink, ListItems) for typed navigation and link composition.
Route Files
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
Defines eight file-based routes demonstrating navigation patterns (relative, absolute, link props), dynamic segments ($paramsPlaceholder, searchPlaceholder), search validation via valibot, server functions with middleware, and query client integration for data fetching.
Generated Route Tree
src/routeTree.gen.ts
Generates fully-typed route tree and module augmentations for @tanstack/solid-router and @tanstack/solid-start, including FileRoutesByFullPath, FileRoutesByTo, FileRoutesById interfaces, per-path route metadata, and SSR router registration.
Route Generation Script
src/createRoutes.mjs
Adds build script that reads TSX templates, creates target directories, and generates 100 numbered route files via string replacement for demonstrating scalable routing.

Sequence Diagram

sequenceDiagram
    participant Browser
    participant App as Solid Start App
    participant Router as TanStack Router
    participant QueryClient as QueryClient
    
    Browser->>App: Request /
    App->>Router: Initialize Router (routeTree.gen)
    Router->>QueryClient: Create & attach QueryClient
    Router->>Router: Build typed route tree
    Note over Router: FileRoutesByPath, FileRoutesByTo<br/>augmented via module declarations
    Router-->>App: Configured Router
    App-->>Browser: Render RootComponent + Outlet
    
    Browser->>App: Navigate to /params/value
    App->>Router: useNavigate({ to: '/params/$value' })
    Router->>QueryClient: Execute loader via getQueryData
    QueryClient-->>Router: Cached/fetched data
    Router->>Browser: Render route component with data
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Route configuration: Verify router initialization, QueryClient wiring, and SSR context setup in router.tsx and __root.tsx.
  • Generated type safety: Check that routeTree.gen.ts correctly maps routes, types, and parent/child relationships.
  • Route implementations: Scan route files for consistent patterns (validation schemas, loaders, server functions) and correct use of type-safe primitives.
  • Example quality: Ensure route examples properly demonstrate navigation, search validation, dynamic segments, and link props usage.

Possibly related PRs

Suggested labels

ssr, package: solid-router, package: start-server-core, package: start-client-core, documentation

Suggested reviewers

  • brenelz

Poem

🐰 A burrow of routes, so carefully laid,
With types that are strong and cascades well-made,
From search to params, each path finds its way,
Solid Start shines—hop along, come what may! 🚀

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a new large-scale example for Solid Start, which is the primary focus of all 18 modified/added files in the changeset.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs(solid-start)--start-large-example

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@nx-cloud
Copy link

nx-cloud bot commented Nov 12, 2025

View your CI Pipeline Execution ↗ for commit 08deea1

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:00 UTC

@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 12, 2025

More templates

@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@5847

commit: 08deea1

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

🧹 Nitpick comments (1)
examples/solid/start-large/src/styles.css (1)

3-30: Consider consolidating the two @layer base blocks.

The file defines two separate @layer base blocks (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 b5d7227 and 08deea1.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is 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.tsx
  • examples/solid/start-large/src/routes/params/route.tsx
  • examples/solid/start-large/src/routes/__root.tsx
  • examples/solid/start-large/src/routes/params/$paramsPlaceholder.tsx
  • examples/solid/start-large/src/routes/search/route.tsx
  • examples/solid/start-large/src/router.tsx
  • examples/solid/start-large/src/routes/relative.tsx
  • examples/solid/start-large/src/typePrimitives.tsx
  • examples/solid/start-large/vite.config.ts
  • examples/solid/start-large/src/routes/absolute.tsx
  • examples/solid/start-large/src/routes/search/searchPlaceholder.tsx
  • examples/solid/start-large/src/routes/index.tsx
  • examples/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.tsx
  • examples/solid/start-large/src/routes/params/route.tsx
  • examples/solid/start-large/src/routes/__root.tsx
  • examples/solid/start-large/src/routes/params/$paramsPlaceholder.tsx
  • examples/solid/start-large/src/routes/search/route.tsx
  • examples/solid/start-large/src/routes/relative.tsx
  • examples/solid/start-large/src/routes/absolute.tsx
  • examples/solid/start-large/src/routes/search/searchPlaceholder.tsx
  • examples/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.tsx
  • examples/solid/start-large/src/routes/params/route.tsx
  • examples/solid/start-large/src/routes/__root.tsx
  • examples/solid/start-large/src/createRoutes.mjs
  • examples/solid/start-large/src/routes/params/$paramsPlaceholder.tsx
  • examples/solid/start-large/src/routes/search/route.tsx
  • examples/solid/start-large/src/router.tsx
  • examples/solid/start-large/src/styles.css
  • examples/solid/start-large/src/routes/relative.tsx
  • examples/solid/start-large/src/typePrimitives.tsx
  • examples/solid/start-large/vite.config.ts
  • examples/solid/start-large/src/routes/absolute.tsx
  • examples/solid/start-large/package.json
  • examples/solid/start-large/postcss.config.mjs
  • examples/solid/start-large/src/routes/search/searchPlaceholder.tsx
  • examples/solid/start-large/tsconfig.json
  • examples/solid/start-large/src/routes/index.tsx
  • examples/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.tsx
  • examples/solid/start-large/src/routes/params/route.tsx
  • examples/solid/start-large/src/routes/__root.tsx
  • examples/solid/start-large/src/createRoutes.mjs
  • examples/solid/start-large/src/routes/params/$paramsPlaceholder.tsx
  • examples/solid/start-large/src/routes/search/route.tsx
  • examples/solid/start-large/src/routes/relative.tsx
  • examples/solid/start-large/src/typePrimitives.tsx
  • examples/solid/start-large/src/routes/absolute.tsx
  • examples/solid/start-large/src/routes/search/searchPlaceholder.tsx
  • examples/solid/start-large/tsconfig.json
  • examples/solid/start-large/src/routes/index.tsx
  • 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 **/src/routes/** : Place file-based routes under src/routes/ directories

Applied to files:

  • examples/solid/start-large/src/routes/params/route.tsx
  • examples/solid/start-large/src/createRoutes.mjs
  • examples/solid/start-large/src/routes/relative.tsx
  • examples/solid/start-large/src/routes/absolute.tsx
  • examples/solid/start-large/src/routes/index.tsx
  • examples/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.tsx
  • examples/solid/start-large/src/createRoutes.mjs
  • examples/solid/start-large/src/routes/params/$paramsPlaceholder.tsx
  • examples/solid/start-large/src/routes/search/route.tsx
  • examples/solid/start-large/.vscode/settings.json
  • examples/solid/start-large/src/routes/relative.tsx
  • examples/solid/start-large/src/routes/absolute.tsx
  • examples/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.tsx
  • examples/solid/start-large/src/routes/params/$paramsPlaceholder.tsx
  • examples/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.tsx
  • examples/solid/start-large/src/createRoutes.mjs
  • examples/solid/start-large/.gitignore
  • examples/solid/start-large/.vscode/settings.json
  • examples/solid/start-large/src/routes/relative.tsx
  • 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 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 directories

Applied to files:

  • examples/solid/start-large/src/createRoutes.mjs
  • examples/solid/start-large/.gitignore
  • 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 **/*.{ts,tsx} : Use TypeScript in strict mode with extensive type safety across the codebase

Applied to files:

  • examples/solid/start-large/src/typePrimitives.tsx
  • examples/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.json
  • examples/solid/start-large/tsconfig.json
  • 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 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.ts file 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.

Comment on lines +1 to +19
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 No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ 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.

Suggested change
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
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.

Comment on lines +13 to +21
"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",
"solid-js": "^1.9.10",
"redaxios": "^0.5.1",
"tailwind-merge": "^2.6.0",
"valibot": "^1.0.0-beta.15"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ 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.

Comment on lines +37 to +49
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()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ 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.

Suggested change
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()
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.

Comment on lines +33 to +37
const fn = createServerFn()
.middleware([middleware])
.handler(() => {
return v.parse(loaderResult, {})
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Server handler never returns valid data

v.parse(loaderResult, {}) runs with an empty object, so Valibot throws before returning. Every call to fn(...) 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 the params key) instead of parsing {}.

 const fn = createServerFn()
   .middleware([middleware])
-  .handler(() => {
-    return v.parse(loaderResult, {})
-  })
+  .handler(({ data }) => v.parse(loaderResult, { params: data }))

Comment on lines +61 to +62
loader: (opts) =>
opts.context.queryClient.ensureQueryData(paramsQueryOptions),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Loader is using the wrong query options

ensureQueryData points at the module-level paramsQueryOptions, whose queryFn still calls v.parse(loaderResult, {}) and never hits your server function. This throws immediately and bypasses the per-request options you placed in context. Call the query options from opts.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.

Comment on lines +6 to +84
const search = v.object({
searchPlaceholder: v.literal('searchPlaceholder'),
page: v.number(),
offset: v.number(),
search: v.string(),
})

const loaderResult = v.object({
searchPlaceholder: v.number(),
})

const middleware = createMiddleware({ type: 'function' })
.inputValidator(search)
.client(({ next }) => {
const context = { client: { searchPlaceholder: 'searchPlaceholder' } }
return next({
context,
sendContext: context,
})
})
.server(({ next }) => {
const context = { server: { searchPlaceholder: 'searchPlaceholder' } }
return next({
context,
sendContext: context,
})
})

const fn = createServerFn()
.middleware([middleware])
.handler(() => {
const result = v.parse(loaderResult, {
searchPlaceholder: 0,
})
return result
})

export const Route = createFileRoute('/search/searchPlaceholder')({
server: {
handlers: {
GET: () => {
return new Response('searchPlaceholder')
},
},
},
component: SearchComponent,
validateSearch: search,
loaderDeps: ({ search }) => ({ search }),
context: (ctx) => ({
searchQueryOptions: queryOptions({
queryKey: ['searchPlaceholder'],
queryFn: () => fn({ data: ctx.deps.search }),
}),
}),
loader: async (opts) => {
const search = await opts.context.queryClient.ensureQueryData(
opts.context.searchQueryOptions,
)

return {
search,
}
},
})

function SearchComponent() {
return (
<div class="p-2 space-y-2">
<Link
to="/search/searchPlaceholder"
class="block py-1 text-blue-800 hover:text-blue-600"
search={{
searchPlaceholder: 'searchPlaceholder',
page: 0,
offset: 10,
search: 'search',
rootSearch: 0,
}}
>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Search schema drops rootSearch.

validateSearch uses v.object. That parser removes keys not declared in the schema, so the rootSearch you pass in the <Link> (and that upstream routes may rely on) gets stripped before loaders run. Either add rootSearch to this schema (with the right validator) or switch to v.objectWithRest if 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.

Comment on lines +1 to +23
{
"include": ["**/*.ts", "**/*.tsx"],
"compilerOptions": {
"strict": true,
"esModuleInterop": true,
"jsx": "preserve",
"jsxImportSource": "solid-js",
"module": "ESNext",
"moduleResolution": "Bundler",
"lib": ["DOM", "DOM.Iterable", "ES2022"],
"isolatedModules": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"target": "ES2022",
"allowJs": true,
"forceConsistentCasingInFileNames": true,
"baseUrl": ".",
"paths": {
"~/*": ["./src/*"]
},
"noEmit": true
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ 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.json or examples/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
fi

Length 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 -20

Length 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 -25

Length 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 like examples/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 birkskyum merged commit ee241f3 into main Nov 12, 2025
6 checks passed
@birkskyum birkskyum deleted the docs(solid-start)--start-large-example branch November 12, 2025 20:01
roduyemi pushed a commit to roduyemi/oss-router that referenced this pull request Nov 19, 2025
* docs(solid-start): start-large example

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants