Skip to content

Conversation

@tom-sherman
Copy link
Contributor

No description provided.

@vercel vercel bot temporarily deployed to Preview – atproto-browser December 22, 2025 13:19 Inactive
@vercel vercel bot temporarily deployed to Preview – frontpage-oauth-preview-client December 22, 2025 13:19 Inactive
@vercel
Copy link

vercel bot commented Dec 22, 2025

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

Project Deployment Review Updated (UTC)
atproto-browser Ready Ready Preview, Comment Dec 22, 2025 1:50pm
frontpage Ready Ready Preview, Comment Dec 22, 2025 1:50pm
2 Skipped Deployments
Project Deployment Review Updated (UTC)
frontpage-oauth-preview-client Skipped Skipped Dec 22, 2025 1:50pm
unravel Skipped Skipped Dec 22, 2025 1:50pm

@vercel vercel bot temporarily deployed to Preview – frontpage-oauth-preview-client December 22, 2025 13:34 Inactive
@vercel vercel bot temporarily deployed to Preview – atproto-browser December 22, 2025 13:34 Inactive
@vercel vercel bot temporarily deployed to Preview – unravel December 22, 2025 13:34 Inactive
@vercel vercel bot temporarily deployed to Preview – frontpage-oauth-preview-client December 22, 2025 13:42 Inactive
@vercel vercel bot temporarily deployed to Preview – unravel December 22, 2025 13:42 Inactive
@vercel vercel bot temporarily deployed to Preview – atproto-browser December 22, 2025 13:42 Inactive
Copy link
Contributor

Copilot AI left a comment

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 refactors page and layout components to use Next.js 16's type generation feature, replacing manual type definitions with auto-generated PageProps, LayoutProps, and RouteContext types. The changes introduce a typegen task in the build pipeline and update component signatures to leverage these generated types for improved type safety and consistency.

Key changes:

  • Added next typegen script and turbo task configuration to generate types in .next/types/**
  • Replaced inline type definitions with PageProps<route> and LayoutProps<route> for pages and layouts
  • Updated route handlers to use RouteContext<route> for better type inference
  • Fixed searchParams handling in /post/new to properly handle string | string[] | undefined types

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
turbo.json Added typegen task that generates types before type-checking and linting
packages/frontpage/package.json Added typegen script that runs next typegen
packages/frontpage/app/(auth)/login/page.tsx Replaced manual searchParams type with PageProps<"/login">
packages/frontpage/app/(app)/profile/[user]/page.tsx Updated page and generateMetadata to use PageProps<"/profile/[user]">
packages/frontpage/app/(app)/post/new/page.tsx Updated to use PageProps<"/post/new"> and added proper handling for searchParams that can be string or string[]
packages/frontpage/app/(app)/post/[postAuthor]/[postRkey]/page.tsx Updated page and generateMetadata to use PageProps<"/post/[postAuthor]/[postRkey]">
packages/frontpage/app/(app)/post/[postAuthor]/[postRkey]/og-image/route.tsx Replaced manual Params type with RouteContext<route>
packages/frontpage/app/(app)/post/[postAuthor]/[postRkey]/layout.tsx Updated layout to use LayoutProps<"/post/[postAuthor]/[postRkey]">
packages/frontpage/app/(app)/post/[postAuthor]/[postRkey]/_lib/page-data.tsx Derived PostPageParams from PageProps params for type consistency
packages/frontpage/app/(app)/post/[postAuthor]/[postRkey]/[commentAuthor]/[commentRkey]/page.tsx Updated page and generateMetadata to use PageProps<route>
packages/frontpage/app/(app)/post/[postAuthor]/[postRkey]/[commentAuthor]/[commentRkey]/og-image/route.tsx Updated to use RouteContext<route> and removed unused CommentPageParams import
packages/frontpage/app/(app)/post/[postAuthor]/[postRkey]/[commentAuthor]/[commentRkey]/_lib/page-data.tsx Derived CommentPageParams from PageProps params for type consistency

@tom-sherman tom-sherman merged commit 62f7417 into main Dec 22, 2025
19 of 20 checks passed
@tom-sherman tom-sherman deleted the pageprops-refactor branch December 22, 2025 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants