Skip to content

Conversation

SarahSoutoul
Copy link
Contributor

@SarahSoutoul SarahSoutoul commented Oct 10, 2025

Description

While working on hooks, I noticed a bug on the live site with the createOrganization return type for the useOrganizationList hook. Clicking on CreateOrganizationParams led to a 404. This PR fixes it.

Before:

Screen.Recording.2025-10-10.at.4.46.55.pm.mov

After:

Screen.Recording.2025-10-10.at.4.47.34.pm.mov

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

Summary by CodeRabbit

  • Documentation
    • Improved in-page linking for the “Create Organization Params” section, ensuring links navigate directly to the correct anchor within the page.
  • Bug Fixes
    • Resolved an issue where links to the “Create Organization Params” content could route to an incorrect or separate path; they now consistently point to the intended in-page section for smoother navigation and fewer dead ends.

@SarahSoutoul SarahSoutoul self-assigned this Oct 10, 2025
Copy link

changeset-bot bot commented Oct 10, 2025

⚠️ No Changeset found

Latest commit: 911c55c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Oct 10, 2025

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

Project Deployment Preview Comments Updated (UTC)
clerk-js-sandbox Ready Ready Preview Comment Oct 10, 2025 10:50pm

Copy link
Contributor

coderabbitai bot commented Oct 10, 2025

Walkthrough

A new link replacement entry was added to .typedoc/custom-plugin.mjs to map references to create-organization-params to the in-page anchor #create-organization-params within the relative link rewrite logic. No other logic or control flow was modified.

Changes

Cohort / File(s) Summary
TypeDoc custom plugin
.typedoc/custom-plugin.mjs
Added a LINK_REPLACEMENTS entry to rewrite links for create-organization-params to the in-page anchor #create-organization-params; no other changes.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant TypeDoc
    participant CustomPlugin
    participant LinkRewriter

    TypeDoc->>CustomPlugin: Process doc page
    CustomPlugin->>LinkRewriter: Rewrite relative links
    Note right of LinkRewriter: Check LINK_REPLACEMENTS map
    alt Match "create-organization-params"
        LinkRewriter-->>CustomPlugin: Replace with "#create-organization-params"
    else Other links
        LinkRewriter-->>CustomPlugin: Apply existing rules/leave as-is
    end
    CustomPlugin-->>TypeDoc: Return transformed content
Loading

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

I twitch my nose at docs so grand,
A tiny map, a careful hand—
One anchor hop, a tidy leap,
From path to page, the links now keep.
Thump-thump! I sign with paws so neat,
Another carrot-cleaned retreat. 🥕

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title concisely describes adding link replacements for a broken hash in the docs related to useOrganizationList references, which matches the changeset’s intent to fix outdated in-page anchors. It clearly signals the primary change without excessive details.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ss/fix-broken-link-use-organization-list-hook

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.

Copy link

pkg-pr-new bot commented Oct 10, 2025

Open in StackBlitz

@clerk/agent-toolkit

npm i https://pkg.pr.new/@clerk/agent-toolkit@6965

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@6965

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@6965

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@6965

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@6965

@clerk/dev-cli

npm i https://pkg.pr.new/@clerk/dev-cli@6965

@clerk/elements

npm i https://pkg.pr.new/@clerk/elements@6965

@clerk/clerk-expo

npm i https://pkg.pr.new/@clerk/clerk-expo@6965

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@6965

@clerk/express

npm i https://pkg.pr.new/@clerk/express@6965

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@6965

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@6965

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@6965

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@6965

@clerk/clerk-react

npm i https://pkg.pr.new/@clerk/clerk-react@6965

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@6965

@clerk/remix

npm i https://pkg.pr.new/@clerk/remix@6965

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@6965

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@6965

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@6965

@clerk/themes

npm i https://pkg.pr.new/@clerk/themes@6965

@clerk/types

npm i https://pkg.pr.new/@clerk/types@6965

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@6965

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@6965

commit: 911c55c

Copy link
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

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 0835ee7 and 911c55c.

📒 Files selected for processing (1)
  • .typedoc/custom-plugin.mjs (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
  • GitHub Check: Integration Tests (localhost, chrome)
  • GitHub Check: Integration Tests (sessions, chrome)
  • GitHub Check: Integration Tests (sessions:staging, chrome)
  • GitHub Check: Publish with pkg-pr-new
  • GitHub Check: Unit Tests (22, **)
  • GitHub Check: Unit Tests (18, --filter=@clerk/astro --filter=@clerk/backend --filter=@clerk/express --filter=@c...
  • GitHub Check: Static analysis
  • GitHub Check: Formatting | Dedupe | Changeset
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: Analyze (javascript-typescript)

['set-active-params', '/docs/reference/javascript/types/set-active-params'],
['clerk-paginated-response', '/docs/reference/javascript/types/clerk-paginated-response'],
['paginated-resources', '#paginated-resources'],
['create-organization-params', '#create-organization-params'],
Copy link
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

LGTM! Consistent with existing in-page anchor pattern.

The addition correctly maps create-organization-params to an in-page anchor, consistent with similar entries like paginated-resources (line 31) and public-organization-data-json (line 49). Since create-organization-params.mdx is also listed in FILES_WITHOUT_HEADINGS (line 17), using an in-page anchor is appropriate.

Verify that the #create-organization-params anchor exists on the target documentation page where this file will be embedded, to ensure links resolve correctly.


🏁 Script executed:

#!/bin/bash
# Description: Verify that create-organization-params.mdx is referenced and the anchor context is clear
# Search for files that might embed or reference create-organization-params

echo "=== Searching for references to create-organization-params ==="
rg -n --type=mdx -C3 'create-organization-params' || echo "No .mdx files found (checking other formats...)"

echo -e "\n=== Searching in JavaScript/TypeScript files ==="
rg -n --type=js --type=ts -C3 'create-organization-params'

echo -e "\n=== Checking for anchor usage in MDX files ==="
rg -n '#create-organization-params' || echo "No anchor references found"

Length of output: 263


🏁 Script executed:

#!/bin/bash
# Locate the MDX file and check for markdown headings (#) to confirm anchor generation

echo "=== Finding create-organization-params.mdx ==="
rg -l --glob '*create-organization-params.mdx' || echo "File not found"

echo -e "\n=== Checking for markdown headings in that file ==="
rg -n --glob '*create-organization-params.mdx' '^#+' || echo "No headings found"

Length of output: 678


🏁 Script executed:

#!/bin/bash
# Locate the MDX file
echo "=== Locating create-organization-params.mdx ==="
file=$(find . -type f -name 'create-organization-params.mdx')
if [ -z "$file" ]; then
  echo "File not found"
  exit 0
fi
echo "Found file: $file"

# Check for markdown headings to confirm anchor generation
echo -e "\n=== Checking for markdown headings in $file ==="
rg -n '^#+' "$file" || echo "No markdown headings found"

Length of output: 62


Invalid LINK_REPLACEMENTS entry: missing target file/anchor
No create-organization-params.mdx or corresponding #create-organization-params heading was found in the repo. Add the MDX file with the proper heading to generate this anchor, or remove/update this mapping.

🤖 Prompt for AI Agents
In .typedoc/custom-plugin.mjs around line 32, the LINK_REPLACEMENTS entry
"['create-organization-params', '#create-organization-params']" points to a
non-existent MDX anchor; either add a create-organization-params.mdx file
containing a heading with id or text that generates the
"#create-organization-params" anchor, or remove/update this mapping to reference
an existing MDX file/anchor; ensure the anchor name matches exactly (including
casing and hyphens) and regenerate docs to verify the link resolves.

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