Skip to content

Conversation

@birkskyum
Copy link
Member

@birkskyum birkskyum commented Nov 3, 2025

This workaround is no longer needed with the latest version of solid-query

Summary by CodeRabbit

  • Refactor
    • Updated query client initialization across multiple router configurations to use default settings, removing custom prefetch behavior from the query system.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 3, 2025

Walkthrough

This PR removes the experimental prefetchInRender flag from QueryClient default options across four Solid Start router files (e2e tests and examples), replacing custom configurations with plain QueryClient constructors. One file adds a module augmentation declaration for router type registration.

Changes

Cohort / File(s) Summary
Remove experimental prefetchInRender from QueryClient
e2e/solid-start/basic-solid-query/src/router.tsx, e2e/solid-start/query-integration/src/router.tsx, e2e/solid-start/server-functions/src/router.tsx, examples/solid/start-basic-solid-query/src/router.tsx
Replaced QueryClient initialization with defaultOptions.queries.experimental_prefetchInRender: true to plain new QueryClient() with no custom options
Add router type registration
examples/solid/start-basic-solid-query/src/router.tsx
Added module augmentation to declare router type in @tanstack/solid-router Register interface

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

  • All changes follow the same homogeneous pattern (removing the same config flag)
  • Minor variation with module augmentation declaration in one file

Possibly related PRs

Suggested labels

package: router-ssr-query-core, package: solid-router-ssr-query, package: solid-start

Poem

🐰 The prefetch flag takes its final bow,
Plain QueryClients rule the show,
Four files simplified, clean and bright,
Experimental whispers fade from sight,
Defaults dance where tweaks once go! ✨

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title clearly and specifically describes the main change: removing the experimental_prefetchInRender configuration from multiple QueryClient initializations across solid-start examples and e2e tests. The title is concise, directly relates to the primary objective stated in the PR description (removing this workaround as it's no longer needed), and would help teammates quickly understand the purpose of this changeset when scanning the repository history.
✨ 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 experimental_prefetchInRender

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8964b5c and cea16d3.

📒 Files selected for processing (4)
  • e2e/solid-start/basic-solid-query/src/router.tsx (1 hunks)
  • e2e/solid-start/query-integration/src/router.tsx (1 hunks)
  • e2e/solid-start/server-functions/src/router.tsx (1 hunks)
  • examples/solid/start-basic-solid-query/src/router.tsx (1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

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

Files:

  • e2e/solid-start/query-integration/src/router.tsx
  • e2e/solid-start/server-functions/src/router.tsx
  • e2e/solid-start/basic-solid-query/src/router.tsx
  • examples/solid/start-basic-solid-query/src/router.tsx
e2e/**

📄 CodeRabbit inference engine (AGENTS.md)

Store end-to-end tests under the e2e/ directory

Files:

  • e2e/solid-start/query-integration/src/router.tsx
  • e2e/solid-start/server-functions/src/router.tsx
  • e2e/solid-start/basic-solid-query/src/router.tsx
examples/{react,solid}/**

📄 CodeRabbit inference engine (AGENTS.md)

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

Files:

  • examples/solid/start-basic-solid-query/src/router.tsx
🧠 Learnings (6)
📓 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 packages/{react-router,solid-router}/** : Implement React and Solid bindings/components only in packages/react-router/ and packages/solid-router/
📚 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:

  • e2e/solid-start/basic-solid-query/src/router.tsx
  • examples/solid/start-basic-solid-query/src/router.tsx
📚 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-basic-solid-query/src/router.tsx
📚 Learning: 2025-10-01T18:30:26.591Z
Learnt from: schiller-manuel
Repo: TanStack/router PR: 5330
File: packages/router-core/src/router.ts:2231-2245
Timestamp: 2025-10-01T18:30:26.591Z
Learning: In `packages/router-core/src/router.ts`, the `resolveRedirect` method intentionally strips the router's origin from redirect URLs when they match (e.g., `https://foo.com/bar` → `/bar` for same-origin redirects) while preserving the full URL for cross-origin redirects. This logic should not be removed or simplified to use `location.publicHref` directly.

Applied to files:

  • examples/solid/start-basic-solid-query/src/router.tsx
📚 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-basic-solid-query/src/router.tsx
📚 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-basic-solid-query/src/router.tsx
⏰ 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: Preview
  • GitHub Check: Test
🔇 Additional comments (4)
e2e/solid-start/server-functions/src/router.tsx (1)

9-9: LGTM - Clean removal of experimental configuration.

The change from a configured QueryClient to a plain constructor correctly removes the experimental_prefetchInRender workaround as stated in the PR objectives.

e2e/solid-start/basic-solid-query/src/router.tsx (1)

9-9: LGTM - Consistent with PR objective.

The removal of the experimental_prefetchInRender configuration is correctly applied.

e2e/solid-start/query-integration/src/router.tsx (1)

7-7: LGTM - Correctly removes experimental flag.

The QueryClient initialization change aligns with the PR's goal of removing the experimental_prefetchInRender workaround.

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

9-9: The experimental flag is still available in the latest version—clarify PR intent.

The web search results show that @tanstack/solid-query@5.80.7 (latest) still includes experimental_prefetchInRender in queryOptions, contradicting the assumption that this flag is "no longer needed." The code change appears to be a local simplification of this example file, not a response to library-level deprecation or removal. Verify whether the PR is intentionally removing usage of this experimental flag (which is a local code preference) or whether it assumes the flag has been deprecated library-wide (which is not the case).

Likely an incorrect or invalid review comment.


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 3, 2025

View your CI Pipeline Execution ↗ for commit cea16d3

Command Status Duration Result
nx affected --targets=test:eslint,test:unit,tes... ✅ Succeeded 1m 53s View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 40s View ↗

☁️ Nx Cloud last updated this comment at 2025-11-03 16:45:21 UTC

@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 3, 2025

More templates

@tanstack/arktype-adapter

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

@tanstack/directive-functions-plugin

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

@tanstack/eslint-plugin-router

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

@tanstack/history

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

@tanstack/nitro-v2-vite-plugin

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

@tanstack/react-router

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

@tanstack/react-router-devtools

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

@tanstack/react-router-ssr-query

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

@tanstack/react-start

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

@tanstack/react-start-client

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

@tanstack/react-start-server

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

@tanstack/router-cli

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

@tanstack/router-core

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

@tanstack/router-devtools

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

@tanstack/router-devtools-core

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

@tanstack/router-generator

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

@tanstack/router-plugin

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

@tanstack/router-ssr-query-core

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

@tanstack/router-utils

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

@tanstack/router-vite-plugin

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

@tanstack/server-functions-plugin

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

@tanstack/solid-router

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

@tanstack/solid-router-devtools

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

@tanstack/solid-router-ssr-query

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

@tanstack/solid-start

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

@tanstack/solid-start-client

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

@tanstack/solid-start-server

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

@tanstack/start-client-core

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

@tanstack/start-plugin-core

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

@tanstack/start-server-core

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

@tanstack/start-static-server-functions

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

@tanstack/start-storage-context

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

@tanstack/valibot-adapter

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

@tanstack/virtual-file-routes

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

@tanstack/zod-adapter

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

commit: cea16d3

@birkskyum birkskyum merged commit 7fbd3e2 into main Nov 3, 2025
6 checks passed
@birkskyum birkskyum deleted the experimental_prefetchInRender branch November 3, 2025 16:54
roduyemi pushed a commit to roduyemi/oss-router that referenced this pull request Nov 19, 2025
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