Skip to content

feat: pass dynamic segments from page types to getPageBySlug for dynamic routing support - #687

Merged
surajair merged 3 commits into
devfrom
fix-dynamic-pages-not-working-in-live-mode
Feb 5, 2026
Merged

surajair merged 3 commits into
devfrom
fix-dynamic-pages-not-working-in-live-mode

Conversation

@surajair

@surajair surajair commented Feb 5, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings February 5, 2026 11:14
@vercel

vercel Bot commented Feb 5, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
sdk Ready Ready Preview, Comment Feb 5, 2026 11:35am

Request Review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for passing dynamic segments from page types to the getPageBySlug function to enable dynamic routing. The implementation collects dynamic segment patterns from registered page types and passes them to the page resolution logic for matching dynamic routes.

Changes:

  • Modified getPageBySlug to accept a required dynamicSegments parameter instead of an optional one with a default empty object
  • Updated ChaiBuilder.getPageBySlug to collect dynamic segments from registered page types and pass them to the underlying getPageBySlug function
  • Fixed a comment to accurately describe the segment extraction logic

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
frameworks/nextjs/package/lib/get-page-by-slug.ts Made dynamicSegments parameter required, removed like import (bug), and corrected comment about segment extraction
frameworks/nextjs/package/ChaiBuilder.ts Added logic to collect dynamic segments from page types and pass them to getPageBySlug

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@surajair
surajair merged commit 207e573 into dev Feb 5, 2026
1 check passed
@surajair
surajair deleted the fix-dynamic-pages-not-working-in-live-mode branch February 5, 2026 11:34
surajair added a commit that referenced this pull request Feb 5, 2026

This branch was successfully deployed

1 active deployment
Preview — 21dc37ff Deployed Feb 5, 2026 by vercel[bot]
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