Skip to content

Fix concepts redirect destinations#7836

Open
mhessdev wants to merge 1 commit intocodex/seo-docs-remediation-setup-prismafrom
codex/seo-docs-remediation-concepts
Open

Fix concepts redirect destinations#7836
mhessdev wants to merge 1 commit intocodex/seo-docs-remediation-setup-prismafrom
codex/seo-docs-remediation-concepts

Conversation

@mhessdev
Copy link
Copy Markdown
Contributor

@mhessdev mhessdev commented Apr 27, 2026

Summary

  • retarget dead legacy concepts and reference redirects to live current docs pages
  • point Prisma Client query-topic redirects at exact current pages instead of broad CRUD hubs
  • use versioned v6 pages where the exact topic still exists there but no longer has a current one-to-one page

Verification

  • pnpm --filter docs run audit:redirects
  • confirmed this concepts batch removes the dead destinations it targeted; remaining items in this family are mostly broad-but-live redirects

Summary by CodeRabbit

  • Chores
    • Updated documentation redirect rules to reorganize Prisma and ORM documentation paths. Multiple documentation URLs have been consolidated and repointed to new locations, ensuring existing links continue to direct users to the correct documentation pages.

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 27, 2026

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

Project Deployment Actions Updated (UTC)
blog Ready Ready Preview, Comment Apr 27, 2026 7:19pm
docs Ready Ready Preview, Comment Apr 27, 2026 7:19pm
eclipse Ready Ready Preview, Comment Apr 27, 2026 7:19pm
site Ready Ready Preview, Comment Apr 27, 2026 7:19pm

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 27, 2026

Walkthrough

