Skip to content

Disable Cache Components by default for chat shell#1502

Open
garinyan wants to merge 1 commit into
vercel:mainfrom
garinyan:codex/disable-cache-components-default
Open

Disable Cache Components by default for chat shell#1502
garinyan wants to merge 1 commit into
vercel:mainfrom
garinyan:codex/disable-cache-components-default

Conversation

@garinyan
Copy link
Copy Markdown

@garinyan garinyan commented May 28, 2026

Fixes #1501.

Summary

This disables Cache Components / PPR by default for the chatbot template by removing:

  • cacheComponents: true
  • experimental.cachedNavigations: true

Root cause

In Next.js 16, cacheComponents: true opts the app into Cache Components / Partial Prerendering behavior, and experimental.cachedNavigations depends on that mode. The chat shell reads request-time data such as auth() and cookies(), so enabling PPR by default can cause a deployment to serve the homepage as a raw application/x-nextjs-pre-render payload rather than normal HTML. In that failure mode the request returns HTTP 200, but the page renders internal pre-render payload text instead of the chat UI.

This PR intentionally does not migrate the whole app to Cache Components/PPR. That would require a broader audit of request-time data access, Suspense boundaries, and cache semantics. The safer default for the template is to keep these experimental/PPR-related knobs off unless an app owner opts in explicitly.

Testing

  • pnpm check

I also attempted pnpm build locally, but this Codex macOS environment cannot load the Next.js native SWC binary due to a local code-signing issue:

Failed to load SWC binary for darwin/arm64

That failure happens while loading Next/SWC and is unrelated to this config diff.

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 28, 2026

@garinyan is attempting to deploy a commit to the Templates Test vtest314 Team on Vercel.

A member of the Team first needs to authorize it.

@garinyan
Copy link
Copy Markdown
Author

Follow-up status note: the code-related checks currently reported on this PR are passing. The two failing Vercel statuses are authorization gates for preview deployments from a fork:

  • Vercel – ai-chatbot: Authorization required to deploy
  • Vercel – chatbot: Authorization required to deploy

A member of the corresponding Vercel team will need to authorize those deployments before the preview checks can run.

@garinyan garinyan force-pushed the codex/disable-cache-components-default branch from 8dd0d97 to a16c38b Compare May 28, 2026 06:51
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.

Homepage can render raw pre-render payload when Cache Components are enabled

1 participant