Skip to content

chore: simplify ci - #6905

Merged
KATT merged 29 commits into
mainfrom
08-21-more
Sep 5, 2025
Merged

KATT merged 29 commits into
mainfrom
08-21-more

Conversation

@KATT

@KATT KATT commented Aug 20, 2025 •

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Chores
    • Reworked build/dev/type-checking to package-scoped parallel scripts, removed legacy codegen generator and a large generated test, updated CI to run new type checks, and added Prisma hoist exclusions.
  • Removed
    • Deleted the experimental TanStack Start example and its tests/configs/artifacts; simplified an example to use direct DB client access.
  • New Features
    • Added an API Reference (auto-generated) sidebar category in docs.
  • Bug Fixes
    • Fixed font preconnect crossOrigin for more reliable font loading.

@railway-app

railway-app Bot commented Aug 20, 2025 •

Copy link
Copy Markdown

πŸš… Deployed to the trpc-pr-6905 environment in trpc-sse-and-websockets

Service Status Web Updated (UTC)
next-sse-chat ◻️ Removed (View Logs) Web Sep 5, 2025 at 4:09 pm
next-prisma-websockets-starter ◻️ Removed (View Logs) Sep 5, 2025 at 4:09 pm

@coderabbitai

coderabbitai Bot commented Aug 20, 2025 •

Copy link
Copy Markdown
Contributor

Walkthrough

Moves type-checking from repo-level Turbo/codegen workflows to package-parallel PNPM + Turbo-per-target checks, removes the BigBoi generator and its test, updates CI to run package and PR-gated www typechecks, adjusts Turbo task declarations, adds Prisma hoist exclusions, tweaks small www typings/markup, and deletes the tanstack-start example and related files.

Changes