The PR updates Vercel redirect rules in the documentation configuration to reorganize Prisma/ORM documentation paths. Legacy redirect targets are remapped from /docs/concepts, /docs/reference, and /docs/crud to more specific destinations like /docs/orm/prisma-client/queries/* and /docs/orm/core-concepts/supported-databases/sql-server. Some paths are version-shifted to /docs/v6/... for backward compatibility.

Changes

Cohort / File(s) Summary
Prisma Client queries and operations
apps/docs/vercel.json
Updated redirects for Prisma Client query features (distinct, group-by, field-selection, sorting/filtering, select-fields, relation-queries, pagination, full-text-search) to target /docs/orm/prisma-client/queries/* instead of broader /docs/crud paths.
Prisma Client setup and utilities
apps/docs/vercel.json
Adjusted redirects for Prisma Client setup, configuration, and utility types to point to /docs/orm/prisma-client/setup-and-configuration/generating-prisma-client and /docs/orm/reference.
Schema, databases, and core concepts
apps/docs/vercel.json
Repointed schema and database support redirects from /docs/orm/reference/supported-databases and /docs/concepts/components/prisma-schema/... to /docs/orm/core-concepts/supported-databases/sql-server and /docs/orm/prisma-schema/data-model/....
Version-shifted legacy paths
apps/docs/vercel.json
Collapsed several redirects to version-specific targets under /docs/v6/... for deprecated features (custom-validation, computed-fields, custom-models, case-sensitivity, advanced-type-safety, legacy-migrate, module-bundlers).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 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 'Fix concepts redirect destinations' directly matches the PR's main objective of retargeting dead legacy redirect paths to current documentation pages.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@argos-ci
Copy link
Copy Markdown

argos-ci Bot commented Apr 27, 2026

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

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - Apr 27, 2026, 7:25 PM

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
apps/docs/vercel.json (1)

2989-2989: Heads-up: same four topics now have split redirect destinations — possibly intentional, worth a sanity pass.

These four entries now route the legacy /docs/concepts/components/prisma-client/{custom-validation,computed-fields,custom-models,case-sensitivity} paths to versioned /docs/v6/orm/prisma-client/queries/<topic> pages, which matches what the PR description says (topics that only exist in v6).

However, the file already contains four sibling rules (lines 1101–1118) that send the current-shape sources /docs/orm/prisma-client/queries/{case-sensitivity,computed-fields,custom-models,custom-validation} to the broad CRUD hub /docs/orm/prisma-client/queries/crud instead of the same v6 pages. The result: a search hit on the legacy concepts URL takes the user to the dedicated v6 doc, but a hit on the newer-shape URL takes them to a generic hub and they have to hunt for the topic.

Not blocking, since the PR scope is explicitly the concepts/reference family, but worth either (a) aligning the four /docs/orm/prisma-client/queries/* entries to the same /docs/v6/... destinations in a follow-up, or (b) leaving a TODO so it doesn't get forgotten. If you want, I can open a follow-up issue to track it.

Also applies to: 2994-2994, 3004-3004, 3009-3009

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/docs/vercel.json` at line 2989, The four existing redirect rules that
map
"/docs/orm/prisma-client/queries/{case-sensitivity,computed-fields,custom-models,custom-validation}"
to the CRUD hub ("/docs/orm/prisma-client/queries/crud") should be aligned with
the new legacy redirects that point to
"/docs/v6/orm/prisma-client/queries/<topic>"; update those four entries so their
"destination" values match
"/docs/v6/orm/prisma-client/queries/case-sensitivity",
"/docs/v6/orm/prisma-client/queries/computed-fields",
"/docs/v6/orm/prisma-client/queries/custom-models", and
"/docs/v6/orm/prisma-client/queries/custom-validation" respectively, or if you
prefer not to change behavior now, add a clear TODO comment next to the existing
"/docs/orm/prisma-client/queries/crud" rules referencing the new v6 destinations
so this alignment is tracked for a follow-up.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/docs/vercel.json`:
- Line 1795: The redirect entries in vercel.json contain anchor fragments that
don't exist on the target MDX pages (e.g., the destination string
"/docs/orm/prisma-client/queries/aggregation-grouping-summarizing#select-distinct"),
so update either the redirects or the MDX headings: locate the redirect lines in
vercel.json and either remove or correct the fragment parts to match the actual
page URLs, or add matching heading slugs/explicit IDs in the target MDX files
(e.g., aggregation-grouping-summarizing.mdx, prisma-client-reference.mdx,
prisma-schema-reference.mdx, models.mdx, relations/index.mdx, sql-server.mdx,
cli/index.mdx, relation-queries.mdx) by renaming headings or adding HTML
anchors/MDX id attributes so each fragment like "#select-distinct", "#group-by",
"#prismaclient", etc. exactly matches the redirect fragment.

---

Nitpick comments:
In `@apps/docs/vercel.json`:
- Line 2989: The four existing redirect rules that map
"/docs/orm/prisma-client/queries/{case-sensitivity,computed-fields,custom-models,custom-validation}"
to the CRUD hub ("/docs/orm/prisma-client/queries/crud") should be aligned with
the new legacy redirects that point to
"/docs/v6/orm/prisma-client/queries/<topic>"; update those four entries so their
"destination" values match
"/docs/v6/orm/prisma-client/queries/case-sensitivity",
"/docs/v6/orm/prisma-client/queries/computed-fields",
"/docs/v6/orm/prisma-client/queries/custom-models", and
"/docs/v6/orm/prisma-client/queries/custom-validation" respectively, or if you
prefer not to change behavior now, add a clear TODO comment next to the existing
"/docs/orm/prisma-client/queries/crud" rules referencing the new v6 destinations
so this alignment is tracked for a follow-up.
🪄 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: 6c344b31-2c9a-4c2a-abc8-b61a73730207

📥 Commits

Reviewing files that changed from the base of the PR and between a49d98d and 8ce68ee.

📒 Files selected for processing (1)
  • apps/docs/vercel.json

Comment thread apps/docs/vercel.json
{
"source": "/docs/concepts/components/prisma-client/distinct",
"destination": "/docs/concepts/components/prisma-client/aggregation-grouping-summarizing#select-distinct",
"destination": "/docs/orm/prisma-client/queries/aggregation-grouping-summarizing#select-distinct",
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.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify that anchor slugs referenced by the new redirect destinations
# resolve to a heading on the target MDX page.

set -u

# Pairs of: <relative-mdx-glob> <expected-anchor-slug>
pairs=(
  "orm/prisma-client/queries/aggregation-grouping-summarizing"  "select-distinct"
  "orm/prisma-client/queries/aggregation-grouping-summarizing"  "group-by"
  "orm/reference/prisma-client-reference"                       "prismaclient"
  "orm/reference/prisma-client-reference"                       "utility-types"
  "orm/reference/prisma-schema-reference"                       "model-field-scalar-types"
  "orm/prisma-schema/data-model/models"                         "native-types-mapping"
  "orm/prisma-schema/data-model/models"                         "defining-a-unique-field"
  "orm/prisma-schema/data-model/relations"                      "relational-databases"
  "orm/core-concepts/supported-databases/sql-server"            "connection-details"
  "orm/core-concepts/supported-databases/sql-server"            "local-setup"
  "cli"                                                         "installation"
  "orm/prisma-client/queries/relation-queries"                  "filter-on-presence-of-related-records"
)

# Convert a heading line ("## Foo Bar (baz)") to a github-style slug.
slugify() {
  printf '%s' "$1" \
    | sed -E 's/^#+[[:space:]]*//' \
    | tr '[:upper:]' '[:lower:]' \
    | sed -E 's/[^a-z0-9[:space:]-]//g' \
    | sed -E 's/[[:space:]]+/-/g'
}

