Exclude static metadata and viewport from error recovery prerender when cache-components is enabled#94134
Exclude static metadata and viewport from error recovery prerender when cache-components is enabled#94134gnoff wants to merge 1 commit into
Conversation
Failing test suitesCommit: d058ed1 | About building and testing Next.js
Expand output● parallel-routes-and-interception › should not render the @children slot when the @slot is not found
Expand output● parallel-routes-and-interception › should not render the @children slot when the @slot is not found
Expand output● parallel-routes-and-interception › should not render the @children slot when the @slot is not found
Expand output● parallel-routes-and-interception › should not render the @children slot when the @slot is not found
Expand output● parallel-routes-and-interception › should not render the @children slot when the @slot is not found
Expand output● parallel-routes-and-interception › should not render the @children slot when the @slot is not found
Expand output● instant-nav-panel › transitions between capture types › should avoid showing stale SPA state when reloading from a captured SPA state into captured MPA state
Expand output● parallel-routes-and-interception › should not render the @children slot when the @slot is not found
Expand output● parallel-routes-and-interception › should not render the @children slot when the @slot is not found
Expand output● parallel-routes-and-interception › should not render the @children slot when the @slot is not found
Expand output● parallel-routes-and-interception › should not render the @children slot when the @slot is not found |
Stats cancelledCommit: d058ed1 |
unstubbable
left a comment
There was a problem hiding this comment.
Looks like the title assertion in test/e2e/app-dir/parallel-routes-not-found/parallel-routes-not-found.test.ts needs to be adjusted.
c34f326 to
bfa493b
Compare
…en cache-components is enabled These functions can be dynamic however in this mode we are trying to recover on the client so there is little point in attempting to resolve the http error recovery metadata since it might block us producing a shell. We now exclude these from the errore recovery RSC payload since we will recover the metadata on hydration in the browser.
bfa493b to
d058ed1
Compare
| const $ = await next.render$('/') | ||
| expect($('title').length).toBe(1) | ||
| expect($('title').text()).toBe('layout title') | ||
| expect($('title').length).toBe(0) |
There was a problem hiding this comment.
Good point — using a browser.eval() + retry() approach like the new cache-components test would work in both modes since the title will be present client-side regardless (either from SSR or from hydration recovery). Either approach fixes the issue; I'll defer to @gnoff on which feels more appropriate here.
These functions can be dynamic however in this mode we are trying to recover on the client so there is little point in attempting to resolve the http error recovery metadata since it might block us producing a shell. We now exclude these from the errore recovery RSC payload since we will recover the metadata on hydration in the browser.