next.js
0b3ce7b8 - fix: respect `htmlLimitedBots` in cache components without buffering the full response (#96367)

Commit
46 days ago
fix: respect `htmlLimitedBots` in cache components without buffering the full response (#96367) ## Summary DOM-capable crawlers can consume streamed metadata, but with cacheComponents enabled, it treated them like HTML-limited bots and forced a full dynamic render. This meant capable crawlers could not use the prerendered shell even when they were not matched by `htmlLimitedBots`. This change lets DOM-capable crawlers follow the normal PPR shell and streaming-metadata path. `htmlLimitedBots` remains the source of truth for requests that need blocking metadata, including when a custom pattern explicitly matches a DOM-capable crawler. ## Test Plan Tests were added that contained a Suspense boundary that intentionally never resolves. The test reads the response stream until it receives the fallback, then verifies that blocking metadata has already been emitted while the unresolved page content has not. A fully buffered response would never return, so this avoids relying on timing or arbitrary delays. This PR is stacked on #96366.
Author
Parents
Loading