Skip to content

fix: add /docs prefix to ViewOptions markdownUrl#7580

Merged
AmanVarshney01 merged 1 commit intomainfrom
fix/view-options-markdown-url
Mar 3, 2026
Merged

fix: add /docs prefix to ViewOptions markdownUrl#7580
AmanVarshney01 merged 1 commit intomainfrom
fix/view-options-markdown-url

Conversation

@AmanVarshney01
Copy link
Member

@AmanVarshney01 AmanVarshney01 commented Mar 3, 2026

Summary

  • The "Open in ChatGPT/Claude/T3 Chat" buttons in the ViewOptions dropdown were generating incorrect URLs missing the /docs/ base path (e.g. https://www.prisma.io/prisma-orm/quickstart/prisma-postgres.mdx instead of https://www.prisma.io/docs/prisma-orm/quickstart/prisma-postgres.mdx)
  • Wrapped page.url with withDocsBasePath() in both the v7 and v6 page components, matching what LLMCopyButton already does

Summary by CodeRabbit

Release Notes

  • Bug Fixes
    • Fixed markdown URL resolution in documentation pages to correctly include the docs base path and file extension, ensuring consistent URL handling across the documentation site.

The "Open in ChatGPT/Claude/T3 Chat" buttons were generating incorrect
URLs missing the /docs/ base path. For example, the URL was
https://www.prisma.io/prisma-orm/quickstart/prisma-postgres.mdx instead
of https://www.prisma.io/docs/prisma-orm/quickstart/prisma-postgres.mdx.

Wrap page.url with withDocsBasePath() in both v7 and v6 page components,
matching what LLMCopyButton already does.
@vercel
Copy link

vercel bot commented Mar 3, 2026

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

Project Deployment Actions Updated (UTC)
blog Building Building Preview, Comment Mar 3, 2026 9:02am
docs Building Building Preview, Comment Mar 3, 2026 9:02am
eclipse Building Building Preview, Comment Mar 3, 2026 9:02am

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 3, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 23f1198 and edbd761.

📒 Files selected for processing (2)
  • apps/docs/src/app/(docs)/(default)/[[...slug]]/page.tsx
  • apps/docs/src/app/(docs)/v6/[[...slug]]/page.tsx

Walkthrough

Both page components update the markdownUrl prop in ViewOptions to apply withDocsBasePath and ensure consistent .mdx file extension usage for markdown URL resolution.

Changes

Cohort / File(s) Summary
ViewOptions Markdown URL Updates
apps/docs/src/app/(docs)/(default)/[[...slug]]/page.tsx, apps/docs/src/app/(docs)/v6/[[...slug]]/page.tsx
Both files update the markdownUrl prop to include the docs base path via withDocsBasePath() and standardize the .mdx extension, replacing direct page.url references.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 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 'fix: add /docs prefix to ViewOptions markdownUrl' directly and specifically describes the main change—adding the /docs prefix to the markdownUrl parameter in ViewOptions components across two pages.

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

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


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

@argos-ci
Copy link

argos-ci bot commented Mar 3, 2026

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

Build Status Details Updated (UTC)
default (Inspect) ⚠️ Changes detected (Review) 1 removed Mar 3, 2026, 9:12 AM

@AmanVarshney01 AmanVarshney01 merged commit 24f64cb into main Mar 3, 2026
9 of 13 checks passed
@AmanVarshney01 AmanVarshney01 deleted the fix/view-options-markdown-url branch March 3, 2026 10:25
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.

1 participant