Skip to content
Source
Sign inSign up
TanStack/router

docs(solid-start): add start-streaming-data-from-server-functions example #5837

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

Adds

  • start-streaming-data-from-server-functions
  • start-counter (renamed from start-bare)

Tracking

Summary by CodeRabbit

  • New Features

    • Added a new streaming data example demonstrating how to stream typed data from server functions using both ReadableStream and async generators.
  • Documentation

    • Removed the "Bare" Solid example.
    • Updated example naming structure.
    1. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      Walkthrough

      The PR removes the "Bare" example from the Solid examples configuration list, renames the counter example package, and introduces a new streaming-data-from-server-functions example with complete Solid router scaffolding, TypeScript configuration, and a demonstration of streaming typed chunks via ReadableStream and async generator patterns.

      Changes

      Cohort / File(s)Summary
      Configuration Updates
      docs/start/config.json
      Removed the "Bare" entry (framework/solid/examples/start-bare) from the Solid example list.
      Package Metadata
      examples/solid/start-counter/package.json
      Updated package name from tanstack-solid-start-example-bare to tanstack-solid-start-example-counter.
      New Streaming Example – Setup
      examples/solid/start-streaming-data-from-server-functions/package.json, tsconfig.json, vite.config.ts
      Added project configuration files with standard Solid setup, TanStack Start integration, dev server port 3000, and TypeScript strict mode with JSX support.
      New Streaming Example – Routing
      examples/solid/start-streaming-data-from-server-functions/src/routeTree.gen.ts, router.tsx
      Added generated route tree with typed file-route mappings and module augmentations for @tanstack/solid-router and @tanstack/solid-start. Added router factory function getRouter with default preload, error, and not-found components.
      New Streaming Example – Routes
      examples/solid/start-streaming-data-from-server-functions/src/routes/__root.tsx, index.tsx
      Added root layout with HydrationScript, HeadContent, Outlet, and devtools. Added index route demonstrating streaming typed chunks via ReadableStream and async generator using Zod schema validation.
      New Streaming Example – Styles
      examples/solid/start-streaming-data-from-server-functions/src/styles/app.css
      Added stylesheet with base font styling, two-column grid layout for streamed results, and button alignment.

      Sequence Diagram(s)

      sequenceDiagram
          participant Client as Browser Client
          participant Router as Solid Router
          participant IndexRoute as Index Route
          participant StreamFn as streamingResponseFn
          participant AsyncGenFn as streamingWithAnAsyncGeneratorFn
          participant Server as Server
      
          Client->>Router: Navigate to /
          Router->>IndexRoute: Render Index Route
          IndexRoute->>Client: Display two buttons
      
          Client->>IndexRoute: Click "Get 10 random numbers (ReadableStream)"
          IndexRoute->>Server: Call streamingResponseFn
          Server->>StreamFn: Create ReadableStream<TextPart>
          StreamFn->>StreamFn: Enqueue chunk 1 (500ms delay)
          StreamFn-->>IndexRoute: Stream chunk 1
          IndexRoute->>Client: Append content to UI state
          Note over StreamFn: Repeat for chunks 2-10
          StreamFn-->>IndexRoute: Complete stream
      
          Client->>IndexRoute: Click "Get 10 random numbers (Async Generator)"
          IndexRoute->>Server: Call streamingWithAnAsyncGeneratorFn
          Server->>AsyncGenFn: Create async generator
          AsyncGenFn->>AsyncGenFn: Yield chunk 1 (500ms delay)
          AsyncGenFn-->>IndexRoute: Yield chunk 1
          IndexRoute->>Client: Append content to UI state
          Note over AsyncGenFn: Repeat for chunks 2-10
          AsyncGenFn-->>IndexRoute: Complete iteration
      
          Client->>Client: Display aggregated results in two pre blocks

      Estimated code review effort

      🎯 3 (Moderate) | ⏱️ ~20 minutes

      • Configuration removal: Straightforward deletion of one entry.
      • Package rename: Trivial single-field update.
      • New example scaffold: While spanning multiple files, the changes are predominantly boilerplate scaffolding (configuration, TypeScript, Vite setup) and generated code (routeTree.gen.ts).
      • Streaming logic: The index route introduces new logic with typed streaming via ReadableStream and async generators with Zod schema validation—moderate complexity but localized to a single file.
      • Homogeneous pattern: All new files belong to a single coherent example, reducing cognitive load across disparate change rationales.

      Areas requiring attention:

      • Verify the routeTree.gen.ts module augmentations are correctly aligned with @tanstack/solid-router and @tanstack/solid-start API contracts.
      • Confirm the streaming chunks (TextPart schema and delta.content references) properly align with expected server function return types.
      • Validate that the Vite and TypeScript configurations match the broader project's patterns for Solid examples.
      • TanStack/router#5577: Adds analogous Solid example scaffolding with routeTree.gen.ts and router typings augmentation for @tanstack/solid-start.
      • TanStack/router#5557: Adds generated Solid route tree and router code with module augmentations, directly related at the code level.
      • TanStack/router#5563: Modifies docs/start/config.json to update the Solid examples list, same configuration file as this PR.

      Suggested reviewers

      • schiller-manuel
      • brenelz

      Poem

      🐰 A streaming symphony, chunk by chunk, New routes bloom in Solid's trunk— Async generators dance with streams, TypeScript types fulfill the dreams! ✨

      Pre-merge checks and finishing touches

      ❌ Failed checks (1 warning)
      Check nameStatusExplanationResolution
      Docstring Coverage⚠️ WarningDocstring coverage is 33.33% which is insufficient. The required threshold is 80.00%.You can run @coderabbitai generate docstrings to improve docstring coverage.
      ✅ Passed checks (2 passed)
      Check nameStatusExplanation
      Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
      Title check✅ PassedThe title accurately describes the main change: adding a new Solid Start example for streaming data from server functions.
      ✨ 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 `start-streaming-data-from-server-functions`

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

      ❤️ Share
      Comment `@coderabbitai help` to get the list of available commands and usage tips.
    2. nx-cloud[bot](GitHub profile, opens in a new tab)commented

      View your CI Pipeline Execution ↗ for commit 3bf5f490ff20dcd55ef773c82d69a5eebf52dc77

      CommandStatusDurationResult
      nx affected --targets=test:eslint,test:unit,tes...✅ Succeeded5m 22sView ↗
      nx run-many --target=build --exclude=examples/*...✅ Succeeded1sView ↗

      ☁️ Nx Cloud last updated this comment at 2025-11-12 17:49:05 UTC

    3. More templates

      @tanstack/arktype-adapter

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

      @tanstack/directive-functions-plugin

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

      @tanstack/eslint-plugin-router

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

      @tanstack/history

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

      @tanstack/nitro-v2-vite-plugin

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

      @tanstack/react-router

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

      @tanstack/react-router-devtools

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

      @tanstack/react-router-ssr-query

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

      @tanstack/react-start

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

      @tanstack/react-start-client

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

      @tanstack/react-start-server

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

      @tanstack/router-cli

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

      @tanstack/router-core

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

      @tanstack/router-devtools

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

      @tanstack/router-devtools-core

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

      @tanstack/router-generator

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

      @tanstack/router-plugin

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

      @tanstack/router-ssr-query-core

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

      @tanstack/router-utils

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

      @tanstack/router-vite-plugin

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

      @tanstack/server-functions-plugin

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

      @tanstack/solid-router

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

      @tanstack/solid-router-devtools

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

      @tanstack/solid-router-ssr-query

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

      @tanstack/solid-start

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

      @tanstack/solid-start-client

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

      @tanstack/solid-start-server

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

      @tanstack/start-client-core

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

      @tanstack/start-plugin-core

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

      @tanstack/start-server-core

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

      @tanstack/start-static-server-functions

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

      @tanstack/start-storage-context

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

      @tanstack/valibot-adapter

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

      @tanstack/virtual-file-routes

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

      @tanstack/zod-adapter

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

      commit: 3bf5f49

    4. Actionable comments posted: 3

      Caution

      Some comments are outside the diff and can’t be posted inline due to platform limitations.

      ⚠️ Outside diff range comments (1)
      examples/solid/start-counter/package.json (1)

      12-14: Use workspace:* protocol for internal @tanstack dependencies.

      Internal monorepo packages should reference the workspace version rather than explicit semver versions, as per coding guidelines.

      Apply this diff to use the workspace protocol:

        "dependencies": {
      -   "@tanstack/solid-router": "^1.135.2",
      -   "@tanstack/solid-router-devtools": "^1.135.2",
      -   "@tanstack/solid-start": "^1.135.2",
      +   "@tanstack/solid-router": "workspace:*",
      +   "@tanstack/solid-router-devtools": "workspace:*",
      +   "@tanstack/solid-start": "workspace:*",
          "solid-js": "^1.9.10",

      As per coding guidelines.

      📜 Review details

      Configuration used: CodeRabbit UI

      Review profile: CHILL

      Plan: Pro

      📥 Commits

      Reviewing files that changed from the base of the PR and between 85f9734b6478a482d9143d56fc40bdc9d6588b55 and 3bf5f490ff20dcd55ef773c82d69a5eebf52dc77.

      ⛔ Files ignored due to path filters (3)
      • examples/solid/start-counter/public/favicon.ico is excluded by !**/*.ico
      • examples/solid/start-streaming-data-from-server-functions/public/favicon.ico is excluded by !**/*.ico
      • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
      📒 Files selected for processing (10)
      • docs/start/config.json (0 hunks)
      • examples/solid/start-counter/package.json (1 hunks)
      • examples/solid/start-streaming-data-from-server-functions/package.json (1 hunks)
      • examples/solid/start-streaming-data-from-server-functions/src/routeTree.gen.ts (1 hunks)
      • examples/solid/start-streaming-data-from-server-functions/src/router.tsx (1 hunks)
      • examples/solid/start-streaming-data-from-server-functions/src/routes/__root.tsx (1 hunks)
      • examples/solid/start-streaming-data-from-server-functions/src/routes/index.tsx (1 hunks)
      • examples/solid/start-streaming-data-from-server-functions/src/styles/app.css (1 hunks)
      • examples/solid/start-streaming-data-from-server-functions/tsconfig.json (1 hunks)
      • examples/solid/start-streaming-data-from-server-functions/vite.config.ts (1 hunks)
      💤 Files with no reviewable changes (1)
      • docs/start/config.json
      🧰 Additional context used
      📓 Path-based instructions (4)
      **/package.json

      📄 CodeRabbit inference engine (AGENTS.md)

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

      Files:

      • examples/solid/start-streaming-data-from-server-functions/package.json
      • examples/solid/start-counter/package.json
      examples/{react,solid}/**

      📄 CodeRabbit inference engine (AGENTS.md)

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

      Files:

      • examples/solid/start-streaming-data-from-server-functions/package.json
      • examples/solid/start-counter/package.json
      • examples/solid/start-streaming-data-from-server-functions/src/routes/index.tsx
      • examples/solid/start-streaming-data-from-server-functions/src/router.tsx
      • examples/solid/start-streaming-data-from-server-functions/tsconfig.json
      • examples/solid/start-streaming-data-from-server-functions/src/routes/__root.tsx
      • examples/solid/start-streaming-data-from-server-functions/vite.config.ts
      • examples/solid/start-streaming-data-from-server-functions/src/routeTree.gen.ts
      • examples/solid/start-streaming-data-from-server-functions/src/styles/app.css
      **/*.{ts,tsx}

      📄 CodeRabbit inference engine (AGENTS.md)

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

      Files:

      • examples/solid/start-streaming-data-from-server-functions/src/routes/index.tsx
      • examples/solid/start-streaming-data-from-server-functions/src/router.tsx
      • examples/solid/start-streaming-data-from-server-functions/src/routes/__root.tsx
      • examples/solid/start-streaming-data-from-server-functions/vite.config.ts
      • examples/solid/start-streaming-data-from-server-functions/src/routeTree.gen.ts
      **/src/routes/**

      📄 CodeRabbit inference engine (AGENTS.md)

      Place file-based routes under src/routes/ directories

      Files:

      • examples/solid/start-streaming-data-from-server-functions/src/routes/index.tsx
      • examples/solid/start-streaming-data-from-server-functions/src/routes/__root.tsx
      🧠 Learnings (9)
      📓 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 examples/{react,solid}/** : Keep example applications under examples/react/ and examples/solid/
      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/
      📚 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-streaming-data-from-server-functions/package.json
      • examples/solid/start-streaming-data-from-server-functions/tsconfig.json
      • examples/solid/start-streaming-data-from-server-functions/src/routes/__root.tsx
      • examples/solid/start-streaming-data-from-server-functions/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/{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-streaming-data-from-server-functions/package.json
      • examples/solid/start-streaming-data-from-server-functions/src/router.tsx
      • examples/solid/start-streaming-data-from-server-functions/tsconfig.json
      • examples/solid/start-streaming-data-from-server-functions/src/routes/__root.tsx
      • examples/solid/start-streaming-data-from-server-functions/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-streaming-data-from-server-functions/src/router.tsx
      • examples/solid/start-streaming-data-from-server-functions/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-streaming-data-from-server-functions/src/router.tsx
      • examples/solid/start-streaming-data-from-server-functions/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-streaming-data-from-server-functions/tsconfig.json
      📚 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-streaming-data-from-server-functions/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-streaming-data-from-server-functions/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-streaming-data-from-server-functions/src/routeTree.gen.ts
      🧬 Code graph analysis (3)
      examples/solid/start-streaming-data-from-server-functions/src/routes/index.tsx (1)
      examples/solid/start-streaming-data-from-server-functions/src/routes/__root.tsx (1)
      • Route (13-18)
      examples/solid/start-streaming-data-from-server-functions/src/routes/__root.tsx (1)
      examples/solid/start-streaming-data-from-server-functions/src/routes/index.tsx (1)
      • Route (91-93)
      examples/solid/start-streaming-data-from-server-functions/src/routeTree.gen.ts (1)
      examples/solid/start-streaming-data-from-server-functions/src/router.tsx (1)
      • getRouter (4-14)
      ⏰ 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 (1)
      examples/solid/start-counter/package.json (1)

      2-2: Package name aligns with directory structure.

      The rename from "tanstack-solid-start-example-bare" to "tanstack-solid-start-example-counter" correctly reflects the new directory name and maintains consistency with naming conventions.

      @@ -0,0 +1,9 @@
      1+{
      2+ "name": "tanstack-solid-start-streaming-data-from-server-functions",
      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"
      coderabbitai[bot](GitHub profile, opens in a new tab)commented

      ⚠️ Potential issue | 🔴 Critical

      Fix the production preview script.

      Vite exposes dev, build, and preview; there is no vite start, so npm run start will fail at runtime. Switch to vite preview to align with the documented CLI.(vite.dev)

      -    "start": "vite start"
      +    "start": "vite preview"
      📝 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
      7- "dev": "vite dev",
      8- "build": "vite build && tsc --noEmit",
      9- "start": "vite start"
      7+ "dev": "vite dev",
      8+ "build": "vite build && tsc --noEmit",
      9+ "start": "vite preview"
      🤖 Prompt for AI Agents
      In examples/solid/start-streaming-data-from-server-functions/package.json around
      lines 7 to 9, the "start" script is using the non-existent "vite start" CLI
      which will fail; update the "start" script to use "vite preview" (e.g., "start":
      "vite preview") so npm run start runs Vite's production preview, keeping the
      existing "build" and "dev" scripts unchanged.
      @@ -0,0 +1,17 @@
      1+{
      2+ "name": "tanstack-solid-start-streaming-data-from-server-functions",
      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+ },
      11+ "dependencies": {
      12+ "@tanstack/solid-router": "^1.135.2",
      13+ "@tanstack/solid-router-devtools": "^1.135.2",
      14+ "@tanstack/solid-start": "^1.135.2",
      15+ "solid-js": "^1.9.10",
      16+ "zod": "^3.24.2"
      17+ },
      coderabbitai[bot](GitHub profile, opens in a new tab)commented

      🛠️ Refactor suggestion | 🟠 Major

      Use workspace protocol for in-repo packages.

      The @tanstack packages are part of this monorepo, so the dependencies here should point to workspace:* instead of published semver ranges. This keeps the example pinned to the local sources during development and satisfies the repo’s package.json guideline. As per coding guidelines.

      -    "@tanstack/solid-router": "^1.135.2",
      -    "@tanstack/solid-router-devtools": "^1.135.2",
      -    "@tanstack/solid-start": "^1.135.2",
      +    "@tanstack/solid-router": "workspace:*",
      +    "@tanstack/solid-router-devtools": "workspace:*",
      +    "@tanstack/solid-start": "workspace:*",
      📝 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
      12- "@tanstack/solid-router": "^1.135.2",
      13- "@tanstack/solid-router-devtools": "^1.135.2",
      14- "@tanstack/solid-start": "^1.135.2",
      15- "solid-js": "^1.9.10",
      16- "zod": "^3.24.2"
      17- },
      12+ "@tanstack/solid-router": "workspace:*",
      13+ "@tanstack/solid-router-devtools": "workspace:*",
      14+ "@tanstack/solid-start": "workspace:*",
      15+ "solid-js": "^1.9.10",
      16+ "zod": "^3.24.2"
      17+ },
      🤖 Prompt for AI Agents
      In examples/solid/start-streaming-data-from-server-functions/package.json around
      lines 12 to 17, the @tanstack dependencies use published semver ranges; replace
      each @tanstack/* entry to use the workspace protocol (e.g., "workspace:*") so
      the package points to the in-repo packages instead of external releases, and
      keep other deps (solid-js, zod) unchanged.
      @@ -0,0 +17,21 @@
      17+ component: RootComponent,
      18+})
      19+
      20+function RootComponent() {
      21+ return (
      22+ <RootDocument>
      23+ <Outlet />
      24+ </RootDocument>
      25+ )
      26+}
      27+
      28+function RootDocument({ children }: { children: JSX.Element }) {
      29+ return (
      30+ <html>
      31+ <head>
      32+ <HydrationScript />
      33+ </head>
      34+ <body>
      35+ <HeadContent />
      36+ {children}
      37+ <TanStackRouterDevtools position="bottom-right" />
      coderabbitai[bot](GitHub profile, opens in a new tab)commented

      ⚠️ Potential issue | 🟠 Major

      Move HeadContent into <head>.

      HeadContent renders <title>, meta tags, and links; keeping it in <body> produces invalid markup and prevents browsers from treating those tags as head elements. Render it inside <head> alongside HydrationScript, and leave <body> for app content/devtools.

      -    <html>
      -      <head>
      -        <HydrationScript />
      -      </head>
      -      <body>
      -        <HeadContent />
      +    <html>
      +      <head>
      +        <HydrationScript />
      +        <HeadContent />
      +      </head>
      +      <body>
               {children}
      📝 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
      31- <head>
      32- <HydrationScript />
      33- </head>
      34- <body>
      35- <HeadContent />
      36- {children}
      37- <TanStackRouterDevtools position="bottom-right" />
      31+ <head>
      32+ <HydrationScript />
      33+ <HeadContent />
      34+ </head>
      35+ <body>
      36+ {children}
      37+ <TanStackRouterDevtools position="bottom-right" />
      🤖 Prompt for AI Agents
      In
      examples/solid/start-streaming-data-from-server-functions/src/routes/__root.tsx
      around lines 31 to 37, HeadContent is being rendered inside the <body> which
      places <title>, meta and link tags in the body; move the <HeadContent />
      component into the <head> section next to <HydrationScript /> so those tags are
      output inside the document head and leave the <body> to contain {children} and
      the TanStackRouterDevtools.

Sign in to join this conversation.