Skip to content

Conversation

@Prathamesh-chougale-17
Copy link

@Prathamesh-chougale-17 Prathamesh-chougale-17 commented Oct 26, 2025

Updated the Tanstack Devtool. Please Refer below video to checkout.

Screen.Recording.2025-10-26.234239.mp4

You can also update other frontend with new tanstack devtool.

Thank you.

Summary by CodeRabbit

  • Dependencies

    • Added a React Devtools package for TanStack to devDependencies.
  • Refactor

    • Unified developer tools into a single TanStack Devtools interface with plugin-based panels.
    • Consolidated Router and Query debug panels into one bottom-right devtools window; Query panel is included conditionally when applicable.

@vercel
Copy link

vercel bot commented Oct 26, 2025

@Prathamesh-chougale-17 is attempting to deploy a commit to the Aman Varshney's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 26, 2025

Walkthrough

Added @tanstack/react-devtools to the template package and refactored devtools usage in the root route to use a unified TanStackDevtools component with plugin-based panels (router panel always, query panel conditionally).

Changes

Cohort / File(s) Summary
Package Dependency Addition
apps/cli/templates/frontend/react/tanstack-router/package.json.hbs
Added devDependency @tanstack/react-devtools (version ^0.7.8)
DevTools Refactor in Root Layout
apps/cli/templates/frontend/react/tanstack-router/src/routes/__root.tsx.hbs
Replaced direct TanStackRouterDevtools and ReactQueryDevtools usage with a single <TanStackDevtools ... plugins=[...] />; updated imports to TanStackDevtools, TanStackRouterDevtoolsPanel, and ReactQueryDevtoolsPanel; positioned at bottom-right; React Query panel added conditionally when orpc/trpc APIs are present

Sequence Diagram(s)

sequenceDiagram
    participant App as Root Layout
    participant TSD as TanStackDevtools
    participant RouterP as TanStackRouterDevtoolsPanel
    participant QueryP as ReactQueryDevtoolsPanel

    App->>TSD: Render TanStackDevtools(position="bottom-right", plugins=[...])
    TSD->>RouterP: Load Router panel plugin
    alt orpc/trpc APIs present
        TSD->>QueryP: Load Query panel plugin
    end
    TSD->>App: Expose unified devtools UI (tabbed panels)
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Small, focused changes across two template files.
  • Review attention: import updates and correct conditional inclusion of the React Query panel; ensure package version aligns with other TanStack packages.

Possibly related PRs

Poem

🐰
I hopped through code with careful paws,
Merged panels tidy, fixed the cause.
One devtools nest where bugs can hide,
Bottom-right I watch and guide.
Debugging carrots for the ride! 🥕✨

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 PR title "updated the tanstack devtool to new tanstack devtool in frontend/react/tanstack-router" clearly references the main change in the changeset: updating the TanStack Devtools implementation in the frontend/react/tanstack-router template. The title is specific about both what is being changed (TanStack Devtools) and where it's being changed (frontend/react/tanstack-router), which aligns with the actual modifications visible in the raw summary (adding @tanstack/react-devtools dependency and refactoring devtools imports and usage to a unified plugin-based approach). While the phrasing is slightly redundant, the title sufficiently communicates the primary change to help teammates understand the nature of the PR when scanning history.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a 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.

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: 1

🧹 Nitpick comments (2)
apps/cli/templates/frontend/react/tanstack-router/src/routes/__root.tsx.hbs (2)

104-120: Consider using official "TanStack" branding in plugin names.

The plugin names use "Tanstack Router" and "Tanstack Query" (lines 110, 115), but the official branding is "TanStack" with a capital 'S'. While this doesn't affect functionality, using consistent branding improves the developer experience.

