Skip to content
Source
Sign inSign up
fuko/trytanstackdb.com

Add the Tanstack Devtools plugin #33

Mergedfukomerged 5 commits intomain fromrefs/pull/33/headmerged by fuko View on GitHub

fukocommented

Summary by CodeRabbit

  • Chores

    • Added TanStack devtools and related devtool packages for in-app debugging.
    • Updated core TanStack libraries to newer releases and enabled build-tool plugin support for those devtools.
  • Documentation

    • Expanded validation checklist to include lint/format checks and an automatic fix command; reinforced “never run or deploy the dev server” guidance.
  • Refactor

    • Made an animation import type-only (no runtime impact).
✏️ Tip: You can customize this high-level summary in your review settings.
    1. Walkthrough

      Adds TanStack DevTools to the app (new dependencies, Vite plugin, and DevTools panels injected into the root layout), converts a motion import to a type-only import, and expands a validation checklist in documentation. No runtime control-flow changes beyond adding the DevTools UI.

      Changes

      Cohort / File(s)Summary
      DevTools & TanStack packages
      package.json
      Added @tanstack/react-devtools, @tanstack/react-query-devtools, @tanstack/react-router-devtools; updated versions: @tanstack/react-query → ^5.90.14, @tanstack/react-router → ^1.144.0, @tanstack/react-router-ssr-query → ^1.144.0, @tanstack/react-start → ^1.144.0.
      DevDependency: Vite plugin
      package.json
      Added devDependency @tanstack/devtools-vite at ^0.4.0.
      Build Configuration
      vite.config.ts
      Imported devtools from @tanstack/devtools-vite and added devtools() to the Vite plugins array.
      Root Layout Integration
      src/routes/__root.tsx
      Imported TanStackDevtools, ReactQueryDevtoolsPanel, and TanStackRouterDevtoolsPanel; injected <TanStackDevtools> into the root document with position bottom-right and two plugins: React Query panel (defaultOpen: true) and Router panel (defaultOpen: false).
      Type-only import
      src/components/HomeIntro.tsx
      Converted Variants import from runtime import to a TypeScript-only import (type Variants) from motion/react.
      Docs / Checklist
      AGENTS.md
      Expanded "Validating your code" section into a checklist: keep the "NEVER run the dev server" line, add lint/format check guidance and mention pnpm check --fix, and add a "NEVER deploy anything" warning.

      Estimated code review effort

      🎯 3 (Moderate) | ⏱️ ~20 minutes

      Pre-merge checks and finishing touches

      ❌ Failed checks (1 warning)
      Check nameStatusExplanationResolution
      Docstring Coverage⚠️ WarningDocstring 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 nameStatusExplanation
      Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
      Title check✅ PassedThe title 'Add the Tanstack Devtools plugin' accurately reflects the primary changes: adding TanStack devtools dependencies, integrating devtools into the root component, and enabling the Vite plugin.
      ✨ Finishing touches
      🧪 Generate unit tests (beta)
      • Create PR with unit tests
      • Post copyable unit tests in a comment
      • Commit unit tests in branch `add-devtools`

      📜 Recent review details

      Configuration used: Path: .coderabbit.yaml

      Review profile: CHILL

      Plan: Pro

      📥 Commits

      Reviewing files that changed from the base of the PR and between e5d73389d7a47cdadc483841c4908f4ca3b63a07 and 808b24d2a951e2c49c2842ac5f50a456ef24ae40.

      ⛔ Files ignored due to path filters (1)
      • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
      📒 Files selected for processing (2)
      • AGENTS.md
      • package.json
      🧰 Additional context used
      🧠 Learnings (12)
      📓 Common learnings
      Learnt from: CR
      Repo: fulopkovacs/trytanstackdb.com PR: 0
      File: AGENTS.md:0-0
      Timestamp: 2025-12-27T20:43:43.168Z
      Learning: Project uses TanStack Start framework with React, TanStack Router, shadcn/ui, and Tailwind CSS v4
      📚 Learning: 2025-12-27T20:43:43.168Z
      Learnt from: CR
      Repo: fulopkovacs/trytanstackdb.com PR: 0
      File: AGENTS.md:0-0
      Timestamp: 2025-12-27T20:43:43.168Z
      Learning: Project uses TanStack Start framework with React, TanStack Router, shadcn/ui, and Tailwind CSS v4

      Applied to files:

      • package.json
      📚 Learning: 2025-12-27T20:43:43.168Z
      Learnt from: CR
      Repo: fulopkovacs/trytanstackdb.com PR: 0
      File: AGENTS.md:0-0
      Timestamp: 2025-12-27T20:43:43.168Z
      Learning: Never run the dev server (e.g., `pnpm dev`) during code validation

      Applied to files:

      • AGENTS.md
      📚 Learning: 2025-12-27T20:43:43.168Z
      Learnt from: CR
      Repo: fulopkovacs/trytanstackdb.com PR: 0
      File: AGENTS.md:0-0
      Timestamp: 2025-12-27T20:43:43.168Z
      Learning: Use `pnpm format` for code formatting

      Applied to files:

      • AGENTS.md
      📚 Learning: 2025-12-27T20:43:43.168Z
      Learnt from: CR
      Repo: fulopkovacs/trytanstackdb.com PR: 0
      File: AGENTS.md:0-0
      Timestamp: 2025-12-27T20:43:43.168Z
      Learning: Use `pnpm lint` for linting

      Applied to files:

      • AGENTS.md
      📚 Learning: 2025-12-27T20:43:43.168Z
      Learnt from: CR
      Repo: fulopkovacs/trytanstackdb.com PR: 0
      File: AGENTS.md:0-0
      Timestamp: 2025-12-27T20:43:43.168Z
      Learning: Use `pnpm dev` for development server

      Applied to files:

      • AGENTS.md
      📚 Learning: 2025-12-27T20:43:43.168Z
      Learnt from: CR
      Repo: fulopkovacs/trytanstackdb.com PR: 0
      File: AGENTS.md:0-0
      Timestamp: 2025-12-27T20:43:43.168Z
      Learning: Never use npm, yarn, or any other package manager in this project - always use pnpm

      Applied to files:

      • AGENTS.md
      📚 Learning: 2025-12-27T20:43:43.168Z
      Learnt from: CR
      Repo: fulopkovacs/trytanstackdb.com PR: 0
      File: AGENTS.md:0-0
      Timestamp: 2025-12-27T20:43:43.168Z
      Learning: Always use `pnpm run <script>` instead of `npm run <script>`

      Applied to files:

      • AGENTS.md
      📚 Learning: 2025-12-27T20:43:43.168Z
      Learnt from: CR
      Repo: fulopkovacs/trytanstackdb.com PR: 0
      File: AGENTS.md:0-0
      Timestamp: 2025-12-27T20:43:43.168Z
      Learning: Use `pnpm typecheck` for type checking

      Applied to files:

      • AGENTS.md
      📚 Learning: 2025-12-27T20:43:43.168Z
      Learnt from: CR
      Repo: fulopkovacs/trytanstackdb.com PR: 0
      File: AGENTS.md:0-0
      Timestamp: 2025-12-27T20:43:43.168Z
      Learning: Use `pnpm run test` for running tests

      Applied to files:

      • AGENTS.md
      📚 Learning: 2025-12-27T20:43:43.168Z
      Learnt from: CR
      Repo: fulopkovacs/trytanstackdb.com PR: 0
      File: AGENTS.md:0-0
      Timestamp: 2025-12-27T20:43:43.168Z
      Learning: Always use `pnpm <command>` for any other npm commands

      Applied to files:

      • AGENTS.md
      📚 Learning: 2025-12-27T20:43:43.168Z
      Learnt from: CR
      Repo: fulopkovacs/trytanstackdb.com PR: 0
      File: AGENTS.md:0-0
      Timestamp: 2025-12-27T20:43:43.168Z
      Learning: Always use `pnpm install` instead of `npm install`

      Applied to files:

      • AGENTS.md
      🪛 LanguageTool
      AGENTS.md

      [style] ~58-~58: Consider using a different verb for a more formal wording. Context: ...our code - this command automatically fixes these issues where possible: `pnpm chec...

      (FIX_RESOLVE)

      🔇 Additional comments (3)
      AGENTS.md (1)

      56-59: LGTM! Good consolidation of validation guidelines into a checklist format.

      Minor observation: The deploy command examples (pnpm preview.deploy, pnpm run deploy) don't exactly match the script names in package.json (deploy.preview, deploy.prod), but the intent is clear. Consider aligning them if you want strict consistency.

      package.json (2)

      78-78: Correct placement as devDependency.

      The Vite plugin is appropriately added to devDependencies since it's only needed during development.


      46-53: Version alignment across TanStack packages is correct.

      The router packages are all properly aligned at ^1.144.0, and the previous incompatibility has been resolved. The @tanstack/react-query-devtools@^5.91.2 is correctly compatible with @tanstack/react-query@^5.90.14—the devtools package explicitly requires this version constraint.


      Comment `@coderabbitai help` to get the list of available commands and usage tips.
    2. 🚀 Preview Deployment

      Status: ✅ Ready!

      Preview URL: Open Preview

      Commit: 808b24d2a951e2c49c2842ac5f50a456ef24ae40

      Built and deployed successfully

    3. Actionable comments posted: 1

      📜 Review details

      Configuration used: Path: .coderabbit.yaml

      Review profile: CHILL

      Plan: Pro

      📥 Commits

      Reviewing files that changed from the base of the PR and between 7f0bce3c3d7f16dbd542deeed29ee07391fe64e0 and c8ae8b41cb67051eeb094d6dd73f63cddc7d107f.

      ⛔ Files ignored due to path filters (1)
      • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
      📒 Files selected for processing (4)
      • package.json
      • src/components/HomeIntro.tsx
      • src/routes/__root.tsx
      • vite.config.ts
      🧰 Additional context used
      📓 Path-based instructions (1)
      **/*.{ts,tsx}

      📄 CodeRabbit inference engine (AGENTS.md)

      **/*.{ts,tsx}: Prefer functions over arrow functions for React components and everything else Prefer type declarations over interface declarations

      Files:

      • src/routes/__root.tsx
      • src/components/HomeIntro.tsx
      • vite.config.ts
      🧠 Learnings (6)
      📓 Common learnings
      Learnt from: CR
      Repo: fulopkovacs/trytanstackdb.com PR: 0
      File: AGENTS.md:0-0
      Timestamp: 2025-12-27T20:43:43.168Z
      Learning: Project uses TanStack Start framework with React, TanStack Router, shadcn/ui, and Tailwind CSS v4
      📚 Learning: 2025-12-27T20:43:43.168Z
      Learnt from: CR
      Repo: fulopkovacs/trytanstackdb.com PR: 0
      File: AGENTS.md:0-0
      Timestamp: 2025-12-27T20:43:43.168Z
      Learning: The root route is located at `src/route/__root.tsx` in TanStack Start

      Applied to files:

      • src/routes/__root.tsx
      📚 Learning: 2025-12-27T20:43:43.168Z
      Learnt from: CR
      Repo: fulopkovacs/trytanstackdb.com PR: 0
      File: AGENTS.md:0-0
      Timestamp: 2025-12-27T20:43:43.168Z
      Learning: Project uses TanStack Start framework with React, TanStack Router, shadcn/ui, and Tailwind CSS v4

      Applied to files:

      • src/routes/__root.tsx
      • src/components/HomeIntro.tsx
      • package.json
      • vite.config.ts
      📚 Learning: 2025-12-24T15:25:07.106Z
      Learnt from: fulopkovacs
      Repo: fulopkovacs/trytanstackdb.com PR: 22
      File: src/components/TodoBoards.tsx:63-81
      Timestamp: 2025-12-24T15:25:07.106Z
      Learning: In Tailwind CSS v4, prefer canonical classes using bg-linear-to-* (e.g., bg-linear-to-b, bg-linear-to-t, bg-linear-to-r) over the older bg-gradient-to-* syntax. This aligns with Tailwind LSP's suggestCanonicalClasses rule. Apply across TSX files (e.g., src/components/*.tsx); replace occurrences of bg-gradient-to-* with the corresponding bg-linear-to-* equivalents and verify gradients visually.

      Applied to files:

      • src/routes/__root.tsx
      • src/components/HomeIntro.tsx
      📚 Learning: 2025-12-28T23:34:13.416Z
      Learnt from: fulopkovacs
      Repo: fulopkovacs/trytanstackdb.com PR: 32
      File: src/components/HomeIntro.tsx:16-25
      Timestamp: 2025-12-28T23:34:13.416Z
      Learning: In Motion (motion/react), when configuring variant transitions, use delayChildren: stagger(x) to create per-child delays (e.g., delayChildren: stagger(0.2)). This is different from the older API that used a separate staggerChildren property. Apply this guidance to TSX files that declare motion variants (e.g., in src/components/**/*.tsx) and verify that stagger is imported from framer-motion. Ensure transitions reflect the intended stagger timing and that no conflicting delay values override the staggered effect.

      Applied to files:

      • src/routes/__root.tsx
      • src/components/HomeIntro.tsx
      📚 Learning: 2025-12-27T20:43:43.168Z
      Learnt from: CR
      Repo: fulopkovacs/trytanstackdb.com PR: 0
      File: AGENTS.md:0-0
      Timestamp: 2025-12-27T20:43:43.168Z
      Learning: Applies to **/__test__/**/*.{ts,tsx} : Use `vitest` for writing tests

      Applied to files:

      • vite.config.ts
      🔇 Additional comments (3)
      vite.config.ts (1)

      4-4: LGTM!

      The devtools plugin integration looks correct. The @tanstack/devtools-vite plugin automatically handles development-only inclusion, so it won't impact production builds.

      Also applies to: 20-20

      src/components/HomeIntro.tsx (1)

      3-3: LGTM!

      Good use of the inline type modifier for Variants. Since it's only used in type positions (satisfies Variants), this correctly marks it for erasure at compile time.

      src/routes/__root.tsx (1)

      217-233: The @tanstack/react-devtools library automatically excludes itself from production builds—bundlers strip the devtools when process.env.NODE_ENV === 'production', so no manual conditional rendering is required. The current implementation is correct.

      Likely an incorrect or invalid review comment.

      Resolvedby coderabbitai[bot](GitHub profile, opens in a new tab)
    4. Actionable comments posted: 0

      🧹 Nitpick comments (1)
      AGENTS.md (1)

      57-59: Consider refining wording for formal consistency.

      The expanded checklist is clear and helpful. However, line 58's phrasing could be slightly more formal to match the imperative tone of the other items. Instead of "this command will find and fix these issues if possible," consider a more direct form like "this command automatically fixes these issues where possible" for consistency.

      🔎 Proposed refinement
      - always make sure that there are no formatting/linting issues in your code
      +- always ensure no formatting/linting issues exist in your code
        - this command will find and fix these issues if possible: `pnpm check --fix`
      + - this command automatically fixes these issues where possible: `pnpm check --fix`
      📜 Review details

      Configuration used: Path: .coderabbit.yaml

      Review profile: CHILL

      Plan: Pro

      📥 Commits

      Reviewing files that changed from the base of the PR and between c8ae8b41cb67051eeb094d6dd73f63cddc7d107f and e5d73389d7a47cdadc483841c4908f4ca3b63a07.

      📒 Files selected for processing (1)
      • AGENTS.md
      🧰 Additional context used
      🧠 Learnings (11)
      📓 Common learnings
      Learnt from: CR
      Repo: fulopkovacs/trytanstackdb.com PR: 0
      File: AGENTS.md:0-0
      Timestamp: 2025-12-27T20:43:43.168Z
      Learning: Project uses TanStack Start framework with React, TanStack Router, shadcn/ui, and Tailwind CSS v4
      📚 Learning: 2025-12-27T20:43:43.168Z
      Learnt from: CR
      Repo: fulopkovacs/trytanstackdb.com PR: 0
      File: AGENTS.md:0-0
      Timestamp: 2025-12-27T20:43:43.168Z
      Learning: Never run the dev server (e.g., `pnpm dev`) during code validation

      Applied to files:

      • AGENTS.md
      📚 Learning: 2025-12-27T20:43:43.168Z
      Learnt from: CR
      Repo: fulopkovacs/trytanstackdb.com PR: 0
      File: AGENTS.md:0-0
      Timestamp: 2025-12-27T20:43:43.168Z
      Learning: Use `pnpm format` for code formatting

      Applied to files:

      • AGENTS.md
      📚 Learning: 2025-12-27T20:43:43.168Z
      Learnt from: CR
      Repo: fulopkovacs/trytanstackdb.com PR: 0
      File: AGENTS.md:0-0
      Timestamp: 2025-12-27T20:43:43.168Z
      Learning: Use `pnpm lint` for linting

      Applied to files:

      • AGENTS.md
      📚 Learning: 2025-12-27T20:43:43.168Z
      Learnt from: CR
      Repo: fulopkovacs/trytanstackdb.com PR: 0
      File: AGENTS.md:0-0
      Timestamp: 2025-12-27T20:43:43.168Z
      Learning: Use `pnpm dev` for development server

      Applied to files:

      • AGENTS.md
      📚 Learning: 2025-12-27T20:43:43.168Z
      Learnt from: CR
      Repo: fulopkovacs/trytanstackdb.com PR: 0
      File: AGENTS.md:0-0
      Timestamp: 2025-12-27T20:43:43.168Z
      Learning: Use `pnpm typecheck` for type checking

      Applied to files:

      • AGENTS.md
      📚 Learning: 2025-12-27T20:43:43.168Z
      Learnt from: CR
      Repo: fulopkovacs/trytanstackdb.com PR: 0
      File: AGENTS.md:0-0
      Timestamp: 2025-12-27T20:43:43.168Z
      Learning: Always use `pnpm run <script>` instead of `npm run <script>`

      Applied to files:

      • AGENTS.md
      📚 Learning: 2025-12-27T20:43:43.168Z
      Learnt from: CR
      Repo: fulopkovacs/trytanstackdb.com PR: 0
      File: AGENTS.md:0-0
      Timestamp: 2025-12-27T20:43:43.168Z
      Learning: Never use npm, yarn, or any other package manager in this project - always use pnpm

      Applied to files:

      • AGENTS.md
      📚 Learning: 2025-12-27T20:43:43.168Z
      Learnt from: CR
      Repo: fulopkovacs/trytanstackdb.com PR: 0
      File: AGENTS.md:0-0
      Timestamp: 2025-12-27T20:43:43.168Z
      Learning: Use `pnpm run test` for running tests

      Applied to files:

      • AGENTS.md
      📚 Learning: 2025-12-27T20:43:43.168Z
      Learnt from: CR
      Repo: fulopkovacs/trytanstackdb.com PR: 0
      File: AGENTS.md:0-0
      Timestamp: 2025-12-27T20:43:43.168Z
      Learning: Always use `pnpm <command>` for any other npm commands

      Applied to files:

      • AGENTS.md
      📚 Learning: 2025-12-27T20:43:43.168Z
      Learnt from: CR
      Repo: fulopkovacs/trytanstackdb.com PR: 0
      File: AGENTS.md:0-0
      Timestamp: 2025-12-27T20:43:43.168Z
      Learning: Use `pnpm build` for production build

      Applied to files:

      • AGENTS.md
      🪛 LanguageTool
      AGENTS.md

      [style] ~58-~58: Consider using a different verb for a more formal wording. Context: ...our code - this command will find and fix these issues if possible: `pnpm check -...

      (FIX_RESOLVE)

      🔇 Additional comments (1)
      AGENTS.md (1)

      56-59: Validation checklist expansion is well-structured.

      The transformation of the validation warnings into a clear, actionable checklist improves the documentation. The addition of the formatting/linting step and the pnpm check --fix command provides helpful guidance for developers. The checklist items are consistent with the project's practices outlined earlier in the file.

    5. fuko merged thisd159976

    6. fuko closed this

Sign in to join this conversation.