Skip to content

static params for the components - #71

Merged
eluce2 merged 1 commit into
mainfrom
08-24-static_params_for_the_components
Aug 25, 2025
Merged

static params for the components#71
eluce2 merged 1 commit into
mainfrom
08-24-static_params_for_the_components

Conversation

@eluce2

@eluce2 eluce2 commented Aug 25, 2025

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • New Features

    • Expanded documentation routing to include component pages and their meta pages, enabling direct deep links.
  • Performance

    • Pre-generates documentation routes for faster initial load times and improved SEO.
  • Reliability

    • Adds a graceful fallback to the root documentation page if route generation encounters an error.

@vercel

vercel Bot commented Aug 25, 2025

Copy link
Copy Markdown

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

Project Deployment Preview Updated (UTC)
proofkit-docs Canceled Canceled Aug 25, 2025 3:04am

eluce2 commented Aug 25, 2025

Copy link
Copy Markdown
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@eluce2
eluce2 marked this pull request as ready for review August 25, 2025 03:03
@eluce2
eluce2 merged commit 165bc9a into main Aug 25, 2025
4 of 6 checks passed
@pkg-pr-new

pkg-pr-new Bot commented Aug 25, 2025

Copy link
Copy Markdown

Open in StackBlitz

@proofkit/better-auth

pnpm add https://pkg.pr.new/proofgeist/proofkit/@proofkit/better-auth@71

@proofkit/cli

pnpm add https://pkg.pr.new/proofgeist/proofkit/@proofkit/cli@71

create-proofkit

pnpm add https://pkg.pr.new/proofgeist/proofkit/create-proofkit@71

@proofkit/fmdapi

pnpm add https://pkg.pr.new/proofgeist/proofkit/@proofkit/fmdapi@71

@proofkit/typegen

pnpm add https://pkg.pr.new/proofgeist/proofkit/@proofkit/typegen@71

@proofkit/webviewer

pnpm add https://pkg.pr.new/proofgeist/proofkit/@proofkit/webviewer@71

commit: 928dc30

@coderabbitai

coderabbitai Bot commented Aug 25, 2025

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

Walkthrough

Adds an import for getRegistryIndex and introduces generateStaticParams() to build static route parameters from the registry index, including root, per-component, and meta routes. Logs success or errors. On failure, returns only the root route. No changes to existing HTTP method handlers.

Changes

Cohort / File(s) Summary
Docs route static params
apps/docs/src/app/r/[[...name]]/route.ts
Added import getRegistryIndex from @proofkit/registry. Implemented export async function generateStaticParams() to fetch registry index, generate params for root, per-component, and meta routes, log results, and handle errors by returning root-only params. Existing HTTP method mappings unchanged.

Sequence Diagram(s)

sequenceDiagram
  participant Build as Next.js Build
  participant Route as route.ts (generateStaticParams)
  participant Registry as @proofkit/registry

  Build->>Route: generateStaticParams()
  alt Success
    Route->>Registry: getRegistryIndex()
    Registry-->>Route: index (list of items)
    Route-->>Build: params = [[], item.name.split("/"), ["meta", ...split]]
  else Error
    Route-->>Build: params = [[]] (root only)
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • 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 26b523c and 928dc30.

📒 Files selected for processing (1)
  • apps/docs/src/app/r/[[...name]]/route.ts (2 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 08-24-static_params_for_the_components

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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