Apply this diff to use official branding:

 				plugins={[
 					{
-						name: "Tanstack Router",
+						name: "TanStack Router",
 						render: <TanStackRouterDevtoolsPanel />,
 					},
           {{#if (or (eq api "orpc") (eq api "trpc"))}}
 					{
-						name: "Tanstack Query",
+						name: "TanStack Query",
 						render: <ReactQueryDevtoolsPanel />,
 					},
           {{/if}}
 				]}

113-118: Consider explicit conditions per coding guidelines.

The coding guidelines suggest using explicit conditions rather than logical operators in Handlebars templates. While the current or usage is clear, you could write it as explicit conditions to strictly follow the guideline:

{{#if (eq api "orpc")}}
{
  name: "TanStack Query",
  render: <ReactQueryDevtoolsPanel />,
},
{{else if (eq api "trpc")}}
{
  name: "TanStack Query",
  render: <ReactQueryDevtoolsPanel />,
},
{{/if}}

However, this creates code duplication. The current approach using or is acceptable and more maintainable.

Based on 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 21c830f and 86a6b56.

📒 Files selected for processing (2)
  • apps/cli/templates/frontend/react/tanstack-router/package.json.hbs (1 hunks)
  • apps/cli/templates/frontend/react/tanstack-router/src/routes/__root.tsx.hbs (3 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{hbs,handlebars}

📄 CodeRabbit inference engine (.cursor/rules/better-t-stack-repo.mdc)

In Handlebars templates, avoid generic if/else blocks; write explicit conditions (e.g., if (eq orm "prisma") and else if (eq orm "drizzle")).

Files:

  • apps/cli/templates/frontend/react/tanstack-router/package.json.hbs
  • apps/cli/templates/frontend/react/tanstack-router/src/routes/__root.tsx.hbs
🔇 Additional comments (1)
apps/cli/templates/frontend/react/tanstack-router/src/routes/__root.tsx.hbs (1)

8-8: LGTM! Import changes align with the new plugin-based architecture.

The refactored imports correctly transition from standalone devtools components to panel-based plugins that integrate with the unified TanStackDevtools container.

Also applies to: 17-17, 25-26

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: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 86a6b56 and e89fa08.

📒 Files selected for processing (1)
  • apps/cli/templates/frontend/react/tanstack-router/package.json.hbs (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{hbs,handlebars}

📄 CodeRabbit inference engine (.cursor/rules/better-t-stack-repo.mdc)

In Handlebars templates, avoid generic if/else blocks; write explicit conditions (e.g., if (eq orm "prisma") and else if (eq orm "drizzle")).

Files:

  • apps/cli/templates/frontend/react/tanstack-router/package.json.hbs

"zod": "^4.0.2"
},
"devDependencies": {
"@tanstack/react-devtools": "^0.7.8",
Copy link
Contributor

@coderabbitai coderabbitai bot Oct 26, 2025

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

Correct placement in devDependencies.

The package is correctly placed in devDependencies, which ensures it won't be included in production bundles. This addresses the concern raised in the previous review.

However, please verify that version ^0.7.8 is valid and up-to-date, as well as free from security vulnerabilities.


🌐 Web query:

What is the latest version of @tanstack/react-devtools npm package?

💡 Result:

The latest version is 0.6.4. [1][2]

Sources:
[1] npm — @tanstack/react-devtools.
[2] GitHub — TanStack/devtools.


Use valid version of @tanstack/react-devtools.

The version specified in the PR (^0.7.8) does not appear to exist. The latest version is 0.6.4. Using a non-existent version would cause dependency resolution to fail during npm install.

Update line 31 to use a valid version such as ^0.6.4 or verify if 0.7.8 is a pre-release version that should be explicitly marked (e.g., ^0.7.8-beta).

🤖 Prompt for AI Agents
In apps/cli/templates/frontend/react/tanstack-router/package.json.hbs around
line 31, the dependency "@tanstack/react-devtools" is pinned to a non-existent
version "^0.7.8"; update this to a valid release (for example "^0.6.4") or
change to the correct prerelease tag if 0.7.8 is a beta (e.g., "^0.7.8-beta") so
npm install will succeed; edit the version string accordingly and run a quick
npm/yarn install locally to verify resolution.

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

@Prathamesh-chougale-17 Prathamesh-chougale-17 changed the title fix(cli): updated the tanstack devtool to new tanstack devtool in frontend/react/tanstack-router. feat: updated the tanstack devtool to new tanstack devtool in frontend/react/tanstack-router. Oct 26, 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.

1 participant