Skip to content

Restore Prisma Next getting-started docs#7999

Merged
ankur-arch merged 21 commits into
mainfrom
restore/prisma-next-getting-started
Jul 3, 2026
Merged

Restore Prisma Next getting-started docs#7999
ankur-arch merged 21 commits into
mainfrom
restore/prisma-next-getting-started

Conversation

@nurul3101

@nurul3101 nurul3101 commented Jul 3, 2026

Copy link
Copy Markdown
Member

Summary

The Prisma Next getting-started work from aman/prisma-next-getting-started was overridden on main. This PR brings it back by merging that branch onto the latest main and resolving conflicts.

Restored/added:

  • apps/docs/content/docs/(index)/next/** — Prisma Next getting-started, quickstart, add-to-existing-project, and Prisma Postgres pages
  • apps/docs/content/docs/cli/next/** — Prisma Next CLI reference
  • apps/docs/content/docs/orm/next/** — Prisma Next ORM section
  • Versioning/sidebar wiring: src/lib/version.ts, versioned-sidebar-tree.ts, version-switcher.tsx, and the Early Access banner in the docs layout

Conflict resolutions

Kept both main and branch intent where they overlapped:

  • docs layout (apps/docs/src/app/layout.tsx): keep GoogleTagManager plus the branch's Banner/ArrowRightIcon Early Access banner imports
  • layout.shared.tsx: activePaths combines /prisma-compute (main) and /next (branch)
  • (index)/index.mdx: keep the Prisma Compute section (main) and add the Prisma Next note (branch)
  • footer.ts / site layout: ORM link points to /docs/orm/next (branch)
  • .gitignore: kept main's superset (includes prisma-next/)
  • typescript-migrations-in-prisma-next blog: kept main's copy (links to the Early Access announcement)

Test plan

  • Docs app builds and the /next pages render
  • Version switcher / sidebar shows Prisma Next entries
  • Early Access banner links to /next
  • Nav/footer ORM links resolve correctly

Made with Cursor

Summary by CodeRabbit

  • New Features
    • Added a new Prisma Next Early Access docs area, including getting started, quickstarts, Prisma Postgres workflows (import/new), and comprehensive Prisma Next CLI and migration guides.
  • Updates
    • Updated site/docs navigation, redirects, and footer links to point to the new Prisma Next paths; improved version switching and sidebar behavior across Getting Started, CLI, and ORM.
    • Added a prominent “Prisma Next is in early access” banner to the docs site with polished styling and accessibility-friendly motion.
  • Documentation
    • Refreshed Early Access/Preview wording and clarified Early Access guidance in existing blog posts and docs.

ankur-arch and others added 20 commits May 11, 2026 16:41
- Replace "not production ready" callouts with Early Access notes across the
  Prisma Next docs pages, the Prisma Next blog series, and the ORM / Console
  feature-maturity definitions. New messaging: Prisma Next is the next major
  version of Prisma ORM, in Early Access, expect changes, share feedback;
  Prisma 7 is GA, keep using it for production.
- Point the site nav "Docs" link to /docs/next and the nav + footer "ORM"
  links to /docs/orm/next so users land on Prisma Next.
- Rename the ORM Next intro sidebar entry from "What is Prisma Next?" to
  "Prisma Next" for parity with the Prisma ORM (Latest) docs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Apply the approved callout wording across all Prisma Next docs pages: invite
users to try the cutting-edge next major version in Early Access and share
feedback, and point anyone who wants the current GA release to Prisma 7.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Early Access now means: ready to try out, cutting edge, and evolving with user
feedback, with an API surface that won't change drastically. Removes the
"prepared for significant breaking changes" framing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…aning

Keeps the Early Access -> Preview -> GA ladder monotonic: Preview is now
described as close to stable, validate in staging, rather than "not
recommended in production."

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Redirect bare /docs to /docs/next so the docs land on Prisma Next by
  default. Keep the Prisma 7 (Latest) getting-started reachable at
  /docs/getting-started: repoint the getting-started version switcher's
  Latest target and the Getting Started tab there (bare "/" now redirects),
  and update the callouts' Prisma 7 links to /getting-started.
- Add spacing under the callout title so the heading no longer sits flush
  against the body (applies to all callouts via CalloutTitle).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Incorporate Ty's feedback on the Prisma Next getting-started docs:

- Remove the auto-redirect from bare /docs to /docs/next; the docs now
  land on Introduction to Prisma.
- Remove the "Docs version" dropdown on getting-started pages. Prisma Next
  lives inline in the getting-started sidebar as its own sections instead
  of a separate rooted version. The ORM version dropdown is unchanged.
- Restructure the getting-started sidebar into: Getting Started,
  Get started with Prisma Next, Prisma Next (Quickstart + Add to Existing
  Project), Prisma ORM, and Prisma Postgres.
- Add a Prisma Next entry to the Prisma Postgres > Quickstart dropdown; the
  page moves to /prisma-postgres/quickstart/prisma-next with a redirect
  from the old path.
- Add a non-forceful Prisma Next callout on Introduction to Prisma.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Bring back the Prisma Next getting-started work from
aman/prisma-next-getting-started that was overridden on main.

Conflicts resolved to keep both main and branch intent:
- docs/site layout: keep Compute nav plus /next paths and Early Access banner imports
- footer/site ORM link points to /docs/orm/next
- (index)/index.mdx keeps Compute section and adds Prisma Next note

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Jul 3, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
blog Ready Ready Preview, Comment Jul 3, 2026 10:56am
docs Ready Ready Preview, Comment Jul 3, 2026 10:56am
eclipse Ready Ready Preview, Comment Jul 3, 2026 10:56am
site Ready Ready Preview, Comment Jul 3, 2026 10:56am

Request Review

@nurul3101 nurul3101 self-assigned this Jul 3, 2026
@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: adf24883-6a38-439c-bb53-b3137c2a93de

📥 Commits

Reviewing files that changed from the base of the PR and between d628bd9 and b57d2fe.

📒 Files selected for processing (1)
  • apps/docs/cspell.json
✅ Files skipped from review due to trivial changes (1)
  • apps/docs/cspell.json

Walkthrough

This PR adds Prisma Next docs and onboarding pages, updates Early Access wording across blog/docs content, and wires docs navigation, redirects, banners, and version-aware routing so Prisma Next routes and links resolve correctly.

Changes

Prisma Next Documentation Content

Layer / File(s) Summary
Early Access messaging updates
apps/blog/content/blog/*/index.mdx, apps/docs/content/docs/console/more/feature-maturity.mdx, apps/docs/content/docs/orm/more/releases.mdx, apps/docs/content/docs/orm/index.mdx
Blog posts and maturity/release docs are reworded to describe Prisma Next as Early Access, with Prisma 7 as the current GA recommendation.
Docs landing and Prisma Next overview
apps/docs/content/docs/(index)/index.mdx, apps/docs/content/docs/(index)/meta.json, apps/docs/content/docs/(index)/next/*, apps/docs/content/docs/(index)/prisma-postgres/*, apps/docs/content/docs/(index)/prisma-postgres/quickstart/prisma-next.mdx, apps/docs/content/docs/orm/next/*
New landing pages, setup-path pages, and section metadata introduce Prisma Next, its quickstarts, and related overview content.
Existing-project and Prisma Postgres guides
apps/docs/content/docs/(index)/next/add-to-existing-project/*, apps/docs/content/docs/(index)/next/quickstart/*, apps/docs/content/docs/(index)/next/prisma-postgres/*
New step-by-step guides cover adding Prisma Next to existing PostgreSQL/MongoDB projects and importing existing databases into Prisma Postgres.
CLI reference documentation
apps/docs/content/docs/cli/next/*, apps/docs/content/docs/cli/meta.json
New CLI reference pages document prisma-next init, config, contract, db, and migration commands.

Estimated code review effort: 3 (Moderate) | ~30 minutes

Docs App Navigation and Banner Infrastructure

Layer / File(s) Summary
Banner UI and redirects
apps/docs/src/app/layout.tsx, apps/docs/src/app/global.css, apps/docs/src/app/(docs)/(default)/layout.tsx, apps/docs/next.config.mjs
A new early-access banner and styling are added, redirects map legacy paths to Prisma Next routes, and the docs layout passes page URLs to the version switcher.
Version-aware routing and sidebar filtering
apps/docs/src/lib/version.ts, apps/docs/src/lib/versioned-sidebar-tree.ts, apps/docs/src/components/version-switcher.tsx, apps/docs/src/components/layout/link-item.tsx, apps/docs/src/components/layout/notebook/page/client.tsx, apps/docs/src/components/sidebar-badge-provider.tsx, apps/docs/src/lib/layout.shared.tsx
Navigation and sidebar logic now resolves Getting Started, CLI, and ORM versions, preserves versioned links, and hides badges on Prisma Next routes.
Site, footer, and MDX callout styling
apps/site/src/app/layout.tsx, packages/ui/src/data/footer.ts, apps/docs/src/mdx-components.tsx
Marketing site and footer links move to Prisma Next destinations, and MDX callout titles render with styled wrappers.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related PRs

  • prisma/web#7923: Both PRs update Prisma Next Early Access wording in the same blog content.
  • prisma/web#7931: Both PRs touch docs app navigation and badge behavior around Prisma Next routes.
  • prisma/web#7933: Both PRs add Prisma Next docs content and wire it into docs routing/navigation.

Poem

A rabbit hops through docs anew,
Prisma Next routes start to brew.
Banners glow, links twist just right,
Old paths redirect to new light.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the PR’s main goal: restoring Prisma Next getting-started documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

🍈 Lychee Link Check Report

123 links: ✅ 22 OK | 🚫 0 errors | 🔀 8 redirects | 👻 93 excluded

✅ All links are working!


Full Statistics Table
Status Count
✅ Successful 22
🔀 Redirected 8
👻 Excluded 93
🚫 Errors 0
⛔ Unsupported 0
⏳ Timeouts 0
❓ Unknown 0

@argos-ci

argos-ci Bot commented Jul 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ⚠️ Changes detected (Review) 1 changed Jul 3, 2026, 11:02 AM

ankur-arch
ankur-arch previously approved these changes Jul 3, 2026
Fix spellcheck CI failure from the restored Prisma Next ORM overview,
which uses "inspectable" and "arktype" (arktype-json extension).

Co-authored-by: Cursor <cursoragent@cursor.com>

@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: 9

🧹 Nitpick comments (8)
apps/docs/content/docs/cli/next/db-verify.mdx (1)

15-17: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use npm fences for the command examples.

These snippets are fenced as bash, so the docs tooling will not auto-render the bun/yarn/pnpm/npm tabs this repo uses elsewhere. Switching them to npm keeps the CLI docs consistent. Based on learnings, use a single npm fenced code block and let the tooling convert it into tabbed commands for bun, yarn, pnpm, and npm.

♻️ Proposed fix
-```bash
+```npm
 prisma-next db verify --db "$DATABASE_URL"
-```
+```

Apply the same fence change to the other command snippets on this page.

Also applies to: 32-43

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/docs/content/docs/cli/next/db-verify.mdx` around lines 15 - 17, The CLI
examples on this docs page are fenced as bash, which prevents the docs tooling
from generating the standard package-manager tabs. Update the command snippets
in the db-verify MDX content to use npm fences instead of bash, and apply the
same fence change to every command example on the page so the rendered docs stay
consistent with other CLI pages.

Source: Learnings

apps/docs/content/docs/cli/next/index.mdx (1)

22-31: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use npm fences for the CLI snippets.

These blocks are fenced as bash, so the docs tooling will not generate the package-manager tabs this page is aiming for. Switching them to npm keeps the reference consistent with the rest of apps/docs/content. Based on learnings, use a single npm fenced code block and let the tooling render bun/yarn/pnpm/npm tabs.

♻️ Proposed fix
-```bash
+```npm
 npx prisma-next help
 npx prisma-next contract emit
-```
+```

Apply the same fence change to the other command snippets on this page.

Also applies to: 39-43, 47-62

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/docs/content/docs/cli/next/index.mdx` around lines 22 - 31, The CLI
command examples on the Next docs page are fenced as plain bash blocks, so the
package-manager tab tooling will not render them correctly. Update the affected
command snippets to use the npm fence instead of bash, and keep each snippet as
a single npm code block so the docs system can generate the bun/yarn/pnpm/npm
tabs consistently. Apply the same fence change to all command examples on this
page, including the install/help/contract emit snippets.

Source: Learnings

apps/docs/content/docs/cli/next/init.mdx (1)

15-23: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use npm fences for the command examples.

These snippets are fenced as bash, so the docs tooling will not auto-generate the bun/yarn/pnpm/npm tabs this repo expects. Switching them to npm keeps the init guide aligned with the rest of the docs. Based on learnings, use a single npm fenced code block and let the tooling convert it into tabbed commands for bun, yarn, pnpm, and npm.

♻️ Proposed fix
-```bash
+```npm
 prisma-next init
-```
+```

Apply the same fence change to the remaining command snippets in this file.

Also applies to: 50-69

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/docs/content/docs/cli/next/init.mdx` around lines 15 - 23, The command
examples in the init guide are fenced as bash, which prevents the docs tooling
from generating the expected package-manager tabs. Update the command snippets
in the init documentation to use the npm fence instead of bash, and apply the
same change to every command example in this file so the tooling can convert
them into bun, yarn, pnpm, and npm tabs consistently.

Source: Learnings

apps/docs/src/components/sidebar-badge-provider.tsx (1)

36-51: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Duplicate "is Next route" detection logic vs. version.ts helpers.

This reimplements next-route detection via raw string prefix checks. version.ts already exposes getGettingStartedVersionFromPathname, getCliVersionFromPathname, and getOrmVersionFromPathname, each of which returns "next" for exactly these routes. Reusing them would keep a single source of truth for what counts as a "Next" route, so if the Next route roots ever change, this file won't silently drift out of sync.

♻️ Proposed refactor using existing version helpers
-function shouldHideSidebarBadge(url: string, badge: BadgeType | undefined) {
-  if (badge !== "early-access") {
-    return false;
-  }
-
-  const docsPathname = url.replace(/^\/docs(?=\/|$)/, "") || "/";
-
-  return (
-    docsPathname === "/next" ||
-    docsPathname.startsWith("/next/") ||
-    docsPathname === "/orm/next" ||
-    docsPathname.startsWith("/orm/next/") ||
-    docsPathname === "/cli/next" ||
-    docsPathname.startsWith("/cli/next/")
-  );
-}
+function shouldHideSidebarBadge(url: string, badge: BadgeType | undefined) {
+  if (badge !== "early-access") {
+    return false;
+  }
+
+  const version =
+    getGettingStartedVersionFromPathname(url) ??
+    getCliVersionFromPathname(url) ??
+    getOrmVersionFromPathname(url);
+
+  return version === "next";
+}

Based on learnings from the upstream contract (version.ts context snippet), which defines Version path mapping defines legacy /next/* paths as corresponding to the canonical /prisma-orm/* quickstart/getting-started sections route-detection semantics that this file re-derives independently.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/docs/src/components/sidebar-badge-provider.tsx` around lines 36 - 51,
The Next-route check in shouldHideSidebarBadge is duplicating path logic that
already exists in version.ts. Replace the raw "/next", "/orm/next", and
"/cli/next" prefix checks with the existing
getGettingStartedVersionFromPathname, getOrmVersionFromPathname, and
getCliVersionFromPathname helpers, and hide the early-access badge when any of
them returns "next". Keep the badge-type guard, but make version.ts the single
source of truth for route detection.
apps/docs/src/components/version-switcher.tsx (1)

35-57: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Unreachable isGettingStartedVersion branches after early return.

Since Line 40-42 already returns null when isGettingStartedVersion is true, isGettingStartedVersion is guaranteed false for the rest of the function. That makes the getGettingStartedVersionFromPathname(pathname) call in the ?? chain (Line 45) always resolve to null, and the isGettingStartedVersion checks in usesScopedVersions (Line 49) and label (Line 53) dead code that always take their "false" branch. This is harmless today but misleading — a future edit near the early return (e.g. relaxing it) would silently change behavior here without anyone noticing these branches were already assumed unreachable.

♻️ Suggested simplification
-  const detectedVersion =
-    getGettingStartedVersionFromPathname(pathname) ??
-    getCliVersionFromPathname(pathname) ??
-    getOrmVersionFromPathname(pathname);
-  const currentVersion = detectedVersion ?? null;
-  const usesScopedVersions = isGettingStartedVersion || isCliVersion;
-  const visibleVersions = usesScopedVersions
+  const currentVersion =
+    getCliVersionFromPathname(pathname) ?? getOrmVersionFromPathname(pathname) ?? null;
+  const visibleVersions = isCliVersion
     ? versions.filter((version) => version === LATEST_VERSION || version === "next")
     : versions;
-  const label = isGettingStartedVersion
-    ? "Docs version"
-    : isCliVersion
-      ? "CLI version"
-      : "ORM version";
+  const label = isCliVersion ? "CLI version" : "ORM version";
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/docs/src/components/version-switcher.tsx` around lines 35 - 57, Remove
the dead `isGettingStartedVersion` branches in `VersionSwitcher`: since the
early `return null` already excludes getting-started pages,
`getGettingStartedVersionFromPathname(pathname)` in the `detectedVersion` chain,
plus the `isGettingStartedVersion` checks in `usesScopedVersions` and `label`,
are unreachable. Simplify those expressions to only use the CLI/ORM path helpers
and base the scoped-version filtering and label selection on the remaining
`isCliVersion`/default logic.
apps/docs/src/lib/versioned-sidebar-tree.ts (1)

116-277: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Getting Started and CLI sidebar filtering are near-duplicate implementations.

filterGettingStartedSidebarTree/filterCliSidebarTree, findGettingStartedNode/findCliNode, and getGettingStartedSidebarTree/getCliSidebarTree each repeat the same shape of logic, differing only in the node predicate and "next"-node predicate used. Consolidating into a single generic implementation parameterized by isSectionNode/isVersionNode predicates would cut ~100 lines of duplication and reduce the risk of the two sections drifting apart when one is updated but not the other (as already hinted by the GS/CLI naming asymmetry above).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/docs/src/lib/versioned-sidebar-tree.ts` around lines 116 - 277, The
Getting Started and CLI sidebar helpers are duplicated and should be unified
into one generic implementation. Refactor
filterGettingStartedSidebarTree/filterCliSidebarTree,
findGettingStartedNode/findCliNode, and
getGettingStartedSidebarTree/getCliSidebarTree into shared helpers parameterized
by the section predicate and version-node predicate (for example,
isGettingStartedNode/isCliNode and
isGettingStartedVersionNode/isCliVersionNode). Keep the current behavior for
selecting the "next" version and for preserving index/children, but route both
sections through the same logic to avoid drift.
apps/docs/src/lib/version.ts (2)

229-254: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Duplicate root-switch/candidate logic between CLI and ORM branches.

getCliSwitchPathname and the ORM fallback path inside getVersionSwitchPathname both independently: compute a suffix from the current root, build a ${targetRoot}${suffix} candidate, check it against getAvailablePathnameSet, and fall back to targetRoot. Extracting this into one shared helper (parameterized by current/target root) would remove the duplication and keep both paths behaviorally in sync going forward.

♻️ Suggested consolidation
+function switchRootPathname(
+  docsPathname: string,
+  currentRoot: string,
+  targetRoot: string,
+  availablePathnames: Iterable<string>,
+) {
+  const suffix =
+    docsPathname === currentRoot
+      ? ""
+      : docsPathname.startsWith(`${currentRoot}/`)
+        ? docsPathname.slice(currentRoot.length)
+        : "";
+  const candidate = `${targetRoot}${suffix}`;
+  const available = getAvailablePathnameSet(availablePathnames);
+
+  return available.size === 0 || available.has(candidate) ? candidate : targetRoot;
+}

Then both getCliSwitchPathname and the ORM branch of getVersionSwitchPathname can call switchRootPathname(...) instead of repeating the suffix/candidate/fallback logic.

Also applies to: 327-349

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/docs/src/lib/version.ts` around lines 229 - 254, The CLI switch path
logic duplicates the same root/suffix/candidate/fallback flow used in the ORM
branch of getVersionSwitchPathname. Extract that shared behavior into a helper
like switchRootPathname that takes the current root, target root, docsPathname,
and availablePathnames, then have getCliSwitchPathname and the ORM fallback call
it directly. Keep the existing candidate-building and getAvailablePathnameSet
check semantics unchanged so both branches stay aligned.

23-61: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Remove the unreachable Getting Started switch path maps
VersionSwitcher returns null for isGettingStartedVersionPathname(pathname), and getVersionSwitchPathname is only called from that component. If nothing else switches versions from a Getting Started pathname, getGettingStartedSwitchPathname and its two maps can be removed.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/docs/src/lib/version.ts` around lines 23 - 61, The Getting Started
switch path logic is unreachable, since VersionSwitcher returns null for
isGettingStartedVersionPathname(pathname) and getVersionSwitchPathname only
routes through that component. Remove getGettingStartedSwitchPathname and the
two Maps NEXT_GETTING_STARTED_PATHS_BY_LATEST_PATH and
LATEST_GETTING_STARTED_PATHS_BY_NEXT_PATH from version.ts, and clean up any
related dead references while keeping the other version-switch path helpers
intact.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/docs/content/docs/`(index)/next/quickstart/mongodb.mdx:
- Around line 85-88: The Next.js MongoDB quickstart “Next steps” list points to
the wrong Prisma schema location; update the guidance in the quickstart content
to reference prisma/contract.prisma instead of src/prisma/contract.prisma. Make
sure the wording stays consistent with the existing docs and only changes the
incorrect file path in the relevant quickstart section.

In `@apps/docs/content/docs/`(index)/prisma-postgres/quickstart/prisma-next.mdx:
- Around line 54-56: The quickstart prerequisite text is mismatched with the
linked add-to-existing-project guide, so update the bullet in the Prisma
Postgres quickstart content to match what the
`/next/add-to-existing-project/postgresql` page actually covers. In the Markdown
around the existing “Use the PostgreSQL existing-project guide” item, either
change the wording to describe an existing PostgreSQL app or switch the link to
the correct Prisma Postgres guide, using the same list item text and nearby
“Import from PostgreSQL/MySQL” bullets as the reference point.

In `@apps/docs/content/docs/cli/next/db-init.mdx`:
- Around line 15-17: The CLI examples in the docs MDX use bash fences, which
prevents the package-manager tab conversion from working. Update the command
examples in db-init.mdx to use npm fences consistently, and keep each command
example in the expected single fenced block style so the docs tooling can render
bun/yarn/pnpm/npm tabs correctly. Refer to the existing prisma-next db init,
prisma-next contract emit, and prisma-next db verify examples when making the
replacement.

In `@apps/docs/content/docs/cli/next/db-schema.mdx`:
- Around line 15-17: The command examples in this MDX doc are fenced as bash,
which prevents the docs tooling from generating the package-manager tabs
expected in this section. Update the code examples to use a single npm fenced
block in the relevant docs snippet(s) so the tooling can convert them into bun,
yarn, pnpm, and npm tabs; use the existing command examples around the db schema
usage as the target for this change.

In `@apps/docs/content/docs/cli/next/db-sign.mdx`:
- Around line 15-17: The command examples in the docs MDX are using bash fences,
which prevents the package-manager tab conversion; update the fenced code blocks
in the db sign section to use a single npm code block so the docs tooling can
generate the bun, yarn, pnpm, and npm tabs. Apply this in the command example
blocks around the db sign/verify commands, keeping the content the same but
changing the fence language to npm.

In `@apps/docs/content/docs/cli/next/db-update.mdx`:
- Around line 15-17: The CLI examples in this MDX file are using bash fences,
which prevents the docs tooling from generating package-manager tabs. Update the
command examples in the db update section to use a single npm fenced code block
instead of bash, matching the existing docs convention used by the CLI content
and ensuring the tab conversion works for all commands like prisma-next db
update and prisma-next contract emit.

In `@apps/docs/content/docs/orm/index.mdx`:
- Around line 17-20: The Prisma Next CTA in the `index.mdx` docs callout points
to the overview page instead of the getting-started flow. Update the link target
in the “Try Prisma Next” tip so the “Prisma Next getting started guide” anchor
points to the getting-started page, keeping the existing callout text and using
the same `:::tip[Try Prisma Next]` block.

In `@apps/docs/cspell.json`:
- Around line 57-58: The dictionary entries use the wrong brand casing, so
spellcheck will still miss the real term. Update the cspell dictionary entries
for the CipherStash brand to use the exact casing consistently, and make sure
the existing dictionary list includes the corrected spelling alongside any
needed variants in the cspell configuration.

In `@apps/docs/next.config.mjs`:
- Around line 285-289: The Next/Postgres switch target is inconsistent between
the redirect and the version mapping. Update the mapping in version.ts for the
/next/prisma-postgres/quickstart/prisma-next source so it points to the same
canonical destination as the redirect in next.config.mjs, and keep the relevant
entries in sync to avoid the version picker and hard redirect landing on
different pages.

---

Nitpick comments:
In `@apps/docs/content/docs/cli/next/db-verify.mdx`:
- Around line 15-17: The CLI examples on this docs page are fenced as bash,
which prevents the docs tooling from generating the standard package-manager
tabs. Update the command snippets in the db-verify MDX content to use npm fences
instead of bash, and apply the same fence change to every command example on the
page so the rendered docs stay consistent with other CLI pages.

In `@apps/docs/content/docs/cli/next/index.mdx`:
- Around line 22-31: The CLI command examples on the Next docs page are fenced
as plain bash blocks, so the package-manager tab tooling will not render them
correctly. Update the affected command snippets to use the npm fence instead of
bash, and keep each snippet as a single npm code block so the docs system can
generate the bun/yarn/pnpm/npm tabs consistently. Apply the same fence change to
all command examples on this page, including the install/help/contract emit
snippets.

In `@apps/docs/content/docs/cli/next/init.mdx`:
- Around line 15-23: The command examples in the init guide are fenced as bash,
which prevents the docs tooling from generating the expected package-manager
tabs. Update the command snippets in the init documentation to use the npm fence
instead of bash, and apply the same change to every command example in this file
so the tooling can convert them into bun, yarn, pnpm, and npm tabs consistently.

In `@apps/docs/src/components/sidebar-badge-provider.tsx`:
- Around line 36-51: The Next-route check in shouldHideSidebarBadge is
duplicating path logic that already exists in version.ts. Replace the raw
"/next", "/orm/next", and "/cli/next" prefix checks with the existing
getGettingStartedVersionFromPathname, getOrmVersionFromPathname, and
getCliVersionFromPathname helpers, and hide the early-access badge when any of
them returns "next". Keep the badge-type guard, but make version.ts the single
source of truth for route detection.

In `@apps/docs/src/components/version-switcher.tsx`:
- Around line 35-57: Remove the dead `isGettingStartedVersion` branches in
`VersionSwitcher`: since the early `return null` already excludes
getting-started pages, `getGettingStartedVersionFromPathname(pathname)` in the
`detectedVersion` chain, plus the `isGettingStartedVersion` checks in
`usesScopedVersions` and `label`, are unreachable. Simplify those expressions to
only use the CLI/ORM path helpers and base the scoped-version filtering and
label selection on the remaining `isCliVersion`/default logic.

In `@apps/docs/src/lib/version.ts`:
- Around line 229-254: The CLI switch path logic duplicates the same
root/suffix/candidate/fallback flow used in the ORM branch of
getVersionSwitchPathname. Extract that shared behavior into a helper like
switchRootPathname that takes the current root, target root, docsPathname, and
availablePathnames, then have getCliSwitchPathname and the ORM fallback call it
directly. Keep the existing candidate-building and getAvailablePathnameSet check
semantics unchanged so both branches stay aligned.
- Around line 23-61: The Getting Started switch path logic is unreachable, since
VersionSwitcher returns null for isGettingStartedVersionPathname(pathname) and
getVersionSwitchPathname only routes through that component. Remove
getGettingStartedSwitchPathname and the two Maps
NEXT_GETTING_STARTED_PATHS_BY_LATEST_PATH and
LATEST_GETTING_STARTED_PATHS_BY_NEXT_PATH from version.ts, and clean up any
related dead references while keeping the other version-switch path helpers
intact.

In `@apps/docs/src/lib/versioned-sidebar-tree.ts`:
- Around line 116-277: The Getting Started and CLI sidebar helpers are
duplicated and should be unified into one generic implementation. Refactor
filterGettingStartedSidebarTree/filterCliSidebarTree,
findGettingStartedNode/findCliNode, and
getGettingStartedSidebarTree/getCliSidebarTree into shared helpers parameterized
by the section predicate and version-node predicate (for example,
isGettingStartedNode/isCliNode and
isGettingStartedVersionNode/isCliVersionNode). Keep the current behavior for
selecting the "next" version and for preserving index/children, but route both
sections through the same logic to avoid drift.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d8bf4eac-fbd8-45e0-a61f-1f9fcd837b25

📥 Commits

Reviewing files that changed from the base of the PR and between b057f0d and d628bd9.

📒 Files selected for processing (58)
  • apps/blog/content/blog/data-migrations-in-prisma-next/index.mdx
  • apps/blog/content/blog/mongodb-without-compromise/index.mdx
  • apps/blog/content/blog/prisma-next-call-for-extension-authors/index.mdx
  • apps/blog/content/blog/the-next-evolution-of-prisma-orm/index.mdx
  • apps/docs/content/docs/(index)/index.mdx
  • apps/docs/content/docs/(index)/meta.json
  • apps/docs/content/docs/(index)/next/add-to-existing-project/meta.json
  • apps/docs/content/docs/(index)/next/add-to-existing-project/mongodb.mdx
  • apps/docs/content/docs/(index)/next/add-to-existing-project/postgresql.mdx
  • apps/docs/content/docs/(index)/next/getting-started.mdx
  • apps/docs/content/docs/(index)/next/index.mdx
  • apps/docs/content/docs/(index)/next/prisma-postgres/from-the-cli.mdx
  • apps/docs/content/docs/(index)/next/prisma-postgres/import-from-existing-database-mysql.mdx
  • apps/docs/content/docs/(index)/next/prisma-postgres/import-from-existing-database-postgresql.mdx
  • apps/docs/content/docs/(index)/next/prisma-postgres/meta.json
  • apps/docs/content/docs/(index)/next/quickstart/meta.json
  • apps/docs/content/docs/(index)/next/quickstart/mongodb.mdx
  • apps/docs/content/docs/(index)/next/quickstart/postgresql.mdx
  • apps/docs/content/docs/(index)/prisma-postgres/quickstart/meta.json
  • apps/docs/content/docs/(index)/prisma-postgres/quickstart/prisma-next.mdx
  • apps/docs/content/docs/cli/meta.json
  • apps/docs/content/docs/cli/next/configuration.mdx
  • apps/docs/content/docs/cli/next/contract-emit.mdx
  • apps/docs/content/docs/cli/next/contract-infer.mdx
  • apps/docs/content/docs/cli/next/db-init.mdx
  • apps/docs/content/docs/cli/next/db-schema.mdx
  • apps/docs/content/docs/cli/next/db-sign.mdx
  • apps/docs/content/docs/cli/next/db-update.mdx
  • apps/docs/content/docs/cli/next/db-verify.mdx
  • apps/docs/content/docs/cli/next/index.mdx
  • apps/docs/content/docs/cli/next/init.mdx
  • apps/docs/content/docs/cli/next/meta.json
  • apps/docs/content/docs/cli/next/migration-apply.mdx
  • apps/docs/content/docs/cli/next/migration-new.mdx
  • apps/docs/content/docs/cli/next/migration-plan.mdx
  • apps/docs/content/docs/cli/next/migration-ref.mdx
  • apps/docs/content/docs/cli/next/migration-show.mdx
  • apps/docs/content/docs/cli/next/migration-status.mdx
  • apps/docs/content/docs/console/more/feature-maturity.mdx
  • apps/docs/content/docs/orm/index.mdx
  • apps/docs/content/docs/orm/more/releases.mdx
  • apps/docs/content/docs/orm/next/index.mdx
  • apps/docs/content/docs/orm/next/meta.json
  • apps/docs/cspell.json
  • apps/docs/next.config.mjs
  • apps/docs/src/app/(docs)/(default)/layout.tsx
  • apps/docs/src/app/global.css
  • apps/docs/src/app/layout.tsx
  • apps/docs/src/components/layout/link-item.tsx
  • apps/docs/src/components/layout/notebook/page/client.tsx
  • apps/docs/src/components/sidebar-badge-provider.tsx
  • apps/docs/src/components/version-switcher.tsx
  • apps/docs/src/lib/layout.shared.tsx
  • apps/docs/src/lib/version.ts
  • apps/docs/src/lib/versioned-sidebar-tree.ts
  • apps/docs/src/mdx-components.tsx
  • apps/site/src/app/layout.tsx
  • packages/ui/src/data/footer.ts

Comment thread apps/docs/content/docs/(index)/next/quickstart/mongodb.mdx
Comment thread apps/docs/content/docs/cli/next/db-init.mdx
Comment thread apps/docs/content/docs/cli/next/db-schema.mdx
Comment thread apps/docs/content/docs/cli/next/db-sign.mdx
Comment thread apps/docs/content/docs/cli/next/db-update.mdx
Comment thread apps/docs/content/docs/orm/index.mdx
Comment thread apps/docs/cspell.json
Comment thread apps/docs/next.config.mjs
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.

3 participants