Cohort / File(s) Summary
Root scripts
package.json
Updated Turbo filter syntax (--filter={./packages/*} β†’ --filter=./packages/*); removed pretest, tsc-check, tsc-watch, codegen, codegen:tests, postinstall; added typecheck-packages, typecheck-www, ts-watch.
Turbo config
turbo.json
Removed codegen-tests and tsc tasks; removed cache: false flags from test-dev, typecheck, test-start (now only declare dependsOn).
CI workflow
.github/workflows/main.yml
Added PR-gated typecheck-www job; replaced pnpm tsc-check with pnpm typecheck-packages; removed tanstack-start from e2e matrix; split example build+typecheck into separate steps.
Per-package scripts
Packages:
packages/*/package.json, www/package.json
Replaced per-package tsc scripts with typecheck (tsc --noEmit --preserveWatchOutput --pretty); removed package-local codegen scripts; added typecheck to www.
Codegen & tests removed
scripts/generateBigBoi.ts, packages/react-query/test/bigBoi.test.tsx
Deleted the BigBoi generator and the BigBoi integration test.
Docs & small fixes
www/sidebars.ts, www/src/pages/media.tsx, www/src/theme/DocItem/Metadata/index.tsx, www/src/utils/handleSmoothScrollToSection.ts
Added typed SidebarItemCategoryConfig usage; changed font preconnect crossOrigin to "anonymous"; removed explicit return type from DocItemMetadata; added non-null assertion + ESLint disable in smooth-scroll util.
Workspace npm config
.npmrc
Added Prisma hoist exclusions: !@prisma/*, !prisma to public-hoist-pattern[].
Examples β€” Prisma usage
examples/next-prisma-todomvc/...
Removed inner context prisma properties; switched todo router resolvers to use imported prisma client directly (removed ctx usage).
Examples β€” tanstack-start removed
examples/tanstack-start/**
Removed the entire tanstack-start example: config, routes, TRPC/router, SSR, tests, styles, tooling and package manifest (many files deleted).

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Dev as Developer/CI
  participant Root as Root scripts
  participant PNPM as pnpm (parallel)
  participant Turbo as Turbo
  participant PKG as ./packages/* (each)
  participant WWW as www
  participant TSC as tsc

  rect rgba(220,235,255,0.9)
    note right of Dev: package-parallel typechecks (pnpm)
    Dev->>Root: pnpm typecheck-packages
    Root->>PNPM: pnpm run --parallel --filter=./packages/* typecheck
    PNPM->>PKG: run `typecheck` script
    PKG->>TSC: tsc --noEmit --preserveWatchOutput --pretty
  end

  rect rgba(235,255,220,0.9)
    note right of Dev: www-specific typecheck (Turbo, PR job)
    Dev->>Root: pnpm typecheck-www
    Root->>Turbo: turbo --filter www typecheck
    Turbo->>WWW: run `typecheck` for `www`
    WWW->>TSC: tsc --noEmit --preserveWatchOutput --pretty
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

πŸ™‹β€β™‚οΈ help wanted

Suggested reviewers

  • juliusmarminge

Poem

"I hop through scripts and nudge the trees,
Braced the filters, trimmed the seeds.
The big generator hopped away,
Typechecks scatter across the day.
A rabbit cheers: tidy code, more speed!" πŸ‡

✨ Finishing Touches
πŸ§ͺ Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 08-21-more

πŸͺ§ Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@KATT
KATT marked this pull request as ready for review August 20, 2025 22:55
@KATT
KATT requested a review from a team as a code owner August 20, 2025 22:55
@vercel

vercel Bot commented Aug 20, 2025 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
next-prisma-starter Ready Ready Preview Sep 5, 2025 3:31pm
og-image Ready Ready Preview Comment Sep 5, 2025 3:31pm
www Ready Ready Preview Comment Sep 5, 2025 3:31pm

@pkg-pr-new

pkg-pr-new Bot commented Aug 20, 2025 •

Copy link
Copy Markdown

Open in StackBlitz

@trpc/client

npm i https://pkg.pr.new/trpc/trpc/@trpc/client@6905

@trpc/next

npm i https://pkg.pr.new/trpc/trpc/@trpc/next@6905

@trpc/react-query

npm i https://pkg.pr.new/trpc/trpc/@trpc/react-query@6905

@trpc/server

npm i https://pkg.pr.new/trpc/trpc/@trpc/server@6905

@trpc/tanstack-react-query

npm i https://pkg.pr.new/trpc/trpc/@trpc/tanstack-react-query@6905

@trpc/upgrade

npm i https://pkg.pr.new/trpc/trpc/@trpc/upgrade@6905

commit: 6ae5200

@KATT KATT changed the title chore: faster ci chore: simplify ci Aug 20, 2025

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
turbo.json (1)

25-26: Enabling cache for tsc is fine; add lockfile/workspace to inputs to avoid stale caches.

Dropping "cache": false means Turbo’s cache now applies to tsc. To ensure correct invalidation when deps/graph change, include the package manager artifacts in globalDependencies (lockfile and workspace manifest). Otherwise, a type surface change via dependency updates could be cached across CI runs.

Suggested addition outside this hunk (top of turbo.json):

{
  "globalDependencies": [
    ".eslintrc.config.js",
    "tsconfig.json",
    "tsconfig.build.json",
    "scripts/**",
    "pnpm-lock.yaml",
    "pnpm-workspace.yaml"
  ]
}

Optional CI tip: if not already configured, enable Turbo remote caching (e.g., TURBO_TOKEN) to realize the speedup consistently across CI jobs.

package.json (1)

20-20: Drop duplicate --pretty and align filter style for consistency.

Minor cleanup and consistency with other scripts that use --filter={./packages/*}.

-    "tsc-check": "turbo tsc --filter './packages/*' -- --noEmit --pretty --pretty",
+    "tsc-check": "turbo --filter={./packages/*} tsc -- --noEmit --pretty",
πŸ“œ Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

πŸ’‘ Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between e6fc309 and 553e9fd.

πŸ“’ Files selected for processing (2)
  • package.json (1 hunks)
  • turbo.json (2 hunks)
⏰ 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). (20)
  • GitHub Check: E2E-tests (next-prisma-todomvc)
  • GitHub Check: E2E-tests (nuxt)
  • GitHub Check: E2E-tests (fastify-server)
  • GitHub Check: E2E-tests (.test/ssg)
  • GitHub Check: E2E-tests (next-prisma-websockets-starter)
  • GitHub Check: E2E-tests (vercel-edge-runtime)
  • GitHub Check: E2E-tests (express-server)
  • GitHub Check: E2E-tests (next-formdata)
  • GitHub Check: E2E-tests (next-prisma-starter)
  • GitHub Check: e2e-legacy-node (next-prisma-websockets-starter, 20.x)
  • GitHub Check: E2E-tests (cloudflare-workers)
  • GitHub Check: E2E-tests (express-minimal)
  • GitHub Check: E2E-tests (.experimental/next-app-dir)
  • GitHub Check: e2e-legacy-node (next-prisma-starter, 20.x)
  • GitHub Check: e2e-legacy-node (next-prisma-websockets-starter, 18.x)
  • GitHub Check: e2e-legacy-node (next-prisma-starter, 18.x)
  • GitHub Check: E2E-tests (Bun) (bun, ubuntu-latest)
  • GitHub Check: Test a monorepo using built declaration files
  • GitHub Check: E2E-tests (Deno) (deno-deploy)
  • GitHub Check: test
πŸ”‡ Additional comments (2)
turbo.json (1)

57-58: Typecheck caching: good for CI speed; confirm no non-deterministic env inputs.

With caching on, ensure type-checks don’t rely on non-hashed env (beyond the already-listed globalEnv) or time-based codegen. If they do, either add those inputs to globalEnv/globalDependencies or keep caching off for this task.

package.json (1)

21-21: tsc-watch script verified safe: no missing tsc scripts or codegen dependencies

  • We confirmed every package under packages/* defines a scripts.tsc entryβ€”no missing scripts to trigger failures.
  • No source files import from __generated__, and no */__generated__/bigBoi directories exist; the root postinstall already runs pnpm codegen (including codegen-tests), so all generated artifacts are in place before watching.
  • Therefore, switching tsc-watch to pnpm run --parallel --filter './packages/*' tsc … --watch won’t break type‐checking or miss codegen outputs.

Optional stylistic polish: unify filter quoting for cross-shell consistency

- "tsc-watch": "pnpm run --parallel --filter './packages/*' tsc --noEmit --preserveWatchOutput --pretty --watch",
+ "tsc-watch": "pnpm run --parallel --filter {./packages/*} tsc --noEmit --preserveWatchOutput --pretty --watch",

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🧹 Nitpick comments (9)
www/src/pages/media.tsx (2)

13-16: Add alt text (and consider lazy-loading) for images used in Asset

For accessibility and minor perf wins, provide meaningful alt text and lazily load these decorative/media assets. Using the existing title prop is a reasonable default.

Apply this diff:

-      <img
-        className={`grow self-center ${props.imgClassName}`}
-        src={props.src}
-      />
+      <img
+        className={`grow self-center ${props.imgClassName}`}
+        src={props.src}
+        alt={props.title}
+        loading="lazy"
+        decoding="async"
+      />

36-44: Handle clipboard write failures

navigator.clipboard.writeText can reject (e.g., unsupported context, permissions). Add a catch to avoid unhandled promise rejections and aid debugging. Keeps your existing void pattern.

-          onClick={() => void navigator.clipboard.writeText(props.value)}
+          onClick={() =>
+            void navigator.clipboard
+              .writeText(props.value)
+              .catch((err) => console.warn('Clipboard write failed', err))
+          }
www/package.json (1)

21-23: Optional: add a watch variant for local DX.

A "typecheck:watch": "tsc --noEmit --preserveWatchOutput --pretty --watch" entry can speed up local iteration.

   "lint": "eslint --cache src",
   "typecheck": "tsc --noEmit --preserveWatchOutput --pretty"
+  ,"typecheck:watch": "tsc --noEmit --preserveWatchOutput --pretty --watch"
www/sidebars.ts (1)

2-2: Avoid importing internal Docusaurus type paths to reduce fragility.

@docusaurus/plugin-content-docs/src/sidebars/types.js is an internal path that can break on upgrades. You can rely on the annotated SidebarsConfig at the end of the file to type-check usage, and drop the explicit type/import.

-import type { SidebarItemCategoryConfig } from '@docusaurus/plugin-content-docs/src/sidebars/types.js';
+// (avoid importing internal Docusaurus types)

And remove the explicit annotation:

-const typeDoc: SidebarItemCategoryConfig = {
+const typeDoc = {

If you prefer explicit checking without internal imports, another option is to keep the import removed and use satisfies against exported SidebarsConfig shapes:

// example (no internal imports)
// const typeDoc = { ... } satisfies Parameters<NonNullable<SidebarsConfig['docs']>[number]['items'].push>[0];
packages/server/package.json (1)

23-23: Optional: add a watch script for server developers.

Mirrors the www suggestion; handy during local development.

   "lint": "eslint --cache src",
   "typecheck": "tsc --noEmit --preserveWatchOutput --pretty"
+  ,"typecheck:watch": "tsc --noEmit --preserveWatchOutput --pretty --watch"
packages/client/package.json (1)

29-29: Optional: add a watch variant here too for parity across packages.

   "lint": "eslint --cache src",
   "typecheck": "tsc --noEmit --preserveWatchOutput --pretty"
+  ,"typecheck:watch": "tsc --noEmit --preserveWatchOutput --pretty --watch"
turbo.json (1)

50-52: Align Turbo typecheck task with new CI flow (or drop it).

CI now runs per-package checks via pnpm, not Turbo. This Turbo task remains unused for packages and is only exercised by the new www job. Either:

  • keep it but note it’s intended for www/local workflows, or
  • remove it from the global tasks to avoid confusion and rely solely on pnpm for packages.

If you keep it, the current dependsOn ["^build"] is sensible. Please confirm intended usage to avoid drift between tooling.

.github/workflows/main.yml (2)

47-48: Package typechecks no longer depend on upstream buildsβ€”verify this is intentional.

Previously Turbo’s typecheck depended on "^build". The new pnpm typecheck-packages runs independently and in parallel to build. If any package’s typecheck requires built d.ts or other artifacts from dependencies, this may flake or miss issues.

Options:

  • add needs: [build] to the typecheck job, or
  • ensure each package’s typecheck doesn’t rely on built outputs (pure source/type-only imports), or
  • switch back to Turbo for package typechecks to retain "^build" semantics.

Please confirm which invariant you want and we can update the workflow accordingly.


49-58: Enable remote Turbo caching for typecheck-www for consistency and speed.

typecheck-www invokes Turbo but this job lacks TURBO_TEAM/TURBO_TOKEN env found in other jobs. Add them if you want remote cache hits on CI.

   typecheck-www:
     needs: [build]
     runs-on: ubuntu-latest
+    env:
+      TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
+      TURBO_TEAM: ${{ vars.TURBO_TEAM }}
     steps:
       - uses: actions/checkout@v4
         with:
           fetch-depth: 0
       - uses: ./.github/setup
       - run: pnpm typecheck-www
πŸ“œ Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

πŸ’‘ Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 3754364 and 626d37c.

πŸ“’ Files selected for processing (16)
  • .github/workflows/main.yml (1 hunks)
  • package.json (1 hunks)
  • packages/client/package.json (1 hunks)
  • packages/next/package.json (1 hunks)
  • packages/react-query/package.json (1 hunks)
  • packages/react-query/test/bigBoi.test.tsx (0 hunks)
  • packages/server/package.json (1 hunks)
  • packages/tanstack-react-query/package.json (1 hunks)
  • packages/tests/package.json (1 hunks)
  • scripts/generateBigBoi.ts (0 hunks)
  • turbo.json (1 hunks)
  • www/package.json (1 hunks)
  • www/sidebars.ts (2 hunks)
  • www/src/pages/media.tsx (1 hunks)
  • www/src/theme/DocItem/Metadata/index.tsx (1 hunks)
  • www/src/utils/handleSmoothScrollToSection.ts (1 hunks)
πŸ’€ Files with no reviewable changes (2)
  • packages/react-query/test/bigBoi.test.tsx
  • scripts/generateBigBoi.ts
🧰 Additional context used
🧠 Learnings (1)
πŸ“š Learning: 2025-06-09T14:01:20.033Z
Learnt from: juliusmarminge
PR: trpc/trpc#6789
File: packages/tanstack-react-query/tsdown.config.ts:1-24
Timestamp: 2025-06-09T14:01:20.033Z
Learning: In the tRPC monorepo, packages/tests and packages/upgrade don't need main/module/types fields in their package.json because tests is not distributed and upgrade just exposes a binary.

Applied to files:

  • packages/tests/package.json
  • packages/react-query/package.json
  • package.json
⏰ 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). (20)
  • GitHub Check: E2E-tests (nuxt)
  • GitHub Check: E2E-tests (tanstack-start)
  • GitHub Check: E2E-tests (vercel-edge-runtime)
  • GitHub Check: E2E-tests (soa)
  • GitHub Check: E2E-tests (.test/internal-types-export)
  • GitHub Check: E2E-tests (express-server)
  • GitHub Check: E2E-tests (next-formdata)
  • GitHub Check: E2E-tests (fastify-server)
  • GitHub Check: E2E-tests (.experimental/next-app-dir)
  • GitHub Check: e2e-legacy-node (next-prisma-websockets-starter, 18.x)
  • GitHub Check: e2e-legacy-node (next-prisma-starter, 18.x)
  • GitHub Check: e2e-legacy-node (next-prisma-websockets-starter, 20.x)
  • GitHub Check: e2e-legacy-node (next-prisma-todomvc, 18.x)
  • GitHub Check: e2e-legacy-node (next-prisma-starter, 20.x)
  • GitHub Check: E2E-tests (Bun) (bun, ubuntu-latest)
  • GitHub Check: Release using pkg.pr.new
  • GitHub Check: typecheck-www
  • GitHub Check: test
  • GitHub Check: Analyze (typescript)
  • GitHub Check: Lint and auto-fix
πŸ”‡ Additional comments (10)
www/src/pages/media.tsx (1)

95-99: Correct use of crossOrigin="anonymous" on preconnect to fonts.gstatic.com

Good fix. crossOrigin expects the enumerated values "anonymous" or "use-credentials"; switching from a boolean-like value to "anonymous" is standards-compliant, prevents credentialed requests to the font CDN, and should satisfy stricter TS/React typings and the new typecheck-www job.

packages/client/package.json (1)

29-29: Standardized per-package typecheck script looks good.

Aligns with the new CI flow and is consistent with other packages.

www/package.json (1)

21-23: Adding a dedicated typecheck script for www is aligned with the new CI job.

Good to see parity with other packages.

www/sidebars.ts (2)

7-17: Refactor to constant improves readability and reuse.

Separating the Typedoc category into typeDoc is a clean improvement.


198-198: Behavior preserved while making the spread more readable.

Using [typeDoc] in the conditional spread keeps semantics unchanged and is easier to scan.

packages/server/package.json (1)

23-23: Consistent typecheck script matches repo-wide convention.

No issues spotted.

www/src/theme/DocItem/Metadata/index.tsx (1)

7-7: Remove explicit return type β€” fine to rely on TS inference here

For a local component, inference keeps noise low and doesn’t weaken type safety. No issues spotted.

packages/next/package.json (1)

30-30: Adopt typecheck script β€” consistent with monorepo CI

Matches the new parallel typecheck strategy. Looks good.

packages/tests/package.json (1)

6-6: Add typecheck script β€” good

This aligns the tests workspace with the unified typecheck job. No concerns.

packages/react-query/package.json (1)

21-21: Switch to typecheck script β€” approved

Consistent with the broader CI simplification; no functional risks.

Comment thread package.json Resolved
Comment thread packages/client/package.json Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
turbo.json (2)

50-51: Typecheck caching looks good; consider dropping the build dependency to speed CI

Enabling cache for pure tsc --noEmit-style typechecks is typically safe and helpful. Optional: removing dependsOn: ["^build"] can decouple typechecking from builds and speed up CI, unless your type checks require generated build artifacts.

Optional tweak:

-  "typecheck": {
-    "dependsOn": ["^build"]
-  },
+  "typecheck": {},

If some packages rely on generated types/artifacts, keep the current dependency.


53-54: Avoid caching and simplify dependencies for test-start (likely e2e/integration)

If test-start launches a server and runs integration/e2e tests, it should generally not be cached. Also, since the global "build" task already depends on "^build", specifying both is redundant.

Recommended:

-  "test-start": {
-    "dependsOn": ["^build", "build"]
-  }
+  "test-start": {
+    "dependsOn": ["build"],
+    "cache": false
+  }

Please confirm what test-start executes. If it’s deterministic and not environment-dependent, you may keep caching on, but ensure CI won’t inadvertently skip execution due to a warm cache.

πŸ“œ Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

πŸ’‘ Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 626d37c and 892f3de.

πŸ“’ Files selected for processing (3)
  • .github/workflows/main.yml (1 hunks)
  • package.json (1 hunks)
  • turbo.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • package.json
  • .github/workflows/main.yml
⏰ 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). (19)
  • GitHub Check: E2E-tests (tanstack-start)
  • GitHub Check: E2E-tests (standalone-server)
  • GitHub Check: E2E-tests (vercel-edge-runtime)
  • GitHub Check: E2E-tests (next-prisma-websockets-starter)
  • GitHub Check: E2E-tests (nuxt)
  • GitHub Check: E2E-tests (minimal-react)
  • GitHub Check: E2E-tests (fastify-server)
  • GitHub Check: E2E-tests (next-prisma-starter)
  • GitHub Check: E2E-tests (.test/ssg)
  • GitHub Check: E2E-tests (.experimental/next-app-dir)
  • GitHub Check: E2E-tests (.test/diagnostics-big-router)
  • GitHub Check: e2e-legacy-node (next-prisma-todomvc, 20.x)
  • GitHub Check: e2e-legacy-node (next-prisma-starter, 20.x)
  • GitHub Check: e2e-legacy-node (next-prisma-websockets-starter, 18.x)
  • GitHub Check: e2e-legacy-node (next-prisma-websockets-starter, 20.x)
  • GitHub Check: e2e-legacy-node (next-prisma-starter, 18.x)
  • GitHub Check: Release using pkg.pr.new
  • GitHub Check: E2E-tests (Deno) (deno-deploy)
  • GitHub Check: test
πŸ”‡ Additional comments (1)
turbo.json (1)

47-48: Review usage of the test-dev Turbo task

It looks like you’ve defined a test-dev task in your root turbo.json but I can’t find any test-dev scripts in your root or package-level package.json files (only in examples/…). Please confirm whether this task is actually used:

β€’ File turbo.json (root), lines 44–48:

"test-dev": {
  "dependsOn": ["^build"]
},

β€’ No "test-dev" script in root package.json
β€’ No "test-dev" script in any packages/*/package.json

If you intend to run ad-hoc or watch-mode tests via Turbo, you’ll want to disable caching and keep the process alive:

  "test-dev": {
-   "dependsOn": ["^build"]
+   "dependsOn": ["^build"],
+   "cache": false,
+   "persistent": true
  },

Otherwise, if this task isn’t being invoked anywhere, consider removing it to avoid confusion.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (4)
examples/next-prisma-todomvc/src/server/routers/todo.ts (4)

20-25: Tighten the id input or drop it to rely on DB defaults.

Allowing clients to supply id as an arbitrary string risks invalid IDs or collisions if the DB generates UUIDs. Either:

  • require a proper UUID, or
  • remove id from the input and let the DB generate it.

Outside this hunk, adjust the schema:

// Option A: keep, but validate
z.object({
  id: z.string().uuid().optional(),
  text: z.string().min(1),
})

// Option B: remove id entirely (preferred if DB auto-generates)
z.object({
  text: z.string().min(1),
})

36-43: Prevent empty updates by validating at least one field is present.

data allows both fields to be omitted; Prisma .update({ data: {} }) will throw. Add a refinement to require one of completed or text.

Outside this hunk, update the input schema:

const EditInput = z.object({
  id: z.string().uuid(),
  data: z.object({
    completed: z.boolean().optional(),
    text: z.string().min(1).optional(),
  }).refine(d => d.completed !== undefined || d.text !== undefined, {
    message: 'Provide at least one field to update',
    path: ['data'],
  }),
})

46-50: Optional micro-optimization: update only rows that need changing.

Reduce unnecessary writes by filtering to items not already in the desired state.

-      await prisma.task.updateMany({
-        data: { completed: input.completed },
-      });
+      await prisma.task.updateMany({
+        data: { completed: input.completed },
+        where: { completed: { not: input.completed } },
+      });

57-62: Keep return ordering consistent with all.

clearCompleted currently returns an unsorted list; all returns items ordered by createdAt: 'asc'. Aligning avoids UI jitter.

-    return prisma.task.findMany();
+    return prisma.task.findMany({
+      orderBy: { createdAt: 'asc' },
+    });
πŸ“œ Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

πŸ’‘ Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 892f3de and 1bb46e2.

πŸ“’ Files selected for processing (3)
  • .npmrc (1 hunks)
  • examples/next-prisma-todomvc/src/server/context.ts (0 hunks)
  • examples/next-prisma-todomvc/src/server/routers/todo.ts (3 hunks)
πŸ’€ Files with no reviewable changes (1)
  • examples/next-prisma-todomvc/src/server/context.ts
🧰 Additional context used
🧬 Code graph analysis (1)
examples/next-prisma-todomvc/src/server/routers/todo.ts (2)
examples/next-prisma-todomvc/src/server/trpc.ts (2)
  • router (9-9)
  • baseProcedure (10-10)
examples/next-prisma-todomvc/src/server/prisma.ts (1)
  • prisma (8-8)
⏰ 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). (20)
  • GitHub Check: E2E-tests (next-prisma-todomvc)
  • GitHub Check: E2E-tests (soa)
  • GitHub Check: E2E-tests (.test/internal-types-export)
  • GitHub Check: E2E-tests (.experimental/next-app-dir)
  • GitHub Check: E2E-tests (cloudflare-workers)
  • GitHub Check: E2E-tests (next-formdata)
  • GitHub Check: E2E-tests (express-minimal)
  • GitHub Check: E2E-tests (.test/diagnostics-big-router)
  • GitHub Check: E2E-tests (.test/ssg)
  • GitHub Check: e2e-legacy-node (next-prisma-websockets-starter, 20.x)
  • GitHub Check: Release using pkg.pr.new
  • GitHub Check: E2E-tests (Bun) (bun, ubuntu-latest)
  • GitHub Check: e2e-legacy-node (next-prisma-todomvc, 20.x)
  • GitHub Check: E2E-tests (Deno) (deno-deploy)
  • GitHub Check: e2e-legacy-node (next-prisma-todomvc, 18.x)
  • GitHub Check: e2e-legacy-node (next-prisma-websockets-starter, 18.x)
  • GitHub Check: Test a monorepo using built declaration files
  • GitHub Check: Lint and auto-fix
  • GitHub Check: test
  • GitHub Check: Analyze (typescript)
πŸ”‡ Additional comments (4)
.npmrc (1)

4-8: Confirmed: Repository uses pnpm 9.12.2, which supports negation in hoist patterns

Verified that package.json pins packageManager to [email protected], comfortably β‰₯ 7.12.0, so the !-style negations in both hoist-pattern[] and public-hoist-pattern[] are fully supported.

examples/next-prisma-todomvc/src/server/routers/todo.ts (3)

2-2: LGTM: direct Prisma import aligns with simplified context.

Using a shared prisma import is consistent with typical Next.js/TRPC examples and avoids passing DB through ctx when not needed.


6-12: LGTM: simple read with deterministic ordering.

Returning tasks ordered by createdAt: 'asc' is appropriate for the UI.


53-56: LGTM: delete by id and return id.

Clear and client-friendly contract; keeps payload small.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
turbo.json (3)

50-51: Reconsider adding "postinstall" as a dependency of typecheck; prefer hashing lockfile instead.

Making typecheck depend on postinstall can re-run side-effectful lifecycle scripts across the workspace and slow CI. If the goal is to invalidate caches when deps change, hashing the lockfile is safer and conventional.

  • Recommended: drop postinstall from typecheck.dependsOn and add the lockfile to globalDependencies.

Within this hunk:

-    "typecheck": {
-      "dependsOn": ["^build", "postinstall"]
-    },
+    "typecheck": {
+      "dependsOn": ["^build"]
+    },

Outside this hunk (illustrative JSON showing the updated list):

{
  "globalDependencies": [
    ".eslintrc.config.js",
    "tsconfig.json",
    "tsconfig.build.json",
    "scripts/**",
    "pnpm-lock.yaml"
  ]
}

47-48: Keep test-dev non-cached to avoid stale results in local workflows.

Dropping cache: false means test-dev will now be cached by default. Tests often read from the clock, tmp dirs, or network; caching can mask failures while iterating locally.

Apply:

     "test-dev": {
-      "dependsOn": ["^build"]
+      "dependsOn": ["^build"],
+      "cache": false
     },

If you intentionally want caching here for CI speed, consider a separate test-ci task left cached, and keep test-dev uncached for local fidelity.


53-54: Align test-start caching policy with intent; default caching may be undesirable.

Similar to test-dev, removing cache: false enables caching. For E2E/startup-style tests, caching is typically risky.

Apply:

     "test-start": {
-      "dependsOn": ["^build", "build"]
+      "dependsOn": ["^build", "build"],
+      "cache": false
     }

If the intent is to speed up CI, consider a dedicated cached CI task instead, and keep developer-facing or flaky-prone tasks uncached.

πŸ“œ Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

πŸ’‘ Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 14670c4 and 7c94723.

πŸ“’ Files selected for processing (1)
  • turbo.json (1 hunks)
⏰ 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). (19)
  • GitHub Check: E2E-tests (next-minimal-starter)
  • GitHub Check: E2E-tests (express-minimal)
  • GitHub Check: E2E-tests (cloudflare-workers)
  • GitHub Check: E2E-tests (.test/ssg)
  • GitHub Check: E2E-tests (fastify-server)
  • GitHub Check: e2e-legacy-node (next-prisma-todomvc, 20.x)
  • GitHub Check: e2e-legacy-node (next-prisma-websockets-starter, 18.x)
  • GitHub Check: e2e-legacy-node (next-prisma-todomvc, 18.x)
  • GitHub Check: e2e-legacy-node (next-prisma-websockets-starter, 20.x)
  • GitHub Check: e2e-legacy-node (next-prisma-starter, 18.x)
  • GitHub Check: e2e-legacy-node (next-prisma-starter, 20.x)
  • GitHub Check: E2E-tests (Deno) (deno-deploy)
  • GitHub Check: Release using pkg.pr.new
  • GitHub Check: E2E-tests (Bun) (bun, ubuntu-latest)
  • GitHub Check: Test a monorepo using built declaration files
  • GitHub Check: typecheck-www
  • GitHub Check: test
  • GitHub Check: typecheck
  • GitHub Check: Lint and auto-fix

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
.github/workflows/main.yml (1)

49-65: Optional hardening: restrict permissions and (optionally) gate by changed paths.

  • Add least-privilege permissions to the job.
  • If desired, skip this job when PRs don’t touch www/** or configs it depends on.

Apply:

   typecheck-www:
     # only run on PRs
     if: github.event_name == 'pull_request'
     timeout-minutes: 10
+    permissions:
+      contents: read
     env:
       TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
       TURBO_TEAM: ${{ vars.TURBO_TEAM }}
     needs: [build]
     runs-on: ubuntu-latest
     steps:

If you want path-based gating without changing triggers, consider dorny/paths-filter to set an output and wrap the pnpm typecheck-www step with an if: guard.

πŸ“œ Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

πŸ’‘ Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 66c6c5e and c8c0f83.

πŸ“’ Files selected for processing (1)
  • .github/workflows/main.yml (1 hunks)
⏰ 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). (4)
  • GitHub Check: test
  • GitHub Check: typecheck
  • GitHub Check: Lint and auto-fix
  • GitHub Check: Analyze (typescript)
πŸ”‡ Additional comments (4)
.github/workflows/main.yml (4)

47-48: Switch to pnpm typecheck-packages looks good.

Matches the PR’s goal to parallelize package type checks and simplify CI.


49-65: New typecheck-www job is clear and scoped.

Gated to PRs, depends on build, and runs the expected script. Looks good.


49-65: Verified script wiring; no changes needed
Both root package.json defines typecheck-www and www/package.json defines typecheck as expected.


47-48: Typecheck scripts verified
Root typecheck-packages script exists and every package under packages/* defines a typecheck script.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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 (4)
.github/workflows/main.yml (4)

49-65: Gating www typecheck on build: clarify intent vs artifacts

Adding typecheck-www with needs: [build] gates sequencing but does not reuse build artifacts across runners. If the goal is just ordering, this is fine. If you intended to leverage build outputs, consider uploading/downloading artifacts or rely explicitly on Turbo remote cache being available.

Example to make intent explicit (optional):

   typecheck-www:
     if: github.event_name == 'pull_request'
     timeout-minutes: 10
     env:
       TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
       TURBO_TEAM: ${{ vars.TURBO_TEAM }}
     needs: [build]
+    # Note: needs only gates; no artifacts are shared. Turbo remote cache must be enabled to reuse work.
     runs-on: ubuntu-latest

150-152: Reduce Turbo invocations per example

Combine build + typecheck for each example into one Turbo run to cut process startup overhead and better leverage the task graph/caching.

-      - run: pnpm turbo --filter ./examples/${{ matrix.dir }} build
-      - run: pnpm turbo --filter ./examples/${{ matrix.dir }} typecheck
+      - run: pnpm turbo run build typecheck --filter ./examples/${{ matrix.dir }}

220-222: Same consolidation for Bun e2e

Merge the two Turbo calls into one.

-      - run: pnpm turbo --filter ./examples/${{ matrix.dir }} build
-      - run: pnpm turbo --filter ./examples/${{ matrix.dir }} typecheck
+      - run: pnpm turbo run build typecheck --filter ./examples/${{ matrix.dir }}

274-276: Same consolidation for legacy-node e2e

Merge build + typecheck into a single Turbo run.

-      - run: pnpm turbo --filter ./examples/${{ matrix.dir }} build
-      - run: pnpm turbo --filter ./examples/${{ matrix.dir }} typecheck
+      - run: pnpm turbo run build typecheck --filter ./examples/${{ matrix.dir }}
πŸ“œ Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

πŸ’‘ Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between f59c2a6 and 8693a7f.

πŸ“’ Files selected for processing (1)
  • .github/workflows/main.yml (4 hunks)
⏰ 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). (17)
  • GitHub Check: E2E-tests (next-prisma-todomvc)
  • GitHub Check: E2E-tests (standalone-server)
  • GitHub Check: E2E-tests (vercel-edge-runtime)
  • GitHub Check: E2E-tests (nuxt)
  • GitHub Check: E2E-tests (next-prisma-starter)
  • GitHub Check: E2E-tests (minimal-react)
  • GitHub Check: E2E-tests (.test/ssg)
  • GitHub Check: E2E-tests (.experimental/next-app-dir)
  • GitHub Check: E2E-tests (.test/diagnostics-big-router)
  • GitHub Check: e2e-legacy-node (next-prisma-websockets-starter, 20.x)
  • GitHub Check: e2e-legacy-node (next-prisma-todomvc, 18.x)
  • GitHub Check: e2e-legacy-node (next-prisma-websockets-starter, 18.x)
  • GitHub Check: e2e-legacy-node (next-prisma-todomvc, 20.x)
  • GitHub Check: e2e-legacy-node (next-prisma-starter, 20.x)
  • GitHub Check: Release using pkg.pr.new
  • GitHub Check: Test a monorepo using built declaration files
  • GitHub Check: test

Comment on lines +47 to +48
- run: pnpm typecheck-packages

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

πŸ’‘ Verification agent

🧩 Analysis chain

Confirm root script exists and matches intent

Switch to pnpm typecheck-packages looks good. Please confirm the root package.json defines this script and that it runs only package workspaces (not examples/www), since e2e jobs now typecheck examples separately.

Run:


🏁 Script executed:

#!/bin/bash
set -euo pipefail
echo "Root has typecheck-packages script?"
rg -n '^  "typecheck-packages"\s*:' package.json

echo "www has its own typecheck script?"
rg -n '^  "typecheck"\s*:' www/package.json

echo "Packages define typecheck?"
fd package.json packages -x rg -n '^  "typecheck"\s*:'

Length of output: 151


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Root typecheck-packages script:"
python3 - << 'EOF'
import json
with open('package.json') as f:
    data = json.load(f)
print(data.get('scripts', {}).get('typecheck-packages', 'not defined'))
EOF

echo "---"

echo "www typecheck script:"
if [ -f www/package.json ]; then
  python3 - << 'EOF'
import json
with open('www/package.json') as f:
    data = json.load(f)
print(data.get('scripts', {}).get('typecheck', 'not defined'))
EOF
else
  echo "www/package.json not found"
fi

echo "---"

echo "Packages typecheck scripts:"
for pkgjson in packages/*/package.json; do
  pkgdir=$(dirname "$pkgjson")
  echo -n "$pkgdir: "
  python3 -c "import json,sys; data=json.load(open(sys.argv[1])); print(data.get('scripts',{}).get('typecheck','not defined'))" "$pkgjson"
done

Length of output: 3047


Add missing typecheck script or adjust workspace filter

The root typecheck-packages script (pnpm run --parallel --filter=./packages/* typecheck) correctly targets only packages/* (not www), but packages/upgrade/package.json lacks a typecheck scriptβ€”causing the command to fail. Either define a typecheck script in packages/upgrade/package.json or narrow the filter to exclude upgrade.

πŸ€– Prompt for AI Agents
.github/workflows/main.yml around lines 47 to 48: the CI step runs "pnpm
typecheck-packages" which expands to "pnpm run --parallel --filter=./packages/*
typecheck" but packages/upgrade/package.json has no "typecheck" script causing
the job to fail; fix by either adding a "typecheck" script to
packages/upgrade/package.json (e.g., pointing to tsc or the shared typecheck
command used by other packages) or tighten the workspace filter in the workflow
to exclude upgrade (for example filter by explicit packages or use negative
filter) so only packages that define "typecheck" are targeted.

@github-actions

github-actions Bot commented Sep 6, 2025

Copy link
Copy Markdown
Contributor

This pull request has been locked because we are very unlikely to see comments on closed issues. If you think, this PR is still necessary, create a new one with the same branch. Thank you.

This branch was successfully deployed

5 active deployments
Preview – www β€” 6ae52002 Deployed Sep 5, 2025 by vercel[bot]
Preview – examples-todomvc β€” 6ae52002 Deployed Sep 5, 2025 by vercel[bot]
Preview – og-image β€” 6ae52002 Deployed Sep 5, 2025 by vercel[bot]
Preview – next-prisma-starter β€” 6ae52002 Deployed Sep 5, 2025 by vercel[bot]
Preview – trpc-next-app-dir β€” 6ae52002 Deployed Sep 5, 2025 by vercel[bot]
next-sse-chat (trpc-sse-and-websockets / trpc-pr-6905) β€” 6ae52002 Deployed Sep 5, 2025 by railway-app[bot]
next-prisma-websockets-starter (trpc-sse-and-websockets / trpc-pr-6905) β€” 6ae52002 Deployed Sep 5, 2025 by railway-app[bot]
trpc-pr-6905 β€” 2ad6a446 Deployed Aug 22, 2025 by railway-app[bot]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants