Skip to content

feat(docs): various seo updates#7782

Merged
aidankmcalister merged 5 commits intomainfrom
fix/various-seo-updates
Apr 7, 2026
Merged

feat(docs): various seo updates#7782
aidankmcalister merged 5 commits intomainfrom
fix/various-seo-updates

Conversation

@aidankmcalister
Copy link
Copy Markdown
Member

@aidankmcalister aidankmcalister commented Apr 7, 2026

Summary by CodeRabbit

  • Documentation

    • Added comprehensive descriptions to Management API endpoint documentation for improved clarity and SEO
    • Enhanced structured data and metadata across API reference pages
    • Clarified documentation organization for Prisma v7 (current) and v6 (legacy)
  • Chores

    • Improved documentation generation with automated description processing
    • Enhanced sitemap configuration for better search engine crawling

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 7, 2026

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

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

Request Review

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

🍈 Lychee Link Check Report

0 links: ✅ 0 OK | 🚫 0 errors | 🔀 0 redirects | 👻 0 excluded

✅ All links are working!


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

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 7, 2026

Caution

Review failed

Pull request was closed or merged during review

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: d1e730f9-e9aa-4da5-95d2-c22dc2dd1825

📥 Commits

Reviewing files that changed from the base of the PR and between 512b239 and 5871eec.

📒 Files selected for processing (2)
  • apps/blog/src/app/(blog)/[slug]/page.tsx
  • packages/ui/src/components/json-ld.tsx

Walkthrough

This PR adds description frontmatter fields to 50+ Management API endpoint documentation files and simplifies metaDescription formatting from multi-line blocks to single-line strings. It updates the docs generation script to sanitize emoji from descriptions, enhances structured data generation with breadcrumb resolution and improved date handling, migrates JsonLd component imports to an external UI package, updates sitemap revalidation settings, and adds a documentation notice to the LLMs route.

Changes

Cohort / File(s) Summary
Experimental endpoint documentation
apps/docs/content/docs/management-api/endpoints/[experimental]/*
Added description frontmatter field and converted metaDescription from multi-line blocks to single-line strings across 19 experimental endpoint files (delete/get/post/patch compute services and versions). All changes are frontmatter-only.
Non-experimental endpoint documentation
apps/docs/content/docs/management-api/endpoints/{connections,database-backups,database-usage,databases-connections,databases,integrations,misc,projects,regions,workspaces}/*
Added description frontmatter field to 34 non-experimental endpoint files; one file (post-databases-by-target-database-id-restore.mdx) also reformatted metaDescription from multi-line to single-line. All changes are frontmatter-only.
Docs generation script
apps/docs/scripts/generate-docs.ts
Added stripEmoji helper to sanitize emoji and variation selector characters from generated operation descriptions, and introduced withDescriptionFirst to reorder frontmatter fields so description appears before other metadata. Updated beforeWrite logic to detect and write description changes.
Sitemap configuration
apps/docs/src/app/(docs)/sitemap.ts
Changed revalidation interval from false (no revalidation) to 3600 seconds, and introduced getPriority helper function to compute dynamic priority values based on page depth (1.0 for root, 0.8 for depth-1, 0.5 otherwise).
Structured data component enhancements
apps/docs/src/components/structured-data.tsx
Introduced DocsPage type alias for consistency; added breadcrumb section-title resolution by reading meta.json from disk with memoization caching; refactored breadcrumb path construction to use cumulative slug segments; enhanced TechArticleSchema date handling with toIsoDate helper; migrated both schemas from inline <script dangerouslySetInnerHTML> to <JsonLd> component rendering.
JsonLd component imports
apps/site/src/app/{events,layout,mcp,orm,studio}/page.tsx, apps/blog/src/app/(blog)/[slug]/page.tsx
Updated JsonLd import source from local @/components/json-ld to external @prisma-docs/ui/components/json-ld across 6 files. One blog file also replaced inline <script dangerouslySetInnerHTML> with <JsonLd> component.
UI component type refinement
packages/ui/src/components/json-ld.tsx
Narrowed JsonLdProps.data type from `Record<string, unknown>
LLMs route documentation
apps/docs/src/app/llms.txt/route.ts
Added a documentation notice block stating coverage of v7 (current) and v6 (legacy) with guidance to prefer the Latest section.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the primary focus: adding SEO metadata (descriptions and metaDescriptions) across 40+ API endpoint documentation pages.

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


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

@argos-ci
Copy link
Copy Markdown

argos-ci bot commented Apr 7, 2026

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

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - Apr 7, 2026, 8:02 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: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/docs/content/docs/management-api/endpoints/[experimental]/delete-compute-services-by-compute-service-id.mdx (1)

3-14: ⚠️ Potential issue | 🟠 Major

Inconsistent emoji handling between description and structuredData.contents.

The description field (line 3) strips the warning emoji: "Experimental endpoint: this API is in active development...", while structuredData.contents[0].content (lines 11-14) preserves it: "⚠️ Experimental endpoint...".

This inconsistency means different consumers of this metadata will see different formatting. Either both should include the emoji or both should strip it for consistency.

🔧 Align emoji handling across metadata fields

Option 1: Keep emoji in both (recommended for user-facing warning)

-description: 'Experimental endpoint: this API is in active development and may change at any time without notice. Deletes a compute service. All compute versions under the service must already be stopped or deleted.'
+description: '⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nDeletes a compute service. All compute versions under the service must already be stopped or deleted.'

Option 2: Strip emoji from both (for SEO/plain-text contexts)

       - content: |-
-          ⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️
+          Experimental endpoint: this API is in active development and may change at any time without notice.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/docs/content/docs/management-api/endpoints/`[experimental]/delete-compute-services-by-compute-service-id.mdx
around lines 3 - 14, The metadata is inconsistent: the description field and
structuredData.contents[0].content handle the warning emoji differently; update
them to match. Easiest fix is to add the warning emoji to the description string
(the description key) so it begins with "⚠️ Experimental endpoint..." to mirror
structuredData.contents[0].content; alternatively, remove the emoji from
structuredData.contents[0].content if you prefer plain-text—apply the same
change to both places (description and structuredData.contents[0].content) to
keep behavior consistent.
♻️ Duplicate comments (15)
apps/docs/content/docs/management-api/endpoints/database-backups/get-databases-by-database-id-backups.mdx (1)

1-22: ⚠️ Potential issue | 🔴 Critical

Critical: Manually editing auto-generated files will cause changes to be lost.

This file is marked as auto-generated (line 18), yet the PR manually adds the description field. These changes will be overwritten when the generation command runs again. The generation script should be the source of truth for these fields.

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

In
`@apps/docs/content/docs/management-api/endpoints/database-backups/get-databases-by-database-id-backups.mdx`
around lines 1 - 22, The file is auto-generated (note the generated-file banner)
but was manually edited to add the top-level description field; revert the
manual change by removing the added "description" key from this MDX so the file
matches the generator output, or better: update the generator that emits this
document to include the desired description so future regenerations preserve it
(look for the code that outputs the frontmatter/description and the
generated-file banner/APIPage usage).
apps/docs/content/docs/management-api/endpoints/connections/get-connections-by-id.mdx (1)

1-22: ⚠️ Potential issue | 🔴 Critical

Critical: Manually editing auto-generated files will cause changes to be lost.

This file is auto-generated and should not be edited directly (line 18). Manual changes will be lost on regeneration.

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

In
`@apps/docs/content/docs/management-api/endpoints/connections/get-connections-by-id.mdx`
around lines 1 - 22, This MDX file is auto-generated (notice near the
generated-file comment and the APIPage component) and has been manually edited;
revert any manual changes in this file and restore the original generated
content by re-running the docs generator (do not edit the generated file
directly), or if you need a permanent change modify the source
generator/template that emits this file (update the generator inputs rather than
editing this file), and remove the duplicate warning comment so only the
standard generated-file notice remains.
apps/docs/content/docs/management-api/endpoints/[experimental]/post-compute-services-versions-by-version-id-stop.mdx (2)

3-14: ⚠️ Potential issue | 🟠 Major

Inconsistent emoji handling between description and structuredData.contents.

The description field strips the warning emoji while structuredData.contents[0].content preserves it. This creates inconsistent metadata representations across different consumers.

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

In
`@apps/docs/content/docs/management-api/endpoints/`[experimental]/post-compute-services-versions-by-version-id-stop.mdx
around lines 3 - 14, The frontmatter is inconsistent: the description field
loses the warning emoji while structuredData.contents[0].content preserves it,
causing mismatched metadata; update either the description or
structuredData.contents[0].content so both include the same warning emoji
sequence (or both omit it) and keep the text identical; specifically change the
description string or the contents[0].content block so the emoji-prefixed
warning text matches exactly, ensuring consumers see consistent metadata for the
experimental endpoint.

1-27: ⚠️ Potential issue | 🔴 Critical

Critical: Manually editing auto-generated files will cause changes to be lost.

This file is auto-generated and should not be edited directly (line 21). Manual changes will be lost on regeneration.

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

In
`@apps/docs/content/docs/management-api/endpoints/`[experimental]/post-compute-services-versions-by-version-id-stop.mdx
around lines 1 - 27, The file contains a duplicated autogenerated-file warning:
the JSX/HTML comment block {/* This file was generated by Fumadocs. Do not edit
this file directly. Any changes should be made by running the generation command
again. */} and a separate plain-text warning paragraph ("Critical: Manually
editing auto-generated files will cause changes to be lost.") are redundant;
remove the duplicate by keeping a single canonical autogenerated-file notice
(prefer the JSX comment block around the top of the file) and delete the extra
plain-text warning paragraph so only one autogenerated-file warning remains;
look for the JSX comment and the "Critical: Manually editing auto-generated
files..." paragraph to locate and fix the duplication.
apps/docs/content/docs/management-api/endpoints/databases/delete-databases-by-database-id.mdx (1)

1-22: ⚠️ Potential issue | 🔴 Critical

Critical: Manually editing auto-generated files will cause changes to be lost.

This file is auto-generated and should not be edited directly (line 18). Manual changes will be lost on regeneration.

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

In
`@apps/docs/content/docs/management-api/endpoints/databases/delete-databases-by-database-id.mdx`
around lines 1 - 22, The file contains a duplicated "do not edit" warning: keep
the generated in-file notice (the JSX comment {/* This file was generated by
Fumadocs... */}) and remove the manual duplicate paragraph added below (the
reviewer-added "**Critical: Manually editing auto-generated files will cause
changes to be lost.**" block). Edit the MDX to delete the extra manual warning
paragraph so only the original generated notice remains; reference the existing
generated comment token to locate the correct spot to keep and remove the
duplicate.
apps/docs/content/docs/management-api/endpoints/[experimental]/delete-compute-services-by-compute-service-id.mdx (1)

1-27: ⚠️ Potential issue | 🔴 Critical

Critical: Manually editing auto-generated files will cause changes to be lost.

This file is auto-generated and should not be edited directly (line 21). Manual changes will be lost on regeneration.

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

In
`@apps/docs/content/docs/management-api/endpoints/`[experimental]/delete-compute-services-by-compute-service-id.mdx
around lines 1 - 27, The file contains a duplicated manual-edit warning ("This
file was generated by Fumadocs. Do not edit this file directly." and the
separate "**Critical: Manually editing auto-generated files will cause changes
to be lost.**" block); remove the extra human-facing duplicate so only the
single generated-file notice remains, leaving the autogenerated banner and the
<APIPage> usage intact; update the content so the warning text appears only once
(remove the "**Critical:...**" paragraph) or, if intended, move any necessary
guidance into the generator that emits the "This file was generated by
Fumadocs..." line to avoid manual edits in future.
apps/docs/content/docs/management-api/endpoints/regions/get-regions.mdx (1)

1-22: ⚠️ Potential issue | 🔴 Critical

Critical: Manually editing auto-generated files will cause changes to be lost.

This file is auto-generated and should not be edited directly (line 18). Manual changes will be lost on regeneration.

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

In `@apps/docs/content/docs/management-api/endpoints/regions/get-regions.mdx`
around lines 1 - 22, Remove the duplicate auto-generated warning by deleting the
manually added sentence "This file is auto-generated and should not be edited
directly (line 18)..." and keep only the single canonical generated comment (/*
This file was generated by Fumadocs. Do not edit this file directly. Any changes
should be made by running the generation command again. */) so the file contains
one authoritative message; update or re-run the generator if you need the
human-friendly note merged into the generator template instead of editing the
generated file.
apps/docs/content/docs/management-api/endpoints/projects/post-projects.mdx (1)

1-22: ⚠️ Potential issue | 🔴 Critical

Critical: Manually editing auto-generated files will cause changes to be lost.

This file is auto-generated and should not be edited directly (line 18). Manual changes will be lost on regeneration.

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

In `@apps/docs/content/docs/management-api/endpoints/projects/post-projects.mdx`
around lines 1 - 22, Remove the duplicated auto-generated-file warning by
deleting the plain-text paragraph that repeats the notice ("This file is
auto-generated and should not be edited directly...") and keep the existing JSX
comment node {/* This file was generated by Fumadocs. Do not edit this file
directly. Any changes should be made by running the generation command again.
*/} so there is a single authoritative generated-file notice; look for that
exact JSX comment text and the duplicate plain-text notice to remove the
redundancy.
apps/docs/content/docs/management-api/endpoints/connections/post-connections-by-id-rotate.mdx (1)

3-3: ⚠️ Potential issue | 🟠 Major

Same issue: manual edits will be overwritten by the generation script.

This file faces the same problem as get-regions-postgres.mdx. The description field added here contradicts the "do not edit directly" warning (line 18) and will be lost when generate-docs.ts runs next. Additionally, description is redundant alongside the existing metaDescription field.

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

In
`@apps/docs/content/docs/management-api/endpoints/connections/post-connections-by-id-rotate.mdx`
at line 3, The manually added frontmatter key "description" in
post-connections-by-id-rotate.mdx conflicts with the auto-generated docs and
duplicates the existing "metaDescription"; remove the "description" field so the
file only uses "metaDescription" and allow generate-docs.ts to manage
autogenerated frontmatter (verify the "do not edit directly" warning and that no
other manual frontmatter keys duplicate generator-controlled keys).
apps/docs/content/docs/management-api/endpoints/connections/delete-connections-by-id.mdx (1)

3-3: ⚠️ Potential issue | 🟠 Major

Same issue: manual edits to generated files.

Identical problem to the previous files—manually adding description to an auto-generated file contradicts the generation workflow and creates redundancy with metaDescription.

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

In
`@apps/docs/content/docs/management-api/endpoints/connections/delete-connections-by-id.mdx`
at line 3, This file has a manual frontmatter key "description" added to an
auto-generated page (apps/docs/.../delete-connections-by-id.mdx) which
duplicates the existing "metaDescription"; remove the manual "description" entry
from the generated MDX and instead update the docs generator/template that emits
metaDescription (or the source data used by the generator) so the desired
description is produced consistently—revert the change in
delete-connections-by-id.mdx and modify the generator/template or source model
that populates metaDescription to include the intended text.
apps/docs/content/docs/management-api/endpoints/[experimental]/get-projects-by-project-id-compute-services.mdx (1)

3-3: ⚠️ Potential issue | 🟠 Major

Same issue: manual metadata changes to generated file.

Both the description addition and metaDescription reformatting face the same problems noted in previous files. These manual edits will be overwritten on the next script run.

Also applies to: 18-18

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

In
`@apps/docs/content/docs/management-api/endpoints/`[experimental]/get-projects-by-project-id-compute-services.mdx
at line 3, The added frontmatter keys "description" and the reformatting of
"metaDescription" were applied directly to a generated MDX file and will be lost
on the next generation run; remove manual edits from this generated file and
instead update the source template or generator that produces the MDX (e.g., the
template/frontmatter generator that emits "description" and "metaDescription")
so the keys are injected consistently, or update the canonical source (where the
metadata is authored) to include the new description format; ensure no manual
changes remain in the generated artifact and run the generation script to verify
the changes persist.
apps/docs/content/docs/management-api/endpoints/[experimental]/patch-compute-services-by-compute-service-id.mdx (1)

3-3: ⚠️ Potential issue | 🟠 Major

Manual metadata changes should be generated automatically.

Both the new description field (line 3) and the reformatted metaDescription (line 18, converted from multi-line to single-line) appear to match what generate-docs.ts would produce via stripEmoji() and lineWidth: -1. However, the file comment (line 21) states not to edit directly.

If the script is now intended to generate these fields, simply re-run the generation command rather than manually editing. If the script isn't yet updated to produce these changes, update it first, then regenerate all files consistently.

Also applies to: 18-18

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

In
`@apps/docs/content/docs/management-api/endpoints/`[experimental]/patch-compute-services-by-compute-service-id.mdx
at line 3, The frontmatter fields "description" and "metaDescription" were
manually changed but should be produced by the docs generator; revert manual
edits and either (A) run the docs generation script to regenerate this file (use
generate-docs.ts which applies stripEmoji() and lineWidth: -1) or (B) if
generate-docs.ts doesn't yet emit these exact formats, update generate-docs.ts
(ensure it uses stripEmoji() and lineWidth: -1 for description/metaDescription)
and then re-run the generator to update all files consistently rather than
editing patch-compute-services-by-compute-service-id.mdx by hand.
apps/docs/content/docs/management-api/endpoints/[experimental]/delete-compute-services-versions-by-version-id.mdx (1)

3-3: ⚠️ Potential issue | 🟠 Major

Same issue: manual metadata changes to generated file.

Final file in this set—same problem as all the others. Manual edits to auto-generated frontmatter will be overwritten by the next script run.

Also applies to: 18-18

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

In
`@apps/docs/content/docs/management-api/endpoints/`[experimental]/delete-compute-services-versions-by-version-id.mdx
at line 3, The file contains a manual edit to the generated YAML frontmatter
(the description field) which will be overwritten by the generator; revert this
manual change and restore the frontmatter to the canonical generated form
(remove custom edits to the description key in the MDX frontmatter), then update
the source/template that produces this page so future generation preserves the
intended text; look for the YAML frontmatter block and the description property
in delete-compute-services-versions-by-version-id.mdx and remove the manual
modification so the generator-controlled content is used.
apps/docs/content/docs/management-api/endpoints/[experimental]/post-versions.mdx (1)

3-3: ⚠️ Potential issue | 🟠 Major

Same issue: manual metadata changes to generated file.

The added description field and reformatted metaDescription (including proper YAML apostrophe escaping in version''s) will be lost when the generation script runs next.

Also applies to: 18-18

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

In
`@apps/docs/content/docs/management-api/endpoints/`[experimental]/post-versions.mdx
at line 3, Revert the manual edits to the generated page (remove the added
description field and the manual metaDescription change) and instead update the
generator/template that produces this page so it emits the desired description
and properly escaped metaDescription (use YAML-safe escaping for the apostrophe,
i.e., two single quotes) during generation; ensure the generator accepts or
derives the description and metaDescription inputs and that regenerated files
preserve these fields rather than requiring manual edits.
apps/docs/content/docs/management-api/endpoints/[experimental]/delete-versions-by-version-id.mdx (1)

3-3: ⚠️ Potential issue | 🟠 Major

Same issue: manual metadata changes to generated file.

Identical pattern—manual description addition and metaDescription reformatting contradict the auto-generation workflow.

Also applies to: 18-18

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

In
`@apps/docs/content/docs/management-api/endpoints/`[experimental]/delete-versions-by-version-id.mdx
at line 3, Revert the manual edits to the generated MDX: remove the hand-written
description and the re-formatted metaDescription from
delete-versions-by-version-id.mdx so the file matches the auto-generated output;
do not manually change the YAML frontmatter fields named "description" or
"metaDescription" in generated docs—if different copy is required, update the
doc generator/template or source data instead of editing this generated file.
🧹 Nitpick comments (3)
apps/docs/content/docs/management-api/endpoints/database-backups/get-databases-by-database-id-backups.mdx (1)

8-14: The _openapi.structuredData property is not consumed.

The structured-data component generates JSON-LD schema using only page.data properties—specifically title, metaTitle, metaDescription, description, lastModified, and datePublished. The _openapi.structuredData.contents and headings values defined here are never referenced anywhere in the codebase. Consider removing this unused property to keep the metadata lean.

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

In
`@apps/docs/content/docs/management-api/endpoints/database-backups/get-databases-by-database-id-backups.mdx`
around lines 8 - 14, Remove the unused _openapi.structuredData property from the
document: delete the structuredData block (including headings and contents)
since the structured-data renderer only consumes page.data properties (title,
metaTitle, metaDescription, description, lastModified, datePublished); ensure no
other code references _openapi.structuredData, and rely on page.data for JSON-LD
generation instead.
apps/docs/content/docs/management-api/endpoints/databases/post-databases-by-target-database-id-restore.mdx (1)

3-3: Use plain text in metadata fields (avoid Markdown tokens).

description and metaDescription currently include **Destructive operation**. In metadata contexts, this is usually rendered as raw asterisks, not formatting.

Suggested metadata-only cleanup
-description: '**Destructive operation** — this immediately and irreversibly overwrites all data in the target database with the contents of the specified backup. Any data written since the backup was taken will be lost. Ensure you have a recent backup of the target database before proceeding. Replaces the data in an existing database from a backup. Connections and credentials are preserved — only the data layer is replaced.'
+description: 'Destructive operation — this immediately and irreversibly overwrites all data in the target database with the contents of the specified backup. Any data written since the backup was taken will be lost. Ensure you have a recent backup of the target database before proceeding. Replaces the data in an existing database from a backup. Connections and credentials are preserved — only the data layer is replaced.'

-metaDescription: 'Management API: **Destructive operation** — this immediately and irreversibly overwrites all data in the target database with the contents of the specified backup. Any data written since the backup was taken will be lost. Ensure you have a recent backup of the target database before proceeding. Replaces the data in an existing database from a backup. Connections and credentials are preserved — only the data layer is replaced.'
+metaDescription: 'Management API: Destructive operation — this immediately and irreversibly overwrites all data in the target database with the contents of the specified backup. Any data written since the backup was taken will be lost. Ensure you have a recent backup of the target database before proceeding. Replaces the data in an existing database from a backup. Connections and credentials are preserved — only the data layer is replaced.'

Also applies to: 18-18

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

In
`@apps/docs/content/docs/management-api/endpoints/databases/post-databases-by-target-database-id-restore.mdx`
at line 3, Update the metadata fields to use plain text (remove Markdown tokens)
so the description and metaDescription do not include '**' formatting; locate
the metadata entries named description and metaDescription in the
post-databases-by-target-database-id-restore document and replace occurrences of
"**Destructive operation**" with "Destructive operation" (or prefix with plain
text like "Destructive operation —") and ensure the rest of the metadata string
remains unchanged.
apps/docs/src/components/structured-data.tsx (1)

42-49: Don't swallow broken meta.json files.

Line 49's empty catch makes "missing file" indistinguishable from "invalid JSON" or other I/O failures. That quietly falls back to slug casing and can ship the wrong breadcrumb labels without surfacing the content problem.

Suggested guard
   for (const candidatePath of candidatePaths) {
     try {
       const meta = JSON.parse(readFileSync(candidatePath, 'utf8')) as { title?: string };
       if (typeof meta.title === 'string' && meta.title.trim().length > 0) {
         sectionTitleCache.set(cacheKey, meta.title);
         return meta.title;
       }
-    } catch {}
+    } catch (error) {
+      if ((error as NodeJS.ErrnoException).code !== 'ENOENT') {
+        throw error;
+      }
+    }
   }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/docs/src/components/structured-data.tsx` around lines 42 - 49, The empty
catch around reading/parsing candidatePaths' meta.json (the loop that reads meta
and sets sectionTitleCache using cacheKey) hides broken files; change the error
handling to only ignore file-not-found (ENOENT) while surfacing or logging other
errors (e.g., JSON.parse errors) so invalid JSON or I/O failures don't silently
fall back to slug casing: catch the error, if it is a missing-file error then
continue, otherwise log the error (including the file path and error message) or
rethrow so broken meta.json files are visible during review/runtime.
🤖 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/content/docs/management-api/endpoints/misc/get-regions-postgres.mdx`:
- Line 3: The PR added a manual description field to a generated file
(get-regions-postgres.mdx) which will be overwritten by the docs generator and
is redundant because metaDescription is already used (via metaDescription ??
description); either remove the manual description from get-regions-postgres.mdx
and rely on metaDescription, or update the generator (generate-docs.ts) to emit
description consistently (ensure the generation logic that computes
metaDescription/description in generate-docs.ts is updated so description is
produced automatically and kept in sync with metaDescription).

In `@apps/docs/seo-audit.md`:
- Around line 105-120: The JSON example has invalid URL syntax using angle
brackets; remove the angle brackets from the string values for "@context",
"url", and the "urlTemplate" inside the "potentialAction" so the example becomes
valid JSON (i.e., use "https://schema.org", "https://www.prisma.io/docs", and
"https://www.prisma.io/docs?q={search_term_string}" respectively) and ensure all
values remain proper JSON strings.
- Around line 175-188: In the Organization schema example JSON block (the
Organization "@type" example) remove the surrounding angle brackets from all URL
strings (e.g., "@context", "url", "logo", and every entry in "sameAs") so they
become plain URLs like https://...; update the JSON example in seo-audit.md
accordingly to ensure valid JSON-LD and correct schema.org formatting.

In `@apps/docs/src/components/structured-data.tsx`:
- Around line 119-128: The breadcrumb URL builder drops the "/v6" prefix by
reconstructing currentPath from page.slugs; update the logic that pushes into
breadcrumbItems (the block using currentPath, page.slugs, withDocsBasePath, and
baseUrl) to preserve the section prefix by deriving the path from page.url or by
prepending the appropriate section root (e.g., "/v6") when getSectionTitle
indicates v6 content; ensure item uses
`${baseUrl}${withDocsBasePath(preservedPath)}` so JSON-LD breadcrumbs on v6
pages include the /v6 segment.

---

Outside diff comments:
In
`@apps/docs/content/docs/management-api/endpoints/`[experimental]/delete-compute-services-by-compute-service-id.mdx:
- Around line 3-14: The metadata is inconsistent: the description field and
structuredData.contents[0].content handle the warning emoji differently; update
them to match. Easiest fix is to add the warning emoji to the description string
(the description key) so it begins with "⚠️ Experimental endpoint..." to mirror
structuredData.contents[0].content; alternatively, remove the emoji from
structuredData.contents[0].content if you prefer plain-text—apply the same
change to both places (description and structuredData.contents[0].content) to
keep behavior consistent.

---

Duplicate comments:
In
`@apps/docs/content/docs/management-api/endpoints/`[experimental]/delete-compute-services-by-compute-service-id.mdx:
- Around line 1-27: The file contains a duplicated manual-edit warning ("This
file was generated by Fumadocs. Do not edit this file directly." and the
separate "**Critical: Manually editing auto-generated files will cause changes
to be lost.**" block); remove the extra human-facing duplicate so only the
single generated-file notice remains, leaving the autogenerated banner and the
<APIPage> usage intact; update the content so the warning text appears only once
(remove the "**Critical:...**" paragraph) or, if intended, move any necessary
guidance into the generator that emits the "This file was generated by
Fumadocs..." line to avoid manual edits in future.

In
`@apps/docs/content/docs/management-api/endpoints/`[experimental]/delete-compute-services-versions-by-version-id.mdx:
- Line 3: The file contains a manual edit to the generated YAML frontmatter (the
description field) which will be overwritten by the generator; revert this
manual change and restore the frontmatter to the canonical generated form
(remove custom edits to the description key in the MDX frontmatter), then update
the source/template that produces this page so future generation preserves the
intended text; look for the YAML frontmatter block and the description property
in delete-compute-services-versions-by-version-id.mdx and remove the manual
modification so the generator-controlled content is used.

In
`@apps/docs/content/docs/management-api/endpoints/`[experimental]/delete-versions-by-version-id.mdx:
- Line 3: Revert the manual edits to the generated MDX: remove the hand-written
description and the re-formatted metaDescription from
delete-versions-by-version-id.mdx so the file matches the auto-generated output;
do not manually change the YAML frontmatter fields named "description" or
"metaDescription" in generated docs—if different copy is required, update the
doc generator/template or source data instead of editing this generated file.

In
`@apps/docs/content/docs/management-api/endpoints/`[experimental]/get-projects-by-project-id-compute-services.mdx:
- Line 3: The added frontmatter keys "description" and the reformatting of
"metaDescription" were applied directly to a generated MDX file and will be lost
on the next generation run; remove manual edits from this generated file and
instead update the source template or generator that produces the MDX (e.g., the
template/frontmatter generator that emits "description" and "metaDescription")
so the keys are injected consistently, or update the canonical source (where the
metadata is authored) to include the new description format; ensure no manual
changes remain in the generated artifact and run the generation script to verify
the changes persist.

In
`@apps/docs/content/docs/management-api/endpoints/`[experimental]/patch-compute-services-by-compute-service-id.mdx:
- Line 3: The frontmatter fields "description" and "metaDescription" were
manually changed but should be produced by the docs generator; revert manual
edits and either (A) run the docs generation script to regenerate this file (use
generate-docs.ts which applies stripEmoji() and lineWidth: -1) or (B) if
generate-docs.ts doesn't yet emit these exact formats, update generate-docs.ts
(ensure it uses stripEmoji() and lineWidth: -1 for description/metaDescription)
and then re-run the generator to update all files consistently rather than
editing patch-compute-services-by-compute-service-id.mdx by hand.

In
`@apps/docs/content/docs/management-api/endpoints/`[experimental]/post-compute-services-versions-by-version-id-stop.mdx:
- Around line 3-14: The frontmatter is inconsistent: the description field loses
the warning emoji while structuredData.contents[0].content preserves it, causing
mismatched metadata; update either the description or
structuredData.contents[0].content so both include the same warning emoji
sequence (or both omit it) and keep the text identical; specifically change the
description string or the contents[0].content block so the emoji-prefixed
warning text matches exactly, ensuring consumers see consistent metadata for the
experimental endpoint.
- Around line 1-27: The file contains a duplicated autogenerated-file warning:
the JSX/HTML comment block {/* This file was generated by Fumadocs. Do not edit
this file directly. Any changes should be made by running the generation command
again. */} and a separate plain-text warning paragraph ("Critical: Manually
editing auto-generated files will cause changes to be lost.") are redundant;
remove the duplicate by keeping a single canonical autogenerated-file notice
(prefer the JSX comment block around the top of the file) and delete the extra
plain-text warning paragraph so only one autogenerated-file warning remains;
look for the JSX comment and the "Critical: Manually editing auto-generated
files..." paragraph to locate and fix the duplication.

In
`@apps/docs/content/docs/management-api/endpoints/`[experimental]/post-versions.mdx:
- Line 3: Revert the manual edits to the generated page (remove the added
description field and the manual metaDescription change) and instead update the
generator/template that produces this page so it emits the desired description
and properly escaped metaDescription (use YAML-safe escaping for the apostrophe,
i.e., two single quotes) during generation; ensure the generator accepts or
derives the description and metaDescription inputs and that regenerated files
preserve these fields rather than requiring manual edits.

In
`@apps/docs/content/docs/management-api/endpoints/connections/delete-connections-by-id.mdx`:
- Line 3: This file has a manual frontmatter key "description" added to an
auto-generated page (apps/docs/.../delete-connections-by-id.mdx) which
duplicates the existing "metaDescription"; remove the manual "description" entry
from the generated MDX and instead update the docs generator/template that emits
metaDescription (or the source data used by the generator) so the desired
description is produced consistently—revert the change in
delete-connections-by-id.mdx and modify the generator/template or source model
that populates metaDescription to include the intended text.

In
`@apps/docs/content/docs/management-api/endpoints/connections/get-connections-by-id.mdx`:
- Around line 1-22: This MDX file is auto-generated (notice near the
generated-file comment and the APIPage component) and has been manually edited;
revert any manual changes in this file and restore the original generated
content by re-running the docs generator (do not edit the generated file
directly), or if you need a permanent change modify the source
generator/template that emits this file (update the generator inputs rather than
editing this file), and remove the duplicate warning comment so only the
standard generated-file notice remains.

In
`@apps/docs/content/docs/management-api/endpoints/connections/post-connections-by-id-rotate.mdx`:
- Line 3: The manually added frontmatter key "description" in
post-connections-by-id-rotate.mdx conflicts with the auto-generated docs and
duplicates the existing "metaDescription"; remove the "description" field so the
file only uses "metaDescription" and allow generate-docs.ts to manage
autogenerated frontmatter (verify the "do not edit directly" warning and that no
other manual frontmatter keys duplicate generator-controlled keys).

In
`@apps/docs/content/docs/management-api/endpoints/database-backups/get-databases-by-database-id-backups.mdx`:
- Around line 1-22: The file is auto-generated (note the generated-file banner)
but was manually edited to add the top-level description field; revert the
manual change by removing the added "description" key from this MDX so the file
matches the generator output, or better: update the generator that emits this
document to include the desired description so future regenerations preserve it
(look for the code that outputs the frontmatter/description and the
generated-file banner/APIPage usage).

In
`@apps/docs/content/docs/management-api/endpoints/databases/delete-databases-by-database-id.mdx`:
- Around line 1-22: The file contains a duplicated "do not edit" warning: keep
the generated in-file notice (the JSX comment {/* This file was generated by
Fumadocs... */}) and remove the manual duplicate paragraph added below (the
reviewer-added "**Critical: Manually editing auto-generated files will cause
changes to be lost.**" block). Edit the MDX to delete the extra manual warning
paragraph so only the original generated notice remains; reference the existing
generated comment token to locate the correct spot to keep and remove the
duplicate.

In `@apps/docs/content/docs/management-api/endpoints/projects/post-projects.mdx`:
- Around line 1-22: Remove the duplicated auto-generated-file warning by
deleting the plain-text paragraph that repeats the notice ("This file is
auto-generated and should not be edited directly...") and keep the existing JSX
comment node {/* This file was generated by Fumadocs. Do not edit this file
directly. Any changes should be made by running the generation command again.
*/} so there is a single authoritative generated-file notice; look for that
exact JSX comment text and the duplicate plain-text notice to remove the
redundancy.

In `@apps/docs/content/docs/management-api/endpoints/regions/get-regions.mdx`:
- Around line 1-22: Remove the duplicate auto-generated warning by deleting the
manually added sentence "This file is auto-generated and should not be edited
directly (line 18)..." and keep only the single canonical generated comment (/*
This file was generated by Fumadocs. Do not edit this file directly. Any changes
should be made by running the generation command again. */) so the file contains
one authoritative message; update or re-run the generator if you need the
human-friendly note merged into the generator template instead of editing the
generated file.

---

Nitpick comments:
In
`@apps/docs/content/docs/management-api/endpoints/database-backups/get-databases-by-database-id-backups.mdx`:
- Around line 8-14: Remove the unused _openapi.structuredData property from the
document: delete the structuredData block (including headings and contents)
since the structured-data renderer only consumes page.data properties (title,
metaTitle, metaDescription, description, lastModified, datePublished); ensure no
other code references _openapi.structuredData, and rely on page.data for JSON-LD
generation instead.

In
`@apps/docs/content/docs/management-api/endpoints/databases/post-databases-by-target-database-id-restore.mdx`:
- Line 3: Update the metadata fields to use plain text (remove Markdown tokens)
so the description and metaDescription do not include '**' formatting; locate
the metadata entries named description and metaDescription in the
post-databases-by-target-database-id-restore document and replace occurrences of
"**Destructive operation**" with "Destructive operation" (or prefix with plain
text like "Destructive operation —") and ensure the rest of the metadata string
remains unchanged.

In `@apps/docs/src/components/structured-data.tsx`:
- Around line 42-49: The empty catch around reading/parsing candidatePaths'
meta.json (the loop that reads meta and sets sectionTitleCache using cacheKey)
hides broken files; change the error handling to only ignore file-not-found
(ENOENT) while surfacing or logging other errors (e.g., JSON.parse errors) so
invalid JSON or I/O failures don't silently fall back to slug casing: catch the
error, if it is a missing-file error then continue, otherwise log the error
(including the file path and error message) or rethrow so broken meta.json files
are visible during review/runtime.
🪄 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: 0c1d45bd-e246-47de-8db3-d9418d49d1d3

📥 Commits

Reviewing files that changed from the base of the PR and between 73b5be5 and 4e5c385.

📒 Files selected for processing (58)
  • apps/docs/content/docs/management-api/endpoints/[experimental]/delete-compute-services-by-compute-service-id.mdx
  • apps/docs/content/docs/management-api/endpoints/[experimental]/delete-compute-services-versions-by-version-id.mdx
  • apps/docs/content/docs/management-api/endpoints/[experimental]/delete-versions-by-version-id.mdx
  • apps/docs/content/docs/management-api/endpoints/[experimental]/get-compute-services-by-compute-service-id-versions.mdx
  • apps/docs/content/docs/management-api/endpoints/[experimental]/get-compute-services-by-compute-service-id.mdx
  • apps/docs/content/docs/management-api/endpoints/[experimental]/get-compute-services-versions-by-version-id.mdx
  • apps/docs/content/docs/management-api/endpoints/[experimental]/get-compute-services.mdx
  • apps/docs/content/docs/management-api/endpoints/[experimental]/get-projects-by-project-id-compute-services.mdx
  • apps/docs/content/docs/management-api/endpoints/[experimental]/get-versions-by-version-id.mdx
  • apps/docs/content/docs/management-api/endpoints/[experimental]/get-versions.mdx
  • apps/docs/content/docs/management-api/endpoints/[experimental]/patch-compute-services-by-compute-service-id.mdx
  • apps/docs/content/docs/management-api/endpoints/[experimental]/post-compute-services-by-compute-service-id-promote.mdx
  • apps/docs/content/docs/management-api/endpoints/[experimental]/post-compute-services-by-compute-service-id-versions.mdx
  • apps/docs/content/docs/management-api/endpoints/[experimental]/post-compute-services-versions-by-version-id-start.mdx
  • apps/docs/content/docs/management-api/endpoints/[experimental]/post-compute-services-versions-by-version-id-stop.mdx
  • apps/docs/content/docs/management-api/endpoints/[experimental]/post-compute-services.mdx
  • apps/docs/content/docs/management-api/endpoints/[experimental]/post-projects-by-project-id-compute-services.mdx
  • apps/docs/content/docs/management-api/endpoints/[experimental]/post-versions-by-version-id-start.mdx
  • apps/docs/content/docs/management-api/endpoints/[experimental]/post-versions-by-version-id-stop.mdx
  • apps/docs/content/docs/management-api/endpoints/[experimental]/post-versions.mdx
  • apps/docs/content/docs/management-api/endpoints/connections/delete-connections-by-id.mdx
  • apps/docs/content/docs/management-api/endpoints/connections/get-connections-by-id.mdx
  • apps/docs/content/docs/management-api/endpoints/connections/get-connections.mdx
  • apps/docs/content/docs/management-api/endpoints/connections/post-connections-by-id-rotate.mdx
  • apps/docs/content/docs/management-api/endpoints/connections/post-connections.mdx
  • apps/docs/content/docs/management-api/endpoints/database-backups/get-databases-by-database-id-backups.mdx
  • apps/docs/content/docs/management-api/endpoints/database-usage/get-databases-by-database-id-usage.mdx
  • apps/docs/content/docs/management-api/endpoints/databases-connections/get-databases-by-database-id-connections.mdx
  • apps/docs/content/docs/management-api/endpoints/databases-connections/post-databases-by-database-id-connections.mdx
  • apps/docs/content/docs/management-api/endpoints/databases/delete-databases-by-database-id.mdx
  • apps/docs/content/docs/management-api/endpoints/databases/get-databases-by-database-id.mdx
  • apps/docs/content/docs/management-api/endpoints/databases/get-databases.mdx
  • apps/docs/content/docs/management-api/endpoints/databases/get-projects-by-project-id-databases.mdx
  • apps/docs/content/docs/management-api/endpoints/databases/patch-databases-by-database-id.mdx
  • apps/docs/content/docs/management-api/endpoints/databases/post-databases-by-target-database-id-restore.mdx
  • apps/docs/content/docs/management-api/endpoints/databases/post-databases.mdx
  • apps/docs/content/docs/management-api/endpoints/databases/post-projects-by-project-id-databases.mdx
  • apps/docs/content/docs/management-api/endpoints/integrations/delete-integrations-by-id.mdx
  • apps/docs/content/docs/management-api/endpoints/integrations/delete-workspaces-by-workspace-id-integrations-by-client-id.mdx
  • apps/docs/content/docs/management-api/endpoints/integrations/get-integrations-by-id.mdx
  • apps/docs/content/docs/management-api/endpoints/integrations/get-integrations.mdx
  • apps/docs/content/docs/management-api/endpoints/integrations/get-workspaces-by-workspace-id-integrations.mdx
  • apps/docs/content/docs/management-api/endpoints/misc/get-regions-accelerate.mdx
  • apps/docs/content/docs/management-api/endpoints/misc/get-regions-postgres.mdx
  • apps/docs/content/docs/management-api/endpoints/projects/delete-projects-by-id.mdx
  • apps/docs/content/docs/management-api/endpoints/projects/get-projects-by-id.mdx
  • apps/docs/content/docs/management-api/endpoints/projects/get-projects.mdx
  • apps/docs/content/docs/management-api/endpoints/projects/patch-projects-by-id.mdx
  • apps/docs/content/docs/management-api/endpoints/projects/post-projects-by-id-transfer.mdx
  • apps/docs/content/docs/management-api/endpoints/projects/post-projects.mdx
  • apps/docs/content/docs/management-api/endpoints/regions/get-regions.mdx
  • apps/docs/content/docs/management-api/endpoints/workspaces/get-workspaces-by-id.mdx
  • apps/docs/content/docs/management-api/endpoints/workspaces/get-workspaces.mdx
  • apps/docs/scripts/generate-docs.ts
  • apps/docs/seo-audit.md
  • apps/docs/src/app/(docs)/sitemap.ts
  • apps/docs/src/app/llms.txt/route.ts
  • apps/docs/src/components/structured-data.tsx

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.

♻️ Duplicate comments (1)
apps/docs/src/components/structured-data.tsx (1)

117-128: ⚠️ Potential issue | 🟠 Major

Breadcrumb URLs still drop the /v6 prefix for versioned docs.

The currentPath is constructed from page.slugs alone, which doesn't include the version prefix. For pages under /v6/*, the generated JSON-LD breadcrumb items will link to incorrect URLs (e.g., /getting-started instead of /v6/getting-started).

This was flagged in a previous review and appears unresolved. The getContentDirectory function already detects v6 pages—you can derive the prefix similarly here.

Suggested fix
 export function BreadcrumbSchema({ page }: StructuredDataProps) {
   const baseUrl = getBaseUrl();
+  const versionPrefix = page.url.startsWith('/v6') ? '/v6' : '';
   const breadcrumbItems = [
     {
       '@type': 'ListItem',
       position: 1,
       name: 'Home',
       item: baseUrl,
     },
   ];

   let currentPath = '';
   page.slugs.forEach((_, index) => {
     const slugs = page.slugs.slice(0, index + 1);
-    currentPath = `/${slugs.join('/')}`;
+    currentPath = `${versionPrefix}/${slugs.join('/')}`;

     breadcrumbItems.push({
       '@type': 'ListItem',
       position: index + 2,
       name: getBreadcrumbName(page, slugs, index),
       item: `${baseUrl}${withDocsBasePath(currentPath)}`,
     });
   });
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/docs/src/components/structured-data.tsx` around lines 117 - 128,
Breadcrumb URLs omit the version prefix because currentPath is built from
page.slugs only; fix by detecting the content directory (use
getContentDirectory(page.filePath)) to determine a version prefix (e.g., '/v6'
when it returns 'v6') and prepend that prefix to currentPath (or to the item
URL) before calling withDocsBasePath/baseUrl so breadcrumbItems entries use the
full versioned path; update the loop that builds currentPath/breadcrumbItems
(references: currentPath, page.slugs, breadcrumbItems, getContentDirectory,
withDocsBasePath, baseUrl, getBreadcrumbName) accordingly.
🧹 Nitpick comments (3)
apps/docs/src/components/structured-data.tsx (3)

70-71: Type assertions bypass compile-time safety.

The repeated (page.data as { ... }) and (page.data as any) casts suggest the DocsPage type doesn't fully reflect the frontmatter schema. If these fields (lastModified, datePublished, metaTitle, metaDescription) are expected on all doc pages, consider extending the type definitions in your source configuration so TypeScript can validate their presence.

Not a blocking issue, but it would catch typos and missing fields at build time rather than producing silent undefined values.

Also applies to: 76-77

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

In `@apps/docs/src/components/structured-data.tsx` around lines 70 - 71, The file
uses repeated unsafe type assertions on page.data (e.g., lastModified,
datePublished, metaTitle, metaDescription) which bypass TypeScript checks;
update the DocsPage/frontmatter type definition used throughout the docs source
configuration to include these optional or required fields (lastModified?:
Date|string, datePublished?: Date|string, metaTitle?: string, metaDescription?:
string) so page.data is correctly typed, then remove the (page.data as {...})
and (page.data as any) casts in structured-data.tsx (references: lastModified,
datePublished, metaTitle, metaDescription, page.data, DocsPage) so the compiler
enforces presence and catches typos at build time.

14-14: Module-level cache persists across requests in long-running servers.

The sectionTitleCache Map will accumulate entries for the lifetime of the Node.js process. In a typical Next.js deployment this is fine since the content set is bounded, but be aware that in development with hot-reloading or if content paths change frequently, stale entries won't be evicted.

For now this is acceptable given the bounded nature of documentation paths—just something to keep in mind if you ever see unexpected breadcrumb titles after content changes.

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

In `@apps/docs/src/components/structured-data.tsx` at line 14, The module-level
Map sectionTitleCache persists for the lifetime of the Node process and can
accumulate stale entries across hot-reloads or changing content; fix by either
making the cache request-scoped (move sectionTitleCache into the function that
computes titles), adding an eviction strategy (size limit or TTL) for
sectionTitleCache, or explicitly clearing it during development HMR (hook into
module.hot.accept to call sectionTitleCache.clear()); pick one approach and
implement it near the sectionTitleCache declaration so the cache won't return
stale breadcrumb titles.

43-50: Synchronous filesystem reads during render.

readFileSync is blocking and executes on every uncached breadcrumb lookup during SSR. Once the cache warms up this is mitigated, but cold starts will block the event loop while reading meta.json files.

This is acceptable for documentation sites with predictable traffic patterns, but if you notice SSR latency spikes, consider moving to async reads with caching at build time or during generateStaticParams.

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

In `@apps/docs/src/components/structured-data.tsx` around lines 43 - 50, The code
is doing synchronous reads during render using readFileSync inside the loop over
candidatePaths which blocks SSR on cold cache; change this to an async approach
and/or pre-warm the cache: replace readFileSync with fs.promises.readFile (or
another async loader) and make the calling code async so the JSON read/parse
awaits, then populate sectionTitleCache.set(cacheKey, meta.title) before
returning; alternatively, move these metadata reads into build-time logic (e.g.,
generateStaticParams or a build script) to populate sectionTitleCache ahead of
SSR and ensure the caller no longer performs blocking I/O during render.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@apps/docs/src/components/structured-data.tsx`:
- Around line 117-128: Breadcrumb URLs omit the version prefix because
currentPath is built from page.slugs only; fix by detecting the content
directory (use getContentDirectory(page.filePath)) to determine a version prefix
(e.g., '/v6' when it returns 'v6') and prepend that prefix to currentPath (or to
the item URL) before calling withDocsBasePath/baseUrl so breadcrumbItems entries
use the full versioned path; update the loop that builds
currentPath/breadcrumbItems (references: currentPath, page.slugs,
breadcrumbItems, getContentDirectory, withDocsBasePath, baseUrl,
getBreadcrumbName) accordingly.

---

Nitpick comments:
In `@apps/docs/src/components/structured-data.tsx`:
- Around line 70-71: The file uses repeated unsafe type assertions on page.data
(e.g., lastModified, datePublished, metaTitle, metaDescription) which bypass
TypeScript checks; update the DocsPage/frontmatter type definition used
throughout the docs source configuration to include these optional or required
fields (lastModified?: Date|string, datePublished?: Date|string, metaTitle?:
string, metaDescription?: string) so page.data is correctly typed, then remove
the (page.data as {...}) and (page.data as any) casts in structured-data.tsx
(references: lastModified, datePublished, metaTitle, metaDescription, page.data,
DocsPage) so the compiler enforces presence and catches typos at build time.
- Line 14: The module-level Map sectionTitleCache persists for the lifetime of
the Node process and can accumulate stale entries across hot-reloads or changing
content; fix by either making the cache request-scoped (move sectionTitleCache
into the function that computes titles), adding an eviction strategy (size limit
or TTL) for sectionTitleCache, or explicitly clearing it during development HMR
(hook into module.hot.accept to call sectionTitleCache.clear()); pick one
approach and implement it near the sectionTitleCache declaration so the cache
won't return stale breadcrumb titles.
- Around line 43-50: The code is doing synchronous reads during render using
readFileSync inside the loop over candidatePaths which blocks SSR on cold cache;
change this to an async approach and/or pre-warm the cache: replace readFileSync
with fs.promises.readFile (or another async loader) and make the calling code
async so the JSON read/parse awaits, then populate
sectionTitleCache.set(cacheKey, meta.title) before returning; alternatively,
move these metadata reads into build-time logic (e.g., generateStaticParams or a
build script) to populate sectionTitleCache ahead of SSR and ensure the caller
no longer performs blocking I/O during render.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e837eab5-8c29-47d1-b6d1-bf46008dcf12

📥 Commits

Reviewing files that changed from the base of the PR and between 4e5c385 and 512b239.

📒 Files selected for processing (8)
  • apps/docs/src/components/structured-data.tsx
  • apps/site/src/app/events/page.tsx
  • apps/site/src/app/layout.tsx
  • apps/site/src/app/mcp/page.tsx
  • apps/site/src/app/orm/page.tsx
  • apps/site/src/app/pricing/page.tsx
  • apps/site/src/app/studio/page.tsx
  • packages/ui/src/components/json-ld.tsx
✅ Files skipped from review due to trivial changes (2)
  • apps/site/src/app/events/page.tsx
  • apps/site/src/app/orm/page.tsx

Made-with: Cursor

# Conflicts:
#	apps/site/src/app/pricing/page.tsx
mhartington
mhartington previously approved these changes Apr 7, 2026
@aidankmcalister aidankmcalister merged commit 7b361ca into main Apr 7, 2026
13 of 16 checks passed
@aidankmcalister aidankmcalister deleted the fix/various-seo-updates branch April 7, 2026 19:56
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.

2 participants