for ((i=0; i<${`#pairs`[@]}; i+=2)); do
  page="${pairs[i]}"
  anchor="${pairs[i+1]}"

  # Find the MDX file for this logical page.
  file="$(fd -t f -e mdx -e md . apps/docs/content/docs 2>/dev/null \
            | rg -F "/${page}." | head -n1)"
  if [[ -z "${file:-}" ]]; then
    file="$(fd -t f -e mdx -e md . apps/docs/content/docs 2>/dev/null \
              | rg -F "/${page}/index." | head -n1)"
  fi

  if [[ -z "${file:-}" ]]; then
    echo "MISSING PAGE: ${page} (anchor #${anchor})"
    continue
  fi

  # Collect every heading slug from the file.
  found=0
  while IFS= read -r line; do
    slug="$(slugify "$line")"
    if [[ "$slug" == "$anchor" ]]; then
      found=1; break
    fi
  done < <(rg -N '^#{1,6}[[:space:]]' "$file")

  if [[ "$found" -eq 1 ]]; then
    echo "OK:      ${page} #${anchor}"
  else
    echo "MISSING: ${page} #${anchor}  (file: ${file})"
  fi
done

Repository: prisma/web

Length of output: 2533


Anchor fragments in these redirect destinations don't exist on their target pages—all 12 will land users at the top of the page instead of the intended section.

The verification found that none of these heading anchors are present in the target MDX files:

  • aggregation-grouping-summarizing.mdx — missing #select-distinct, #group-by
  • prisma-client-reference.mdx — missing #prismaclient, #utility-types
  • prisma-schema-reference.mdx — missing #model-field-scalar-types
  • models.mdx — missing #native-types-mapping, #defining-a-unique-field
  • relations/index.mdx — missing #relational-databases
  • sql-server.mdx — missing #connection-details, #local-setup
  • cli/index.mdx — missing #installation
  • relation-queries.mdx — missing #filter-on-presence-of-related-records

This defeats the intent of the redirect—users get a 200 response but land in the wrong place. Either the heading slugs need to be renamed to match these anchors, or the redirect destinations need to be adjusted to match the actual page structure. This needs to be resolved before merge.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/docs/vercel.json` at line 1795, The redirect entries in vercel.json
contain anchor fragments that don't exist on the target MDX pages (e.g., the
destination string
"/docs/orm/prisma-client/queries/aggregation-grouping-summarizing#select-distinct"),
so update either the redirects or the MDX headings: locate the redirect lines in
vercel.json and either remove or correct the fragment parts to match the actual
page URLs, or add matching heading slugs/explicit IDs in the target MDX files
(e.g., aggregation-grouping-summarizing.mdx, prisma-client-reference.mdx,
prisma-schema-reference.mdx, models.mdx, relations/index.mdx, sql-server.mdx,
cli/index.mdx, relation-queries.mdx) by renaming headings or adding HTML
anchors/MDX id attributes so each fragment like "#select-distinct", "#group-by",
"#prismaclient", etc. exactly matches the redirect fragment.

Copy link
Copy Markdown
Contributor

@ArthurGamby ArthurGamby left a comment

Choose a reason for hiding this comment

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

QA two links also, it works. I checked the anchor issue pointed by CodeRabbit, it's a false alarm, it works.

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