fix(docs): add missing /docs prefix in doc actions menu URLs#1509
fix(docs): add missing /docs prefix in doc actions menu URLs#1509skygig wants to merge 1 commit into
Conversation
|
@skygig is attempting to deploy a commit to the Cua Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthrough
ChangesURL path consistency update
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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. Comment |
Summary
The doc actions menu component (
DocActionsMenu) was constructing URLswithout the
/docspath segment, resulting in broken links.Example (Quickstart page):
https://cua.ai/cua/guide/get-started/quickstart?utm_source=cua.ai/docshttps://cua.ai/docs/cua/guide/get-started/quickstart?utm_source=cua.ai/docsThe root cause is that
page.urlfrom fumadocs (configured withbaseUrl: '/')returns paths like
/cua/guide/...without the/docsprefix, but the live siteserves documentation under
cua.ai/docs/....Changes
docs/src/components/doc-actions-menu.tsxFixed 3 URL constructions that were missing the
/docsprefix:handleCopyMarkdown— fallback URL copied to clipboard on errorhandleOpenChatGPT— URL sent to ChatGPT as contexthandleOpenClaude— URL sent to Claude as contextThis is consistent with how
generateMetadatainpage.tsxalready constructsthe canonical URL:
`https://cua.ai/docs${page.url}`How I identified the issue:
Summary by CodeRabbit