Skip to content

fix(docs): add missing /docs prefix in doc actions menu URLs#1509

Open
skygig wants to merge 1 commit into
trycua:mainfrom
skygig:fix/docs-actions-menu-url
Open

fix(docs): add missing /docs prefix in doc actions menu URLs#1509
skygig wants to merge 1 commit into
trycua:mainfrom
skygig:fix/docs-actions-menu-url

Conversation

@skygig
Copy link
Copy Markdown

@skygig skygig commented May 13, 2026

Summary

The doc actions menu component (DocActionsMenu) was constructing URLs
without the /docs path segment, resulting in broken links.

Example (Quickstart page):

  • Before: https://cua.ai/cua/guide/get-started/quickstart?utm_source=cua.ai/docs
  • After: https://cua.ai/docs/cua/guide/get-started/quickstart?utm_source=cua.ai/docs

The root cause is that page.url from fumadocs (configured with baseUrl: '/')
returns paths like /cua/guide/... without the /docs prefix, but the live site
serves documentation under cua.ai/docs/....

Changes

docs/src/components/doc-actions-menu.tsx

Fixed 3 URL constructions that were missing the /docs prefix:

  • handleCopyMarkdown — fallback URL copied to clipboard on error
  • handleOpenChatGPT — URL sent to ChatGPT as context
  • handleOpenClaude — URL sent to Claude as context

This is consistent with how generateMetadata in page.tsx already constructs
the canonical URL: `https://cua.ai/docs${page.url}`

How I identified the issue:

image

Summary by CodeRabbit

  • Bug Fixes
    • Fixed URL path generation for documentation links used in copy functionality and ChatGPT/Claude integrations to ensure consistent and correct formatting across all sharing methods.

Review Change Stack

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 13, 2026

@skygig is attempting to deploy a commit to the Cua Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 13, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 00bd4fd0-a06f-4ee8-a789-d72b414696df

📥 Commits

Reviewing files that changed from the base of the PR and between 041916d and 1a71e63.

📒 Files selected for processing (1)
  • docs/src/components/doc-actions-menu.tsx

📝 Walkthrough

Walkthrough

DocActionsMenu now consistently forms downstream URLs with the /docs path segment in the base (https://cua.ai/docs${pageUrl}... instead of https://cua.ai${pageUrl}...). This change is applied uniformly across the markdown copy fallback and both the ChatGPT and Claude prompt/link handlers.

Changes

URL path consistency update

Layer / File(s) Summary
Add /docs path to all URL constructions
docs/src/components/doc-actions-menu.tsx
The base URL for copy-to-clipboard fallback, ChatGPT, and Claude handlers is updated to include /docs, ensuring consistent downstream routing across all URL-building paths in the component.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A path most proper, /docs in sight,
Three URLs fixed, all shining bright!
From copy to chat, the routing's true,
Consistency hops straight through and through! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 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 (4 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 main change: adding the missing '/docs' prefix to URLs in the DocActionsMenu component, which is the core fix addressing broken links.
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.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.

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.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

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