rsnext/test/e2e/app-dir
Zack Tanner a4f46bc157
Fix empty white page with parallel routes + loading boundaries (#61597)
### What
When navigating to a page that uses a loading boundary + parallel route,
an empty white screen would be displayed rather than the loading state /
final state

### Why
With parallel routes, the RSC data is an array of data paths, each
corresponding with one of the parallel segments rendered on the page.

During the navigation event, when we iterate over this data, we call
`applyFlightData` with this data path & an empty cache node.
`applyFlightData` checks to see if the flight data contains cache nodes
("seed data"). If it doesn't, then that means it has no work to do, and
it bails out. Pre-PPR and in the case of having a `loading.js` file,
`walkTreeWithFlightRouterState` doesn't return any seed data, just
router state. This means that `applyFlightData` will not have any work
to do on the new cache node, and leaves it untouched.

Once `applyFlightData` is finished, but while still in the flight data
path loop, we reassign `currentCache` to the empty cache object we
created prior to `applyFlightData`. But since that cache node has
remained empty, the next iteration of the loop is going to be inspecting
a now empty cache, rather than the actual "current" cache. Now there's
no existing cache to copy into the new cache. The app now doesn't know
about any cache nodes.

### How
It doesn't seem like we should be re-assigning `currentCache` to the new
cache. In the context of a navigation, it seems more accurate to always
assume `currentCache` is the cache _now_, since it won't actually be
applied to the state until the action has finished (`mutable.cache` is
currently taking care of this).

Closes NEXT-2223
Fixes #61080
2024-02-12 16:30:52 -08:00
..
_allow-underscored-root-directory Add missing rootlayout to allow-underscored-root-directory test (#61137) 2024-01-25 12:40:40 +01:00
actions ensure server action errors notify rejection handlers (#61588) 2024-02-02 14:36:39 -08:00
actions-allowed-origins Change allowed forwarded hosts to be allowed origins for Server Actions (#58023) 2023-11-08 11:20:32 +01:00
actions-navigation fix loading issue when navigating to page with async metadata (#61687) 2024-02-06 07:10:53 -08:00
app conditionally send Next-URL in Vary response (#61794) 2024-02-09 09:57:23 -08:00
app-a11y Remove experimental config from create-next-app (#49241) 2023-05-05 00:22:28 -07:00
app-alias Alias nextjs api entry to esm version for app router (#59852) 2023-12-23 17:46:50 +01:00
app-basepath Ensure client filter with basePath is correct (#60580) 2024-01-12 20:55:56 +00:00
app-basepath-custom-server fix: redirect logic missing basePath in App Render (#60184) 2024-01-11 10:08:29 +00:00
app-client-cache app-router: tweak prefetch cache status heuristics (#53864) 2023-08-20 11:25:48 +00:00
app-compilation Add hasRedbox fix (#60522) 2024-01-15 09:36:44 +01:00
app-config-crossorigin fix(#53190): add missing crossOrigin to assetsPrefix resources (#56311) 2023-10-02 17:21:49 +00:00
app-css Turbopack: switch to a single client components entrypoint (#59352) 2023-12-08 08:24:08 +01:00
app-css-pageextensions Use consistent name for App Router tests (#56352) 2023-10-06 11:06:06 +02:00
app-custom-cache-handler Stabilize custom cache handlers and changing memory size. (#57953) 2024-01-17 23:42:52 +01:00
app-edge fix: next dev with edge runtime on windows (#56502) 2023-10-10 14:03:03 +00:00
app-edge-root-layout Fix static metadata routes runtime when root layout is in edge runtime (#50351) 2023-05-25 15:39:57 -07:00
app-esm-js Support next/og usage in ESM nextjs app (#60818) 2024-01-18 13:44:50 +01:00
app-external chore(test): switch a few tests from yarn to pnpm (#61793) 2024-02-09 15:11:52 +01:00
app-fetch-deduping dedupe pending revalidation requests (#58990) 2023-11-28 14:38:59 +00:00
app-invalid-revalidate Add unstable_cache validate test case (#59828) 2023-12-20 18:00:23 -06:00
app-middleware Use consistent name for App Router tests (#56352) 2023-10-06 11:06:06 +02:00
app-prefetch remove additional static prefetch code (#59313) 2023-12-05 21:29:23 -08:00
app-prefetch-false type check tests (and convert next-test-utils.js to ts) (#51071) 2023-06-23 17:42:50 +00:00
app-prefetch-false-loading chore: Fix multiple typos (#60531) 2024-01-11 10:44:55 -08:00
app-prefetch-static Reland static prefetches & fix prefetch bailout behavior (#56228) 2023-10-02 17:12:55 +00:00
app-rendering Remove experimental config from create-next-app (#49241) 2023-05-05 00:22:28 -07:00
app-routes route handlers: make req.cookies opt you into dynamic (#58769) 2023-11-22 14:29:01 +00:00
app-routes-subrequests fix: allow some recursion for middleware subrequests (#60615) 2024-02-06 18:00:29 +00:00
app-routes-trailing-slash Remove experimental config from create-next-app (#49241) 2023-05-05 00:22:28 -07:00
app-simple-routes Turbopack: add edge app routes (#53387) 2023-08-07 13:00:06 +02:00
app-static Stabilize custom cache handlers and changing memory size. (#57953) 2024-01-17 23:42:52 +01:00
app-validation Use consistent name for App Router tests (#56352) 2023-10-06 11:06:06 +02:00
asset-prefix Add new build and test workflow (#50436) 2023-05-27 21:02:31 -07:00
async-component-preload Remove experimental config from create-next-app (#49241) 2023-05-05 00:22:28 -07:00
autoscroll-with-css-modules Skip Babel tests for Turbopack (#56091) 2023-09-27 16:12:43 +02:00
back-button-download-bug chore(next/image)!: mark domains as deprecated in favor remotePatterns (#57062) 2023-10-19 20:24:48 +00:00
build-size Improve performance of String.prototype.split uses (#56746) 2023-10-19 00:25:15 +00:00
chunk-loading App Router - preinitialize chunks during SSR (#54752) 2023-10-03 21:40:25 +00:00
conflicting-page-segments fix parallel catch-all route normalization (#59791) 2023-12-22 09:30:23 -08:00
create-root-layout Skip create-root-layout for Turbopack (#61191) 2024-01-26 10:49:28 +01:00
crypto-globally-available Remove experimental config from create-next-app (#49241) 2023-05-05 00:22:28 -07:00
css-order partially fix css duplication in app dir (#61198) 2024-02-07 17:08:48 +01:00
draft-mode Allow next/headers in middleware & draftMode in edge runtime (#53465) 2023-08-02 20:22:35 +00:00
dynamic Fix next dynamic import named export from client components (#61378) 2024-01-31 14:50:20 +01:00
dynamic-data DX: add route context to the dynamic errors (#61332) 2024-01-29 17:35:01 +01:00
dynamic-href Add hasRedbox fix (#60522) 2024-01-15 09:36:44 +01:00
edge-route-catchall fix edge route catch-all param parsing (#59343) 2023-12-06 12:21:28 -08:00
edge-route-rewrite fix rewrites to edge routes (#58797) 2023-11-23 05:25:00 +00:00
edge-runtime-node-compatibility Update default moduleResolution in tsconfig.json from node to bundler (#51957) 2023-07-18 15:11:09 +00:00
emotion-js Fix emotion-js transform for server components (#54284) 2023-08-20 03:14:16 +00:00
error-boundary-navigation Fix root not-found page tree loader structure (#54080) 2023-08-16 15:10:08 +00:00
errors Associate server error digest with browser logged one (#61592) 2024-02-06 13:39:12 +01:00
externals Fix app-dir/externals for Turbopack (#61150) 2024-01-25 16:11:22 +01:00
front-redirect-issue Remove experimental config from create-next-app (#49241) 2023-05-05 00:22:28 -07:00
global-error Add hasRedbox fix (#60522) 2024-01-15 09:36:44 +01:00
headers-static-bailout Add docs page for uncaught DynamicServerErrors (#53402) 2023-08-08 12:49:53 +02:00
hello-world Bail out of 404 page when favicon.ico doesn't exist (#50795) 2023-06-06 10:58:40 +02:00
hooks Reapply "feat(app-router): introduce experimental.missingSuspenseWithCSRBailout flag" (#60508) (#60751) 2024-01-17 12:33:45 +01:00
i18n-hybrid Remove experimental config from create-next-app (#49241) 2023-05-05 00:22:28 -07:00
import Use consistent name for App Router tests (#56352) 2023-10-06 11:06:06 +02:00
interception-dynamic-segment fix interception routes with dynamic segments (#59273) 2023-12-05 08:47:40 -08:00
interception-middleware-rewrite fix behavior when revisiting an intercepted route (#59168) 2023-12-01 08:54:01 -08:00
interception-route-groups disable static generation on interception routes (#61004) 2024-01-22 16:33:39 -08:00
interception-route-prefetch-cache provide interception rewrites to edge runtime (#61414) 2024-02-09 10:30:58 -08:00
interception-routes-root-catchall fix parallel catch-all route normalization (#59791) 2023-12-22 09:30:23 -08:00
interoperability-with-pages improve error DX on pages with RSC build errors (#52843) 2023-07-20 00:32:57 +00:00
layout-params Remove experimental config from create-next-app (#49241) 2023-05-05 00:22:28 -07:00
logging Fix: respect init.cache if fetch input is request instance (#60821) 2024-01-18 17:54:36 +01:00
mdx Fix client reference proxies (#57301) 2023-10-24 00:24:22 +00:00
metadata Support generating multi-meta tahs for metadata api other prop (#59106) 2023-11-30 16:44:49 +01:00
metadata-dynamic-routes Fix sitemap generateSitemaps support for string id (#61088) 2024-01-24 16:52:52 +01:00
metadata-edge types: cover the tests with root tsconfig.json (#59550) 2023-12-13 11:55:02 +01:00
metadata-missing-metadata-base Polish unsupported metadata warning with doc link (#58750) 2023-11-23 05:42:20 +00:00
metadata-suspense Remove throw for unknown messages in hot-reloader-client (#57353) 2023-11-03 01:06:53 +00:00
missing-suspense-with-csr-bailout Add stack trace to client rendering bailout error (#61200) 2024-01-26 16:32:18 +01:00
mjs-as-extension Enable .mjs extension config in Turbopack (#58825) 2023-11-23 14:17:36 +00:00
modularizeimports Fix bugs with baseUrl and mdxRs (#58968) 2023-11-28 10:50:14 +01:00
navigation Navigation Signals in PPR (#60450) 2024-02-06 12:25:50 -07:00
next-config Avoid loading Next.js config again in render workers (#52587) 2023-07-12 11:21:05 +00:00
next-font Support resuming a complete HTML prerender that has dynamic flight data (#60865) 2024-02-12 15:59:13 -08:00
next-image Implement client_root for edge in Turbopack (#61024) 2024-01-23 18:41:02 +01:00
not-found Dynamic APIs (#60645) 2024-01-23 16:06:12 -08:00
not-found-default Reapply "feat(app-router): introduce experimental.missingSuspenseWithCSRBailout flag" (#60508) (#60751) 2024-01-17 12:33:45 +01:00
pages-to-app-routing Remove experimental config from create-next-app (#49241) 2023-05-05 00:22:28 -07:00
parallel-route-not-found log a dev warning when a missing parallel slot results in a 404 (#60186) 2024-01-04 07:56:20 -08:00
parallel-route-not-found-params Fix TypeError when using params in RootLayout with parallel routes (#60401) 2024-01-09 07:06:24 -08:00
parallel-routes-and-interception Fix empty white page with parallel routes + loading boundaries (#61597) 2024-02-12 16:30:52 -08:00
parallel-routes-and-interception-basepath Fix intercepted segments with basepath (#60485) 2024-01-10 13:18:00 -08:00
parallel-routes-catchall parallel routes: fix catch-all slots being treated as optional catch-all (#61174) 2024-01-30 15:28:47 -08:00
parallel-routes-catchall-children-slot parallel routes: fix @children slots (#60288) 2024-01-06 07:24:44 -08:00
parallel-routes-catchall-default fix parallel route top-level catch-all normalization logic to support nested explicit (non-catchall) slot routes (#60776) 2024-01-23 22:11:13 +00:00
parallel-routes-catchall-dynamic-segment fix parallel route top-level catch-all normalization logic to support nested explicit (non-catchall) slot routes (#60776) 2024-01-23 22:11:13 +00:00
parallel-routes-catchall-groups fix parallel catch-all route normalization (#59791) 2023-12-22 09:30:23 -08:00
parallel-routes-catchall-slotted-non-catchalls fix parallel route top-level catch-all normalization logic to support nested explicit (non-catchall) slot routes (#60776) 2024-01-23 22:11:13 +00:00
parallel-routes-layouts parallel routes: support multi-slot layouts (#61115) 2024-01-26 11:46:23 -08:00
parallel-routes-not-found Recover not found errors from flight data to render with proper boundary (#53703) 2023-08-12 08:41:47 +00:00
parallel-routes-revalidation Fix parallel routes with server actions / revalidating router cache (#59585) 2023-12-15 15:51:14 +00:00
parallel-routes-use-selected-layout-segment fix useSelectedLayoutSegment's support for parallel routes (#60912) 2024-01-23 15:53:45 -08:00
params-hooks-compat Enable missing suspense bailout by default (#60840) 2024-01-18 21:11:22 +01:00
ppr Refine logging message of experiments (#61337) 2024-01-29 20:02:46 +01:00
ppr-errors Support resuming a complete HTML prerender that has dynamic flight data (#60865) 2024-02-12 15:59:13 -08:00
ppr-full Support resuming a complete HTML prerender that has dynamic flight data (#60865) 2024-02-12 15:59:13 -08:00
ppr-navigations [PPR Nav] Fix flash of loading state during back/forward (#60578) 2024-01-12 14:18:54 -05:00
revalidate-dynamic revalidate APIs should make route handlers dynamic (#58466) 2023-11-16 11:57:55 +01:00
rewrites-redirects Remove experimental config from create-next-app (#49241) 2023-05-05 00:22:28 -07:00
root-layout Add hasRedbox fix (#60522) 2024-01-15 09:36:44 +01:00
root-layout-redirect Update default moduleResolution in tsconfig.json from node to bundler (#51957) 2023-07-18 15:11:09 +00:00
root-layout-render-once Ensure root layout only render once per request (#52589) 2023-07-13 17:34:31 +02:00
route-page-manifest-bug Remove experimental config from create-next-app (#49241) 2023-05-05 00:22:28 -07:00
router-autoscroll Fix scroll bailout logic when targeting fixed/sticky elements (#53873) 2023-08-15 13:31:39 +00:00
router-stuck-dynamic-static-segment Update default moduleResolution in tsconfig.json from node to bundler (#51957) 2023-07-18 15:11:09 +00:00
rsc-basic Update swc_core to v0.87.28 (#60876) 2024-01-24 08:05:05 +00:00
search-params-react-key Remove experimental config from create-next-app (#49241) 2023-05-05 00:22:28 -07:00
searchparams-static-bailout Update default moduleResolution in tsconfig.json from node to bundler (#51957) 2023-07-18 15:11:09 +00:00
server-actions-relative-redirect Remove the experimental serverActions flag (#57145) 2023-10-20 20:45:25 +00:00
set-cookies Fix mjs import for Turbopack test (#56354) 2023-10-03 13:33:04 +02:00
shallow-routing Enable missing suspense bailout by default (#60840) 2024-01-18 21:11:22 +01:00
similar-pages-paths Remove experimental config from create-next-app (#49241) 2023-05-05 00:22:28 -07:00
syntax-highlighter-crash Increase Rust stack size (#61809) 2024-02-08 10:59:50 +01:00
taint Expose Experimental Taint APIs (#56507) 2023-10-19 19:02:37 -07:00
test-template/{{ toFileName name }} Remove experimental config from create-next-app (#49241) 2023-05-05 00:22:28 -07:00
third-parties Fix third party typings (#59503) 2023-12-12 01:07:17 +01:00
trailingslash Add new build and test workflow (#50436) 2023-05-27 21:02:31 -07:00
turbopack-reports Turbopack issue report tests (#61845) 2024-02-10 12:59:31 +01:00
underscore-ignore-app-paths Update default moduleResolution in tsconfig.json from node to bundler (#51957) 2023-07-18 15:11:09 +00:00
use-params Make useSearchParams and useParams compatible between app and pages router (#55280) 2023-09-18 12:42:20 +00:00
use-selected-layout-segment-s chore: upgrade jest (#56909) 2023-10-19 17:38:24 +00:00
with-babel Update tests for Turbopack (#59354) 2023-12-07 15:03:44 +01:00
with-exported-function-config chore: upgrade jest (#56909) 2023-10-19 17:38:24 +00:00
x-forwarded-headers fix: set x-forwarded-host based on request (#58500) 2023-11-16 12:00:41 +01:00