Skip to content

App Router#425

Merged
mitchellh merged 9 commits intomainfrom
app-router
Feb 24, 2026
Merged

App Router#425
mitchellh merged 9 commits intomainfrom
app-router

Conversation

@mitchellh
Copy link
Contributor

It's obviously the future of Next, we should migrate to it. This was mostly done by AI with some manual cleanups. I'm still reviewing the full thing. There are obviously messy parts to this that I'm not happy with so continuing to clean it up.

@vercel
Copy link

vercel bot commented Feb 24, 2026

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

Project Deployment Actions Updated (UTC)
website Ready Ready Preview Feb 24, 2026 11:44pm

Request Review

Comment on lines +27 to +48
// loadDocsNavTreeData loads nav.json and contextualizes open/active nodes for a slug.
export async function loadDocsNavTreeData(
docsDirectory: string,
activePageSlug: string,
): Promise<NavTreeNode[]> {
const docsFilePath = `${docsDirectory}/nav.json`;
try {
const data = await fs.readFile(docsFilePath, "utf8");
const jsonData: NavFile = JSON.parse(data);
return contextualizeNavFile(jsonData, activePageSlug);
} catch (err) {
if (err instanceof SyntaxError) {
throw new Error(
`Failed to parse ${docsFilePath}:

${err.message}}`,
{ cause: err },
);
}
throw err;
}
}
Copy link

Choose a reason for hiding this comment

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

I believe this can be wrapped with React.cache and avoid I/O during build.
https://react.dev/reference/react/cache

{/* Don't render the content until the window width has been
calculated, else there will be a flash from the smallest size
of the terminal to the true calculated size */}
{windowWidth > 0 && (
Copy link

Choose a reason for hiding this comment

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

I might be wrong but this would be bad for SEO and LCP since one see nothing until hydration.Might be important if you ever want that YC money. But I suck at SEO so might want to double check me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the same logic we already have, so this is good to note to look into but shouldn't block this.

@mitchellh mitchellh merged commit ecc6fea into main Feb 24, 2026
5 checks passed
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